summaryrefslogtreecommitdiffstats
path: root/kviewshell/renderedDocumentPage.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-02 19:23:46 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-02 19:23:46 +0000
commiteba47f8f0637f451e21348187591e1f1fd58ac74 (patch)
tree448f10b95c656604acc331a3236c1e59bde5c1ad /kviewshell/renderedDocumentPage.cpp
parentc7e8736c69373f48b0401319757c742e8607431a (diff)
downloadtdegraphics-eba47f8f0637f451e21348187591e1f1fd58ac74.tar.gz
tdegraphics-eba47f8f0637f451e21348187591e1f1fd58ac74.zip
TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1158446 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kviewshell/renderedDocumentPage.cpp')
-rw-r--r--kviewshell/renderedDocumentPage.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/kviewshell/renderedDocumentPage.cpp b/kviewshell/renderedDocumentPage.cpp
index c5f0d361..1d535bc5 100644
--- a/kviewshell/renderedDocumentPage.cpp
+++ b/kviewshell/renderedDocumentPage.cpp
@@ -21,7 +21,7 @@ RenderedDocumentPage::RenderedDocumentPage()
textBoxList.reserve(250);
pageNr = 0;
isEmpty = true;
- pageText = QString::null;
+ pageText = TQString::null;
}
@@ -46,23 +46,23 @@ void RenderedDocumentPage::clear()
textBoxList.clear();
hyperLinkList.clear();
- pageText = QString::null;
+ pageText = TQString::null;
isEmpty = true;
}
-QRegion RenderedDocumentPage::selectedRegion(const TextSelection& selection)
+TQRegion RenderedDocumentPage::selectedRegion(const TextSelection& selection)
{
if (selection.isEmpty() || selection.getPageNumber() != pageNr)
- return QRegion();
+ return TQRegion();
int startIndex = selection.getSelectedTextStart();
int endIndex = selection.getSelectedTextEnd();
- QValueVector<QRect> wordBox;
+ TQValueVector<TQRect> wordBox;
- QRect currentWordBox;
+ TQRect currentWordBox;
//unsigned int currentBaseline = 0;
// Merge character boxes into boxes containing complete words.
@@ -93,12 +93,12 @@ QRegion RenderedDocumentPage::selectedRegion(const TextSelection& selection)
// we still need to store the last word
wordBox.push_back(currentWordBox);
- QValueVector<QRect> lineBox;
+ TQValueVector<TQRect> lineBox;
// Merge word boxes into boxes containing whole lines.
// We start a new line if we encounter a wordbox which does not
// vertically overlap which the current lineBox.
- QRect currentLineBox;
+ TQRect currentLineBox;
for (unsigned int i = 0; i < wordBox.size(); i++)
{
@@ -143,17 +143,17 @@ QRegion RenderedDocumentPage::selectedRegion(const TextSelection& selection)
}
// Add the lineboxes to a Region
- QRegion selectedRegion;
+ TQRegion selectedRegion;
for (unsigned int i = 0; i < lineBox.size(); i++)
{
- selectedRegion += QRegion(lineBox[i]);
+ selectedRegion += TQRegion(lineBox[i]);
}
return selectedRegion;
}
-TextSelection RenderedDocumentPage::select(const QRect& selectedRectangle)
+TextSelection RenderedDocumentPage::select(const TQRect& selectedRectangle)
{
int selectedTextStart = -1;
int selectedTextEnd = -1;
@@ -172,7 +172,7 @@ TextSelection RenderedDocumentPage::select(const QRect& selectedRectangle)
TextSelection selection;
- QString selectedText;
+ TQString selectedText;
if (selectedTextStart != -1)
{
@@ -187,7 +187,7 @@ TextSelection RenderedDocumentPage::select(const QRect& selectedRectangle)
return selection;
}
-TextSelection RenderedDocumentPage::select(const QPoint& point)
+TextSelection RenderedDocumentPage::select(const TQPoint& point)
{
int selectedTextStart = -1;
int selectedTextEnd = -1;
@@ -204,7 +204,7 @@ TextSelection RenderedDocumentPage::select(const QPoint& point)
TextSelection selection;
- QString selectedText;
+ TQString selectedText;
if (selectedTextStart != -1)
{
@@ -216,12 +216,12 @@ TextSelection RenderedDocumentPage::select(const QPoint& point)
return selection;
}
-TextSelection RenderedDocumentPage::find(const QString& str, int index, bool caseSensitive)
+TextSelection RenderedDocumentPage::find(const TQString& str, int index, bool caseSensitive)
{
if (pageText.isNull())
{
// Create the pageText by joining all entries of textBoxList.
- for (QValueVector<TextBox>::Iterator i = textBoxList.begin(); i != textBoxList.end(); i++)
+ for (TQValueVector<TextBox>::Iterator i = textBoxList.begin(); i != textBoxList.end(); i++)
{
pageText = pageText + i->text;
}
@@ -291,7 +291,7 @@ TextSelection RenderedDocumentPage::find(const QString& str, int index, bool cas
}
-TextSelection RenderedDocumentPage::findRev(const QString& str, int index, bool caseSensitive)
+TextSelection RenderedDocumentPage::findRev(const TQString& str, int index, bool caseSensitive)
{
// Negative index means we start the search at the end of the text.
if (index < 0)
@@ -302,7 +302,7 @@ TextSelection RenderedDocumentPage::findRev(const QString& str, int index, bool
if (pageText.isNull())
{
// Create the pageText by joining all entries of textBoxList.
- for (QValueVector<TextBox>::Iterator i = textBoxList.begin(); i != textBoxList.end(); i++)
+ for (TQValueVector<TextBox>::Iterator i = textBoxList.begin(); i != textBoxList.end(); i++)
{
pageText = pageText + i->text;
}