summaryrefslogtreecommitdiffstats
path: root/src/kchmtreeviewitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kchmtreeviewitem.cpp')
-rw-r--r--src/kchmtreeviewitem.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/src/kchmtreeviewitem.cpp b/src/kchmtreeviewitem.cpp
index 7a82a39..5b1a530 100644
--- a/src/kchmtreeviewitem.cpp
+++ b/src/kchmtreeviewitem.cpp
@@ -19,8 +19,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <qstringlist.h>
-#include <qstyle.h>
+#include <tqstringlist.h>
+#include <tqstyle.h>
#include "kchmtreeviewitem.h"
#include "kchmmainwindow.h"
@@ -28,16 +28,16 @@
#include "iconstorage.h"
-KCHMIndTocItem::KCHMIndTocItem( QListViewItem * parent, QListViewItem * after, QString name, QString aurl, int image) : QListViewItem(parent, after, name), url(aurl), image_number(image)
+KCHMIndTocItem::KCHMIndTocItem( TQListViewItem * tqparent, TQListViewItem * after, TQString name, TQString aurl, int image) : TQListViewItem(tqparent, after, name), url(aurl), image_number(image)
{
}
-KCHMIndTocItem::KCHMIndTocItem( QListView * parent, QListViewItem * after, QString name, QString aurl, int image) : QListViewItem(parent, after, name), url(aurl), image_number(image)
+KCHMIndTocItem::KCHMIndTocItem( TQListView * tqparent, TQListViewItem * after, TQString name, TQString aurl, int image) : TQListViewItem(tqparent, after, name), url(aurl), image_number(image)
{
}
-const QPixmap * KCHMIndTocItem::pixmap( int i ) const
+const TQPixmap * KCHMIndTocItem::pixmap( int i ) const
{
int imagenum;
@@ -58,24 +58,24 @@ const QPixmap * KCHMIndTocItem::pixmap( int i ) const
}
-QString KCHMIndTocItem::getUrl( ) const
+TQString KCHMIndTocItem::getUrl( ) const
{
- if ( url.find ('|') == -1 )
+ if ( url.tqfind ('|') == -1 )
return url;
// Create a dialog with URLs, and show it, so user can select an URL he/she wants.
- QStringList urls = QStringList::split ('|', url);
- QStringList titles;
+ TQStringList urls = TQStringList::split ('|', url);
+ TQStringList titles;
LCHMFile * xchm = ::mainWindow->chmFile();
for ( unsigned int i = 0; i < urls.size(); i++ )
{
- QString title = xchm->getTopicByUrl (urls[i]);
+ TQString title = xchm->getTopicByUrl (urls[i]);
if ( !title )
{
qWarning ("Could not get item name for url '%s'", urls[i].ascii());
- titles.push_back(QString::null);
+ titles.push_back(TQString());
}
else
titles.push_back(title);
@@ -83,62 +83,62 @@ QString KCHMIndTocItem::getUrl( ) const
KCHMDialogChooseUrlFromList dlg (urls, titles, ::mainWindow);
- if ( dlg.exec() == QDialog::Accepted )
+ if ( dlg.exec() == TQDialog::Accepted )
return dlg.getSelectedItemUrl();
- return QString::null;
+ return TQString();
}
-void KCHMIndTocItem::paintBranches( QPainter * p, const QColorGroup & cg, int w, int y, int h )
+void KCHMIndTocItem::paintBranches( TQPainter * p, const TQColorGroup & cg, int w, int y, int h )
{
if ( image_number != LCHMBookIcons::IMAGE_INDEX )
- QListViewItem::paintBranches(p, cg, w, y, h);
+ TQListViewItem::paintBranches(p, cg, w, y, h);
else
{
- // Too bad that listView()->paintEmptyArea( p, QRect( 0, 0, w, h ) ) is protected.
+ // Too bad that listView()->paintEmptyArea( p, TQRect( 0, 0, w, h ) ) is protected.
// Taken from qt-x11-free-3.0.4/src/widgets/qlistview.cpp
- QStyleOption opt( 0, 0 );
- QStyle::SFlags how = QStyle::Style_Default | QStyle::Style_Enabled;
+ TQStyleOption opt( 0, 0 );
+ TQStyle::SFlags how = TQStyle::Style_Default | TQStyle::Style_Enabled;
- listView()->style().drawComplexControl( QStyle::CC_ListView,
- p, listView(), QRect( 0, 0, w, h ), cg,
- how, QStyle::SC_ListView, QStyle::SC_None,
+ listView()->tqstyle().tqdrawComplexControl( TQStyle::CC_ListView,
+ p, listView(), TQRect( 0, 0, w, h ), cg,
+ how, TQStyle::SC_ListView, TQStyle::SC_None,
opt );
}
}
-void KCHMIndTocItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align )
+void KCHMIndTocItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align )
{
- QColorGroup newcg ( cg );
- QColor c = newcg.text();
+ TQColorGroup newcg ( cg );
+ TQColor c = newcg.text();
- if ( url.find ('|') != -1 )
- newcg.setColor( QColorGroup::Text, Qt::red );
+ if ( url.tqfind ('|') != -1 )
+ newcg.setColor( TQColorGroup::Text, TQt::red );
else if ( url[0] == ':' )
- newcg.setColor( QColorGroup::Text, Qt::lightGray );
+ newcg.setColor( TQColorGroup::Text, TQt::lightGray );
else
{
- QListViewItem::paintCell( p, cg, column, width, align );
+ TQListViewItem::paintCell( p, cg, column, width, align );
return;
}
- QListViewItem::paintCell( p, newcg, column, width, align );
- newcg.setColor( QColorGroup::Text, c );
+ TQListViewItem::paintCell( p, newcg, column, width, align );
+ newcg.setColor( TQColorGroup::Text, c );
}
void KCHMIndTocItem::setOpen( bool open )
{
if ( image_number != LCHMBookIcons::IMAGE_INDEX || open )
- QListViewItem::setOpen (open);
+ TQListViewItem::setOpen (open);
}
-void kchmFillListViewWithParsedData( QListView * list, const QValueVector< LCHMParsedEntry >& data, QMap<QString, KCHMIndTocItem*> * map )
+void kchmFillListViewWithParsedData( TQListView * list, const TQValueVector< LCHMParsedEntry >& data, TQMap<TQString, KCHMIndTocItem*> * map )
{
- QValueVector< KCHMIndTocItem *> lastchild;
- QValueVector< KCHMIndTocItem *> rootentry;
+ TQValueVector< KCHMIndTocItem *> lastchild;
+ TQValueVector< KCHMIndTocItem *> rootentry;
if ( map )
map->clear();
@@ -161,7 +161,7 @@ void kchmFillListViewWithParsedData( QListView * list, const QValueVector< LCHMP
// Create the node
KCHMIndTocItem * item;
- QString url = data[i].urls.join ("|");
+ TQString url = data[i].urls.join ("|");
if ( indent == 0 )
item = new KCHMIndTocItem( list, lastchild[indent], data[i].name, url, data[i].imageid );
@@ -202,7 +202,7 @@ void kchmFillListViewWithParsedData( QListView * list, const QValueVector< LCHMP
}
int real_indent = indent - root_indent_offset;
- QString url = urls.join ("|");
+ TQString url = urls.join ("|");
if ( real_indent == 0 )
{
@@ -241,7 +241,7 @@ void kchmFillListViewWithParsedData( QListView * list, const QValueVector< LCHMP
qDebug ("CHMFile::ParseAndFillTopicsTree: <object> tag is parsed, but both name and url are empty.");
}
- name = QString::null;
+ name = TQString();
urls.clear();
in_object = false;
imagenum = defaultimagenum;