diff options
Diffstat (limited to 'starter')
-rw-r--r-- | starter/baghiralinkdrag.cpp | 56 | ||||
-rw-r--r-- | starter/baghiralinkdrag.h | 16 | ||||
-rw-r--r-- | starter/config.ui | 44 | ||||
-rw-r--r-- | starter/help.ui | 6 | ||||
-rw-r--r-- | starter/linkconfig.ui | 16 | ||||
-rw-r--r-- | starter/menu.cpp | 720 | ||||
-rw-r--r-- | starter/menu.h | 226 | ||||
-rw-r--r-- | starter/mykey.h | 36 | ||||
-rw-r--r-- | starter/starter.cpp | 130 | ||||
-rw-r--r-- | starter/starter.h | 32 | ||||
-rw-r--r-- | starter/starterconfig.ui | 92 | ||||
-rw-r--r-- | starter/starterhelp.ui | 16 |
12 files changed, 695 insertions, 695 deletions
diff --git a/starter/baghiralinkdrag.cpp b/starter/baghiralinkdrag.cpp index 9c54011..a6ee43a 100644 --- a/starter/baghiralinkdrag.cpp +++ b/starter/baghiralinkdrag.cpp @@ -1,4 +1,4 @@ -#include <qbuffer.h> +#include <tqbuffer.h> #include "baghiralinkdrag.h" static bool _accepted; @@ -6,36 +6,36 @@ static bool _accepted; #define _TLO_ 0 #define _TO_ 4*sizeof(int) #define _CLO_ 1*sizeof(int) -#define _CO_ 4*sizeof(int) + title.length()*sizeof(QChar) -#define _CO2_ 4*sizeof(int) + title->length()*sizeof(QChar) +#define _CO_ 4*sizeof(int) + title.length()*sizeof(TQChar) +#define _CO2_ 4*sizeof(int) + title->length()*sizeof(TQChar) #define _ILO_ 2*sizeof(int) -#define _IO_ 4*sizeof(int) + (title.length()+command.length())*sizeof(QChar) -#define _IO2_ 4*sizeof(int) + (title->length()+command->length())*sizeof(QChar) +#define _IO_ 4*sizeof(int) + (title.length()+command.length())*sizeof(TQChar) +#define _IO2_ 4*sizeof(int) + (title->length()+command->length())*sizeof(TQChar) #define _IxO_ 3*sizeof(int) -BaghiraLinkDrag::BaghiraLinkDrag(QString title, QString command, QString icon, int index, QWidget* dragSource) : QDragObject(dragSource, 0) +BaghiraLinkDrag::BaghiraLinkDrag(TQString title, TQString command, TQString icon, int index, TQWidget* dragSource) : TQDragObject(dragSource, 0) { _accepted = false; - a.resize((title.length()+command.length()+icon.length())*sizeof(QChar)+4*sizeof(int)); + a.resize((title.length()+command.length()+icon.length())*sizeof(TQChar)+4*sizeof(int)); - QChar* tmpChar; + TQChar* tmpChar; int tmpLength; - tmpChar = const_cast<QChar*>(title.unicode()); + tmpChar = const_cast<TQChar*>(title.unicode()); tmpLength = title.length(); memcpy(a.data(), &tmpLength, sizeof(int)); - memcpy(a.data() + _TO_ , tmpChar, tmpLength*sizeof(QChar)); + memcpy(a.data() + _TO_ , tmpChar, tmpLength*sizeof(TQChar)); - tmpChar = const_cast<QChar*>(command.unicode()); + tmpChar = const_cast<TQChar*>(command.unicode()); tmpLength = command.length(); memcpy(a.data() + _CLO_ , &tmpLength, sizeof(int)); - memcpy(a.data() + _CO_, tmpChar, tmpLength*sizeof(QChar)); + memcpy(a.data() + _CO_, tmpChar, tmpLength*sizeof(TQChar)); - tmpChar = const_cast<QChar*>(icon.unicode()); + tmpChar = const_cast<TQChar*>(icon.unicode()); tmpLength = icon.length(); memcpy(a.data() + _ILO_, &tmpLength, sizeof(int)); - memcpy(a.data() + _IO_, tmpChar, tmpLength*sizeof(QChar)); + memcpy(a.data() + _IO_, tmpChar, tmpLength*sizeof(TQChar)); memcpy(a.data() + _IxO_, &index, sizeof(int)); } @@ -44,33 +44,33 @@ BaghiraLinkDrag::~BaghiraLinkDrag() { } -bool BaghiraLinkDrag::decode( const QMimeSource * e, QString * title, QString * command, QString * icon, int * index) +bool BaghiraLinkDrag::decode( const TQMimeSource * e, TQString * title, TQString * command, TQString * icon, int * index) { - QByteArray a = e->encodedData("application/baghiralink"); + TQByteArray a = e->encodedData("application/baghiralink"); if (a.size() < 4*sizeof(int)) // some empty stuff { return false; } - QChar* tmpChar; + TQChar* tmpChar; int tmpLength; memcpy(&tmpLength, a.data(), sizeof(int)); - tmpChar = new QChar[tmpLength]; - memcpy(tmpChar, a.data() + _TO_, tmpLength*sizeof(QChar)); + tmpChar = new TQChar[tmpLength]; + memcpy(tmpChar, a.data() + _TO_, tmpLength*sizeof(TQChar)); title->setUnicode(tmpChar, tmpLength); delete tmpChar; memcpy(&tmpLength, a.data() + _CLO_, sizeof(int)); - tmpChar = new QChar[tmpLength]; - memcpy(tmpChar, a.data() + _CO2_, tmpLength*sizeof(QChar)); + tmpChar = new TQChar[tmpLength]; + memcpy(tmpChar, a.data() + _CO2_, tmpLength*sizeof(TQChar)); command->setUnicode(tmpChar, tmpLength); delete tmpChar; memcpy(&tmpLength, a.data() + _ILO_, sizeof(int)); - tmpChar = new QChar[tmpLength]; - memcpy(tmpChar, a.data() + _IO2_, tmpLength*sizeof(QChar)); + tmpChar = new TQChar[tmpLength]; + memcpy(tmpChar, a.data() + _IO2_, tmpLength*sizeof(TQChar)); icon->setUnicode(tmpChar, tmpLength); delete tmpChar; tmpChar = 0L; @@ -84,7 +84,7 @@ bool BaghiraLinkDrag::accepted() return _accepted; } -bool BaghiraLinkDrag::canDecode( const QMimeSource * e ) +bool BaghiraLinkDrag::canDecode( const TQMimeSource * e ) { return e->provides("application/baghiralink"); #if 0 @@ -92,7 +92,7 @@ bool BaghiraLinkDrag::canDecode( const QMimeSource * e ) { return false; } - QByteArray a = e->encodedData("application/baghiralink"); + TQByteArray a = e->encodedData("application/baghiralink"); if (a.size() != BAGHIRALINK_BUFSIZE) { return false; @@ -115,11 +115,11 @@ const char * BaghiraLinkDrag::format ( int i ) const return 0; } -QByteArray BaghiraLinkDrag::encodedData ( const char * mimeType) const +TQByteArray BaghiraLinkDrag::encodedData ( const char * mimeType) const { - if (QString("application/baghiralink") == mimeType) + if (TQString("application/baghiralink") == mimeType) { return a; } - return QByteArray(); + return TQByteArray(); } diff --git a/starter/baghiralinkdrag.h b/starter/baghiralinkdrag.h index 3aca9ec..23dc9c0 100644 --- a/starter/baghiralinkdrag.h +++ b/starter/baghiralinkdrag.h @@ -1,24 +1,24 @@ #ifndef _BAGHIRALINKDRAG_H_ #define _BAGHIRALINKDRAG_H_ -#include <qdragobject.h> -#include <qstring.h> +#include <tqdragobject.h> +#include <tqstring.h> -class BaghiraLinkDrag : public QDragObject +class BaghiraLinkDrag : public TQDragObject { // Q_OBJECT public: - BaghiraLinkDrag(QString title, QString command, QString icon, int index = -1, QWidget* dragSource = 0); + BaghiraLinkDrag(TQString title, TQString command, TQString icon, int index = -1, TQWidget* dragSource = 0); ~BaghiraLinkDrag(); - static bool decode( const QMimeSource * e, QString * title, QString * command, QString * icon, int * index); - static bool canDecode( const QMimeSource * e); + static bool decode( const TQMimeSource * e, TQString * title, TQString * command, TQString * icon, int * index); + static bool canDecode( const TQMimeSource * e); static void setAccepted( ); virtual const char * format ( int i = 0 ) const; - virtual QByteArray encodedData ( const char * ) const; + virtual TQByteArray encodedData ( const char * ) const; static bool accepted( ); private: - QByteArray a; + TQByteArray a; }; #endif diff --git a/starter/config.ui b/starter/config.ui index ebc7956..6fb994d 100644 --- a/starter/config.ui +++ b/starter/config.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>ConfigDialog</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>ConfigDialog</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="3" column="0"> + <widget class="TQLayoutWidget" row="3" column="0"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -36,7 +36,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonHelp</cstring> </property> @@ -67,7 +67,7 @@ </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -84,7 +84,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -100,7 +100,7 @@ </widget> </hbox> </widget> - <widget class="QPushButton" row="1" column="0"> + <widget class="TQPushButton" row="1" column="0"> <property name="name"> <cstring>buttonDetail</cstring> </property> @@ -111,7 +111,7 @@ <bool>true</bool> </property> </widget> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>baseGroup</cstring> </property> @@ -145,7 +145,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -210,7 +210,7 @@ <number>48</number> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -218,7 +218,7 @@ <string><b>Command</b></string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -226,7 +226,7 @@ <string><i>Keywords</i></string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -234,7 +234,7 @@ <string><i><b>Name</b></i></string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -247,7 +247,7 @@ <cstring>keywords</cstring> </property> </widget> - <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="5" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>startupFeedback</cstring> </property> @@ -255,7 +255,7 @@ <string>Activate startup feedback</string> </property> </widget> - <widget class="QCheckBox" row="6" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="6" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>showInSystray</cstring> </property> @@ -282,7 +282,7 @@ </size> </property> </widget> - <widget class="QLabel" row="0" column="4"> + <widget class="TQLabel" row="0" column="4"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -306,7 +306,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox" row="2" column="0"> + <widget class="TQGroupBox" row="2" column="0"> <property name="name"> <cstring>extendedGroup</cstring> </property> @@ -317,7 +317,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0" rowspan="2" colspan="5"> + <widget class="TQLabel" row="0" column="0" rowspan="2" colspan="5"> <property name="name"> <cstring>textLabel7</cstring> </property> @@ -339,7 +339,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="5"> + <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="5"> <property name="name"> <cstring>startInTerminal</cstring> </property> @@ -347,7 +347,7 @@ <string>Start in terminal</string> </property> </widget> - <widget class="QLabel" row="4" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="4" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel9</cstring> </property> @@ -380,7 +380,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QCheckBox" row="6" column="0" rowspan="1" colspan="5"> + <widget class="TQCheckBox" row="6" column="0" rowspan="1" colspan="5"> <property name="name"> <cstring>startAsUser</cstring> </property> @@ -388,7 +388,7 @@ <string>Start as different user</string> </property> </widget> - <widget class="QLabel" row="7" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="7" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel6</cstring> </property> @@ -421,7 +421,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLabel" row="10" column="0" rowspan="2" colspan="1"> + <widget class="TQLabel" row="10" column="0" rowspan="2" colspan="1"> <property name="name"> <cstring>textLabel8</cstring> </property> diff --git a/starter/help.ui b/starter/help.ui index dbb5416..3202f0e 100644 --- a/starter/help.ui +++ b/starter/help.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>HelpDialog</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>HelpDialog</cstring> </property> @@ -69,7 +69,7 @@ Please note:<br> <br><br> <b>Description:</b><br> This is the longtext description of your application (not a helptext, though ;), e.g. "A powerfull image manipulator with a UI similar to photoshop. Supports Layers, filters, scripting, blahblahblah..." -You can use Qt richtext tags and there's no limit on the size, but keep it usefull ;) let's say something about 200 chars at max.<br> +You can use TQt richtext tags and there's no limit on the size, but keep it usefull ;) let's say something about 200 chars at max.<br> (Optional, not searched)</string> </property> <property name="readOnly"> @@ -79,7 +79,7 @@ You can use Qt richtext tags and there's no limit on the size, but keep it usefu <bool>false</bool> </property> </widget> - <widget class="QPushButton" row="1" column="1"> + <widget class="TQPushButton" row="1" column="1"> <property name="name"> <cstring>buttonClose</cstring> </property> diff --git a/starter/linkconfig.ui b/starter/linkconfig.ui index b156900..8f949f6 100644 --- a/starter/linkconfig.ui +++ b/starter/linkconfig.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>LinkConfig</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>LinkConfig</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>layout10</cstring> </property> @@ -47,7 +47,7 @@ </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -64,7 +64,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -114,7 +114,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> <cstring>layout3</cstring> </property> @@ -122,7 +122,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -135,7 +135,7 @@ <cstring>title</cstring> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -151,7 +151,7 @@ <string><b>Command</b></string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>command</cstring> </property> diff --git a/starter/menu.cpp b/starter/menu.cpp index 81611d0..5e33a71 100644 --- a/starter/menu.cpp +++ b/starter/menu.cpp @@ -1,14 +1,14 @@ -#include <qcheckbox.h> -#include <qcursor.h> -#include <qdatetime.h> -#include <qdir.h> +#include <tqcheckbox.h> +#include <tqcursor.h> +#include <tqdatetime.h> +#include <tqdir.h> #include <kpopupmenu.h> -#include <qobjectlist.h> -#include <qpainter.h> -#include <qptrlist.h> -#include <qstrlist.h> -#include <qstringlist.h> -#include <qvbox.h> +#include <tqobjectlist.h> +#include <tqpainter.h> +#include <tqptrlist.h> +#include <tqstrlist.h> +#include <tqstringlist.h> +#include <tqvbox.h> #include <dcopclient.h> #include <kapplication.h> #include <kconfig.h> @@ -61,15 +61,15 @@ //TODO: sort functions alphabetically, split files by classes... refactoring sucks ;) -static QColor commentColor; -static QColor infoColor; +static TQColor commentColor; +static TQColor infoColor; static KConfig *config; static bool useKTTS; -QString spell(const QString text) +TQString spell(const TQString text) { - QString result; + TQString result; for (uint i = 0; i < text.length(); i++) { result += " "; result += text[i]; @@ -78,52 +78,52 @@ QString spell(const QString text) } /* - Internal class to get access to protected QBoxLayout-members + Internal class to get access to protected TQBoxLayout-members */ -class MyVBoxLayout : public QVBoxLayout +class MyVBoxLayout : public TQVBoxLayout { friend class AppList; public: - MyVBoxLayout( QLayout * parentLayout, int spacing = -1, const char * name = 0 ) - : QVBoxLayout( parentLayout, spacing, name ) {} + MyVBoxLayout( TQLayout * parentLayout, int spacing = -1, const char * name = 0 ) + : TQVBoxLayout( parentLayout, spacing, name ) {} }; -StartMenuButton::StartMenuButton( int size, QString icon, QString title, QString command, Orientation orientation, QWidget* parent, const char * name) : QWidget(parent, name), m_title(title), m_command(command), m_icon(icon), m_orientation(orientation), _moving(false) +StartMenuButton::StartMenuButton( int size, TQString icon, TQString title, TQString command, Orientation orientation, TQWidget* parent, const char * name) : TQWidget(parent, name), m_title(title), m_command(command), m_icon(icon), m_orientation(orientation), _moving(false) { - setBackgroundOrigin(QWidget::ParentOrigin); + setBackgroundOrigin(TQWidget::ParentOrigin); int bigSize = _BIGSIZE_(size); m_pix = KGlobal::iconLoader()->loadIcon(icon, KIcon::Desktop, size); m_hoverPix = KGlobal::iconLoader()->loadIcon(icon, KIcon::Desktop, bigSize); - m_pixmapLabel = new QLabel(this, name); + m_pixmapLabel = new TQLabel(this, name); m_pixmapLabel->setPixmap(m_pix); - m_pixmapLabel->setBackgroundOrigin(QWidget::AncestorOrigin); - QBoxLayout* layout; + m_pixmapLabel->setBackgroundOrigin(TQWidget::AncestorOrigin); + TQBoxLayout* layout; if (orientation == Horizontal) { - m_titleLabel = new QLabel("<qt><b>" + title + "</b></qt>", this, name); - m_titleLabel->setBackgroundOrigin(QWidget::AncestorOrigin); - m_titleLabel->setTextFormat( Qt::RichText ); - m_titleLabel->setAlignment ( Qt::AlignLeft | Qt::AlignVCenter ); + m_titleLabel = new TQLabel("<qt><b>" + title + "</b></qt>", this, name); + m_titleLabel->setBackgroundOrigin(TQWidget::AncestorOrigin); + m_titleLabel->setTextFormat( TQt::RichText ); + m_titleLabel->setAlignment ( TQt::AlignLeft | TQt::AlignVCenter ); m_pixmapLabel->setFixedSize(bigSize+2,bigSize+2); - m_pixmapLabel->setAlignment ( Qt::AlignCenter ); - layout = new QHBoxLayout ( this ); + m_pixmapLabel->setAlignment ( TQt::AlignCenter ); + layout = new TQHBoxLayout ( this ); layout->addSpacing ( 5 ); - layout->addWidget(m_pixmapLabel,0,Qt::AlignCenter); + layout->addWidget(m_pixmapLabel,0,TQt::AlignCenter); layout->addSpacing ( 2 ); layout->addWidget(m_titleLabel,1); layout->addSpacing ( 5 ); } else if (orientation == Vertical) { - m_titleLabel = new QLabel("<qt><b>" + title + "</b></qt>", this, name); - m_titleLabel->setBackgroundOrigin(QWidget::AncestorOrigin); - m_titleLabel->setTextFormat( Qt::RichText ); - m_titleLabel->setAlignment ( Qt::AlignHCenter | Qt::AlignTop ); + m_titleLabel = new TQLabel("<qt><b>" + title + "</b></qt>", this, name); + m_titleLabel->setBackgroundOrigin(TQWidget::AncestorOrigin); + m_titleLabel->setTextFormat( TQt::RichText ); + m_titleLabel->setAlignment ( TQt::AlignHCenter | TQt::AlignTop ); m_pixmapLabel->setFixedSize(bigSize+2,bigSize+2); - m_pixmapLabel->setAlignment ( Qt::AlignCenter ); - layout = new QVBoxLayout ( this ); + m_pixmapLabel->setAlignment ( TQt::AlignCenter ); + layout = new TQVBoxLayout ( this ); layout->addSpacing ( 5 ); - layout->addWidget(m_pixmapLabel,0,Qt::AlignCenter); + layout->addWidget(m_pixmapLabel,0,TQt::AlignCenter); layout->addSpacing ( 2 ); layout->addWidget(m_titleLabel,1); layout->addSpacing ( 5 ); @@ -131,10 +131,10 @@ StartMenuButton::StartMenuButton( int size, QString icon, QString title, QString else { setFixedSize(bigSize+2,bigSize+2); - m_pixmapLabel->setAlignment ( Qt::AlignCenter ); + m_pixmapLabel->setAlignment ( TQt::AlignCenter ); m_pixmapLabel->setFixedSize(bigSize+2,bigSize+2); } - setCursor(Qt::PointingHandCursor); + setCursor(TQt::PointingHandCursor); } void StartMenuButton::reloadIcon(int size) @@ -148,7 +148,7 @@ void StartMenuButton::reloadIcon(int size) m_pixmapLabel->setPixmap(m_pix); } -void StartMenuButton::smartMove(QPoint &pt) +void StartMenuButton::smartMove(TQPoint &pt) { } @@ -157,16 +157,16 @@ void StartMenuButton::smartMove(int x, int y) if (!dynamic_cast<Panel*>(parentWidget())) return; StartMenuButton *bt = 0L; - QObjectList *kids = const_cast<QObjectList*>(parentWidget()->children()); - QRect dRect(QPoint(x,y), size()); - QRect bRect; + TQObjectList *kids = const_cast<TQObjectList*>(parentWidget()->children()); + TQRect dRect(TQPoint(x,y), size()); + TQRect bRect; if (kids && !kids->isEmpty()) { - QObject *o; + TQObject *o; for ( o = kids->first(); o; o = kids->next() ) if ((o != this) && (bt = (dynamic_cast<StartMenuButton*>(o)))) { - bRect = QRect(bt->pos(), bt->size()); + bRect = TQRect(bt->pos(), bt->size()); if (dRect.intersects(bRect)) break; bt = 0L; @@ -176,7 +176,7 @@ void StartMenuButton::smartMove(int x, int y) { move(dRect.topLeft()); int dst; - if (((Panel*)parentWidget())->orientation() == Qt::Horizontal) + if (((Panel*)parentWidget())->orientation() == TQt::Horizontal) { dst = pos().x() + width() - parentWidget()->width(); if (dst > 0) @@ -205,21 +205,21 @@ void StartMenuButton::smartMove(int x, int y) (dRect.y() < bRect.y() && dRect.bottom() > bRect.y() + bRect.height() / 2) ) { - QPoint bPt = bt->pos(); + TQPoint bPt = bt->pos(); bt->move(pos()); move(bPt); } } -void StartMenuButton::mouseReleaseEvent ( QMouseEvent * mre) +void StartMenuButton::mouseReleaseEvent ( TQMouseEvent * mre) { - if (mre->state() & Qt::LeftButton) + if (mre->state() & TQt::LeftButton) { if (_moving) { _moving = false; return; } emit pressed(m_command); return; } - if (mre->state() & Qt::RightButton) + if (mre->state() & TQt::RightButton) { if (!dynamic_cast<Panel*>(parentWidget())) return; @@ -261,29 +261,29 @@ void Panel::addIcon() addIcon ( linkConfigDialog->icon->icon(), linkConfigDialog->title->text(), linkConfigDialog->command->text(), iconAddPosition ); } -void StartMenuButton::mouseMoveEvent ( QMouseEvent * mme ) +void StartMenuButton::mouseMoveEvent ( TQMouseEvent * mme ) { if (!dynamic_cast<Panel*>(parentWidget())) return; - if (mme->state() & Qt::LeftButton) + if (mme->state() & TQt::LeftButton) { _moving = true; - QPoint pt = mapToParent(mme->pos()); - if (!(mme->state() & Qt::ShiftButton)) + TQPoint pt = mapToParent(mme->pos()); + if (!(mme->state() & TQt::ShiftButton)) { if (pt.y() < -5 || pt.y() > parentWidget()->height() + 5 || pt.x() < -5 || pt.x() > parentWidget()->width() + 5) { BaghiraLinkDrag *d = new BaghiraLinkDrag( m_title, m_command, m_icon, -1, parentWidget() ); - d->setPixmap(m_hoverPix, QPoint(m_hoverPix.width()/2, m_hoverPix.height()/2)); + d->setPixmap(m_hoverPix, TQPoint(m_hoverPix.width()/2, m_hoverPix.height()/2)); d->drag(); - if ((mme->state() & Qt::ControlButton) || BaghiraLinkDrag::accepted()) + if ((mme->state() & TQt::ControlButton) || BaghiraLinkDrag::accepted()) return; ((Panel*)parentWidget())->poof(); // do NOT delete d. return; } } - if (((Panel*)parentWidget())->orientation() == Qt::Horizontal) + if (((Panel*)parentWidget())->orientation() == TQt::Horizontal) smartMove(pt.x() - width()/2, pos().y()); else smartMove(pos().x(), pt.y() - height()/2); @@ -293,32 +293,32 @@ void StartMenuButton::mouseMoveEvent ( QMouseEvent * mme ) } -void StartMenuButton::enterEvent( QEvent * ) +void StartMenuButton::enterEvent( TQEvent * ) { if (m_orientation == Status) emit hovered(m_title); m_pixmapLabel->setPixmap(m_hoverPix); } -void StartMenuButton::leaveEvent( QEvent * ) +void StartMenuButton::leaveEvent( TQEvent * ) { if (m_orientation == Status) emit unhovered(); m_pixmapLabel->setPixmap(m_pix); } -StartMenuEntry::StartMenuEntry(KService * service, QString relPath, int size, bool newbie, QWidget * parent) : QWidget(parent) +StartMenuEntry::StartMenuEntry(KService * service, TQString relPath, int size, bool newbie, TQWidget * parent) : TQWidget(parent) { groupPath = relPath; forNewbie = newbie; if (config) // might be first use ever... { - QString tmpString = config->readEntry(service->desktopEntryName()); - if (tmpString != QString::null) + TQString tmpString = config->readEntry(service->desktopEntryName()); + if (tmpString != TQString::null) { usage = tmpString.section ( ' ', 0, 0 ).toUInt(); - lastUse = QDate::fromString(tmpString.section ( ' ', 1, 1 ), Qt::ISODate); + lastUse = TQDate::fromString(tmpString.section ( ' ', 1, 1 ), TQt::ISODate); // ranking is naiv but hopefully usefull for the beginning: often usage increases rank, time to the last usage decreases. "8" is just a "random" offset - the idea is that apps that have been used within the last week should have a higher rank than apps that don't appear in the list - setting these to - infinity isn't a good idea as well, as they might be brand new - rank = 8 + usage - lastUse.daysTo(QDate::currentDate()); + rank = 8 + usage - lastUse.daysTo(TQDate::currentDate()); } else { @@ -328,7 +328,7 @@ StartMenuEntry::StartMenuEntry(KService * service, QString relPath, int size, bo } else { - qWarning("no valid config!"); + tqWarning("no valid config!"); usage = 0; rank = 0; // neutral rank } @@ -339,27 +339,27 @@ StartMenuEntry::StartMenuEntry(KService * service, QString relPath, int size, bo display = false; m_pix = m_service->pixmap( KIcon::Desktop, size ); m_hoverPix = m_service->pixmap( KIcon::Desktop, bigSize ); - m_titleLabel = new QLabel("<qt><h3>" + m_service->name() + "</h3></qt>", this); - m_titleLabel->setTextFormat( Qt::RichText ); - m_commentLabel = new QLabel(m_service->comment(), this); + m_titleLabel = new TQLabel("<qt><h3>" + m_service->name() + "</h3></qt>", this); + m_titleLabel->setTextFormat( TQt::RichText ); + m_commentLabel = new TQLabel(m_service->comment(), this); m_commentLabel->setPaletteForegroundColor(commentColor); - m_commentLabel->setTextFormat( Qt::RichText ); - m_pixmapLabel = new QLabel(this); + m_commentLabel->setTextFormat( TQt::RichText ); + m_pixmapLabel = new TQLabel(this); m_pixmapLabel->setFixedSize ( bigSize+2, bigSize+2 ); - m_pixmapLabel->setAlignment(Qt::AlignCenter); + m_pixmapLabel->setAlignment(TQt::AlignCenter); m_pixmapLabel->setPixmap(m_pix); - QVBoxLayout* spacer = new QVBoxLayout ( this ); + TQVBoxLayout* spacer = new TQVBoxLayout ( this ); spacer->addSpacing ( 1 ); - QHBoxLayout* layout = new QHBoxLayout ( spacer ); + TQHBoxLayout* layout = new TQHBoxLayout ( spacer ); layout->addWidget(m_pixmapLabel); layout->addSpacing ( 2 ); - QVBoxLayout* textLayout = new QVBoxLayout ( layout ); + TQVBoxLayout* textLayout = new TQVBoxLayout ( layout ); layout->setStretchFactor ( textLayout, 1 ); textLayout->addWidget(m_titleLabel); textLayout->addWidget(m_commentLabel); layout->addStretch(); spacer->addSpacing ( 1 ); - setCursor(Qt::PointingHandCursor); + setCursor(TQt::PointingHandCursor); } void StartMenuEntry::reloadIcon(int size) @@ -379,7 +379,7 @@ StartMenuEntry::~StartMenuEntry() void StartMenuEntry::saveStats() { if (usage > 0) - config->writeEntry(m_service->desktopEntryName(), QString::number(usage) + " " + lastUse.toString(Qt::ISODate)); + config->writeEntry(m_service->desktopEntryName(), TQString::number(usage) + " " + lastUse.toString(TQt::ISODate)); } bool StartMenuEntry::operator==( const StartMenuEntry& se ) const @@ -425,54 +425,54 @@ bool StartMenuEntry::operator>( const double& d ) const return rank < d; // to have descending sort order (we could also use a negative ranking...) } -void StartMenuEntry::mouseReleaseEvent ( QMouseEvent * e ) +void StartMenuEntry::mouseReleaseEvent ( TQMouseEvent * e ) //TODO: do funny stuff with other buttons (e.g. provide edit dialog) { - if (e->button() == Qt::LeftButton) + if (e->button() == TQt::LeftButton) { m_pixmapLabel->setPixmap(m_pix); execute(); - if (!(e->state() & Qt::ControlButton)) + if (!(e->state() & TQt::ControlButton)) emit pressed(); } - if (e->button() == Qt::RightButton) + if (e->button() == TQt::RightButton) { emit popup(this); } } -void StartMenuEntry::mouseMoveEvent ( QMouseEvent * mme ) +void StartMenuEntry::mouseMoveEvent ( TQMouseEvent * mme ) { - if (mme->state() & Qt::LeftButton && (mme->pos().y() < 0 || mme->pos().y() > height() || mme->pos().x() < 0 || mme->pos().x() > width())) + if (mme->state() & TQt::LeftButton && (mme->pos().y() < 0 || mme->pos().y() > height() || mme->pos().x() < 0 || mme->pos().x() > width())) { BaghiraLinkDrag *d = new BaghiraLinkDrag( m_service->name(), m_service->exec(), m_service->icon(), -1, parentWidget() ); - d->setPixmap(m_hoverPix, QPoint(m_hoverPix.width()/2, m_hoverPix.height()/2)); + d->setPixmap(m_hoverPix, TQPoint(m_hoverPix.width()/2, m_hoverPix.height()/2)); d->dragCopy(); // do NOT delete d. } } -void StartMenuEntry::keyPressEvent ( QKeyEvent * e ) +void StartMenuEntry::keyPressEvent ( TQKeyEvent * e ) { switch (e->key()) { - case Qt::Key_Escape: + case TQt::Key_Escape: emit closeMenu(); break; - case Qt::Key_Return: - case Qt::Key_Enter: + case TQt::Key_Return: + case TQt::Key_Enter: execute(); - if (!(e->state() & Qt::ControlButton)) + if (!(e->state() & TQt::ControlButton)) emit pressed(); break; - case Qt::Key_Down: + case TQt::Key_Down: emit appDown(); break; - case Qt::Key_Up: + case TQt::Key_Up: emit appUp(); break; - case Qt::Key_Home: // ->searchline + select - case Qt::Key_Left: + case TQt::Key_Home: // ->searchline + select + case TQt::Key_Left: emit appLeft(); break; default: @@ -480,18 +480,18 @@ void StartMenuEntry::keyPressEvent ( QKeyEvent * e ) } } -QString StartMenuEntry::title() +TQString StartMenuEntry::title() { return m_titleLabel->text(); } -void StartMenuEntry::focusInEvent ( QFocusEvent * ) +void StartMenuEntry::focusInEvent ( TQFocusEvent * ) { isCurrent = true; emit hovered("[ " + groupPath + " ] " + exec); if (useKTTS) { - QString text = i18n("for TTS output, telling which item is focussed (keyboard) and than reads the comment", "%1 focussed. %2").arg(m_titleLabel->text()).arg(m_commentLabel->text()); + TQString text = i18n("for TTS output, telling which item is focussed (keyboard) and than reads the comment", "%1 focussed. %2").arg(m_titleLabel->text()).arg(m_commentLabel->text()); emit sayText(text); } setPaletteBackgroundColor(KGlobalSettings::highlightColor()); @@ -500,7 +500,7 @@ void StartMenuEntry::focusInEvent ( QFocusEvent * ) m_commentLabel->setPaletteForegroundColor(KGlobalSettings::highlightedTextColor()); } -void StartMenuEntry::focusOutEvent ( QFocusEvent * ) +void StartMenuEntry::focusOutEvent ( TQFocusEvent * ) { emit unhovered(); isCurrent = false; @@ -518,12 +518,12 @@ void StartMenuEntry::focusOutEvent ( QFocusEvent * ) } } -void StartMenuEntry::enterEvent( QEvent * ) +void StartMenuEntry::enterEvent( TQEvent * ) { emit hovered("[ " + groupPath + " ] " + exec); if (useKTTS) { - QString text = i18n("for TTS output, telling which item is hovered (mouse) and than reads the comment", "%1 hovered. %2").arg(m_titleLabel->text()).arg(m_commentLabel->text()); + TQString text = i18n("for TTS output, telling which item is hovered (mouse) and than reads the comment", "%1 hovered. %2").arg(m_titleLabel->text()).arg(m_commentLabel->text()); emit sayText(text); } if (!isCurrent) @@ -534,7 +534,7 @@ void StartMenuEntry::enterEvent( QEvent * ) m_pixmapLabel->setPixmap(m_hoverPix); } -void StartMenuEntry::leaveEvent( QEvent * ) +void StartMenuEntry::leaveEvent( TQEvent * ) { emit unhovered(); if (!isCurrent) @@ -548,33 +548,33 @@ void StartMenuEntry::leaveEvent( QEvent * ) void StartMenuEntry::execute() { usage++; - lastUse = QDate::currentDate(); + lastUse = TQDate::currentDate(); rank = 8 + usage; - KApplication::startServiceByDesktopPath(m_service->desktopEntryPath(), QStringList(), 0, 0, 0, "", true); + KApplication::startServiceByDesktopPath(m_service->desktopEntryPath(), TQStringList(), 0, 0, 0, "", true); emit executed(); } -Panel::Panel(int size, QWidget * parent, const char * name) : QWidget(parent, name), _size(size), _draggedMe(false), _count(0), _orientation(Qt::Horizontal), _poof(0), _poofIndex(0), _poofAnimPix(0), _poofPix(0) +Panel::Panel(int size, TQWidget * parent, const char * name) : TQWidget(parent, name), _size(size), _draggedMe(false), _count(0), _orientation(TQt::Horizontal), _poof(0), _poofIndex(0), _poofAnimPix(0), _poofPix(0) { linkConfigDialog = new LinkConfig(); - setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed); // setPaletteBackgroundColor(KGlobalSettings::highlightColor()); setAcceptDrops(true); config->setGroup("Panel"); - QStringList commands = config->readListEntry("Commands", '§'); - QStringList icons = config->readListEntry("Icons", '§'); - QStringList offsets = config->readListEntry("Offsets", '§'); - QStringList titles = config->readListEntry("Titles", '§'); - QStringList::Iterator it1 = commands.begin(); - QStringList::Iterator it2 = icons.begin(); - QStringList::Iterator it3 = offsets.begin(); - QStringList::Iterator it4 = titles.begin(); + TQStringList commands = config->readListEntry("Commands", '§'); + TQStringList icons = config->readListEntry("Icons", '§'); + TQStringList offsets = config->readListEntry("Offsets", '§'); + TQStringList titles = config->readListEntry("Titles", '§'); + TQStringList::Iterator it1 = commands.begin(); + TQStringList::Iterator it2 = icons.begin(); + TQStringList::Iterator it3 = offsets.begin(); + TQStringList::Iterator it4 = titles.begin(); while (it1 != commands.end() && it2 != icons.end() && it3 != offsets.end() && it4 != titles.end()) { - addIcon(*it2, *it4, *it1, QPoint((*it3).toInt(),0)); + addIcon(*it2, *it4, *it1, TQPoint((*it3).toInt(),0)); ++it1; ++it2; ++it3; @@ -585,24 +585,24 @@ Panel::Panel(int size, QWidget * parent, const char * name) : QWidget(parent, na void Panel::save(KConfig *config) { config->setGroup("Panel"); - QObjectList *kids = const_cast<QObjectList*>(children()); + TQObjectList *kids = const_cast<TQObjectList*>(children()); StartMenuButton *bt = 0; if (kids && !kids->isEmpty()) { - QStringList icons; - QStringList titles; - QStringList commands; - QStringList offsets; - QObject *o; + TQStringList icons; + TQStringList titles; + TQStringList commands; + TQStringList offsets; + TQObject *o; for ( o = kids->first(); o; o = kids->next() ) if (bt = (dynamic_cast<StartMenuButton*>(o))) { icons.append(bt->icon()); titles.append(bt->title()); commands.append(bt->command()); - _orientation == Qt::Horizontal ? - offsets.append(QString::number(bt->x())) : - offsets.append(QString::number(bt->y())); + _orientation == TQt::Horizontal ? + offsets.append(TQString::number(bt->x())) : + offsets.append(TQString::number(bt->y())); } config->writeEntry("Commands", commands, '§'); config->writeEntry("Icons", icons, '§'); @@ -614,23 +614,23 @@ void Panel::save(KConfig *config) void Panel::reloadIcons( int size) { _size = size; - if (_orientation == Qt::Horizontal) + if (_orientation == TQt::Horizontal) { - setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed); setFixedHeight(_BIGSIZE_(_size)+4); setMaximumWidth(32767); } else { - setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding); + setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding); setFixedWidth(_BIGSIZE_(_size)+4); setMaximumHeight(32767); } - QObjectList *kids = const_cast<QObjectList*>(children()); + TQObjectList *kids = const_cast<TQObjectList*>(children()); StartMenuButton *bt = 0; if (kids && !kids->isEmpty()) { - QObject *o; + TQObject *o; for ( o = kids->first(); o; o = kids->next() ) if (bt = (dynamic_cast<StartMenuButton*>(o))) { @@ -639,7 +639,7 @@ void Panel::reloadIcons( int size) } } -void Panel::ensureVisible(QRect & rect) +void Panel::ensureVisible(TQRect & rect) { int dx = 0; int dy = 0; if (rect.width() > clipRegion().boundingRect().width()) @@ -661,7 +661,7 @@ void Panel::updateSize(int dst) { if (dst > 0) { - if (_orientation == Qt::Horizontal) + if (_orientation == TQt::Horizontal) { resize(width()+dst, height()); } @@ -672,32 +672,32 @@ void Panel::updateSize(int dst) } else // more complex: resize and reposition all children, so first one is on (0,0) { - QObjectList *kids = const_cast<QObjectList*>(children()); + TQObjectList *kids = const_cast<TQObjectList*>(children()); if (kids && !kids->isEmpty()) { - QObject *o; + TQObject *o; StartMenuButton *bt; - if (_orientation == Qt::Horizontal) + if (_orientation == TQt::Horizontal) { resize(width()-dst, height()); for ( o = kids->first(); o; o = kids->next() ) if (bt = (dynamic_cast<StartMenuButton*>(o))) - bt->move(QPoint(bt->x()-dst, bt->y())); + bt->move(TQPoint(bt->x()-dst, bt->y())); } else { resize(width(), height()-dst); for ( o = kids->first(); o; o = kids->next() ) if (bt = (dynamic_cast<StartMenuButton*>(o))) - bt->move(QPoint(bt->x(), bt->y()-dst)); + bt->move(TQPoint(bt->x(), bt->y()-dst)); } } } } -void Panel::wheelEvent ( QWheelEvent * we ) +void Panel::wheelEvent ( TQWheelEvent * we ) { - if (_orientation == Qt::Vertical) + if (_orientation == TQt::Vertical) { if (we->delta() > 0) { @@ -745,45 +745,45 @@ void Panel::wheelEvent ( QWheelEvent * we ) } } -void Panel::resizeEvent ( QResizeEvent * e) +void Panel::resizeEvent ( TQResizeEvent * e) { - if (_orientation == Qt::Horizontal) + if (_orientation == TQt::Horizontal) { if (e->size().height() != e->oldSize().height()) { int h = e->size().height(); - KPixmap bgPix = QPixmap(32, h); - KPixmap bgPix1 = QPixmap(32, h/2); - KPixmap bgPix2 = QPixmap(32, h - bgPix1.height()); - QColor color = palette().color(QPalette::Active, QColorGroup::Background); + KPixmap bgPix = TQPixmap(32, h); + KPixmap bgPix1 = TQPixmap(32, h/2); + KPixmap bgPix2 = TQPixmap(32, h - bgPix1.height()); + TQColor color = palette().color(TQPalette::Active, TQColorGroup::Background); KPixmapEffect::gradient( bgPix1, color.light(130), color.dark(105), KPixmapEffect::VerticalGradient, 0); KPixmapEffect::gradient( bgPix2, color.dark(120), color.light(110), KPixmapEffect::VerticalGradient, 0); - QPainter p(&bgPix); + TQPainter p(&bgPix); p.drawPixmap(0,0,bgPix1); p.drawPixmap(0,bgPix1.height(),bgPix2); p.end(); setPaletteBackgroundPixmap( bgPix ); } } - else if (_orientation == Qt::Vertical) + else if (_orientation == TQt::Vertical) { if (e->size().width() != e->oldSize().width()) { int w = e->size().width(); - KPixmap bgPix = QPixmap(w, 32); - KPixmap bgPix1 = QPixmap(w/2, 32); - KPixmap bgPix2 = QPixmap(w - bgPix1.width(), 32); - QColor color = palette().color(QPalette::Active, QColorGroup::Background); + KPixmap bgPix = TQPixmap(w, 32); + KPixmap bgPix1 = TQPixmap(w/2, 32); + KPixmap bgPix2 = TQPixmap(w - bgPix1.width(), 32); + TQColor color = palette().color(TQPalette::Active, TQColorGroup::Background); KPixmapEffect::gradient( bgPix1, color.light(110), color.dark(120), KPixmapEffect::HorizontalGradient, 0); KPixmapEffect::gradient( bgPix2, color.dark(105), color.light(130), KPixmapEffect::HorizontalGradient, 0); - QPainter p(&bgPix); + TQPainter p(&bgPix); p.drawPixmap(0,0,bgPix1); p.drawPixmap(bgPix1.width(),0,bgPix2); p.end(); setPaletteBackgroundPixmap( bgPix ); } } - QWidget::resizeEvent( e ); + TQWidget::resizeEvent( e ); } void Panel::poof() @@ -793,10 +793,10 @@ void Panel::poof() _draggedMe = false; return; }*/ - QObjectList *kids = const_cast<QObjectList*>(children()); + TQObjectList *kids = const_cast<TQObjectList*>(children()); if (kids && !kids->isEmpty()) { - QObject *o; + TQObject *o; StartMenuButton *bt = 0L; for ( o = kids->first(); o; o = kids->next() ) { @@ -808,20 +808,20 @@ void Panel::poof() } } _poofIndex = 0; - _poofPix = new QPixmap(locateLocal("data", "baghira/poof.png"), "png"); - _poofAnimPix = new QPixmap(_poofPix->width(), _poofPix->width()); + _poofPix = new TQPixmap(locateLocal("data", "baghira/poof.png"), "png"); + _poofAnimPix = new TQPixmap(_poofPix->width(), _poofPix->width()); if (!_poof) - _poof = new QWidget(0,0, Qt::WType_TopLevel | Qt::WStyle_NoBorder | Qt::WStyle_StaysOnTop | Qt::WX11BypassWM); + _poof = new TQWidget(0,0, TQt::WType_TopLevel | TQt::WStyle_NoBorder | TQt::WStyle_StaysOnTop | TQt::WX11BypassWM); #if KDE_IS_VERSION(3,3,91) //3.4 beta KWin::setShadowSize(_poof->winId(), 0); #endif _poof->setFixedSize(_poofPix->width(), _poofPix->width()); - int x = QCursor::pos().x() - _poof->width()/2; - int y = QCursor::pos().y() - _poof->height()/2; - QPixmap bgPix = QPixmap::grabWindow( qt_xrootwin(), x, y, _poofPix->width(), _poofPix->width()); + int x = TQCursor::pos().x() - _poof->width()/2; + int y = TQCursor::pos().y() - _poof->height()/2; + TQPixmap bgPix = TQPixmap::grabWindow( tqt_xrootwin(), x, y, _poofPix->width(), _poofPix->width()); _poof->move(x,y); _poof->show(); - _poof->setBackgroundOrigin(QWidget::WidgetOrigin); + _poof->setBackgroundOrigin(TQWidget::WidgetOrigin); _poof->setPaletteBackgroundPixmap( bgPix ); runPoof(); } @@ -842,14 +842,14 @@ void Panel::runPoof() return; } _poof->erase(); - bitBlt(_poof, 0 ,0, _poofPix, 0, _poofIndex * _poofPix->width(), _poofPix->width(), _poofPix->width(), Qt::AndROP); + bitBlt(_poof, 0 ,0, _poofPix, 0, _poofIndex * _poofPix->width(), _poofPix->width(), _poofPix->width(), TQt::AndROP); ++_poofIndex; - QTimer::singleShot ( 70, this, SLOT(runPoof()) ); // around 15 fps + TQTimer::singleShot ( 70, this, SLOT(runPoof()) ); // around 15 fps } -void Panel::mouseReleaseEvent ( QMouseEvent * mre ) +void Panel::mouseReleaseEvent ( TQMouseEvent * mre ) { - if (mre->state() & Qt::RightButton) + if (mre->state() & TQt::RightButton) { iconAddPosition = mre->pos(); linkConfigDialog->setCaption ( i18n("New Link") ); @@ -863,48 +863,48 @@ void Panel::mouseReleaseEvent ( QMouseEvent * mre ) } } -void Panel::dragEnterEvent ( QDragEnterEvent *dee ) +void Panel::dragEnterEvent ( TQDragEnterEvent *dee ) { if (BaghiraLinkDrag::canDecode(dee)) { - QObjectList *kids = const_cast<QObjectList*>(children()); + TQObjectList *kids = const_cast<TQObjectList*>(children()); if (kids && !kids->isEmpty()) { - QObject *o; + TQObject *o; StartMenuButton *bt = 0L; for ( o = kids->first(); o; o = kids->next() ) if ((bt = (dynamic_cast<StartMenuButton*>(o))) && bt->isMoving()) // this is just some icon the user drags around ad that accidently left the panel { BaghiraLinkDrag::setAccepted(); - // as we cannot access Qts dragmanager and qdragobject doesn't provide a function to cancel the drag, we just emit a virtual escape key... + // as we cannot access TQts dragmanager and qdragobject doesn't provide a function to cancel the drag, we just emit a virtual escape key... _draggedMe = true; // ensure to please not poof ;P - XTestFakeKeyEvent(qt_xdisplay(),XKeysymToKeycode(qt_xdisplay(), XK_Escape), true, 0); - XTestFakeKeyEvent(qt_xdisplay(),XKeysymToKeycode(qt_xdisplay(), XK_Escape), false, 0); - XFlush(qt_xdisplay()); + XTestFakeKeyEvent(tqt_xdisplay(),XKeysymToKeycode(tqt_xdisplay(), XK_Escape), true, 0); + XTestFakeKeyEvent(tqt_xdisplay(),XKeysymToKeycode(tqt_xdisplay(), XK_Escape), false, 0); + XFlush(tqt_xdisplay()); repositionIcon(bt, mapFromGlobal(dee->pos())); return; } } dee->accept(TRUE); } - else if (QUriDrag::canDecode(dee) || QTextDrag::canDecode(dee)) + else if (TQUriDrag::canDecode(dee) || TQTextDrag::canDecode(dee)) dee->accept(TRUE); } -void Panel::dropEvent ( QDropEvent *de ) +void Panel::dropEvent ( TQDropEvent *de ) { - QStrList list; - QString title; - QString command; - QString icon; + TQStrList list; + TQString title; + TQString command; + TQString icon; int index; if ( BaghiraLinkDrag::decode(de, &title, &command, &icon, &index) ) { - addIcon ( icon, title, command, QPoint(de->pos().x() - (_BIGSIZE_(_size)/2), de->pos().y() - (_BIGSIZE_(_size)/2))); + addIcon ( icon, title, command, TQPoint(de->pos().x() - (_BIGSIZE_(_size)/2), de->pos().y() - (_BIGSIZE_(_size)/2))); BaghiraLinkDrag::setAccepted(); } - else if ( QUriDrag::decode(de, list) ) + else if ( TQUriDrag::decode(de, list) ) { char *uri; KURL url; @@ -912,7 +912,7 @@ void Panel::dropEvent ( QDropEvent *de ) { url = KURL(uri); if (url.protocol() == "http") - addIcon ( "html", url.host()+(url.path()=="/"?QString(""):url.path()), uri, de->pos() ); + addIcon ( "html", url.host()+(url.path()=="/"?TQString(""):url.path()), uri, de->pos() ); else { KFileItem item = KFileItem(KFileItem::Unknown, KFileItem::Unknown, url, true); @@ -920,13 +920,13 @@ void Panel::dropEvent ( QDropEvent *de ) } } } - else if (QTextDrag::decode(de, command)) + else if (TQTextDrag::decode(de, command)) { KURL url(command); if (url.isValid()) { if (url.protocol() == "http") - addIcon ( "html", url.host()+(url.path()=="/"?QString(""):url.path()), command, de->pos() ); + addIcon ( "html", url.host()+(url.path()=="/"?TQString(""):url.path()), command, de->pos() ); else { KFileItem item = KFileItem(KFileItem::Unknown, KFileItem::Unknown, url, true); @@ -951,23 +951,23 @@ void Panel::dropEvent ( QDropEvent *de ) } } -void Panel::repositionIcon(StartMenuButton *button, QPoint pt) +void Panel::repositionIcon(StartMenuButton *button, TQPoint pt) { - QObjectList *kids = const_cast<QObjectList*>(children()); + TQObjectList *kids = const_cast<TQObjectList*>(children()); if (!kids || kids->isEmpty()) // the easy one ;) return; if (kids->count() == 1) // button's for certain the only child ;) { - if (_orientation == Qt::Horizontal) + if (_orientation == TQt::Horizontal) button->move(pt.x(),0); else button->move(0,pt.y()); return; } - QObject *o; + TQObject *o; StartMenuButton *bt = 0L; int xy = 0; - if (_orientation == Qt::Horizontal) + if (_orientation == TQt::Horizontal) { if (pt.x() < 0) // append horizontally { @@ -981,7 +981,7 @@ void Panel::repositionIcon(StartMenuButton *button, QPoint pt) // first find possible icon under the position for ( o = kids->first(); o; o = kids->next() ) { - if ((bt = dynamic_cast<StartMenuButton*>(o)) && QRect(bt->pos(), bt->size()).contains(pt)) + if ((bt = dynamic_cast<StartMenuButton*>(o)) && TQRect(bt->pos(), bt->size()).contains(pt)) break; else bt = 0l; @@ -1021,7 +1021,7 @@ void Panel::repositionIcon(StartMenuButton *button, QPoint pt) // first find possible icon under the position for ( o = kids->first(); o; o = kids->next() ) { - if ((bt = dynamic_cast<StartMenuButton*>(o)) && QRect(bt->pos(), bt->size()).contains(pt)) + if ((bt = dynamic_cast<StartMenuButton*>(o)) && TQRect(bt->pos(), bt->size()).contains(pt)) break; else bt = 0l; @@ -1043,17 +1043,17 @@ void Panel::repositionIcon(StartMenuButton *button, QPoint pt) } } -StartMenuButton* Panel::addIcon ( QString icon, QString title, QString command, QPoint pt ) +StartMenuButton* Panel::addIcon ( TQString icon, TQString title, TQString command, TQPoint pt ) { StartMenuButton *tmpButton = new StartMenuButton(_size, icon, title, command, StartMenuButton::Status, this); // reposition icon repositionIcon(tmpButton, pt); // connections - connect (tmpButton, SIGNAL(hovered(const QString &)), this, SIGNAL(message(const QString &))); + connect (tmpButton, SIGNAL(hovered(const TQString &)), this, SIGNAL(message(const TQString &))); connect (tmpButton, SIGNAL(unhovered()), this, SIGNAL(clearStatus())); connect (tmpButton, SIGNAL(updateSize(int)), this, SLOT(updateSize(int))); - connect (tmpButton, SIGNAL(pressed(const QString &)), parent(), SLOT(execute(const QString &))); - connect (tmpButton, SIGNAL(pressed(const QString &)), parent(), SLOT(close())); + connect (tmpButton, SIGNAL(pressed(const TQString &)), parent(), SLOT(execute(const TQString &))); + connect (tmpButton, SIGNAL(pressed(const TQString &)), parent(), SLOT(close())); // done // inc counter _count++; @@ -1066,37 +1066,37 @@ void Panel::setOrientation ( Orientation ori ) if (_orientation == ori) return; _orientation = ori; - QObjectList *kids = const_cast<QObjectList*>(children()); + TQObjectList *kids = const_cast<TQObjectList*>(children()); if (!kids || kids->isEmpty()) return; - QObject *o; + TQObject *o; StartMenuButton *bt = 0L; for ( o = kids->first(); o; o = kids->next() ) if (bt = (dynamic_cast<StartMenuButton*>(o))) - bt->move(QPoint(bt->pos().y(), bt->pos().x())); + bt->move(TQPoint(bt->pos().y(), bt->pos().x())); } -AppList::AppList(int size, QWidget * parent) : QScrollView(parent), _size(size) +AppList::AppList(int size, TQWidget * parent) : TQScrollView(parent), _size(size) { popupBlocked_ = false; enableClipper( true ); - setFrameStyle(QFrame::LineEditPanel | QFrame::Sunken ); + setFrameStyle(TQFrame::LineEditPanel | TQFrame::Sunken ); configDialog_ = new ConfigDialog; helpDialog_ = new HelpDialog; - connect (((QObject*)configDialog_->buttonHelp), SIGNAL(clicked()), ((QObject*)helpDialog_), SLOT(exec())); - connect (((QObject*)configDialog_->buttonCancel), SIGNAL(clicked()), this, SLOT(unblockPopup())); - m_widget = new QFrame(viewport()); - m_widget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); + connect (((TQObject*)configDialog_->buttonHelp), SIGNAL(clicked()), ((TQObject*)helpDialog_), SLOT(exec())); + connect (((TQObject*)configDialog_->buttonCancel), SIGNAL(clicked()), this, SLOT(unblockPopup())); + m_widget = new TQFrame(viewport()); + m_widget->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); m_widget->setPaletteBackgroundColor(KGlobalSettings::baseColor()); addChild(m_widget,0,0); - setResizePolicy(QScrollView::AutoOneFit); + setResizePolicy(TQScrollView::AutoOneFit); m_widget->show(); - infoLayout = new QVBoxLayout(m_widget); - infoLabel = new QLabel(m_widget); + infoLayout = new TQVBoxLayout(m_widget); + infoLabel = new TQLabel(m_widget); infoLabel->setPaletteBackgroundColor(infoColor); - infoLabel->setTextFormat( Qt::RichText ); + infoLabel->setTextFormat( TQt::RichText ); infoLayout->addWidget(infoLabel); - m_VLayout = new QVBoxLayout(infoLayout); + m_VLayout = new TQVBoxLayout(infoLayout); m_iconLoader = KGlobal::iconLoader(); m_popup = new KPopupMenu(this); m_popup->insertItem(i18n("Edit Entry"), this, SLOT(editDialog())); @@ -1106,9 +1106,9 @@ AppList::AppList(int size, QWidget * parent) : QScrollView(parent), _size(size) init(); } -void AppList::mouseReleaseEvent ( QMouseEvent * e ) +void AppList::mouseReleaseEvent ( TQMouseEvent * e ) { - if (e->button() == Qt::RightButton) + if (e->button() == TQt::RightButton) addDialog(); } @@ -1116,13 +1116,13 @@ void AppList::windowActivationChange ( bool oldActive ) { if (isActiveWindow() && entryList.current()) entryList.current()->setFocus(); - QScrollView::windowActivationChange ( oldActive ); + TQScrollView::windowActivationChange ( oldActive ); } void AppList::reloadIcons( int size) { _size = size; - QPtrListIterator<StartMenuEntry> it(entryList); + TQPtrListIterator<StartMenuEntry> it(entryList); StartMenuEntry *runner; while( (runner = it.current()) != 0 ) { @@ -1133,8 +1133,8 @@ void AppList::reloadIcons( int size) void AppList::addDialog() { - disconnect (((QObject*)configDialog_->buttonOk), SIGNAL(clicked()), this, 0); - connect (((QObject*)configDialog_->buttonOk), SIGNAL(clicked()), this, SLOT(addEntry())); + disconnect (((TQObject*)configDialog_->buttonOk), SIGNAL(clicked()), this, 0); + connect (((TQObject*)configDialog_->buttonOk), SIGNAL(clicked()), this, SLOT(addEntry())); configDialog_->appName->clear(); configDialog_->category->clearEdit(); configDialog_->command->clear(); @@ -1152,7 +1152,7 @@ void AppList::addDialog() configDialog_->shortcut->setShortcut(KShortcut::null(), false); configDialog_->setCaption ( i18n("New Entry") ); - ((QWidget*)(configDialog_->extendedGroup))->hide(); + ((TQWidget*)(configDialog_->extendedGroup))->hide(); configDialog_->buttonDetail->setDown ( false ); configDialog_->adjustSize(); configDialog_->show(); @@ -1160,16 +1160,16 @@ void AppList::addDialog() void AppList::addEntry() { - QString fullpath = configDialog_->category->currentText(); + TQString fullpath = configDialog_->category->currentText(); while (fullpath[0] == '/') // remove leading "/"'s { fullpath.remove(0,1); } fullpath = KService::newServicePath(true, fullpath + configDialog_->appName->text()); -//qWarning("%s",fullpath.ascii()); +//tqWarning("%s",fullpath.ascii()); writeEntry(fullpath); KService *s = new KService(fullpath); - QStringList list(KServiceGroup::group(configDialog_->category->currentText())->caption()); + TQStringList list(KServiceGroup::group(configDialog_->category->currentText())->caption()); StartMenuEntry *sme = addApp(s, list, configDialog_->category->currentText()); sme->rank = 0xFFFFFF; // hype rank to max, i.e. keep this entry on top of everything - for this session or until first use sme->show(); @@ -1181,7 +1181,7 @@ void AppList::removeEntry() popupBlocked_ = true; if (KMessageBox::questionYesNo (this, i18n("<qt>Are you sure you want to remove<br> %1</qt>").arg(handledEntry->title()), i18n("Remove ALI entry")) == KMessageBox::Yes) { - qWarning("gonna delete!"); + tqWarning("gonna delete!"); writeEntry(handledEntry->m_service->locateLocal(), true); handledEntry->hide(); entryList.removeRef(handledEntry); @@ -1196,8 +1196,8 @@ void AppList::editDialog() if (!handledEntry) return; popupBlocked_ = true; - disconnect (((QObject*)configDialog_->buttonOk), SIGNAL(clicked()), this, 0); - connect (((QObject*)configDialog_->buttonOk), SIGNAL(clicked()), this, SLOT(editEntry())); + disconnect (((TQObject*)configDialog_->buttonOk), SIGNAL(clicked()), this, 0); + connect (((TQObject*)configDialog_->buttonOk), SIGNAL(clicked()), this, SLOT(editEntry())); configDialog_->appName->setText(handledEntry->m_service->name()); configDialog_->category->setCurrentItem (handledEntry->groupPath, false); configDialog_->showInSystray->setChecked( handledEntry->m_service->exec().contains("ksystraycmd ") ); @@ -1218,7 +1218,7 @@ void AppList::editDialog() // KKeyButton* shortcut; configDialog_->setCaption ( i18n("Edit Entry") ); - ((QWidget*)(configDialog_->extendedGroup))->hide(); + ((TQWidget*)(configDialog_->extendedGroup))->hide(); configDialog_->buttonDetail->setDown ( false ); configDialog_->adjustSize(); configDialog_->show(); @@ -1226,7 +1226,7 @@ void AppList::editDialog() void AppList::editEntry() { - QString fullpath; + TQString fullpath; if (handledEntry->groupPath == configDialog_->category->currentText()) // group not changed fullpath = handledEntry->m_service->locateLocal(); // find a local replacement path else // more complex: remove (del/shadow) entry from old group and create one in the new group @@ -1239,17 +1239,17 @@ void AppList::editEntry() } writeEntry(fullpath); handledEntry->hide(); - QDate lu = handledEntry->lastUse; + TQDate lu = handledEntry->lastUse; uint u = handledEntry->usage; entryList.removeRef(handledEntry); delete handledEntry; handledEntry = 0L; KService *s = new KService(fullpath); - QStringList list(KServiceGroup::group(configDialog_->category->currentText())->caption()); + TQStringList list(KServiceGroup::group(configDialog_->category->currentText())->caption()); StartMenuEntry *sme = addApp(s, list, configDialog_->category->currentText()); sme->lastUse = lu; sme->usage = u; - sme->rank = 8 + u - lu.daysTo(QDate::currentDate()); + sme->rank = 8 + u - lu.daysTo(TQDate::currentDate()); if (!config) config = new KConfig("bStarter", false, false); config->setGroup("Statistics"); sme->saveStats(); @@ -1260,7 +1260,7 @@ void AppList::editEntry() popupBlocked_ = false; } -void AppList::writeEntry(QString path, bool hidden ) +void AppList::writeEntry(TQString path, bool hidden ) { KConfig *config = new KConfig(path); config->setDesktopGroup(); @@ -1281,7 +1281,7 @@ void AppList::writeEntry(QString path, bool hidden ) if (!configDialog_->iconButton->icon().isNull()) config->writeEntry("Icon", configDialog_->iconButton->icon()); if (!configDialog_->keywords->text().isEmpty()) - config->writeEntry("Keywords", QStringList::split(',', configDialog_->keywords->text())); + config->writeEntry("Keywords", TQStringList::split(',', configDialog_->keywords->text())); if (!configDialog_->appName->text().isEmpty()) config->writeEntry("Name", configDialog_->appName->text()); if (!configDialog_->workingDir->url().isEmpty()) @@ -1312,13 +1312,13 @@ void AppList::popup(StartMenuEntry* entry) if (popupBlocked_ && configDialog_->isShown()) return; handledEntry = entry; - m_popup->popup(QCursor::pos()); + m_popup->popup(TQCursor::pos()); } void AppList::sort() { - // first clean the layout (i assume that QLayout::remove() will search from beginning so removing over the current order will be quite fast) - QPtrListIterator<StartMenuEntry> it(entryList); + // first clean the layout (i assume that TQLayout::remove() will search from beginning so removing over the current order will be quite fast) + TQPtrListIterator<StartMenuEntry> it(entryList); StartMenuEntry *runner; while( (runner = it.current()) != 0 ) { @@ -1340,11 +1340,11 @@ void AppList::sort() void AppList::init() { - m_root = KServiceGroup::group(QString::null); + m_root = KServiceGroup::group(TQString::null); if (!m_root || !m_root->isValid()) { - qWarning("ROOT NOT FOUND"); + tqWarning("ROOT NOT FOUND"); return; } favItemAmount = config->readNumEntry("FavItemAmount", 10); @@ -1360,7 +1360,7 @@ void AppList::init() infoLabel->setText ( i18n("<qt><b>Favorite Applications</b><br></qt>") ); } config->setGroup("Statistics"); - QStringList captions, paths; + TQStringList captions, paths; insertGroup(m_root, captions, paths); paths.sort(); configDialog_->category->insertStringList(paths); @@ -1374,7 +1374,7 @@ void AppList::init() void AppList::save(KConfig *config) { config->setGroup("Statistics"); - QPtrListIterator<StartMenuEntry> it(entryList); + TQPtrListIterator<StartMenuEntry> it(entryList); StartMenuEntry *runner; while( (runner = it.current()) != 0 ) { @@ -1383,7 +1383,7 @@ void AppList::save(KConfig *config) } } -void AppList::insertGroup(KServiceGroup *g, QStringList & captions, QStringList & paths) +void AppList::insertGroup(KServiceGroup *g, TQStringList & captions, TQStringList & paths) { KServiceGroup::List list = g->entries(true, true, false, false); @@ -1423,14 +1423,14 @@ void AppList::insertGroup(KServiceGroup *g, QStringList & captions, QStringList } } -StartMenuEntry* AppList::addApp(KService * s, QStringList & captions, QString relPath) +StartMenuEntry* AppList::addApp(KService * s, TQStringList & captions, TQString relPath) { StartMenuEntry * tmp = new StartMenuEntry(s, relPath, _size, neewbieApps.find(s->desktopEntryName()) != neewbieApps.end(), m_widget); connect (tmp, SIGNAL(appUp()), this, SLOT(appUp())); connect (tmp, SIGNAL(appDown()), this, SLOT(appDown())); connect (tmp, SIGNAL(appLeft()), this, SLOT(appLeft())); - connect (tmp, SIGNAL(hovered(const QString&)), this, SIGNAL(message(const QString&))); - if (useKTTS) connect (tmp, SIGNAL(sayText(const QString&)), this, SIGNAL(sayText(const QString&))); + connect (tmp, SIGNAL(hovered(const TQString&)), this, SIGNAL(message(const TQString&))); + if (useKTTS) connect (tmp, SIGNAL(sayText(const TQString&)), this, SIGNAL(sayText(const TQString&))); connect (tmp, SIGNAL(unhovered()), this, SIGNAL(clearStatus())); connect (tmp, SIGNAL(pressed()), parent(), SLOT(close())); connect (tmp, SIGNAL(popup(StartMenuEntry*)), this, SLOT(popup(StartMenuEntry*))); @@ -1445,12 +1445,12 @@ StartMenuEntry* AppList::addApp(KService * s, QStringList & captions, QString re it = m_keywordList.insert(s->name(), StartMenuEntryList(), false); it.data().append( tmp ); } - QStringList kw; + TQStringList kw; #if 0 kw = s->categories(); // THIS IS ****IMPORTANT***** kicker will crash on init if you try to grep through the pointers! if (!kw.isEmpty()) { - QStringList::Iterator key; + TQStringList::Iterator key; for ( key = kw.begin(); key != kw.end(); ++key ) { if (!((*key).isNull() || (*key).isEmpty())) @@ -1464,7 +1464,7 @@ StartMenuEntry* AppList::addApp(KService * s, QStringList & captions, QString re kw = s->keywords(); // THIS IS ****IMPORTANT***** kicker will crash on init if you try to grep through the pointers! if (!kw.isEmpty()) { - for ( QStringList::Iterator key = kw.begin(); key != kw.end(); ++key ) + for ( TQStringList::Iterator key = kw.begin(); key != kw.end(); ++key ) { if (!((*key).isNull() || (*key).isEmpty())) { @@ -1476,7 +1476,7 @@ StartMenuEntry* AppList::addApp(KService * s, QStringList & captions, QString re // group captions (so Games/IDSoftware/Quake3 will appear in Games and IDSoftware) if (!captions.isEmpty()) { - for ( QStringList::Iterator key = captions.begin(); key != captions.end(); ++key ) + for ( TQStringList::Iterator key = captions.begin(); key != captions.end(); ++key ) { if (!((*key).isNull() || (*key).isEmpty())) { @@ -1513,7 +1513,7 @@ void AppList::appDown() { if (save) save->clearFocus(); runner->setFocus(); - QPoint pt(0,runner->height()); + TQPoint pt(0,runner->height()); pt = runner->mapToParent(pt); ensureVisible ( pt.x(), pt.y()); return; @@ -1542,7 +1542,7 @@ void AppList::appUp() { if (save) save->clearFocus(); runner->setFocus(); - QPoint pt(0,0); + TQPoint pt(0,0); pt = runner->mapToParent(pt); ensureVisible ( pt.x(), pt.y()); return; @@ -1553,7 +1553,7 @@ void AppList::appUp() if (runner->isShown()) { runner->setFocus(); - QPoint pt(0,0); + TQPoint pt(0,0); pt = runner->mapToParent(pt); ensureVisible ( pt.x(), pt.y()); } @@ -1574,7 +1574,7 @@ void AppList::appLeft() emit looseKey(); } -void AppList::showCategory(const QString & string) +void AppList::showCategory(const TQString & string) { infoLabel->setText(string); infoLabel->show(); @@ -1607,15 +1607,15 @@ void AppList::showCategory(const QString & string) } if (useKTTS && visibleItems == 0) { - QString text = i18n("for TTS output, informs the user that no entries are in the currently selected group", "Warning! No Applications in group %1").arg(string); + TQString text = i18n("for TTS output, informs the user that no entries are in the currently selected group", "Warning! No Applications in group %1").arg(string); emit sayText(text); } } -void AppList::search(const QString & string) +void AppList::search(const TQString & string) { StartMenuEntry *it2; - if (string == QString::null || string == "") // empty line - remove all and exit + if (string == TQString::null || string == "") // empty line - remove all and exit { infoLabel->setText ( i18n("<qt><b>Favorite Applications</b><br></qt>") ); infoLabel->show(); @@ -1674,7 +1674,7 @@ void AppList::search(const QString & string) } if (useKTTS && visibleItems == 0) { - QString text = i18n("for TTS output, no entries match the current search text", "Warning! No more Applications left. The entered Text is %1").arg(spell(string)); + TQString text = i18n("for TTS output, no entries match the current search text", "Warning! No more Applications left. The entered Text is %1").arg(spell(string)); emit sayText(text); } } @@ -1710,10 +1710,10 @@ void AppList::reset() setContentsPos(0, 0); } -StartMenu::StartMenu( int size, QWidget * parent, WFlags f ) : QWidget(parent, "StartMenu", f), _size(size), inMove(false) +StartMenu::StartMenu( int size, TQWidget * parent, WFlags f ) : TQWidget(parent, "StartMenu", f), _size(size), inMove(false) { m_panelPos = StartMenu::Nowhere; - panelLayout = new QGridLayout ( this, 3, 3 ); + panelLayout = new TQGridLayout ( this, 3, 3 ); config = new KConfig("bStarter", true, false); config->setGroup("Shell"); history = config->readListEntry("History"); @@ -1727,40 +1727,40 @@ StartMenu::StartMenu( int size, QWidget * parent, WFlags f ) : QWidget(parent, " commentColor.setRgb((r+r2)/2,(g+g2)/2,(b+b2)/2); infoColor.setRgb((3*r+r2)/4,(3*g+g2)/4,(3*b+b2)/4); currentHistoryItem = history.end(); - header = new QWidget(this, "_B_ALI_HEADER"); + header = new TQWidget(this, "_B_ALI_HEADER"); header->installEventFilter(this); - QHBoxLayout *headerLayout = new QHBoxLayout(header, 5, 3); - userButton = new StartMenuButton(_size, "folder_home", QString(getenv("USER")), "~", StartMenuButton::Status, header, "_B_ALI_HEADER"); + TQHBoxLayout *headerLayout = new TQHBoxLayout(header, 5, 3); + userButton = new StartMenuButton(_size, "folder_home", TQString(getenv("USER")), "~", StartMenuButton::Status, header, "_B_ALI_HEADER"); headerLayout->addWidget(userButton); header->setPaletteBackgroundColor(KGlobalSettings::highlightColor()); - connect (userButton, SIGNAL(pressed(const QString &)), this, SLOT(execute(const QString &))); - connect (userButton, SIGNAL(pressed(const QString &)), this, SLOT(close())); - QBoxLayout *mainLayout = new QVBoxLayout(); + connect (userButton, SIGNAL(pressed(const TQString &)), this, SLOT(execute(const TQString &))); + connect (userButton, SIGNAL(pressed(const TQString &)), this, SLOT(close())); + TQBoxLayout *mainLayout = new TQVBoxLayout(); panelLayout->addLayout(mainLayout, 1, 1); mainLayout->addWidget(header); mainLayout->addSpacing ( 3 ); - QBoxLayout *centerLayout = new QHBoxLayout( mainLayout ); + TQBoxLayout *centerLayout = new TQHBoxLayout( mainLayout ); centerLayout->addSpacing ( 3 ); appList = new AppList(_size, this); - appList->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); + appList->setSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Expanding); appList->finish(); searchLine = new SearchLine(header); - categoryCombo = new QComboBox(header, "_B_ALI_HEADER"); + categoryCombo = new TQComboBox(header, "_B_ALI_HEADER"); headerLayout->addWidget(categoryCombo); categoryCombo->setLineEdit ( searchLine ); categoryCombo->insertStringList(appList->categories); categoryCombo->setEditable ( true ); - categoryCombo->setInsertionPolicy(QComboBox::NoInsertion); + categoryCombo->setInsertionPolicy(TQComboBox::NoInsertion); searchLine->installEventFilter(this); searchLine->setCompletionMode(KGlobalSettings::CompletionAuto); config->setGroup("Shortcuts"); // read shortcuts... - QStringList cuts = config->readListEntry ("Shortcuts", ','); - QStringList cats = config->readListEntry ("Categories", ','); - QStringList::Iterator it; - QStringList::Iterator it2 = cats.begin(); + TQStringList cuts = config->readListEntry ("Shortcuts", ','); + TQStringList cats = config->readListEntry ("Categories", ','); + TQStringList::Iterator it; + TQStringList::Iterator it2 = cats.begin(); for ( it = cuts.begin(); it != cuts.end(); ++it ) { if (it2 == cats.end()) break; @@ -1768,23 +1768,23 @@ StartMenu::StartMenu( int size, QWidget * parent, WFlags f ) : QWidget(parent, " it2++; } //--- - QString PATH(getenv("PATH")); + TQString PATH(getenv("PATH")); int n = PATH.contains(':', false); - QStringList list; + TQStringList list; for (int i = 0; i < n; i++) { - QDir execDir(PATH.section(':', i, i)); - list = execDir.entryList(QDir::Files | QDir::Executable, QDir::Name | QDir::IgnoreCase ); + TQDir execDir(PATH.section(':', i, i)); + list = execDir.entryList(TQDir::Files | TQDir::Executable, TQDir::Name | TQDir::IgnoreCase ); searchLine->completionObject()->insertItems(list); } - connect (categoryCombo, SIGNAL(activated( const QString &)), appList, SLOT(showCategory(const QString &))); - connect (searchLine, SIGNAL(typedTextChanged(const QString &)), appList, SLOT(search(const QString &))); - connect (searchLine, SIGNAL(textChanged(const QString &)), this, SLOT(endHistory())); + connect (categoryCombo, SIGNAL(activated( const TQString &)), appList, SLOT(showCategory(const TQString &))); + connect (searchLine, SIGNAL(typedTextChanged(const TQString &)), appList, SLOT(search(const TQString &))); + connect (searchLine, SIGNAL(textChanged(const TQString &)), this, SLOT(endHistory())); connect (appList, SIGNAL(looseKey()), searchLine, SLOT(setFocus())); connect (appList, SIGNAL(looseKey()), searchLine, SLOT(selectAll() )); connect (kapp, SIGNAL(shutDown()), this, SLOT(save() )); - if (useKTTS) connect (appList, SIGNAL(sayText(const QString&)), this, SLOT(sayText(const QString&) )); + if (useKTTS) connect (appList, SIGNAL(sayText(const TQString&)), this, SLOT(sayText(const TQString&) )); centerLayout->addWidget(appList,10); centerLayout->addSpacing ( 3 ); @@ -1794,12 +1794,12 @@ StartMenu::StartMenu( int size, QWidget * parent, WFlags f ) : QWidget(parent, " m_panel->setFixedHeight(_BIGSIZE_(_size)+4); statusBar = new KSqueezedTextLabel(this); - QFont tmpFnt = statusBar->font(); + TQFont tmpFnt = statusBar->font(); tmpFnt.setBold(true); statusBar->setFont(tmpFnt); - connect (appList, SIGNAL(message(const QString&)), this, SLOT(message(const QString&) )); + connect (appList, SIGNAL(message(const TQString&)), this, SLOT(message(const TQString&) )); connect (appList, SIGNAL(clearStatus()), this, SLOT(clearStatus() )); - connect (m_panel, SIGNAL(message(const QString&)), this, SLOT(centerMessage(const QString&) )); + connect (m_panel, SIGNAL(message(const TQString&)), this, SLOT(centerMessage(const TQString&) )); connect (m_panel, SIGNAL(clearStatus()), this, SLOT(clearStatus() )); mainLayout->addSpacing ( 3 ); @@ -1815,8 +1815,8 @@ void StartMenu::save() { config = new KConfig("bStarter", false, false); config->setGroup("Shell"); - QStringList lst; - for ( QStringList::Iterator it = history.begin(); it != history.end(); ++it ) + TQStringList lst; + for ( TQStringList::Iterator it = history.begin(); it != history.end(); ++it ) lst.prepend(*it); config->writeEntry("History", lst); config->setGroup("Settings"); @@ -1830,7 +1830,7 @@ extern int kicker_screen_number; void StartMenu::slotLock() { - QCString appname( "kdesktop" ); + TQCString appname( "kdesktop" ); // if ( kicker_screen_number ) // appname.sprintf("kdesktop-screen-%d", kicker_screen_number); kapp->dcopClient()->send(appname, "KScreensaverIface", "lock()", ""); @@ -1844,9 +1844,9 @@ void StartMenu::reloadIcons( int size) appList->reloadIcons(size); } -void StartMenu::setCategory(const QString & category) +void StartMenu::setCategory(const TQString & category) { - categoryCombo->setCurrentItem ( categoryCombo->listBox()->index(categoryCombo->listBox()->findItem(category, Qt::ExactMatch))); + categoryCombo->setCurrentItem ( categoryCombo->listBox()->index(categoryCombo->listBox()->findItem(category, TQt::ExactMatch))); //emit categoryCombo->activated ( category ); // dunno if i'll need that once, needs protected access appList->showCategory(category); } @@ -1862,31 +1862,31 @@ void StartMenu::toggleKTTS(bool on) if (useKTTS) { m_spokenText = 0; - QPtrListIterator<StartMenuEntry> it(appList->entryList); + TQPtrListIterator<StartMenuEntry> it(appList->entryList); StartMenuEntry *runner; while( (runner = it.current()) != 0 ) { ++it; - connect (runner, SIGNAL(sayText(const QString&)), this, SIGNAL(sayText(const QString&))); + connect (runner, SIGNAL(sayText(const TQString&)), this, SIGNAL(sayText(const TQString&))); } - connect (appList, SIGNAL(sayText(const QString&)), this, SLOT(sayText(const QString&) )); + connect (appList, SIGNAL(sayText(const TQString&)), this, SLOT(sayText(const TQString&) )); } else { - QPtrListIterator<StartMenuEntry> it(appList->entryList); + TQPtrListIterator<StartMenuEntry> it(appList->entryList); StartMenuEntry *runner; while( (runner = it.current()) != 0 ) { ++it; - disconnect (runner, SIGNAL(sayText(const QString&)), this, SIGNAL(sayText(const QString&))); + disconnect (runner, SIGNAL(sayText(const TQString&)), this, SIGNAL(sayText(const TQString&))); } - disconnect (appList, SIGNAL(sayText(const QString&)), this, SLOT(sayText(const QString&) )); + disconnect (appList, SIGNAL(sayText(const TQString&)), this, SLOT(sayText(const TQString&) )); } } -SearchLine::SearchLine( QWidget * parent ) : KLineEdit(parent){blocked = false;}; +SearchLine::SearchLine( TQWidget * parent ) : KLineEdit(parent){blocked = false;}; -void SearchLine::makeCompletion (const QString & string) +void SearchLine::makeCompletion (const TQString & string) { if (blocked) {blocked = false; return;} emit typedTextChanged(string); @@ -1898,10 +1898,10 @@ StartMenu::~StartMenu() // appList->save(); } -void StartMenu::sayText(const QString &text) +void StartMenu::sayText(const TQString &text) { // strip tags - QString cleanText; + TQString cleanText; bool copy = true; for (uint i = 0; i < text.length(); i++) { @@ -1919,37 +1919,37 @@ void StartMenu::sayText(const QString &text) cleanText += text[i]; } // done - QByteArray data1; - QDataStream arg1(data1, IO_WriteOnly); + TQByteArray data1; + TQDataStream arg1(data1, IO_WriteOnly); arg1 << m_spokenText; // stop what we messaged before (if) if (!kapp->dcopClient()->send("kttsd", "kspeech", "stopText(uint)", data1)) - qDebug("there was some error using DCOP."); + tqDebug("there was some error using DCOP."); - QByteArray data, replyData; - QCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data, replyData; + TQCString replyType; + TQDataStream arg(data, IO_WriteOnly); arg << cleanText << ""; // ask for the full list - if (!kapp->dcopClient()->call("kttsd", "kspeech", "sayText(QString, QString)", data, replyType, replyData)) - qDebug("there was some error using DCOP."); + if (!kapp->dcopClient()->call("kttsd", "kspeech", "sayText(TQString, TQString)", data, replyType, replyData)) + tqDebug("there was some error using DCOP."); else { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if (replyType == "uint") reply >> m_spokenText; else - qWarning("properties() returned an unexpected type of reply (%s)!",QString(replyType).ascii()); + tqWarning("properties() returned an unexpected type of reply (%s)!",TQString(replyType).ascii()); } } void StartMenu::show() { - m_panel->setBackgroundOrigin(QWidget::WidgetOrigin); - statusBar->setBackgroundOrigin(QWidget::ParentOrigin); + m_panel->setBackgroundOrigin(TQWidget::WidgetOrigin); + statusBar->setBackgroundOrigin(TQWidget::ParentOrigin); searchLine->setText(i18n("Type to search or enter a command")); searchLine->selectAll(); searchLine->setFocus(); // KWin::setOpacity(winId(), 80); - QWidget::show(); + TQWidget::show(); } void StartMenu::hide() @@ -1957,18 +1957,18 @@ void StartMenu::hide() emit aboutToHide(); searchLine->clear(); appList->reset(); - QWidget::hide(); + TQWidget::hide(); } -void StartMenu::message(const QString &text) +void StartMenu::message(const TQString &text) { - statusBar->setAlignment ( Qt::AlignAuto | Qt::AlignVCenter ); + statusBar->setAlignment ( TQt::AlignAuto | TQt::AlignVCenter ); statusBar->setText(text); } -void StartMenu::centerMessage(const QString &text) +void StartMenu::centerMessage(const TQString &text) { - statusBar->setAlignment ( Qt::AlignCenter ); + statusBar->setAlignment ( TQt::AlignCenter ); statusBar->setText(text); } @@ -1988,9 +1988,9 @@ void StartMenu::setPanelPosition(PanelPosition p) m_panel->show(); if (m_panelPos == StartMenu::Nowhere || m_panelPos == StartMenu::West || m_panelPos == StartMenu::East ) { -// m_panel->set2SizePolicies(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); - m_panel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - m_panel->setOrientation ( Qt::Horizontal ); +// m_panel->set2SizePolicies(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed); + m_panel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed); + m_panel->setOrientation ( TQt::Horizontal ); m_panel->setFixedHeight(_BIGSIZE_(_size)+4); m_panel->setMaximumWidth(32767); } @@ -2000,9 +2000,9 @@ void StartMenu::setPanelPosition(PanelPosition p) m_panel->show(); if (m_panelPos == StartMenu::Nowhere || m_panelPos == StartMenu::South || m_panelPos == StartMenu::North ) { -// m_panel->set2SizePolicies(QSizePolicy::Fixed, QSizePolicy::MinimumExpanding); - m_panel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding); - m_panel->setOrientation ( Qt::Vertical ); +// m_panel->set2SizePolicies(TQSizePolicy::Fixed, TQSizePolicy::MinimumExpanding); + m_panel->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding); + m_panel->setOrientation ( TQt::Vertical ); m_panel->setFixedWidth(_BIGSIZE_(_size)+4); m_panel->setMaximumHeight(32767); } @@ -2012,9 +2012,9 @@ void StartMenu::setPanelPosition(PanelPosition p) m_panel->show(); if (m_panelPos == StartMenu::Nowhere || m_panelPos == StartMenu::South || m_panelPos == StartMenu::North ) { -// m_panel->set2SizePolicies(QSizePolicy::Fixed, QSizePolicy::MinimumExpanding); - m_panel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding); - m_panel->setOrientation ( Qt::Vertical ); +// m_panel->set2SizePolicies(TQSizePolicy::Fixed, TQSizePolicy::MinimumExpanding); + m_panel->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding); + m_panel->setOrientation ( TQt::Vertical ); m_panel->setFixedWidth(_BIGSIZE_(_size)+4); m_panel->setMaximumHeight(32767); } @@ -2024,9 +2024,9 @@ void StartMenu::setPanelPosition(PanelPosition p) m_panel->show(); if (m_panelPos == StartMenu::Nowhere || m_panelPos == StartMenu::West || m_panelPos == StartMenu::East ) { -// m_panel->set2SizePolicies(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); - m_panel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - m_panel->setOrientation ( Qt::Horizontal ); +// m_panel->set2SizePolicies(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed); + m_panel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed); + m_panel->setOrientation ( TQt::Horizontal ); m_panel->setFixedHeight(_BIGSIZE_(_size)+4); m_panel->setMaximumWidth(32767); } @@ -2039,21 +2039,21 @@ void StartMenu::setPanelPosition(PanelPosition p) m_panelPos = p; } -void StartMenu::execute(const QString& command) +void StartMenu::execute(const TQString& command) // adapted from kicker run applet - far more convenient ;) { history.remove(command); history.append(command); // all - the list is not stored and the user may want to easily correct mistypes of LOOOOOOOOOOOOOOOOOOOONG commands with a lot of "\ "... ;P - QString exec; + TQString exec; kapp->propagateSessionManager(); _filterData->setData( command.stripWhiteSpace() ); - QStringList filters; + TQStringList filters; filters << "kurisearchfilter" << "kshorturifilter"; KURIFilter::self()->filterURI( *(_filterData), filters ); - QString cmd = (_filterData->uri().isLocalFile() ? _filterData->uri().path():_filterData->uri().url()); + TQString cmd = (_filterData->uri().isLocalFile() ? _filterData->uri().path():_filterData->uri().url()); // Nothing interesting. Quit! if ( cmd.isEmpty() ) @@ -2101,63 +2101,63 @@ void StartMenu::endHistory() currentHistoryItem = history.end(); } -void StartMenu::search(const QString & string) +void StartMenu::search(const TQString & string) { - disconnect (searchLine, SIGNAL(textChanged ( const QString & )), this, SLOT(search(const QString &))); + disconnect (searchLine, SIGNAL(textChanged ( const TQString & )), this, SLOT(search(const TQString &))); appList->search(string); } -bool StartMenu::eventFilter ( QObject * o, QEvent * e ) +bool StartMenu::eventFilter ( TQObject * o, TQEvent * e ) { if (o == header) { - if (e->type() == QEvent::MouseButtonPress && ((QMouseEvent*)e)->button() == Qt::LeftButton) + if (e->type() == TQEvent::MouseButtonPress && ((TQMouseEvent*)e)->button() == TQt::LeftButton) { inMove = true; - movePoint = ((QMouseEvent*)e)->pos(); - header->grabMouse(Qt::SizeAllCursor); + movePoint = ((TQMouseEvent*)e)->pos(); + header->grabMouse(TQt::SizeAllCursor); return true; } - else if (e->type() == QEvent::MouseButtonRelease && ((QMouseEvent*)e)->button() == Qt::LeftButton) + else if (e->type() == TQEvent::MouseButtonRelease && ((TQMouseEvent*)e)->button() == TQt::LeftButton) { inMove = false; header->releaseMouse(); return true; } - else if (e->type() == QEvent::MouseMove && inMove) + else if (e->type() == TQEvent::MouseMove && inMove) { - move(((QMouseEvent*)e)->globalPos() - movePoint); + move(((TQMouseEvent*)e)->globalPos() - movePoint); return true; } - else if (e->type() == QEvent::Resize && ((QResizeEvent*)e)->size().height() != ((QResizeEvent*)e)->oldSize().height()) + else if (e->type() == TQEvent::Resize && ((TQResizeEvent*)e)->size().height() != ((TQResizeEvent*)e)->oldSize().height()) { - int height = ((QResizeEvent*)e)->size().height(); - KPixmap bgPix = QPixmap(32, height); - KPixmap bgPix1 = QPixmap(32, height/2); - KPixmap bgPix2 = QPixmap(32, height - bgPix1.height()); - QColor buttonColor = ((QWidget*)o)->palette().color(QPalette::Active, QColorGroup::Button); + int height = ((TQResizeEvent*)e)->size().height(); + KPixmap bgPix = TQPixmap(32, height); + KPixmap bgPix1 = TQPixmap(32, height/2); + KPixmap bgPix2 = TQPixmap(32, height - bgPix1.height()); + TQColor buttonColor = ((TQWidget*)o)->palette().color(TQPalette::Active, TQColorGroup::Button); KPixmapEffect::gradient( bgPix1, buttonColor.light(130), buttonColor, KPixmapEffect::VerticalGradient, 0); KPixmapEffect::gradient( bgPix2, buttonColor.dark(120), buttonColor.light(110), KPixmapEffect::VerticalGradient, 0); - QPainter p(&bgPix); + TQPainter p(&bgPix); p.drawPixmap(0,0,bgPix1); p.drawPixmap(0,bgPix1.height(),bgPix2); p.end(); - ((QWidget*)o)->setPaletteBackgroundPixmap( bgPix ); + ((TQWidget*)o)->setPaletteBackgroundPixmap( bgPix ); } return false; } if (o != searchLine) return false; - QLineEdit *le = (QLineEdit *)o; - if (e->type() == QEvent::KeyPress) + TQLineEdit *le = (TQLineEdit *)o; + if (e->type() == TQEvent::KeyPress) { - QKeyEvent *ke = (QKeyEvent*)e; - if (ke->state() & Qt::ControlButton || ke->state() & Qt::AltButton) + TQKeyEvent *ke = (TQKeyEvent*)e; + if (ke->state() & TQt::ControlButton || ke->state() & TQt::AltButton) // might be shortcut, set category { - if (ke->state() == Qt::ControlButton) + if (ke->state() == TQt::ControlButton) { - if (ke->key() == Qt::Key_Up) + if (ke->key() == TQt::Key_Up) { if (categoryCombo->currentItem() > 0) { @@ -2166,7 +2166,7 @@ bool StartMenu::eventFilter ( QObject * o, QEvent * e ) } return true; } - if (ke->key() == Qt::Key_Down) + if (ke->key() == TQt::Key_Down) { if (categoryCombo->currentItem() < categoryCombo->count()) { @@ -2176,7 +2176,7 @@ bool StartMenu::eventFilter ( QObject * o, QEvent * e ) return true; } } - if (ke->key() == Qt::Key_Shift || ke->key() == Qt::Key_Control || ke->key() == Qt::Key_Alt) + if (ke->key() == TQt::Key_Shift || ke->key() == TQt::Key_Control || ke->key() == TQt::Key_Alt) return false; ShortcutList::Iterator it; for ( it = shortcutList.begin(); it != shortcutList.end(); ++it ) @@ -2188,21 +2188,21 @@ bool StartMenu::eventFilter ( QObject * o, QEvent * e ) } switch(ke->key()) { - case Qt::Key_Return: - case Qt::Key_Enter: + case TQt::Key_Return: + case TQt::Key_Enter: { execute(le->text()); - if (!(ke->state() & Qt::ControlButton)) + if (!(ke->state() & TQt::ControlButton)) close(); //bye return true; //don't do anything else } - case Qt::Key_Backspace: - case Qt::Key_Delete: + case TQt::Key_Backspace: + case TQt::Key_Delete: { - connect (le, SIGNAL(textChanged ( const QString & )), this, SLOT(search(const QString &))); + connect (le, SIGNAL(textChanged ( const TQString & )), this, SLOT(search(const TQString &))); break; } - case Qt::Key_Down: + case TQt::Key_Down: { if (history.isEmpty() || currentHistoryItem == history.end()) { @@ -2219,7 +2219,7 @@ bool StartMenu::eventFilter ( QObject * o, QEvent * e ) } return true; //don't scroll the categories } - case Qt::Key_Up: + case TQt::Key_Up: { if (!(history.isEmpty() || currentHistoryItem == history.begin())) { @@ -2230,7 +2230,7 @@ bool StartMenu::eventFilter ( QObject * o, QEvent * e ) } return true; //don't scroll the categories } - case Qt::Key_Escape: + case TQt::Key_Escape: { close(); //bye break; @@ -2240,9 +2240,9 @@ bool StartMenu::eventFilter ( QObject * o, QEvent * e ) } return false; } - else if (isVisible() && useKTTS && e->type() == QEvent::FocusIn) + else if (isVisible() && useKTTS && e->type() == TQEvent::FocusIn) { - QString text = i18n("TTS output", "The searchline has now the focus."); + TQString text = i18n("TTS output", "The searchline has now the focus."); sayText(text); } return false; diff --git a/starter/menu.h b/starter/menu.h index d11a651..c858a07 100644 --- a/starter/menu.h +++ b/starter/menu.h @@ -6,55 +6,55 @@ #include <config.h> #endif -#include <qpoint.h> -#include <qwidget.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qscrollview.h> -#include <qmap.h> -#include <qpixmap.h> -#include <qsortedlist.h> -#include <qptrlist.h> +#include <tqpoint.h> +#include <tqwidget.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqscrollview.h> +#include <tqmap.h> +#include <tqpixmap.h> +#include <tqsortedlist.h> +#include <tqptrlist.h> #include <klineedit.h> #include <kservicegroup.h> #include "mykey.h" class KIconLoader; -class QPaintEvent; -class QMouseEvent; -class QEvent; -class QPixmap; -class QVBoxLayout; -class QComboBox; +class TQPaintEvent; +class TQMouseEvent; +class TQEvent; +class TQPixmap; +class TQVBoxLayout; +class TQComboBox; class StartMenuButton; class KConfig; class LinkConfig; -class Panel : public QWidget//QScrollView +class Panel : public TQWidget//TQScrollView { friend class StartMenu; friend class StartMenuButton; Q_OBJECT public: - Panel(int size = 32, QWidget * parent = 0, const char * name = 0); + Panel(int size = 32, TQWidget * parent = 0, const char * name = 0); Orientation orientation(){ return _orientation; } void setOrientation ( Orientation o ); -// void addItem ( QWidget *w ); - StartMenuButton* addIcon ( QString icon, QString title, QString command, QPoint pt = QPoint(-1,-1) ); +// void addItem ( TQWidget *w ); + StartMenuButton* addIcon ( TQString icon, TQString title, TQString command, TQPoint pt = TQPoint(-1,-1) ); void save(KConfig* config); - void repositionIcon ( StartMenuButton* bt, QPoint pt ); - void ensureVisible(QRect & rect); + void repositionIcon ( StartMenuButton* bt, TQPoint pt ); + void ensureVisible(TQRect & rect); void reloadIcons(int size); void poof(); public slots: void updateSize(int); protected: - void wheelEvent ( QWheelEvent * ); - void dragEnterEvent ( QDragEnterEvent * ); - void dropEvent ( QDropEvent * ); - void mouseReleaseEvent ( QMouseEvent * e ); - void resizeEvent ( QResizeEvent * ); + void wheelEvent ( TQWheelEvent * ); + void dragEnterEvent ( TQDragEnterEvent * ); + void dropEvent ( TQDropEvent * ); + void mouseReleaseEvent ( TQMouseEvent * e ); + void resizeEvent ( TQResizeEvent * ); LinkConfig *linkConfigDialog; int _size; private: @@ -62,74 +62,74 @@ private: Orientation _orientation; bool _draggedMe; int _poofIndex; - QPoint iconAddPosition; - QPixmap *_poofPix; - QPixmap *_poofAnimPix; - QWidget *_poof; + TQPoint iconAddPosition; + TQPixmap *_poofPix; + TQPixmap *_poofAnimPix; + TQWidget *_poof; private slots: void addIcon(); void runPoof(); signals: - void message(const QString&); + void message(const TQString&); void clearStatus(); }; -class QTextDrag; +class TQTextDrag; -class StartMenuButton : public QWidget +class StartMenuButton : public TQWidget { friend class Panel; Q_OBJECT public: enum Orientation { Horizontal = 0, Vertical, Status }; - StartMenuButton ( int size, QString icon, QString title, QString command, Orientation orientation, QWidget* parent = 0, const char * name = 0); - void smartMove(QPoint & pt); // prevents collisions with other childs of parentWidget() + StartMenuButton ( int size, TQString icon, TQString title, TQString command, Orientation orientation, TQWidget* parent = 0, const char * name = 0); + void smartMove(TQPoint & pt); // prevents collisions with other childs of parentWidget() void smartMove(int x, int y); void reloadIcon(int size); public slots: void edit(); protected: - QString & command(){return m_command;} - QString & title(){return m_title;} - QString & icon(){return m_icon;} - void mouseReleaseEvent ( QMouseEvent * e ); - void mouseMoveEvent ( QMouseEvent * e ); - void enterEvent( QEvent * ); - void leaveEvent( QEvent * ); + TQString & command(){return m_command;} + TQString & title(){return m_title;} + TQString & icon(){return m_icon;} + void mouseReleaseEvent ( TQMouseEvent * e ); + void mouseMoveEvent ( TQMouseEvent * e ); + void enterEvent( TQEvent * ); + void leaveEvent( TQEvent * ); bool isMoving() {return _moving;} private: Orientation m_orientation; bool _moving; - QTextDrag *myDrag; - QString m_command; - QString m_title; - QString m_icon; - QLabel* m_titleLabel; - QLabel* m_pixmapLabel; - QPixmap m_pix; - QPixmap m_hoverPix; + TQTextDrag *myDrag; + TQString m_command; + TQString m_title; + TQString m_icon; + TQLabel* m_titleLabel; + TQLabel* m_pixmapLabel; + TQPixmap m_pix; + TQPixmap m_hoverPix; signals: - void pressed(const QString &); - void hovered(const QString &); + void pressed(const TQString &); + void hovered(const TQString &); void unhovered(); void updateSize(int); }; class KService; -class QDate; +class TQDate; class AppList; -class StartMenuEntry : public QWidget +class StartMenuEntry : public TQWidget { friend class AppList; Q_OBJECT public: - StartMenuEntry(KService * service, QString relPath, int size = 32, bool neewbie = false, QWidget * parent = 0); + StartMenuEntry(KService * service, TQString relPath, int size = 32, bool neewbie = false, TQWidget * parent = 0); ~StartMenuEntry(); void reloadIcon(int size); bool display; - QString title(); + TQString title(); void saveStats(); int rank; bool forNewbie; @@ -143,34 +143,34 @@ public: bool operator<( const double& d ) const; bool operator>( const double& d ) const; protected: - void focusInEvent ( QFocusEvent * ); - void focusOutEvent ( QFocusEvent * ); - void mouseReleaseEvent ( QMouseEvent * e ); - void mouseMoveEvent ( QMouseEvent * mme ); - void keyPressEvent ( QKeyEvent * e ); - void enterEvent( QEvent * ); - void leaveEvent( QEvent * ); + void focusInEvent ( TQFocusEvent * ); + void focusOutEvent ( TQFocusEvent * ); + void mouseReleaseEvent ( TQMouseEvent * e ); + void mouseMoveEvent ( TQMouseEvent * mme ); + void keyPressEvent ( TQKeyEvent * e ); + void enterEvent( TQEvent * ); + void leaveEvent( TQEvent * ); KService* m_service; - QString groupPath; - QDate lastUse; + TQString groupPath; + TQDate lastUse; uint usage; private: void execute(); - QString exec; + TQString exec; bool isCurrent; - QLabel* m_titleLabel; - QLabel* m_commentLabel; - QLabel* m_pixmapLabel; - QPixmap m_pix; - QPixmap m_hoverPix; + TQLabel* m_titleLabel; + TQLabel* m_commentLabel; + TQLabel* m_pixmapLabel; + TQPixmap m_pix; + TQPixmap m_hoverPix; signals: void closeMenu(); void pressed(); void appDown(); void appUp(); void appLeft(); - void hovered(const QString &); - void sayText(const QString&); + void hovered(const TQString &); + void sayText(const TQString&); void unhovered(); void popup(StartMenuEntry*); void executed(); @@ -180,17 +180,17 @@ class KPopupMenu; class ConfigDialog; class HelpDialog; -class AppList : public QScrollView +class AppList : public TQScrollView { friend class StartMenu; Q_OBJECT public: - AppList(int size = 32, QWidget * parent = 0); - StartMenuEntry* addApp(KService * service, QStringList & captions, QString relPath); + AppList(int size = 32, TQWidget * parent = 0); + StartMenuEntry* addApp(KService * service, TQStringList & captions, TQString relPath); void finish(); StartMenuEntry* handledEntry; // for rightclick menu action - void writeEntry(QString path, bool hidden = false); // for add/edit + void writeEntry(TQString path, bool hidden = false); // for add/edit void reloadIcons(int size); public slots: void addEntry(); @@ -200,35 +200,35 @@ public slots: void editDialog(); void clear(); void reset(); - void search(const QString & string); + void search(const TQString & string); void appDown(); void appUp(); void appLeft(); void sort(); - void showCategory(const QString & string); + void showCategory(const TQString & string); void unblockPopup(){popupBlocked_ = false;} protected: - QStringList categories; + TQStringList categories; int favItemAmount; void save(KConfig* config); - void mouseReleaseEvent ( QMouseEvent * e ); + void mouseReleaseEvent ( TQMouseEvent * e ); void windowActivationChange ( bool oldActive ); private: void init(); - void insertGroup(KServiceGroup *g, QStringList & captions, QStringList & paths); + void insertGroup(KServiceGroup *g, TQStringList & captions, TQStringList & paths); KServiceGroup::Ptr m_root; KIconLoader *m_iconLoader; - QLabel *infoLabel; - QVBoxLayout * infoLayout; - QVBoxLayout * m_VLayout; - QFrame * m_widget; + TQLabel *infoLabel; + TQVBoxLayout * infoLayout; + TQVBoxLayout * m_VLayout; + TQFrame * m_widget; bool newbie; - QStringList neewbieApps; + TQStringList neewbieApps; KPopupMenu *m_popup; bool popupBlocked_; int _size; - typedef QSortedList<StartMenuEntry> StartMenuEntryList; - typedef QMap<QString,StartMenuEntryList> KeyWordList; + typedef TQSortedList<StartMenuEntry> StartMenuEntryList; + typedef TQMap<TQString,StartMenuEntryList> KeyWordList; StartMenuEntryList entryList; KeyWordList m_keywordList; KeyWordList m_groupList; @@ -238,80 +238,80 @@ private slots: void popup(StartMenuEntry*); signals: void looseKey(); - void message(const QString&); - void sayText(const QString&); + void message(const TQString&); + void sayText(const TQString&); void clearStatus(); }; -class QStringList; +class TQStringList; class SearchLine : public KLineEdit { Q_OBJECT public: - SearchLine( QWidget * parent ); + SearchLine( TQWidget * parent ); bool blocked; protected slots: - void makeCompletion (const QString &); + void makeCompletion (const TQString &); void block(){blocked = true;} signals: - void typedTextChanged(const QString & string); + void typedTextChanged(const TQString & string); }; class KURIFilterData; class StarterConfig; -class QSignalMapper; +class TQSignalMapper; class KSqueezedTextLabel; -class StartMenu : public QWidget +class StartMenu : public TQWidget { friend class starter; // to allow setting the shortcutlis directly Q_OBJECT public: enum PanelPosition { North = 0, South, West, East, Nowhere }; - StartMenu ( int size = 32, QWidget * parent = 0, WFlags f = 0 ); + StartMenu ( int size = 32, TQWidget * parent = 0, WFlags f = 0 ); ~StartMenu(); void show(); void hide(); void reloadIcons(int size); - QStringList & categories(){return appList->categories;}; - typedef QMap<MyKey,QString> ShortcutList; + TQStringList & categories(){return appList->categories;}; + typedef TQMap<MyKey,TQString> ShortcutList; void updateShortcuts(ShortcutList &); void setFavItemAmount(int i) {if (appList) appList->favItemAmount = i;} void setPanelPosition(PanelPosition p); public slots: - void sayText(const QString &text); + void sayText(const TQString &text); void toggleKTTS(bool); - void setCategory(const QString & category); + void setCategory(const TQString & category); void save(); protected: - bool eventFilter ( QObject * o, QEvent * e ); + bool eventFilter ( TQObject * o, TQEvent * e ); ShortcutList shortcutList; private slots: - void message(const QString &text); - void centerMessage(const QString &text); + void message(const TQString &text); + void centerMessage(const TQString &text); void clearStatus(); - void execute(const QString & command); - void search(const QString & string); + void execute(const TQString & command); + void search(const TQString & string); void endHistory(); // void slotLock(); private: bool inMove; uint m_spokenText; int _size; - QWidget *header; - QPoint movePoint; + TQWidget *header; + TQPoint movePoint; KURIFilterData *_filterData; AppList *appList; - QComboBox *categoryCombo; + TQComboBox *categoryCombo; SearchLine *searchLine; KSqueezedTextLabel *statusBar; Panel *m_panel; - QStringList history; - QStringList::Iterator currentHistoryItem; + TQStringList history; + TQStringList::Iterator currentHistoryItem; PanelPosition m_panelPos; StartMenuButton *userButton; - QGridLayout *panelLayout; + TQGridLayout *panelLayout; signals: void aboutToHide(); diff --git a/starter/mykey.h b/starter/mykey.h index 36a32d2..b924624 100644 --- a/starter/mykey.h +++ b/starter/mykey.h @@ -1,23 +1,23 @@ #ifndef MYKEY_H #define MYKEY_H -#include <qstring.h> +#include <tqstring.h> class MyKey { public: MyKey(short key, short modFlags){modFlags_ = modFlags; key_ = key;} MyKey(){modFlags_ = 0; key_ = 0;} - MyKey(QString & string) + MyKey(TQString & string) { - QString tmpString = string.left(string.findRev('+')); + TQString tmpString = string.left(string.findRev('+')); modFlags_ = 0; - if (tmpString.contains("256")) // QString.setNum(Qt::ShiftButton) - modFlags_ |= Qt::ShiftButton; - if (tmpString.contains("512")) // QString.setNum(Qt::ControlButton) - modFlags_ |= Qt::ControlButton; - if (tmpString.contains("1024")) // QString.setNum(Qt::AltButton) - modFlags_ |= Qt::AltButton; + if (tmpString.contains("256")) // TQString.setNum(TQt::ShiftButton) + modFlags_ |= TQt::ShiftButton; + if (tmpString.contains("512")) // TQString.setNum(TQt::ControlButton) + modFlags_ |= TQt::ControlButton; + if (tmpString.contains("1024")) // TQString.setNum(TQt::AltButton) + modFlags_ |= TQt::AltButton; tmpString = string.right(string.length() - string.findRev('+') - 1); key_ = tmpString.toShort(); } @@ -39,25 +39,25 @@ public: { return (!(modFlags_ > myKey.modFlags()) && key_ > myKey.key()); } - QString toString() const + TQString toString() const { - QString string; - QString numString; - if (modFlags_ & Qt::ShiftButton) + TQString string; + TQString numString; + if (modFlags_ & TQt::ShiftButton) { - numString.setNum(Qt::ShiftButton); + numString.setNum(TQt::ShiftButton); string += numString; string += '+'; } - if (modFlags_ & Qt::ControlButton) + if (modFlags_ & TQt::ControlButton) { - numString.setNum(Qt::ControlButton); + numString.setNum(TQt::ControlButton); string += numString; string += '+'; } - if (modFlags_ & Qt::AltButton) + if (modFlags_ & TQt::AltButton) { - numString.setNum(Qt::AltButton); + numString.setNum(TQt::AltButton); string += numString; string += '+'; } diff --git a/starter/starter.cpp b/starter/starter.cpp index 9740888..d7e8d83 100644 --- a/starter/starter.cpp +++ b/starter/starter.cpp @@ -1,20 +1,20 @@ -#include <qcombobox.h> -#include <qcursor.h> -#include <qdesktopwidget.h> +#include <tqcombobox.h> +#include <tqcursor.h> +#include <tqdesktopwidget.h> #include <kglobal.h> #include <klocale.h> #include <kconfig.h> #include <kmessagebox.h> #include <kapplication.h> # include <kpopupmenu.h> -#include <qimage.h> -#include <qfile.h> -#include <qlabel.h> -#include <qradiobutton.h> -#include <qspinbox.h> -#include <qcheckbox.h> -#include <qtimer.h> +#include <tqimage.h> +#include <tqfile.h> +#include <tqlabel.h> +#include <tqradiobutton.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> +#include <tqtimer.h> #include <kiconloader.h> #include <dcopclient.h> #include <kdebug.h> @@ -35,15 +35,15 @@ (_v_ == 2) ? 32 :\ (_v_ == 3) ? 48 : 64 -starter::starter(const QString& configFile, Type type, int actions, QWidget *parent, const char *name) +starter::starter(const TQString& configFile, Type type, int actions, TQWidget *parent, const char *name) : DCOPObject("StarterIface"), KPanelApplet(configFile, type, actions, parent, name) { configPopup = new KPopupMenu(this); popupBlocked = false; - mainView = new QLabel(this); + mainView = new TQLabel(this); configDialog = new StarterConfig(this); - QRect desktop = QDesktopWidget().availableGeometry( configDialog ); + TQRect desktop = TQDesktopWidget().availableGeometry( configDialog ); configDialog->move((desktop.width() - configDialog->width())/2, (desktop.height() - configDialog->height())/2); KConfig config("bStarter", false, false); config.setGroup("Settings"); @@ -71,7 +71,7 @@ starter::starter(const QString& configFile, Type type, int actions, QWidget *par _iconSize = config.readNumEntry("IconSize", 32 ); configDialog->iconSize->setCurrentItem(_SIZE2VALUE_(_iconSize)); - startMenu = new StartMenu(_iconSize, this, Qt::WType_Popup); + startMenu = new StartMenu(_iconSize, this, TQt::WType_Popup); shortcutList = startMenu->shortcutList; configDialog->categoryList->insertStringList(startMenu->categories()); connect (startMenu, SIGNAL(aboutToHide()), this, SLOT(unblockPopupDelayed())); @@ -80,7 +80,7 @@ starter::starter(const QString& configFile, Type type, int actions, QWidget *par //--- connect(configDialog->categoryList, SIGNAL(highlighted(int)), this, SLOT(activateShortcutButton(int))); connect(configDialog->buttonShortcut, SIGNAL(capturedShortcut (const KShortcut &)), this, SLOT(addShortcut(const KShortcut &))); - connect(configDialog->categoryList, SIGNAL(highlighted ( const QString & )), this, SLOT(updateShortcutButton(const QString &))); + connect(configDialog->categoryList, SIGNAL(highlighted ( const TQString & )), this, SLOT(updateShortcutButton(const TQString &))); connect(configDialog->buttonOk, SIGNAL(clicked()), this, SLOT(updateSettings())); StarterHelp *helpDialog = new StarterHelp(configDialog); connect(configDialog->buttonHelp, SIGNAL(clicked()), helpDialog, SLOT(show())); @@ -120,14 +120,14 @@ void starter::addShortcut(const KShortcut &cut) // generate MyKey short state = 0; if (cut.seq(0).key(0).modFlags() & KKey::CTRL) - state |= Qt::ControlButton; + state |= TQt::ControlButton; if (cut.seq(0).key(0).modFlags() & KKey::ALT) - state |= Qt::AltButton; + state |= TQt::AltButton; if (cut.seq(0).key(0).modFlags() & KKey::SHIFT) - state |= Qt::ShiftButton; + state |= TQt::ShiftButton; MyKey key(cut.seq(0).keyCodeQt(), state); // Test if this is a valid shotrcut, i.e. contains 'ctrl' or 'alt', returns iff not - if (!(state & Qt::ControlButton || state & Qt::AltButton)) + if (!(state & TQt::ControlButton || state & TQt::AltButton)) { KMessageBox::sorry(this, i18n("<qt>To ensure usefull behaviour of the searchline, the shortcut <b>must contain</b> a metabutton, i.e. <b>'ctrl' and/or 'alt'</b></qt>"), i18n("Sorry, invalid Shortcut")); return; @@ -154,13 +154,13 @@ void starter::addShortcut(const KShortcut &cut) configDialog->buttonShortcut->setShortcut(cut, false); } -void starter::updateShortcutButton(const QString & category) +void starter::updateShortcutButton(const TQString & category) { ShortcutList::Iterator it; for ( it = shortcutList.begin(); it != shortcutList.end(); ++it ) if (it.data() == category) { - QKeyEvent qke( QEvent::KeyPress, it.key().key(), 0, it.key().modFlags()); + TQKeyEvent qke( TQEvent::KeyPress, it.key().key(), 0, it.key().modFlags()); KKey kkey(&qke); KShortcut ksc(kkey); configDialog->buttonShortcut->setShortcut(ksc, false); @@ -205,7 +205,7 @@ void starter::updateSettings() } startMenu->setFavItemAmount(configDialog->favItemAmount->value()); config->setGroup("Shortcuts"); - QStringList cuts; QStringList cats; + TQStringList cuts; TQStringList cats; ShortcutList::Iterator it; for ( it = shortcutList.begin(); it != shortcutList.end(); ++it ) { @@ -218,46 +218,46 @@ void starter::updateSettings() delete config; } -#define _VALID_(_url_) configDialog && !configDialog->_url_->url().isEmpty() && QFile::exists(configDialog->_url_->url()) +#define _VALID_(_url_) configDialog && !configDialog->_url_->url().isEmpty() && TQFile::exists(configDialog->_url_->url()) void starter::reloadImages() { KIconLoader* iLoader = KGlobal::iconLoader(); - QString pth; + TQString pth; if (_VALID_(BaseURL)) pth = configDialog->BaseURL->url(); else pth = iLoader->iconPath("bStarter", KIcon::Small, true); if (pth) - pixmap = QImage(pth); + pixmap = TQImage(pth); if (!pth || pixmap.isNull()) { - pixmap = QPixmap(22,22); - pixmap.fill(Qt::black); + pixmap = TQPixmap(22,22); + pixmap.fill(TQt::black); } - pth = QString(); + pth = TQString(); if (_VALID_(HoverURL)) pth = configDialog->HoverURL->url(); else pth = iLoader->iconPath("bStarter_hover", KIcon::Small, true); if (pth) - hoverPixmap = QImage(pth); + hoverPixmap = TQImage(pth); if (!pth || hoverPixmap.isNull()) { - hoverPixmap = QPixmap(22,22); - hoverPixmap.fill(Qt::black); + hoverPixmap = TQPixmap(22,22); + hoverPixmap.fill(TQt::black); } - pth = QString(); + pth = TQString(); if (_VALID_(DownURL)) pth = configDialog->DownURL->url(); else pth = iLoader->iconPath("bStarter_down", KIcon::Small, true); if (pth) - downPixmap = QImage(pth); + downPixmap = TQImage(pth); if (!pth || downPixmap.isNull()) { - downPixmap = QPixmap(22,22); - downPixmap.fill(Qt::white); + downPixmap = TQPixmap(22,22); + downPixmap.fill(TQt::white); } int wd = pixmap.width(); int ht = pixmap.height(); @@ -269,7 +269,7 @@ void starter::reloadImages() repaint(); } -void starter::resizeEvent ( QResizeEvent *rev ) +void starter::resizeEvent ( TQResizeEvent *rev ) { pixmap = pixmap.convertToImage().smoothScale(rev->size().height()*pixmap.width()/pixmap.height(),rev->size().height()); downPixmap = downPixmap.convertToImage().smoothScale(rev->size().height()*downPixmap.width()/downPixmap.height(),rev->size().height()); @@ -281,12 +281,12 @@ void starter::resizeEvent ( QResizeEvent *rev ) void starter::configureMenu() { - KApplication::startServiceByDesktopName("kmenuedit", QStringList(), 0, 0, 0, "", true); + KApplication::startServiceByDesktopName("kmenuedit", TQStringList(), 0, 0, 0, "", true); } void starter::preferences() { - KApplication::startServiceByDesktopName("kmenuedit", QStringList(), 0, 0, 0, "", true); + KApplication::startServiceByDesktopName("kmenuedit", TQStringList(), 0, 0, 0, "", true); } int starter::widthForHeight(int height) const @@ -302,7 +302,7 @@ int starter::heightForWidth(int width) const void starter::unblockPopupDelayed() { popupBlocked = true; - QTimer::singleShot ( 50, this, SLOT(unblockPopup()) ); + TQTimer::singleShot ( 50, this, SLOT(unblockPopup()) ); } void starter::unblockPopup() @@ -335,14 +335,14 @@ void starter::popupMenu() } else { - QRect desktop = QDesktopWidget().availableGeometry( startMenu ); + TQRect desktop = TQDesktopWidget().availableGeometry( startMenu ); startMenu->resize(desktop.width()/5, 2*desktop.height()/3); startMenu->setFixedSize(startMenu->size()); // startMenu->setFixedSize(_MAX_(startMenu->minimumWidth(), desktop.width()/5) ,_MAX_(startMenu->minimumHeight(), 2*desktop.height()/3)); // 1/5 screen width, 2/3 screen height } - QPoint pt = mapToGlobal(pos()); - QRect desktop = QDesktopWidget().availableGeometry( startMenu ); + TQPoint pt = mapToGlobal(pos()); + TQRect desktop = TQDesktopWidget().availableGeometry( startMenu ); int x = pt.x(); int y = pt.y(); @@ -372,9 +372,9 @@ void starter::popupMenu() y = desktop.bottom() - startMenu->height(); if (y < 0) y = 0; } - pt = QPoint(x, y); + pt = TQPoint(x, y); - startMenu->reparent(this, Qt::WType_Popup, pt, true); + startMenu->reparent(this, TQt::WType_Popup, pt, true); } } @@ -391,63 +391,63 @@ void starter::showMenu() } else { - QRect desktop = QDesktopWidget().availableGeometry( startMenu ); + TQRect desktop = TQDesktopWidget().availableGeometry( startMenu ); // setActiveWindow(); startMenu->resize(desktop.width()/2, desktop.width()*9/32); startMenu->setFixedSize(startMenu->size()); // startMenu->setFixedSize(_MAX_(startMenu->minimumWidth(), desktop.width()/2) , _MAX_(startMenu->minimumHeight(), desktop.width()*9/32)); // 16:9 window, width == 1/2 screen } - QPoint pt; + TQPoint pt; if (configDialog->customDialogPos->isChecked()) { if (configDialog->dialogFollowMouse->isChecked()) { - QRect desktop = QDesktopWidget().availableGeometry( startMenu ); + TQRect desktop = TQDesktopWidget().availableGeometry( startMenu ); int x,y; - x = QCursor::pos().x() + startMenu->width()/2 < desktop.width() ? QCursor::pos().x() - startMenu->width()/2 : desktop.width() - startMenu->width(); + x = TQCursor::pos().x() + startMenu->width()/2 < desktop.width() ? TQCursor::pos().x() - startMenu->width()/2 : desktop.width() - startMenu->width(); if (x < 0) x = 0; - y = QCursor::pos().y() + startMenu->height()/2 < desktop.height() ? QCursor::pos().y() - startMenu->height()/2 : desktop.height() - startMenu->height(); + y = TQCursor::pos().y() + startMenu->height()/2 < desktop.height() ? TQCursor::pos().y() - startMenu->height()/2 : desktop.height() - startMenu->height(); if (y < 0) y = 0; - pt = QPoint(x, y); + pt = TQPoint(x, y); } else - pt = QPoint(configDialog->dialogX->value(), configDialog->dialogY->value()); + pt = TQPoint(configDialog->dialogX->value(), configDialog->dialogY->value()); } else { - QRect desktop = QDesktopWidget().availableGeometry( startMenu ); - pt = QPoint((desktop.right() - startMenu->width())/2, (desktop.bottom() - startMenu->height())/2); + TQRect desktop = TQDesktopWidget().availableGeometry( startMenu ); + pt = TQPoint((desktop.right() - startMenu->width())/2, (desktop.bottom() - startMenu->height())/2); } if (configDialog->showDialogTitlebar->isChecked()) - startMenu->reparent(this, Qt::WType_TopLevel, pt, true); + startMenu->reparent(this, TQt::WType_TopLevel, pt, true); else - startMenu->reparent(this, Qt::WType_TopLevel | Qt::WStyle_Customize | Qt::WStyle_NoBorder, pt, true); + startMenu->reparent(this, TQt::WType_TopLevel | TQt::WStyle_Customize | TQt::WStyle_NoBorder, pt, true); } -bool starter::eventFilter( QObject*, QEvent *e ) +bool starter::eventFilter( TQObject*, TQEvent *e ) { switch (e->type()) { - case QEvent::Enter: + case TQEvent::Enter: { mainView->setPixmap(hoverPixmap); mainView->repaint(); return TRUE; } - case QEvent::Leave: + case TQEvent::Leave: { mainView->setPixmap(startMenu->isShown() ? downPixmap : pixmap); mainView->repaint(); return TRUE; } - case QEvent::MouseButtonPress: + case TQEvent::MouseButtonPress: { - if (((QMouseEvent*)e)->button() == Qt::RightButton) + if (((TQMouseEvent*)e)->button() == TQt::RightButton) { - configPopup->popup(((QMouseEvent*)e)->globalPos()); + configPopup->popup(((TQMouseEvent*)e)->globalPos()); return TRUE; } - if (((QMouseEvent*)e)->button() == Qt::LeftButton) + if (((TQMouseEvent*)e)->button() == TQt::LeftButton) { mainView->setPixmap(downPixmap); mainView->repaint(); @@ -455,9 +455,9 @@ bool starter::eventFilter( QObject*, QEvent *e ) } return TRUE; } - case QEvent::MouseButtonRelease: + case TQEvent::MouseButtonRelease: { - if (((QMouseEvent*)e)->button() != Qt::LeftButton) + if (((TQMouseEvent*)e)->button() != TQt::LeftButton) return FALSE; if (mainView->hasMouse()) mainView->setPixmap(hoverPixmap); @@ -473,7 +473,7 @@ bool starter::eventFilter( QObject*, QEvent *e ) extern "C" { - KPanelApplet* init( QWidget *parent, const QString& configFile) + KPanelApplet* init( TQWidget *parent, const TQString& configFile) { KGlobal::locale()->insertCatalogue("starter"); return new starter(configFile, KPanelApplet::Normal, diff --git a/starter/starter.h b/starter/starter.h index 39c72b9..0175ea4 100644 --- a/starter/starter.h +++ b/starter/starter.h @@ -7,17 +7,17 @@ #endif #include <kpanelapplet.h> -#include <qmap.h> -#include <qstring.h> -#include <qpixmap.h> -// #include <qpainter.h> +#include <tqmap.h> +#include <tqstring.h> +#include <tqpixmap.h> +// #include <tqpainter.h> #include <kconfig.h> #include <kshortcut.h> #include "starteriface.h" #include "mykey.h" class DCOPClient; -class QLabel; +class TQLabel; class KPopupMenu; class StartMenu; class StarterConfig; @@ -27,8 +27,8 @@ class starter : public KPanelApplet, virtual public StarterIface Q_OBJECT public: - starter(const QString& configFile, Type t = Normal, int actions = 0, - QWidget *parent = 0, const char *name = 0); + starter(const TQString& configFile, Type t = Normal, int actions = 0, + TQWidget *parent = 0, const char *name = 0); ~starter(); virtual int widthForHeight(int height) const; @@ -37,29 +37,29 @@ public: void popupMenu(); void showMenu(); protected: - virtual void resizeEvent ( QResizeEvent * ); + virtual void resizeEvent ( TQResizeEvent * ); private: enum State {Default, Hover, Down}; State state; int _iconSize; - bool eventFilter( QObject *o, QEvent *e ); + bool eventFilter( TQObject *o, TQEvent *e ); bool popupBlocked; // bool isDialog_; - QLabel *mainView; -// QPainter m_painter; + TQLabel *mainView; +// TQPainter m_painter; DCOPClient *client; KPopupMenu *configPopup; StartMenu *startMenu; - QPixmap pixmap; - QPixmap hoverPixmap; - QPixmap downPixmap; + TQPixmap pixmap; + TQPixmap hoverPixmap; + TQPixmap downPixmap; StarterConfig *configDialog; - typedef QMap<MyKey,QString> ShortcutList; + typedef TQMap<MyKey,TQString> ShortcutList; ShortcutList shortcutList; private slots: void addShortcut(const KShortcut&); - void updateShortcutButton(const QString&); + void updateShortcutButton(const TQString&); void configureMenu(); void reloadImages(); void updateSettings(); diff --git a/starter/starterconfig.ui b/starter/starterconfig.ui index a703e45..fd3f056 100644 --- a/starter/starterconfig.ui +++ b/starter/starterconfig.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>StarterConfig</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>StarterConfig</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>groupBox5</cstring> </property> @@ -38,7 +38,7 @@ <cstring>BaseURL</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2_3</cstring> </property> @@ -51,7 +51,7 @@ <cstring>HoverURL</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -59,7 +59,7 @@ <string><b>Base</b></string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -74,7 +74,7 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget" row="4" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="4" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -88,7 +88,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonHelp</cstring> </property> @@ -119,7 +119,7 @@ </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -136,7 +136,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -152,7 +152,7 @@ </widget> </hbox> </widget> - <widget class="QButtonGroup" row="3" column="0"> + <widget class="TQButtonGroup" row="3" column="0"> <property name="name"> <cstring>buttonGroup1</cstring> </property> @@ -163,7 +163,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> <cstring>layout10</cstring> </property> @@ -171,7 +171,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>customDialogSize</cstring> </property> @@ -182,7 +182,7 @@ <string>Custom dialog size</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>dialogW</cstring> </property> @@ -193,7 +193,7 @@ <number>3000</number> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -201,7 +201,7 @@ <string>x</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>dialogH</cstring> </property> @@ -231,7 +231,7 @@ </spacer> </hbox> </widget> - <widget class="QRadioButton" row="4" column="0"> + <widget class="TQRadioButton" row="4" column="0"> <property name="name"> <cstring>dialogFollowMouse</cstring> </property> @@ -242,7 +242,7 @@ <string>Show dialog under mouse</string> </property> </widget> - <widget class="QLayoutWidget" row="3" column="0"> + <widget class="TQLayoutWidget" row="3" column="0"> <property name="name"> <cstring>layout12</cstring> </property> @@ -250,7 +250,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>fixedDialogPos</cstring> </property> @@ -261,7 +261,7 @@ <string>Fixed</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>dialogX</cstring> </property> @@ -269,7 +269,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -277,7 +277,7 @@ <string>:</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>dialogY</cstring> </property> @@ -304,7 +304,7 @@ </spacer> </hbox> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>customDialogPos</cstring> </property> @@ -326,7 +326,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QCheckBox" row="8" column="0"> + <widget class="TQCheckBox" row="8" column="0"> <property name="name"> <cstring>showDialogTitlebar</cstring> </property> @@ -362,7 +362,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget" row="6" column="0"> + <widget class="TQLayoutWidget" row="6" column="0"> <property name="name"> <cstring>layout6</cstring> </property> @@ -370,7 +370,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -381,7 +381,7 @@ <string>Panel Position</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>North</string> @@ -421,7 +421,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox" row="2" column="0"> + <widget class="TQGroupBox" row="2" column="0"> <property name="name"> <cstring>groupBox6</cstring> </property> @@ -432,7 +432,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> <cstring>layout11</cstring> </property> @@ -440,7 +440,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>customPopupSize</cstring> </property> @@ -451,7 +451,7 @@ <string>Custom popup size</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>popupW</cstring> </property> @@ -462,7 +462,7 @@ <number>3000</number> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -470,7 +470,7 @@ <string>x</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>popupH</cstring> </property> @@ -514,7 +514,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget" row="2" column="0"> + <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> <cstring>layout6_2</cstring> </property> @@ -522,7 +522,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_3_2</cstring> </property> @@ -533,7 +533,7 @@ <string>Panel Position</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>North</string> @@ -573,7 +573,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>groupBox4</cstring> </property> @@ -584,7 +584,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="2" column="0"> + <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> <cstring>layout9</cstring> </property> @@ -592,7 +592,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2_4</cstring> </property> @@ -600,7 +600,7 @@ <string>Items in favorite list</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>favItemAmount</cstring> </property> @@ -641,7 +641,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>useKTTS</cstring> </property> @@ -649,7 +649,7 @@ <string>Talk to me (via KTTS)</string> </property> </widget> - <widget class="QLayoutWidget" row="3" column="0"> + <widget class="TQLayoutWidget" row="3" column="0"> <property name="name"> <cstring>layout9</cstring> </property> @@ -657,7 +657,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_4</cstring> </property> @@ -665,7 +665,7 @@ <string>Icon SIze</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>16/22</string> @@ -699,7 +699,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox" row="0" column="1" rowspan="4" colspan="1"> + <widget class="TQGroupBox" row="0" column="1" rowspan="4" colspan="1"> <property name="name"> <cstring>groupBox7</cstring> </property> @@ -710,7 +710,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QListBox" row="0" column="0"> + <widget class="TQListBox" row="0" column="0"> <property name="name"> <cstring>categoryList</cstring> </property> @@ -718,7 +718,7 @@ <enum>AlwaysOff</enum> </property> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> <cstring>layout18</cstring> </property> diff --git a/starter/starterhelp.ui b/starter/starterhelp.ui index a0bf868..ea039c8 100644 --- a/starter/starterhelp.ui +++ b/starter/starterhelp.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>StarterHelp</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>StarterHelp</cstring> </property> @@ -19,11 +19,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTabWidget" row="0" column="0"> + <widget class="TQTabWidget" row="0" column="0"> <property name="name"> <cstring>tabWidget2</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -34,7 +34,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -55,7 +55,7 @@ Pressing <b>down</b> will move the keyboard focus to the below entr </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -66,7 +66,7 @@ Pressing <b>down</b> will move the keyboard focus to the below entr <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel6</cstring> </property> @@ -80,7 +80,7 @@ Pressing the <b>up</b> key on the topmost item will act as above.< </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -91,7 +91,7 @@ Pressing the <b>up</b> key on the topmost item will act as above.< <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> |