diff --git a/README b/README index dbc57ec..fda5c8c 100644 --- a/README +++ b/README @@ -22,7 +22,7 @@ will fix the horizontal slider problem, rotating pixmaps in general 0.8 ---- -after a long time, this is a snapshot of the current cvs version and probably the last baghira for Qt3 ever. +after a long time, this is a snapshot of the current cvs version and probably the last baghira for TQt3 ever. there won't be Baghira for Qt4, don't ask. - several bugfixes, minor changes, whatever. diff --git a/bab/bab.h b/bab/bab.h index cc28882..2727bce 100644 --- a/bab/bab.h +++ b/bab/bab.h @@ -26,9 +26,9 @@ #endif //#include #include "bab_iface.h" -#include -#include -#include +#include +#include +#include #include #include @@ -44,32 +44,32 @@ public: ~BabSwitcher(); void toggle(); - void setStyle(QString); - QString style(); - void setDeco(QString); - QString deco(); - void start(QString name, QString settings); + void setStyle(TQString); + TQString style(); + void setDeco(TQString); + TQString deco(); + void start(TQString name, TQString settings); void emitStyleChanged(); - static QPoint *globalPos; + static TQPoint *globalPos; protected: - void mousePressEvent(QMouseEvent *e); - void paintEvent(QPaintEvent *ev); + void mousePressEvent(TQMouseEvent *e); + void paintEvent(TQPaintEvent *ev); private: int state_; int decoState_; - QPixmap JaguarIcon; - QPixmap PantherIcon; - QPixmap iTunesIcon; - QPixmap TigerIcon; - QPixmap MilkIcon; + TQPixmap JaguarIcon; + TQPixmap PantherIcon; + TQPixmap iTunesIcon; + TQPixmap TigerIcon; + TQPixmap MilkIcon; }; -class QComboBox; -class QCheckBox; +class TQComboBox; +class TQCheckBox; /** * @short Application Main Window * @author Thomas Lübking @@ -82,12 +82,12 @@ public: enum TabState {Tab = 0, Clever, Chooser}; bab(); - void showEvent(QShowEvent *e); - QCheckBox *cornerCheck; + void showEvent(TQShowEvent *e); + TQCheckBox *cornerCheck; virtual ~bab(); private: BabSwitcher* bSwitcher; - QComboBox *DefStyle; + TQComboBox *DefStyle; private slots: void saveSettings(); @@ -95,7 +95,7 @@ private slots: }; -class Corner : public QWidget +class Corner : public TQWidget { Q_OBJECT public: diff --git a/bab/bab_iface.h b/bab/bab_iface.h index bf63d92..faf7bd2 100644 --- a/bab/bab_iface.h +++ b/bab/bab_iface.h @@ -29,11 +29,11 @@ class babInterface : virtual public DCOPObject k_dcop: virtual void toggle() = 0; - virtual QString style() = 0; - virtual void setStyle(QString state) = 0; - virtual QString deco() = 0; - virtual void setDeco(QString state) = 0; - virtual void start(QString name, QString settings) = 0; + virtual TQString style() = 0; + virtual void setStyle(TQString state) = 0; + virtual TQString deco() = 0; + virtual void setDeco(TQString state) = 0; + virtual void start(TQString name, TQString settings) = 0; virtual void emitStyleChanged() = 0; }; diff --git a/bab/main.cpp b/bab/main.cpp index df09293..b530769 100644 --- a/bab/main.cpp +++ b/bab/main.cpp @@ -19,17 +19,17 @@ ***************************************************************************/ #include "bab.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include // #include @@ -94,20 +94,20 @@ int main(int argc, char **argv) } -bab::bab() : KMainWindow(0,"bab",Qt::WStyle_StaysOnTop | Qt::WX11BypassWM ){ +bab::bab() : KMainWindow(0,"bab",TQt::WStyle_StaysOnTop | TQt::WX11BypassWM ){ bSwitcher = new BabSwitcher(this,"switcher"); - QToolTip::add(bSwitcher, i18n("leftclick toggles state
rightclick toggles setupmenu")); + TQToolTip::add(bSwitcher, i18n("leftclick toggles state
rightclick toggles setupmenu")); bSwitcher->show(); - QDir d( QDir::homeDirPath() + "/.baghira"); + TQDir d( TQDir::homeDirPath() + "/.baghira"); if (!d.exists()) - d.mkdir(QDir::homeDirPath() + "/.baghira"); - d = QDir( QDir::homeDirPath() + "/.baghira/.bab"); + d.mkdir(TQDir::homeDirPath() + "/.baghira"); + d = TQDir( TQDir::homeDirPath() + "/.baghira/.bab"); if (!d.exists()) - d.mkdir(QDir::homeDirPath() + "/.baghira/.bab"); + d.mkdir(TQDir::homeDirPath() + "/.baghira/.bab"); FILE *file = NULL; - QString tmpString = QDir::homeDirPath() + "/.baghira/Jaguar"; - if (!QFile::exists(tmpString)) + TQString tmpString = TQDir::homeDirPath() + "/.baghira/Jaguar"; + if (!TQFile::exists(tmpString)) { if( (file = fopen(tmpString.latin1(), "w")) != NULL ) { @@ -115,8 +115,8 @@ bab::bab() : KMainWindow(0,"bab",Qt::WStyle_StaysOnTop | Qt::WX11BypassWM ){ fclose(file); } } - tmpString = QDir::homeDirPath() + "/.baghira/Panther"; - if (!QFile::exists(tmpString)) + tmpString = TQDir::homeDirPath() + "/.baghira/Panther"; + if (!TQFile::exists(tmpString)) { if( (file = fopen(tmpString.latin1(), "w")) != NULL ) { @@ -124,8 +124,8 @@ bab::bab() : KMainWindow(0,"bab",Qt::WStyle_StaysOnTop | Qt::WX11BypassWM ){ fclose(file); } } - tmpString = QDir::homeDirPath() + "/.baghira/Brushed"; - if (!QFile::exists(tmpString)) + tmpString = TQDir::homeDirPath() + "/.baghira/Brushed"; + if (!TQFile::exists(tmpString)) { if( (file = fopen(tmpString.latin1(), "w")) != NULL ) { @@ -133,8 +133,8 @@ bab::bab() : KMainWindow(0,"bab",Qt::WStyle_StaysOnTop | Qt::WX11BypassWM ){ fclose(file); } } - tmpString = QDir::homeDirPath() + "/.baghira/Tiger"; - if (!QFile::exists(tmpString)) + tmpString = TQDir::homeDirPath() + "/.baghira/Tiger"; + if (!TQFile::exists(tmpString)) { if( (file = fopen(tmpString.latin1(), "w")) != NULL ) { @@ -142,8 +142,8 @@ bab::bab() : KMainWindow(0,"bab",Qt::WStyle_StaysOnTop | Qt::WX11BypassWM ){ fclose(file); } } - tmpString = QDir::homeDirPath() + "/.baghira/Milk"; - if (!QFile::exists(tmpString)) + tmpString = TQDir::homeDirPath() + "/.baghira/Milk"; + if (!TQFile::exists(tmpString)) { if( (file = fopen(tmpString.latin1(), "w")) != NULL ) { @@ -152,27 +152,27 @@ bab::bab() : KMainWindow(0,"bab",Qt::WStyle_StaysOnTop | Qt::WX11BypassWM ){ } } - QVBox *vb = new QVBox(this); + TQVBox *vb = new TQVBox(this); vb->setLineWidth(2); vb->setMargin(2); -// vb->setFrameStyle(QFrame::Panel | QFrame::Plain ); +// vb->setFrameStyle(TQFrame::Panel | TQFrame::Plain ); - QLabel *DefStyleLabel = new QLabel("Default Style is", vb); - DefStyle = new QComboBox(vb); + TQLabel *DefStyleLabel = new TQLabel("Default Style is", vb); + DefStyle = new TQComboBox(vb); DefStyle->insertItem ( "Jaguar" ); DefStyle->insertItem ( "Panther" ); DefStyle->insertItem ( "Brushed" ); DefStyle->insertItem ( "Tiger" ); DefStyle->insertItem ( "Milk" ); - cornerCheck = new QCheckBox("Round upper screen corners", vb); - QSettings config; + cornerCheck = new TQCheckBox("Round upper screen corners", vb); + TQSettings config; config.beginGroup("/baghira/BAB"); DefStyle->setCurrentItem(config.readNumEntry("defaultState", BabSwitcher::Panther )); cornerCheck->setChecked( config.readBoolEntry("roundCorners", true ) ); config.endGroup(); - QPushButton *configBaghira = new QPushButton("Configure Baghira", vb); - QPushButton *Quit = new QPushButton("Quit BAB", vb); - QPushButton *Close = new QPushButton("Close Menu", vb); + TQPushButton *configBaghira = new TQPushButton("Configure Baghira", vb); + TQPushButton *Quit = new TQPushButton("Quit BAB", vb); + TQPushButton *Close = new TQPushButton("Close Menu", vb); vb->adjustSize(); bSwitcher->setStyle(DefStyle->currentText()); bSwitcher->setDeco(DefStyle->currentText()); @@ -204,10 +204,10 @@ void bab::configureBaghira() // any errors that arise KLibLoader* loader = KLibLoader::self(); - KLibrary* library = loader->library( QFile::encodeName("kstyle_baghira_config") ); + KLibrary* library = loader->library( TQFile::encodeName("kstyle_baghira_config") ); if (!library) { - qWarning("There was an error loading the configuration dialog for this style."); + tqWarning("There was an error loading the configuration dialog for this style."); return; } @@ -215,7 +215,7 @@ void bab::configureBaghira() if (!allocPtr) { - qWarning("There was an error loading the configuration dialog for this style."); + tqWarning("There was an error loading the configuration dialog for this style."); return; } @@ -223,42 +223,42 @@ void bab::configureBaghira() StyleConfigDialog* dial = new StyleConfigDialog(this, "Baghira Configuration"); dial->enableButtonSeparator(true); - typedef QWidget*(* factoryRoutine)( QWidget* parent ); + typedef TQWidget*(* factoryRoutine)( TQWidget* parent ); //Get the factory, and make the widget. factoryRoutine factory = (factoryRoutine)(allocPtr); - QWidget* styleConfig = factory( dial ); + TQWidget* styleConfig = factory( dial ); - QTabWidget* tw = (QTabWidget*)styleConfig->child("tabWidget"); + TQTabWidget* tw = (TQTabWidget*)styleConfig->child("tabWidget"); - QWidget* decoConfig = 0; - QObject *decoObject = 0; + TQWidget* decoConfig = 0; + TQObject *decoObject = 0; if (tw) { - KLibrary* library2 = loader->library( QFile::encodeName("kwin_baghira_config") ); + KLibrary* library2 = loader->library( TQFile::encodeName("kwin_baghira_config") ); if (!library2) { - qWarning("There was an error loading the configuration dialog for the deco."); + tqWarning("There was an error loading the configuration dialog for the deco."); return; } void* allocPtr2 = library2->symbol("allocate_config"); if (!allocPtr2) { - qWarning("There was an error loading the configuration dialog for this style."); + tqWarning("There was an error loading the configuration dialog for this style."); return; } - typedef QObject*(* factoryRoutine2)( KConfig* conf, QWidget* parent ); + typedef TQObject*(* factoryRoutine2)( KConfig* conf, TQWidget* parent ); factoryRoutine2 factory2 = (factoryRoutine2)(allocPtr2); decoObject = factory2( 0, tw ); - decoConfig = (QWidget*)tw->child("ConfigDialog"); + decoConfig = (TQWidget*)tw->child("ConfigDialog"); tw->addTab(decoConfig, "Decoration"); } //Insert it in... dial->setMainWidget( styleConfig ); - QWidget *desktop = QApplication::desktop(); - QPoint nPos((desktop->width() - dial->width())/2, (desktop->height() - dial->height() - 100)/2); + TQWidget *desktop = TQApplication::desktop(); + TQPoint nPos((desktop->width() - dial->width())/2, (desktop->height() - dial->height() - 100)/2); dial->move(nPos); //..and connect it to the wrapper connect(styleConfig, SIGNAL(changed(bool)), dial, SLOT(setStyleDirty(bool))); @@ -268,7 +268,7 @@ void bab::configureBaghira() connect(dial, SIGNAL(defaults()), decoObject, SLOT(defaults())); connect(dial, SIGNAL(save(KConfig*)), decoObject, SLOT(save(KConfig*))); - if (dial->exec() == QDialog::Accepted) + if (dial->exec() == TQDialog::Accepted) { //For now, ask all KDE apps to recreate their styles to apply the setitngs if (dial->isStyleDirty()) @@ -277,21 +277,21 @@ void bab::configureBaghira() KIPC::sendMessageAll(KIPC::ToolbarStyleChanged); } if (dial->isDecoDirty()) - kapp->dcopClient()->send("kwin", "KWinInterface", "reconfigure()", QByteArray()); + kapp->dcopClient()->send("kwin", "KWinInterface", "reconfigure()", TQByteArray()); } tw->removeChild( decoObject ); dial->insertChild( decoObject ); - decoConfig->reparent(dial, QPoint(0,0)); + decoConfig->reparent(dial, TQPoint(0,0)); delete dial; } /* overwrite the show event for repositioning the window on top of the icon, adapted from kkeyled */ -void bab::showEvent(QShowEvent *e){ +void bab::showEvent(TQShowEvent *e){ if ( bSwitcher->globalPos->x() >= 0) { - QWidget *desktop = QApplication::desktop(); + TQWidget *desktop = TQApplication::desktop(); int w = desktop->width(); - QPoint nPos; + TQPoint nPos; if (bSwitcher->globalPos->y() - height() >= 0 ) { // it's not on top nPos.setY(bSwitcher->globalPos->y() -height()); @@ -315,13 +315,13 @@ void bab::showEvent(QShowEvent *e){ // If it was set by the normal sessionmanagement it needs // to set the Flags again - setWFlags(Qt::WStyle_StaysOnTop | Qt::WX11BypassWM); - QWidget::showEvent(e); // execute the normal showevent + setWFlags(TQt::WStyle_StaysOnTop | TQt::WX11BypassWM); + TQWidget::showEvent(e); // execute the normal showevent raise(); } void bab::saveSettings(){ - QSettings *config = new QSettings(); + TQSettings *config = new TQSettings(); // KConfig *config = new KConfig("baghirarc"); config->beginGroup("/baghira/BAB"); config->writeEntry("defaultState", DefStyle->currentItem()); @@ -330,7 +330,7 @@ void bab::saveSettings(){ delete config; } -QPoint *BabSwitcher::globalPos = new QPoint(0,0); +TQPoint *BabSwitcher::globalPos = new TQPoint(0,0); BabSwitcher::BabSwitcher(bab *parent, const char *name) : KSystemTray(parent,name), DCOPObject("babInterface") { @@ -353,7 +353,7 @@ void BabSwitcher::toggle() else state_ = Jaguar; decoState_ = state_; - QString nameString; + TQString nameString; switch (state_) { case Jaguar: @@ -371,17 +371,17 @@ void BabSwitcher::toggle() case Milk: nameString = "Milk"; } - QString tmpString = QDir::homeDirPath() + "/.baghira/" + nameString; - QString tmpString2 = QDir::homeDirPath() + "/.baghira/.bab/.style"; + TQString tmpString = TQDir::homeDirPath() + "/.baghira/" + nameString; + TQString tmpString2 = TQDir::homeDirPath() + "/.baghira/.bab/.style"; remove(tmpString2.latin1()); symlink (tmpString.latin1(), tmpString2.latin1()); - tmpString2 = QDir::homeDirPath() + "/.baghira/.bab/.deco"; + tmpString2 = TQDir::homeDirPath() + "/.baghira/.bab/.deco"; remove(tmpString2.latin1()); symlink (tmpString.latin1(), tmpString2.latin1()); repaint(); } -void BabSwitcher::setStyle(QString style) +void BabSwitcher::setStyle(TQString style) { if (style == "Jaguar") state_ = Jaguar; @@ -397,14 +397,14 @@ void BabSwitcher::setStyle(QString style) style = "Panther"; state_ = Panther; } - QString tmpString = QDir::homeDirPath() + "/.baghira/" + style; - QString tmpString2 = QDir::homeDirPath() + "/.baghira/.bab/.style"; + TQString tmpString = TQDir::homeDirPath() + "/.baghira/" + style; + TQString tmpString2 = TQDir::homeDirPath() + "/.baghira/.bab/.style"; remove(tmpString2.latin1()); symlink (tmpString.latin1(), tmpString2.latin1()); repaint(); } -void BabSwitcher::setDeco(QString deco) +void BabSwitcher::setDeco(TQString deco) { if (deco == "Jaguar") decoState_ = Jaguar; @@ -420,13 +420,13 @@ void BabSwitcher::setDeco(QString deco) deco = "Panther"; decoState_ = Panther; } - QString tmpString = QDir::homeDirPath() + "/.baghira/" + deco; - QString tmpString2 = QDir::homeDirPath() + "/.baghira/.bab/.deco"; + TQString tmpString = TQDir::homeDirPath() + "/.baghira/" + deco; + TQString tmpString2 = TQDir::homeDirPath() + "/.baghira/.bab/.deco"; remove(tmpString2.latin1()); symlink (tmpString.latin1(), tmpString2.latin1()); } -QString BabSwitcher::style() +TQString BabSwitcher::style() { switch (state_) { @@ -443,7 +443,7 @@ QString BabSwitcher::style() } } -QString BabSwitcher::deco() +TQString BabSwitcher::deco() { switch (decoState_) { @@ -460,10 +460,10 @@ QString BabSwitcher::deco() } } -void BabSwitcher::start(QString name, QString settings) +void BabSwitcher::start(TQString name, TQString settings) { KProcess proc; - QString section; int i = 0; bool done = false; + TQString section; int i = 0; bool done = false; if (name.contains(' ')) { while (!done) @@ -471,8 +471,8 @@ void BabSwitcher::start(QString name, QString settings) section = name.section(' ',i,i); if (i == 0) { - QString tmpString = QDir::homeDirPath() + "/.baghira/" + settings; - QString tmpString2 = QDir::homeDirPath() + "/.baghira/.bab/" + section; + TQString tmpString = TQDir::homeDirPath() + "/.baghira/" + settings; + TQString tmpString2 = TQDir::homeDirPath() + "/.baghira/.bab/" + section; remove(tmpString2.latin1()); symlink (tmpString.latin1(), tmpString2.latin1()); } @@ -485,8 +485,8 @@ void BabSwitcher::start(QString name, QString settings) } else { - QString tmpString = QDir::homeDirPath() + "/.baghira/" + settings; - QString tmpString2 = QDir::homeDirPath() + "/.baghira/.bab/" + name; + TQString tmpString = TQDir::homeDirPath() + "/.baghira/" + settings; + TQString tmpString2 = TQDir::homeDirPath() + "/.baghira/.bab/" + name; remove(tmpString2.latin1()); symlink (tmpString.latin1(), tmpString2.latin1()); proc << name; @@ -501,9 +501,9 @@ void BabSwitcher::emitStyleChanged() KIPC::sendMessageAll(KIPC::ToolbarStyleChanged); } -void BabSwitcher::mousePressEvent(QMouseEvent *e){ +void BabSwitcher::mousePressEvent(TQMouseEvent *e){ - QWidget *daddy = parentWidget(); + TQWidget *daddy = parentWidget(); globalPos->setX(e->globalX() - e->x()); globalPos->setY(e->globalY() - e->y()); @@ -526,38 +526,38 @@ void BabSwitcher::mousePressEvent(QMouseEvent *e){ } } -void BabSwitcher::paintEvent(QPaintEvent *ev){ +void BabSwitcher::paintEvent(TQPaintEvent *ev){ KSystemTray::paintEvent(ev); - QPainter icyApainter(this); + TQPainter icyApainter(this); switch (state_) { case Jaguar: - JaguarIcon.isNull() ? icyApainter.fillRect(rect(), Qt::blue) : icyApainter.drawPixmap(0, 0, JaguarIcon); + JaguarIcon.isNull() ? icyApainter.fillRect(rect(), TQt::blue) : icyApainter.drawPixmap(0, 0, JaguarIcon); break; case Panther: - PantherIcon.isNull() ? icyApainter.fillRect(rect(), Qt::black) : icyApainter.drawPixmap(0, 0, PantherIcon); + PantherIcon.isNull() ? icyApainter.fillRect(rect(), TQt::black) : icyApainter.drawPixmap(0, 0, PantherIcon); break; case iTunes: - iTunesIcon.isNull() ? icyApainter.fillRect(rect(), Qt::gray) : icyApainter.drawPixmap(0, 0, iTunesIcon); + iTunesIcon.isNull() ? icyApainter.fillRect(rect(), TQt::gray) : icyApainter.drawPixmap(0, 0, iTunesIcon); break; case Tiger: - TigerIcon.isNull() ? icyApainter.fillRect(rect(), Qt::yellow) : icyApainter.drawPixmap(0, 0, TigerIcon); + TigerIcon.isNull() ? icyApainter.fillRect(rect(), TQt::yellow) : icyApainter.drawPixmap(0, 0, TigerIcon); break; case Milk: - MilkIcon.isNull() ? icyApainter.fillRect(rect(), Qt::white) : icyApainter.drawPixmap(0, 0, MilkIcon); + MilkIcon.isNull() ? icyApainter.fillRect(rect(), TQt::white) : icyApainter.drawPixmap(0, 0, MilkIcon); default: break; } icyApainter.end(); } -Corner::Corner(Side side) : QWidget(0, (side == left)?"left_corner":"right_corner", Qt::WType_TopLevel | Qt::WStyle_NoBorder | Qt::WStyle_StaysOnTop | Qt::WX11BypassWM ) +Corner::Corner(Side side) : TQWidget(0, (side == left)?"left_corner":"right_corner", TQt::WType_TopLevel | TQt::WStyle_NoBorder | TQt::WStyle_StaysOnTop | TQt::WX11BypassWM ) { if (side == left) { setFixedSize(5,4); move(0,0); show(); - setPaletteBackgroundColor(Qt::black); + setPaletteBackgroundColor(TQt::black); XRectangle* xrects = new XRectangle[4]; xrects[ 0 ].x = 0; xrects[ 0 ].y = 0; @@ -575,15 +575,15 @@ Corner::Corner(Side side) : QWidget(0, (side == left)?"left_corner":"right_corne xrects[ 3 ].y = 3; xrects[ 3 ].width = 1; xrects[ 3 ].height = 2; - XShapeCombineRectangles( qt_xdisplay(), winId(), ShapeBounding, 0, 0, + XShapeCombineRectangles( tqt_xdisplay(), winId(), ShapeBounding, 0, 0, xrects, 4, ShapeSet, 0 ); delete[] xrects; } else { setFixedSize(5,4); - move(QApplication::desktop()->width()-5,0); + move(TQApplication::desktop()->width()-5,0); show(); - setPaletteBackgroundColor(Qt::black); + setPaletteBackgroundColor(TQt::black); XRectangle* xrects = new XRectangle[4]; xrects[ 0 ].x = 0; xrects[ 0 ].y = 0; @@ -601,7 +601,7 @@ Corner::Corner(Side side) : QWidget(0, (side == left)?"left_corner":"right_corne xrects[ 3 ].y = 3; xrects[ 3 ].width = 1; xrects[ 3 ].height = 2; - XShapeCombineRectangles( qt_xdisplay(), winId(), ShapeBounding, 0, 0, + XShapeCombineRectangles( tqt_xdisplay(), winId(), ShapeBounding, 0, 0, xrects, 4, ShapeSet, 0 ); delete[] xrects; } diff --git a/bab/styleconfdialog.cpp b/bab/styleconfdialog.cpp index 245f5ab..e78cc46 100644 --- a/bab/styleconfdialog.cpp +++ b/bab/styleconfdialog.cpp @@ -21,7 +21,7 @@ #include "styleconfdialog.h" #include -StyleConfigDialog::StyleConfigDialog(QWidget* parent, QString styleName): +StyleConfigDialog::StyleConfigDialog(TQWidget* parent, TQString styleName): KDialogBase(parent, "StyleConfigDialog", true, /*modal*/ styleName, diff --git a/bab/styleconfdialog.h b/bab/styleconfdialog.h index 9a125d7..c4d8fc8 100644 --- a/bab/styleconfdialog.h +++ b/bab/styleconfdialog.h @@ -28,7 +28,7 @@ class StyleConfigDialog: public KDialogBase { Q_OBJECT public: - StyleConfigDialog(QWidget* parent, QString styleName); + StyleConfigDialog(TQWidget* parent, TQString styleName); bool isStyleDirty() const; bool isDecoDirty() const; diff --git a/config/about.ui b/config/about.ui index bbe3ed7..1bf48f1 100644 --- a/config/about.ui +++ b/config/about.ui @@ -1,6 +1,6 @@ About - + About @@ -48,7 +48,7 @@ unnamed - + layout4 @@ -75,7 +75,7 @@ - + layout11 @@ -83,7 +83,7 @@ unnamed - + crLabel @@ -120,7 +120,7 @@ - + layout6 @@ -145,7 +145,7 @@ - + buttonInfo @@ -178,7 +178,7 @@ - + textLabel2_2 @@ -240,7 +240,7 @@ - + layout11 @@ -248,7 +248,7 @@ unnamed - + cpuLabel @@ -259,7 +259,7 @@ AlignVCenter|AlignLeft - + kdeLabel @@ -338,7 +338,7 @@ - + textLabel5 @@ -354,7 +354,7 @@ AlignVCenter|AlignRight - + systemLabel @@ -416,7 +416,7 @@ - + textLabel1_2 @@ -500,7 +500,7 @@ - + textLabel3 @@ -535,7 +535,7 @@ - + layout5 @@ -560,7 +560,7 @@ - + buttonDownload @@ -601,7 +601,7 @@ - + layout8 @@ -609,7 +609,7 @@ unnamed - + textLabel2 @@ -620,7 +620,7 @@ AlignVCenter|AlignRight - + versionLabel @@ -633,7 +633,7 @@ - + layout10 @@ -641,7 +641,7 @@ unnamed - + textLabel1 diff --git a/config/colordialog.cpp b/config/colordialog.cpp index 3466082..38279c8 100644 --- a/config/colordialog.cpp +++ b/config/colordialog.cpp @@ -1,12 +1,12 @@ #include "colordialog.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -36,33 +36,33 @@ if ( R < 0 ) R = 0; else if ( R > 255 ) R = 255; \ if ( G < 0 ) G = 0; else if ( G > 255 ) G = 255; \ if ( B < 0 ) B = 0; else if ( B > 255 ) B = 255; -ColorDialog::ColorDialog(QWidget* parent, const char* name) : QDialog( parent, name) +ColorDialog::ColorDialog(TQWidget* parent, const char* name) : TQDialog( parent, name) { - QVBoxLayout *vertical = new QVBoxLayout(this); - QHBoxLayout *top = new QHBoxLayout(vertical); + TQVBoxLayout *vertical = new TQVBoxLayout(this); + TQHBoxLayout *top = new TQHBoxLayout(vertical); demo = new DemoWindow(this); top->addWidget(demo); - QVBoxLayout *topRight = new QVBoxLayout(top); - QLabel *info = new QLabel("Select custom colors or grab directly from screen.
Click image left to switch between items.
",this); + TQVBoxLayout *topRight = new TQVBoxLayout(top); + TQLabel *info = new TQLabel("Select custom colors or grab directly from screen.
Click image left to switch between items.
",this); topRight->addWidget(info); - QIconSet icon = KGlobal::iconLoader()->loadIconSet("colorpicker", KIcon::Small); - buttonCP = new QPushButton(icon, QString::null, this); + TQIconSet icon = KGlobal::iconLoader()->loadIconSet("colorpicker", KIcon::Small); + buttonCP = new TQPushButton(icon, TQString::null, this); topRight->addWidget(buttonCP); - QLabel *lb = new QLabel("From other app:",this); + TQLabel *lb = new TQLabel("From other app:",this); topRight->addWidget(lb); - other = new QComboBox(this); + other = new TQComboBox(this); topRight->addWidget(other); topRight->addStretch(); - buttonOk = new QPushButton("&Ok", this); + buttonOk = new TQPushButton("&Ok", this); topRight->addWidget(buttonOk); - buttonCancel = new QPushButton("&Cancel", this); + buttonCancel = new TQPushButton("&Cancel", this); topRight->addWidget(buttonCancel); const char *title[NUMCOLORS] = {"Background", "Button", "Base", "Text", "Highlight", "Highlighted Text", "Button Text", "Alternate Background"}; for (int i = 0; i < NUMCOLORS; i++) { picker[i] = new ColorPicker(this, title[i]); vertical->addWidget(picker[i]); - connect (picker[i], SIGNAL(colorChanged(QColor)), demo, SLOT(smartRepaint())); + connect (picker[i], SIGNAL(colorChanged(TQColor)), demo, SLOT(smartRepaint())); picker[i]->hide(); } for (int i = 0; i < NUMCOLORS; i++) @@ -83,7 +83,7 @@ ColorDialog::ColorDialog(QWidget* parent, const char* name) : QDialog( parent, n connect (buttonOk, SIGNAL(clicked()), this, SLOT(close())); connect (buttonCP, SIGNAL(clicked()), this, SLOT(grabColor())); connect (buttonCancel, SIGNAL(clicked()), this, SLOT(close())); - connect (other, SIGNAL(activated (const QString &)), this, SLOT(getFromOther(const QString &))); + connect (other, SIGNAL(activated (const TQString &)), this, SLOT(getFromOther(const TQString &))); } ColorDialog::~ColorDialog() @@ -93,21 +93,21 @@ ColorDialog::~ColorDialog() void ColorDialog::show() { other->clear(); - QDir d( QDir::homeDirPath() + "/.baghira", 0L, QDir::Name | QDir::IgnoreCase, QDir::Files | QDir::Readable | QDir::Writable ); + TQDir d( TQDir::homeDirPath() + "/.baghira", 0L, TQDir::Name | TQDir::IgnoreCase, TQDir::Files | TQDir::Readable | TQDir::Writable ); if (d.exists()) { for ( uint i = 0; i < d.count(); i++ ) other->insertItem(d[i]); } - QDialog::show(); + TQDialog::show(); demo->show(); // demo->repaint(false); } -void ColorDialog::getFromOther( const QString & string ) +void ColorDialog::getFromOther( const TQString & string ) { FILE *file = NULL; - QString tmpString = QDir::homeDirPath() + "/.baghira/" + string; + TQString tmpString = TQDir::homeDirPath() + "/.baghira/" + string; if( (file = fopen(tmpString.latin1(), "r")) != NULL ) { uint k; @@ -119,7 +119,7 @@ void ColorDialog::getFromOther( const QString & string ) for (int i = 0; i < NUMCOLORS; i++) { picker[i]->blockSignals(true); - if (colors[i] != -1) picker[i]->setColor(QColor(colors[i])); + if (colors[i] != -1) picker[i]->setColor(TQColor(colors[i])); picker[i]->blockSignals(false); } demo->repaint(false); @@ -133,7 +133,7 @@ void ColorDialog::grabColor() grabKeyboard(); } -void ColorDialog::mouseReleaseEvent(QMouseEvent* me) +void ColorDialog::mouseReleaseEvent(TQMouseEvent* me) { if (gettingColorFromScreen) { @@ -150,38 +150,38 @@ void ColorDialog::mouseReleaseEvent(QMouseEvent* me) } } else - QDialog::mouseReleaseEvent(me); + TQDialog::mouseReleaseEvent(me); } -//extern QImage uic_findiImage(const QString& name); +//extern TQImage uic_findiImage(const TQString& name); //extern void qInitImages_baghira(); //extern void qCleanupImages_baghira(); -DemoWindow::DemoWindow( ColorDialog* parent, const char* name) : QWidget(parent, name) +DemoWindow::DemoWindow( ColorDialog* parent, const char* name) : TQWidget(parent, name) { - setBackgroundMode ( Qt::NoBackground ); + setBackgroundMode ( TQt::NoBackground ); colorDialog_ = parent; setFixedSize(320,120); - pm = new QPixmap(320,120); - pp = new QPainter(); - p = new QPainter(); - (const_cast(&p->font()))->setPixelSize(16); - baseRect = QRect(20, 10, 200, 100); - buttonRect = QRect(230, 90, 37, 21); - buttonTextRect = QRect(236, 91, 20, 18); - highlightRect = QRect(21, 42, 198, 22); - textRect = QRect(25, 21, 100, 18); - highTextRect = QRect(25, 42, 120, 22); - alternateRect = QRect(21, 86, 198, 22); + pm = new TQPixmap(320,120); + pp = new TQPainter(); + p = new TQPainter(); + (const_cast(&p->font()))->setPixelSize(16); + baseRect = TQRect(20, 10, 200, 100); + buttonRect = TQRect(230, 90, 37, 21); + buttonTextRect = TQRect(236, 91, 20, 18); + highlightRect = TQRect(21, 42, 198, 22); + textRect = TQRect(25, 21, 100, 18); + highTextRect = TQRect(25, 42, 120, 22); + alternateRect = TQRect(21, 86, 198, 22); baseImage = uic_findImage("button-base"); - dest = QImage( baseImage.width(), baseImage.height(), 32 ); + dest = TQImage( baseImage.width(), baseImage.height(), 32 ); dest.setAlphaBuffer( true ); } DemoWindow::~DemoWindow(){} -void DemoWindow::mousePressEvent ( QMouseEvent * me ) +void DemoWindow::mousePressEvent ( TQMouseEvent * me ) { for (int i = 0; i < NUMCOLORS; i++) colorDialog_->picker[i]->hide(); @@ -204,23 +204,23 @@ void DemoWindow::mousePressEvent ( QMouseEvent * me ) colorDialog_->picker[Back]->show(); } -void DemoWindow::paintEvent ( QPaintEvent * ) +void DemoWindow::paintEvent ( TQPaintEvent * ) { pp->begin(pm); pp->fillRect(0,0,pm->width(),pm->height(), colorDialog_->picker[Back]->color()); - style().drawPrimitive( QStyle::PE_PanelLineEdit, pp, rect(), colorGroup() ); + style().drawPrimitive( TQStyle::PE_PanelLineEdit, pp, rect(), colorGroup() ); pp->fillRect(baseRect, colorDialog_->picker[Base]->color()); pp->fillRect(highlightRect, colorDialog_->picker[High]->color()); pp->fillRect(alternateRect, colorDialog_->picker[Alternate]->color()); pp->setPen ( colorDialog_->picker[Text]->color() ); - pp->drawText ( textRect, Qt::AlignAuto | Qt::AlignVCenter, "Common Text"); - pp->drawText ( alternateRect, Qt::AlignAuto | Qt::AlignVCenter, "Alt. Background"); + pp->drawText ( textRect, TQt::AlignAuto | TQt::AlignVCenter, "Common Text"); + pp->drawText ( alternateRect, TQt::AlignAuto | TQt::AlignVCenter, "Alt. Background"); pp->setPen ( colorDialog_->picker[HighText]->color() ); - pp->drawText ( highTextRect, Qt::AlignAuto | Qt::AlignVCenter, "Highlighted Text"); + pp->drawText ( highTextRect, TQt::AlignAuto | TQt::AlignVCenter, "Highlighted Text"); pp->drawPixmap(buttonRect, tintButton(baseImage, colorDialog_->picker[Button]->color())); pp->setPen ( colorDialog_->picker[ButText]->color() ); - pp->drawText ( buttonTextRect, Qt::AlignCenter, "B"); - style().drawPrimitive( QStyle::PE_PanelLineEdit, pp, baseRect, colorGroup()); + pp->drawText ( buttonTextRect, TQt::AlignCenter, "B"); + style().drawPrimitive( TQStyle::PE_PanelLineEdit, pp, baseRect, colorGroup()); pp->end(); p->begin(this); p->drawPixmap(0,0, *pm); @@ -231,49 +231,49 @@ void DemoWindow::smartRepaint() { if (colorDialog_->picker[Back]->isShown()) { - QWidget::repaint(false); + TQWidget::repaint(false); return; } if (colorDialog_->picker[Button]->isShown()) { - QWidget::repaint(buttonRect, false); + TQWidget::repaint(buttonRect, false); return; } if (colorDialog_->picker[Base]->isShown()) { - QWidget::repaint(false); + TQWidget::repaint(false); return; } if (colorDialog_->picker[Text]->isShown()) { - QWidget::repaint(textRect, false); + TQWidget::repaint(textRect, false); return; } if (colorDialog_->picker[High]->isShown()) { - QWidget::repaint(highlightRect, false); + TQWidget::repaint(highlightRect, false); return; } if (colorDialog_->picker[HighText]->isShown()) { - QWidget::repaint(highTextRect, false); + TQWidget::repaint(highTextRect, false); return; } if (colorDialog_->picker[Alternate]->isShown()) { - QWidget::repaint(alternateRect, false); + TQWidget::repaint(alternateRect, false); return; } if (colorDialog_->picker[ButText]->isShown()) { - QWidget::repaint(buttonTextRect, false); + TQWidget::repaint(buttonTextRect, false); return; } } -QImage & DemoWindow::tintButton(QImage &src, QColor & c) +TQImage & DemoWindow::tintButton(TQImage &src, TQColor & c) { -// dest = QImage( src.width(), src.height(), 32, 0, _ENDIAN_ ); +// dest = TQImage( src.width(), src.height(), 32, 0, _ENDIAN_ ); unsigned int *data = ( unsigned int * ) src.bits(); unsigned int *destData = ( unsigned int* ) dest.bits(); int total = src.width() * src.height(); @@ -287,14 +287,14 @@ QImage & DemoWindow::tintButton(QImage &src, QColor & c) int sq = CLAMP((int)((45.0/128.0)*s+55),0,100); // float srcPercent, destPercent; for ( int current = 0 ; current < total ; ++current ) { - alpha = qAlpha( data[ current ] ); - blue = qBlue( data[ current ] ); - red = qRed( data[ current ] ); - green = qGreen( data[ current ] ); + alpha = tqAlpha( data[ current ] ); + blue = tqBlue( data[ current ] ); + red = tqRed( data[ current ] ); + green = tqGreen( data[ current ] ); SATURATION_COLOR2(sq, red, green, blue); // force back to valid colorspace ! COLOR_SPACE(destR, destG, destB); - destData[ current ] = qRgba( destR, destG, destB, alpha ); + destData[ current ] = tqRgba( destR, destG, destB, alpha ); } return ( dest ); } diff --git a/config/colordialog.h b/config/colordialog.h index 23c4808..42b6225 100644 --- a/config/colordialog.h +++ b/config/colordialog.h @@ -1,21 +1,21 @@ #ifndef COLORDIALOG_H #define COLORDIALOG_H -#include -#include -#include +#include +#include +#include -class QPushButton; -class QComboBox; -class QGroupBox; -class QPainter; +class TQPushButton; +class TQComboBox; +class TQGroupBox; +class TQPainter; class ColorDialog; -class QImage; -class QPixmap; +class TQImage; +class TQPixmap; enum Colors { Back = 0, Button, Base, Text, High, HighText, ButText, Alternate, NUMCOLORS }; -class DemoWindow : public QWidget +class DemoWindow : public TQWidget { Q_OBJECT @@ -27,26 +27,26 @@ private slots: void smartRepaint(); protected: - void mousePressEvent ( QMouseEvent * e ); - void paintEvent ( QPaintEvent * ); + void mousePressEvent ( TQMouseEvent * e ); + void paintEvent ( TQPaintEvent * ); private: - QPainter *p; - QPainter *pp; - QPixmap *pm; + TQPainter *p; + TQPainter *pp; + TQPixmap *pm; ColorDialog* colorDialog_; - QRect baseRect; - QRect buttonRect; - QRect buttonTextRect; - QRect highlightRect; - QRect textRect; - QRect highTextRect; - QRect alternateRect; - QImage baseImage; - QImage dest; + TQRect baseRect; + TQRect buttonRect; + TQRect buttonTextRect; + TQRect highlightRect; + TQRect textRect; + TQRect highTextRect; + TQRect alternateRect; + TQImage baseImage; + TQImage dest; private: - QImage & tintButton(QImage &src, QColor & c); + TQImage & tintButton(TQImage &src, TQColor & c); signals: void selected(Colors c); @@ -55,35 +55,35 @@ signals: class ColorPicker; -class ColorDialog : public QDialog +class ColorDialog : public TQDialog { friend class DemoWindow; friend class AppSetter; Q_OBJECT public: - ColorDialog( QWidget* parent = 0, const char* name = 0); + ColorDialog( TQWidget* parent = 0, const char* name = 0); ~ColorDialog(); - QPushButton *buttonOk; - QPushButton *buttonCancel; + TQPushButton *buttonOk; + TQPushButton *buttonCancel; void show(); protected: ColorPicker *picker[NUMCOLORS]; - void mouseReleaseEvent(QMouseEvent* me); + void mouseReleaseEvent(TQMouseEvent* me); DemoWindow *demo; private: - QPushButton *buttonCP; + TQPushButton *buttonCP; bool gettingColorFromScreen; - QComboBox *other; + TQComboBox *other; private slots: void grabColor(); - void getFromOther( const QString & string ); + void getFromOther( const TQString & string ); signals: - void colorChanged(QColor color); + void colorChanged(TQColor color); }; diff --git a/config/colorpicker.cpp b/config/colorpicker.cpp index 263ef0d..e4f2cf9 100644 --- a/config/colorpicker.cpp +++ b/config/colorpicker.cpp @@ -1,16 +1,16 @@ #include "colorpicker.h" -#include -#include +#include +#include #include -ColorPicker::ColorPicker(QWidget* parent, const char* name) : QGroupBox( parent, name) +ColorPicker::ColorPicker(TQWidget* parent, const char* name) : TQGroupBox( parent, name) { setTitle(name); - setColumnLayout(0, Qt::Vertical ); + setColumnLayout(0, TQt::Vertical ); layout()->setSpacing( 6 ); layout()->setMargin( 11 ); - QVBoxLayout *vLayout = new QVBoxLayout(layout()); + TQVBoxLayout *vLayout = new TQVBoxLayout(layout()); red = new KIntNumInput(this, "red"); red->setRange(0, 255, 1, true); @@ -35,10 +35,10 @@ ColorPicker::~ColorPicker() void ColorPicker::emitChange() { - emit colorChanged(QColor(red->value(), green->value(), blue->value())); + emit colorChanged(TQColor(red->value(), green->value(), blue->value())); } -void ColorPicker::setColor(const QColor & color) +void ColorPicker::setColor(const TQColor & color) { red->setValue( color.red() ); green->setValue( color.green() ); @@ -49,24 +49,24 @@ void ColorPicker::setColor(const QColor & color) void ColorPicker::setRed(int r) { red->setValue( r ); - emit colorChanged(QColor(r, green->value(), blue->value())); + emit colorChanged(TQColor(r, green->value(), blue->value())); } void ColorPicker::setGreen(int g) { green->setValue( g ); - emit colorChanged(QColor(red->value(), g, blue->value())); + emit colorChanged(TQColor(red->value(), g, blue->value())); } void ColorPicker::setBlue(int b) { blue->setValue( b ); - emit colorChanged(QColor(red->value(), green->value(), b)); + emit colorChanged(TQColor(red->value(), green->value(), b)); } -QColor & ColorPicker::color() +TQColor & ColorPicker::color() { - color__ = QColor(red->value(), green->value(), blue->value()); + color__ = TQColor(red->value(), green->value(), blue->value()); return color__; } diff --git a/config/colorpicker.h b/config/colorpicker.h index 6f813b2..59f27cf 100644 --- a/config/colorpicker.h +++ b/config/colorpicker.h @@ -1,22 +1,22 @@ #ifndef COLORPICKER_H #define COLORPICKER_H -#include +#include class KIntNumInput; -class QColor; +class TQColor; -class ColorPicker : public QGroupBox +class ColorPicker : public TQGroupBox { Q_OBJECT public: - ColorPicker( QWidget* parent = 0, const char* name = 0); + ColorPicker( TQWidget* parent = 0, const char* name = 0); ~ColorPicker(); - QColor & color(); + TQColor & color(); public slots: - void setColor(const QColor & color); + void setColor(const TQColor & color); void setRed(int red); void emitChange(); void setGreen(int green); @@ -28,11 +28,11 @@ protected: KIntNumInput *red; KIntNumInput *green; KIntNumInput *blue; - QColor color_; - QColor color__; + TQColor color_; + TQColor color__; signals: - void colorChanged(QColor color); + void colorChanged(TQColor color); }; diff --git a/config/configdialog.ui b/config/configdialog.ui index 870e4cf..d9a2fbf 100644 --- a/config/configdialog.ui +++ b/config/configdialog.ui @@ -1,6 +1,6 @@ Config - + Config @@ -27,7 +27,7 @@ unnamed - + layout55 @@ -35,7 +35,7 @@ unnamed - + buttonHelp @@ -49,7 +49,7 @@ true - + buttonAbout @@ -74,7 +74,7 @@ - + statusWarning @@ -104,7 +104,7 @@ - + buttonLoad @@ -112,7 +112,7 @@ Load... - + buttonSaveAs @@ -122,7 +122,7 @@ - + tabWidget @@ -134,7 +134,7 @@ 0 - + Widget8 @@ -162,7 +162,7 @@ - + groupBox13 @@ -173,7 +173,7 @@ unnamed - + layout22 @@ -181,7 +181,7 @@ unnamed - + shadowGroups @@ -189,7 +189,7 @@ Sink Groupboxes - + layout7 @@ -197,7 +197,7 @@ unnamed - + textLabel5 @@ -205,7 +205,7 @@ Depth - + shadowIntensity @@ -228,7 +228,7 @@ 10 - + layout6 @@ -236,7 +236,7 @@ unnamed - + textLabel6 @@ -261,7 +261,7 @@ - + textLabel7 @@ -277,7 +277,7 @@ - + groupBox12 @@ -288,7 +288,7 @@ unnamed - + textLabel12 @@ -296,7 +296,7 @@ Color function - + Aquarius @@ -314,7 +314,7 @@ "Aquarius" is very Aqua like<br>"Liquid" bases upon mosfet's original Code - + layout123 @@ -322,7 +322,7 @@ unnamed - + Fixed @@ -360,7 +360,7 @@ - + textLabel13 @@ -384,7 +384,7 @@ - + groupBox11 @@ -395,7 +395,7 @@ unnamed - + stippleBackground @@ -403,7 +403,7 @@ Use Scanlines in Aqua Design - + layout4 @@ -411,7 +411,7 @@ unnamed - + textLabel2 @@ -419,7 +419,7 @@ Scanline contrast - + stippleContrast @@ -445,7 +445,7 @@ 10 - + layout3 @@ -453,7 +453,7 @@ unnamed - + textLabel3 @@ -478,7 +478,7 @@ - + textLabel4 @@ -506,7 +506,7 @@ - + groupButtonPreview @@ -520,7 +520,7 @@ unnamed - + layout59 @@ -528,7 +528,7 @@ unnamed - + layout58 @@ -553,7 +553,7 @@ - + pixmapButtonPreview @@ -580,7 +580,7 @@ - + layout55 @@ -588,7 +588,7 @@ unnamed - + textLabel1_5 @@ -596,7 +596,7 @@ R - + textLabel2_5 @@ -604,7 +604,7 @@ G - + textLabel3_4 @@ -614,7 +614,7 @@ - + layout53 @@ -622,7 +622,7 @@ unnamed - + sliderButtonRed @@ -633,7 +633,7 @@ Horizontal - + sliderButtonGreen @@ -644,7 +644,7 @@ Horizontal - + sliderButtonBlue @@ -657,7 +657,7 @@ - + layout56 @@ -665,7 +665,7 @@ unnamed - + valueButtonRed @@ -673,7 +673,7 @@ 0 - + valueButtonGreen @@ -681,7 +681,7 @@ 0 - + valueButtonBlue @@ -695,7 +695,7 @@ - + textLabel1_10 @@ -703,7 +703,7 @@ Color presets - + colorPresets @@ -742,7 +742,7 @@ - + animateButtons @@ -750,7 +750,7 @@ Animate Buttons - + groupBox10 @@ -775,7 +775,7 @@ Vertical - + layout48 @@ -783,7 +783,7 @@ unnamed - + textLabel1 @@ -791,7 +791,7 @@ Default Design is - + Jaguar @@ -857,7 +857,7 @@ - + textLabel1_9 @@ -865,7 +865,7 @@ Buttons look like - + textLabel2_8 @@ -873,7 +873,7 @@ Toolbuttons look like - + Jaguar @@ -903,7 +903,7 @@ buttonStyle - + Jaguar @@ -937,7 +937,7 @@ - + Widget9 @@ -948,7 +948,7 @@ unnamed - + groupBox9 @@ -956,13 +956,13 @@ Tabs - <qt>Panther introduced so called choosers<br>Qt has only Tabs, but you can influence their appereance here a bit</qt> + <qt>Panther introduced so called choosers<br>TQt has only Tabs, but you can influence their appereance here a bit</qt> unnamed - + Tabs @@ -982,7 +982,7 @@ brushedTabs - + textLabel3_7 @@ -990,7 +990,7 @@ Brushed Tabs are - + Tabs @@ -1010,7 +1010,7 @@ aquaTabs - + textLabel2_7 @@ -1032,7 +1032,7 @@ Horizontal - + centerTabs @@ -1042,7 +1042,7 @@ - + groupBox2 @@ -1053,7 +1053,7 @@ unnamed - + animateSlider @@ -1061,7 +1061,7 @@ Animate Hovered Slider - + squeezeSlider @@ -1069,7 +1069,7 @@ Squeeze pressed Slider - + shadowSlider @@ -1096,7 +1096,7 @@ - + groupBox1 @@ -1107,7 +1107,7 @@ unnamed - + layout68 @@ -1115,7 +1115,7 @@ unnamed - + layout67 @@ -1123,7 +1123,7 @@ unnamed - + drawTreeLines @@ -1158,7 +1158,7 @@ - + layout66 @@ -1166,7 +1166,7 @@ unnamed - + textLabel8 @@ -1201,7 +1201,7 @@ - + layout65 @@ -1209,7 +1209,7 @@ unnamed - + useCustomExpanderColor @@ -1238,7 +1238,7 @@ - + layout71 @@ -1246,7 +1246,7 @@ unnamed - + layout70 @@ -1254,7 +1254,7 @@ unnamed - + Lines @@ -1287,7 +1287,7 @@ - + Apple @@ -1313,7 +1313,7 @@ Expanders are the little icons you can click to open a new Layer in the tree - + layout69 @@ -1364,7 +1364,7 @@ Horizontal - + useRectLVH @@ -1375,7 +1375,7 @@ Makes Listview Headers look like the rectangular Buttons - + bevelHighlights @@ -1385,7 +1385,7 @@ - + groupBox4 @@ -1396,7 +1396,7 @@ unnamed - + roundTasks @@ -1418,7 +1418,7 @@ Horizontal - + replaceMenubar @@ -1426,7 +1426,7 @@ Replace menubar extension (display app name) - + layout49 @@ -1434,7 +1434,7 @@ unnamed - + textLabel1_11 @@ -1442,7 +1442,7 @@ Maximum width - + menuMaxWidth @@ -1453,7 +1453,7 @@ 10000 - + startKRuler @@ -1480,7 +1480,7 @@ - + removeKickerBevel @@ -1490,7 +1490,7 @@ - + layout53 @@ -1498,7 +1498,7 @@ unnamed - + groupBox3 @@ -1509,7 +1509,7 @@ unnamed - + layout39 @@ -1517,7 +1517,7 @@ unnamed - + textLabel11 @@ -1525,7 +1525,7 @@ Style - + Apple @@ -1547,7 +1547,7 @@ - + layout52 @@ -1555,7 +1555,7 @@ unnamed - + showProgressValue @@ -1584,7 +1584,7 @@ - + groupBox5 @@ -1595,7 +1595,7 @@ unnamed - + Aqua @@ -1620,7 +1620,7 @@ unhoveredToolButtons - + textLabel1_8 @@ -1628,7 +1628,7 @@ Show unhovered buttons for - + layout50 @@ -1636,7 +1636,7 @@ unnamed - + textLabel1_12 @@ -1677,7 +1677,7 @@ - + tab @@ -1722,7 +1722,7 @@ - + transGroup @@ -1736,7 +1736,7 @@ unnamed - + layout64 @@ -1744,7 +1744,7 @@ unnamed - + textLabel1_4 @@ -1760,7 +1760,7 @@ Background - + Default @@ -1801,7 +1801,7 @@ - + layout55 @@ -1809,7 +1809,7 @@ unnamed - + drawMenuStripe @@ -1872,7 +1872,7 @@ Horizontal - + layout61 @@ -1880,7 +1880,7 @@ unnamed - + textLabel2_2 @@ -1888,7 +1888,7 @@ Opacity - + menuOpacity @@ -1914,7 +1914,7 @@ - + layout28 @@ -1922,7 +1922,7 @@ unnamed - + textLabel3_2 @@ -1947,7 +1947,7 @@ - + textLabel4_2 @@ -1973,7 +1973,7 @@ Horizontal - + layout54 @@ -1981,7 +1981,7 @@ unnamed - + textLabel2_4 @@ -2014,7 +2014,7 @@ - + textLabel3_6 @@ -2032,7 +2032,7 @@ - + textLabel1_7 @@ -2054,7 +2054,7 @@ Horizontal - + layout62 @@ -2062,7 +2062,7 @@ unnamed - + textLabel1_2 @@ -2103,7 +2103,7 @@ - + textLabel2_3 @@ -2119,7 +2119,7 @@ - + textLabel2_3_2 @@ -2137,7 +2137,7 @@ - + layout46 @@ -2145,7 +2145,7 @@ unnamed - + textLabel5_2 @@ -2161,7 +2161,7 @@ Color - + Background @@ -2189,12 +2189,12 @@ - Qt usually uses the button color for the menus... well, Apple does not. + TQt usually uses the button color for the menus... well, Apple does not. - + glossyMenus @@ -2202,7 +2202,7 @@ Use glossy highlights - + shadowMenuText @@ -2229,7 +2229,7 @@ - + groupBox14 @@ -2240,7 +2240,7 @@ unnamed - + 16x16 @@ -2275,7 +2275,7 @@ linkIconSize - + textLabel1_13 @@ -2283,7 +2283,7 @@ Hardware Iconsize - + textLabel2_9 @@ -2291,7 +2291,7 @@ Link Iconsize - + 16x16 @@ -2347,7 +2347,7 @@ - + tab @@ -2358,7 +2358,7 @@ unnamed - + useCustomColors @@ -2369,7 +2369,7 @@ These Widgets default to the Button Color, however you can customize them here - + colorFrame @@ -2383,7 +2383,7 @@ unnamed - + layout62 @@ -2391,7 +2391,7 @@ unnamed - + layout58 @@ -2399,7 +2399,7 @@ unnamed - + textLabel4_3 @@ -2434,7 +2434,7 @@ - + layout60 @@ -2442,7 +2442,7 @@ unnamed - + textLabel5_3 @@ -2477,7 +2477,7 @@ - + layout62 @@ -2485,7 +2485,7 @@ unnamed - + textLabel7_3 @@ -2520,7 +2520,7 @@ - + layout64 @@ -2528,7 +2528,7 @@ unnamed - + textLabel9_2 @@ -2563,7 +2563,7 @@ - + layout65 @@ -2571,7 +2571,7 @@ unnamed - + textLabel11_3 @@ -2608,7 +2608,7 @@ - + layout61 @@ -2616,7 +2616,7 @@ unnamed - + layout59 @@ -2624,7 +2624,7 @@ unnamed - + textLabel3_3 @@ -2659,7 +2659,7 @@ - + layout61 @@ -2667,7 +2667,7 @@ unnamed - + textLabel6_3 @@ -2702,7 +2702,7 @@ - + layout63 @@ -2710,7 +2710,7 @@ unnamed - + textLabel8_3 @@ -2745,7 +2745,7 @@ - + layout52 @@ -2753,7 +2753,7 @@ unnamed - + textLabel1_3 @@ -2788,7 +2788,7 @@ - + layout66 @@ -2796,7 +2796,7 @@ unnamed - + textLabel10 @@ -2864,7 +2864,7 @@ - + brushBox @@ -2875,7 +2875,7 @@ unnamed - + layout62 @@ -2883,7 +2883,7 @@ unnamed - + layout59 @@ -2891,7 +2891,7 @@ unnamed - + textLabel1_6 @@ -2899,7 +2899,7 @@ R - + sliderBrushRed @@ -2912,7 +2912,7 @@ - + layout60 @@ -2920,7 +2920,7 @@ unnamed - + textLabel2_6 @@ -2928,7 +2928,7 @@ G - + sliderBrushGreen @@ -2941,7 +2941,7 @@ - + layout61 @@ -2949,7 +2949,7 @@ unnamed - + textLabel3_5 @@ -2957,7 +2957,7 @@ B - + sliderBrushBlue @@ -2972,7 +2972,7 @@ - + pixmapBrushPreview @@ -2982,7 +2982,7 @@ - + tintBrush diff --git a/config/help.ui b/config/help.ui index 5fdae0a..ac6909d 100644 --- a/config/help.ui +++ b/config/help.ui @@ -1,6 +1,6 @@ Help - + Help @@ -36,7 +36,7 @@ unnamed - + layout2 @@ -61,7 +61,7 @@ - + closeButton @@ -71,11 +71,11 @@ - + tabWidget2 - + tab @@ -86,7 +86,7 @@ unnamed - + layout3 @@ -111,7 +111,7 @@ - + startBAB @@ -171,7 +171,7 @@ c) BAB is also a DCOP interface to the Baghira Style and Windeco - + tab @@ -194,7 +194,7 @@ To see, which functions are provided by bab (the list will probably grow), open <i><b>dcop bab default</b></i><br> <br> The most interesting function is<br><br> -<i><b>start(QString name,QString settings)</b></i><br> +<i><b>start(TQString name,TQString settings)</b></i><br> <br> use it like:<br><br> <i><b>start &lt;appName&gt; &lt;design&gt;</b></i><br><br> @@ -203,7 +203,7 @@ where <i><b>&lt;appName&gt;</b></i> is the (KDE) - + tab @@ -233,7 +233,7 @@ where <i><b>&lt;appName&gt;</b></i> is the (KDE) - + tab @@ -267,7 +267,7 @@ and<br> for hosting the Project - + textLabel1 diff --git a/config/kstyle_baghira_config.cpp b/config/kstyle_baghira_config.cpp index 1e838e8..337e810 100644 --- a/config/kstyle_baghira_config.cpp +++ b/config/kstyle_baghira_config.cpp @@ -18,28 +18,28 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include -//#include -// #include -#include -#include -#include -#include -#include -#include +#include +//#include +// #include +#include +#include +#include +#include +#include +#include #include -#include -#include +#include +#include #include #include #include @@ -69,8 +69,8 @@ #ifndef KDE_VERSION_STRING #define KDE_VERSION_STRING "error" #endif -#ifndef QT_BUILD_KEY -#define QT_BUILD_KEY "error error error error" +#ifndef TQT_BUILD_KEY +#define TQT_BUILD_KEY "error error error error" #endif #define CLAMP(x,l,u) x < l ? l :\ @@ -103,14 +103,14 @@ void kstyle_baghira_config::openHtml1() { - QStringList args; + TQStringList args; args << "exec" << "http://baghira.sf.net/"; kapp->kdeinitExec("kfmclient", args); } void kstyle_baghira_config::openHtml2() { - QStringList args; + TQStringList args; args << "exec" << "http://www.sf.net/projects/baghira/files/"; kapp->kdeinitExec("kfmclient", args); } @@ -125,9 +125,9 @@ void kstyle_baghira_config::startKRuler() kapp->kdeinitExec("kruler"); } -QImage* kstyle_baghira_config::tintButton(QImage &src, QColor c) +TQImage* kstyle_baghira_config::tintButton(TQImage &src, TQColor c) { - QImage *dest = new QImage( src.width(), src.height(), 32, 0 ); + TQImage *dest = new TQImage( src.width(), src.height(), 32, 0 ); dest->setAlphaBuffer( true ); unsigned int *data = ( unsigned int * ) src.bits(); unsigned int *destData = ( unsigned int* ) dest->bits(); @@ -142,21 +142,21 @@ QImage* kstyle_baghira_config::tintButton(QImage &src, QColor c) int sq = CLAMP((int)((45.0/128.0)*s+55),0,100); // float srcPercent, destPercent; for ( int current = 0 ; current < total ; ++current ) { - alpha = qAlpha( data[ current ] ); - blue = qBlue( data[ current ] ); - red = qRed( data[ current ] ); - green = qGreen( data[ current ] ); + alpha = tqAlpha( data[ current ] ); + blue = tqBlue( data[ current ] ); + red = tqRed( data[ current ] ); + green = tqGreen( data[ current ] ); SATURATION_COLOR2(sq, red, green, blue); // force back to valid colorspace ! COLOR_SPACE(destR, destG, destB); - destData[ current ] = qRgba( destR, destG, destB, alpha ); + destData[ current ] = tqRgba( destR, destG, destB, alpha ); } return ( dest ); } -QImage* kstyle_baghira_config::tintBrush( QImage &img, QColor c) +TQImage* kstyle_baghira_config::tintBrush( TQImage &img, TQColor c) { - QImage *dest = new QImage( img.width(), img.height(), 32, 0 ); + TQImage *dest = new TQImage( img.width(), img.height(), 32, 0 ); unsigned int *data = ( unsigned int * ) img.bits(); unsigned int *destData = ( unsigned int* ) dest->bits(); int total = img.width() * img.height(); @@ -172,14 +172,14 @@ QImage* kstyle_baghira_config::tintBrush( QImage &img, QColor c) // float srcPercent, destPercent; for ( current = 0 ; current < total ; ++current ) { - alpha = qAlpha( data[ current ] ); - blue = qBlue( data[ current ] ); - red = qRed( data[ current ] ); - green = qGreen( data[ current ] ); + alpha = tqAlpha( data[ current ] ); + blue = tqBlue( data[ current ] ); + red = tqRed( data[ current ] ); + green = tqGreen( data[ current ] ); SATURATION_COLOR(red, green, blue); // force back to valid colorspace ! COLOR_SPACE(destR, destG, destB); - destData[ current ] = qRgba( destR, destG, destB, alpha ); + destData[ current ] = tqRgba( destR, destG, destB, alpha ); } return ( dest ); } @@ -188,7 +188,7 @@ void kstyle_baghira_config::sliderButtonRedChanged(int value) { sliderButtonRedValue = value; dialog_->valueButtonRed->setNum(value); - dialog_->pixmapButtonPreview->setPixmap(*tintButton(baseImage, QColor(sliderButtonRedValue, sliderButtonGreenValue, sliderButtonBlueValue))); + dialog_->pixmapButtonPreview->setPixmap(*tintButton(baseImage, TQColor(sliderButtonRedValue, sliderButtonGreenValue, sliderButtonBlueValue))); dialog_->pixmapButtonPreview->repaint(false); configChanged(); } @@ -197,7 +197,7 @@ void kstyle_baghira_config::sliderButtonGreenChanged(int value) { sliderButtonGreenValue = value; dialog_->valueButtonGreen->setNum(value); - dialog_->pixmapButtonPreview->setPixmap(*tintButton(baseImage, QColor(sliderButtonRedValue, sliderButtonGreenValue, sliderButtonBlueValue))); + dialog_->pixmapButtonPreview->setPixmap(*tintButton(baseImage, TQColor(sliderButtonRedValue, sliderButtonGreenValue, sliderButtonBlueValue))); dialog_->pixmapButtonPreview->repaint(false); configChanged(); } @@ -206,7 +206,7 @@ void kstyle_baghira_config::sliderButtonBlueChanged(int value) { sliderButtonBlueValue = value; dialog_->valueButtonBlue->setNum(value); - dialog_->pixmapButtonPreview->setPixmap(*tintButton(baseImage, QColor(sliderButtonRedValue, sliderButtonGreenValue, sliderButtonBlueValue))); + dialog_->pixmapButtonPreview->setPixmap(*tintButton(baseImage, TQColor(sliderButtonRedValue, sliderButtonGreenValue, sliderButtonBlueValue))); dialog_->pixmapButtonPreview->repaint(false); configChanged(); } @@ -214,7 +214,7 @@ void kstyle_baghira_config::sliderButtonBlueChanged(int value) void kstyle_baghira_config::sliderBrushRedChanged(int value) { sliderBrushRedValue = value; - dialog_->pixmapBrushPreview->setPixmap(*tintBrush(baseImage2, QColor(sliderBrushRedValue, sliderBrushGreenValue, sliderBrushBlueValue))); + dialog_->pixmapBrushPreview->setPixmap(*tintBrush(baseImage2, TQColor(sliderBrushRedValue, sliderBrushGreenValue, sliderBrushBlueValue))); dialog_->pixmapBrushPreview->repaint(false); configChanged(); } @@ -222,7 +222,7 @@ void kstyle_baghira_config::sliderBrushRedChanged(int value) void kstyle_baghira_config::sliderBrushGreenChanged(int value) { sliderBrushGreenValue = value; - dialog_->pixmapBrushPreview->setPixmap(*tintBrush(baseImage2, QColor(sliderBrushRedValue, sliderBrushGreenValue, sliderBrushBlueValue))); + dialog_->pixmapBrushPreview->setPixmap(*tintBrush(baseImage2, TQColor(sliderBrushRedValue, sliderBrushGreenValue, sliderBrushBlueValue))); dialog_->pixmapBrushPreview->repaint(false); configChanged(); } @@ -230,7 +230,7 @@ void kstyle_baghira_config::sliderBrushGreenChanged(int value) void kstyle_baghira_config::sliderBrushBlueChanged(int value) { sliderBrushBlueValue = value; - dialog_->pixmapBrushPreview->setPixmap(*tintBrush(baseImage2, QColor(sliderBrushRedValue, sliderBrushGreenValue, sliderBrushBlueValue))); + dialog_->pixmapBrushPreview->setPixmap(*tintBrush(baseImage2, TQColor(sliderBrushRedValue, sliderBrushGreenValue, sliderBrushBlueValue))); dialog_->pixmapBrushPreview->repaint(false); configChanged(); } @@ -238,7 +238,7 @@ void kstyle_baghira_config::sliderBrushBlueChanged(int value) // void kstyle_baghira_config::sliderBrushSaturationChanged(int value) // { // sliderBrushSaturationValue = value; -// dialog_->pixmapBrushPreview->setPixmap(*tintBrush(baseImage2, QColor(sliderBrushRedValue, sliderBrushGreenValue, sliderBrushBlueValue), sliderBrushSaturationValue)); +// dialog_->pixmapBrushPreview->setPixmap(*tintBrush(baseImage2, TQColor(sliderBrushRedValue, sliderBrushGreenValue, sliderBrushBlueValue), sliderBrushSaturationValue)); // dialog_->pixmapBrushPreview->repaint(false); // emit changed(true); // } @@ -255,10 +255,10 @@ int presetColor[NUMBEROFCOLORS][3] = {{84,144,218},{130,170,190},{103,118,134},{ // -------------------------------- -typedef KGenericFactory kstyle_baghira_configFactory; +typedef KGenericFactory kstyle_baghira_configFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kstyle_baghira_config, kstyle_baghira_configFactory("kcmkstyle_baghira_config")) -//extern QImage uic_findImage(const QString& name); +//extern TQImage uic_findImage(const TQString& name); //extern void qInitImages_baghira(); //extern void qCleanupImages_baghira(); @@ -284,35 +284,35 @@ void kstyle_baghira_config::showAbout() about_->exec(); } -kstyle_baghira_config::kstyle_baghira_config(QWidget *parent, const char *name, const QStringList&) : QWidget(parent, name )//, myAboutData(0) +kstyle_baghira_config::kstyle_baghira_config(TQWidget *parent, const char *name, const TQStringList&) : TQWidget(parent, name )//, myAboutData(0) { loadDone = false; if (parent) parent->setCaption("Configure Your Cat"); - QVBoxLayout *layout = new QVBoxLayout(this); + TQVBoxLayout *layout = new TQVBoxLayout(this); dialog_ = new Config(this); for (int i = 0; i < NUMBEROFCOLORS; i++) dialog_->colorPresets->insertItem ( presetColorName[i], i ); - QWidget *rulesWidget = new QWidget(dialog_->tabWidget); - QHBoxLayout *rwlh = new QHBoxLayout(rulesWidget); + TQWidget *rulesWidget = new TQWidget(dialog_->tabWidget); + TQHBoxLayout *rwlh = new TQHBoxLayout(rulesWidget); applist = new KListView(rulesWidget); applist->setFullWidth(true); #if KDE_IS_VERSION(3,3,91) applist->setShadeSortColumn(false); #endif applist->setAllColumnsShowFocus( true ); - applist->setSelectionMode(QListView::Single); + applist->setSelectionMode(TQListView::Single); applist->addColumn ( i18n("Name") ); applist->addColumn ( i18n("Links to") ); - QDir d( QDir::homeDirPath() + "/.baghira", 0L, QDir::Name | QDir::IgnoreCase, QDir::Files | QDir::Readable | QDir::Writable ); + TQDir d( TQDir::homeDirPath() + "/.baghira", 0L, TQDir::Name | TQDir::IgnoreCase, TQDir::Files | TQDir::Readable | TQDir::Writable ); if (!d.exists()) - d.mkdir(QDir::homeDirPath() + "/.baghira"); + d.mkdir(TQDir::homeDirPath() + "/.baghira"); else { for ( uint i = 0; i < d.count(); i++ ) { - QFileInfo FI = QFileInfo(d, d[i]); + TQFileInfo FI = TQFileInfo(d, d[i]); if (FI.isSymLink()) applist->insertItem(new KListViewItem(applist, d[i], FI.readLink().section('/',-1,-1))); else @@ -321,27 +321,27 @@ kstyle_baghira_config::kstyle_baghira_config(QWidget *parent, const char *name, } rwlh->addWidget(applist); // rwlh->addLayout(rwlv); - QVBoxLayout *rwlv = new QVBoxLayout(rwlh); + TQVBoxLayout *rwlv = new TQVBoxLayout(rwlh); rwlv->addStretch(); - QPushButton *btnNew = new QPushButton("New...", rulesWidget); - QPushButton *btnEdit = new QPushButton("Edit...", rulesWidget); - QPushButton *btnDel = new QPushButton("Remove", rulesWidget); - QPushButton *btnDet = new QPushButton("Detect", rulesWidget); + TQPushButton *btnNew = new TQPushButton("New...", rulesWidget); + TQPushButton *btnEdit = new TQPushButton("Edit...", rulesWidget); + TQPushButton *btnDel = new TQPushButton("Remove", rulesWidget); + TQPushButton *btnDet = new TQPushButton("Detect", rulesWidget); rwlv->addWidget(btnNew); rwlv->addWidget(btnEdit); rwlv->addWidget(btnDel); rwlv->addSpacing( 5 ); rwlv->addWidget(btnDet); rwlv->addStretch(); - dialog_->tabWidget->addTab( rulesWidget, QString("Rules") ); + dialog_->tabWidget->addTab( rulesWidget, TQString("Rules") ); appsetter = new AppSetter(this); connect(btnNew, SIGNAL(clicked()), appsetter, SLOT(show())); connect(btnEdit, SIGNAL(clicked()), this, SLOT(editApp())); - connect(this, SIGNAL(editApp(QString, QString)), appsetter, SLOT(show(QString, QString))); + connect(this, SIGNAL(editApp(TQString, TQString)), appsetter, SLOT(show(TQString, TQString))); connect(btnDel, SIGNAL(clicked()), this, SLOT(removeApp())); connect(btnDet, SIGNAL(clicked()), this, SLOT(selectWindow())); - connect(appsetter, SIGNAL(addApp(QString, QString)), this, SLOT(addApp(QString, QString))); - connect(appsetter, SIGNAL(removeApp(QString)), this, SLOT(removeApp(QString))); + connect(appsetter, SIGNAL(addApp(TQString, TQString)), this, SLOT(addApp(TQString, TQString))); + connect(appsetter, SIGNAL(removeApp(TQString)), this, SLOT(removeApp(TQString))); // preview stuff baseImage = uic_findImage("button-base"); @@ -356,9 +356,9 @@ kstyle_baghira_config::kstyle_baghira_config(QWidget *parent, const char *name, crNotes[0] = "© 2003-2005 by Thomas Lübking
http://baghira.SourceForge.net
"; crNotes[1] = "© \"Design\" 2001-2005 by Apple inc.
http://www.apple.com"; crNotes[2] = "© \"Milk\" 2002-2005 by Max Rudberg
http://www.maxthemes.com
"; - timer = new QTimer(); + timer = new TQTimer(); connect( timer, SIGNAL(timeout()), this, SLOT(updateCR()) ); - QString tmpString(QT_BUILD_KEY); + TQString tmpString(TQT_BUILD_KEY); about_->systemLabel->setText(tmpString.section(' ',1,1)); about_->cpuLabel->setText(tmpString.section(' ',0,0)); about_->setFixedSize (380, 430); @@ -413,25 +413,25 @@ kstyle_baghira_config::kstyle_baghira_config(QWidget *parent, const char *name, connect(dialog_->drawMenuStripe, SIGNAL(stateChanged(int)), this, SLOT(configChanged())); connect(dialog_->glossyMenus, SIGNAL(stateChanged(int)), this, SLOT(configChanged())); - connect(dialog_->customInactiveColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); -connect(dialog_->toolbuttonHighColor, SIGNAL(changed(const QColor &)), this, SLOT(changeTooluttonHighlightColor(const QColor &))); - connect(dialog_->treeLineColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); - connect(dialog_->customExpanderColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); - connect(dialog_->menuTextColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); - connect(dialog_->menuTextColorHigh, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); - connect(dialog_->menuColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); - connect(dialog_->menuColorHigh, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); - connect(dialog_->menuColor2, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); - connect(dialog_->radioOffColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); - connect(dialog_->radioOnColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); - connect(dialog_->checkOffColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); - connect(dialog_->checkOnColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); - connect(dialog_->sliderColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); - connect(dialog_->hoverSliderColorColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); - connect(dialog_->pressedSliderColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); - connect(dialog_->inactiveTabColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); - connect(dialog_->activeTabColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); - connect(dialog_->menuStripeColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); + connect(dialog_->customInactiveColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged())); +connect(dialog_->toolbuttonHighColor, SIGNAL(changed(const TQColor &)), this, SLOT(changeTooluttonHighlightColor(const TQColor &))); + connect(dialog_->treeLineColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged())); + connect(dialog_->customExpanderColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged())); + connect(dialog_->menuTextColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged())); + connect(dialog_->menuTextColorHigh, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged())); + connect(dialog_->menuColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged())); + connect(dialog_->menuColorHigh, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged())); + connect(dialog_->menuColor2, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged())); + connect(dialog_->radioOffColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged())); + connect(dialog_->radioOnColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged())); + connect(dialog_->checkOffColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged())); + connect(dialog_->checkOnColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged())); + connect(dialog_->sliderColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged())); + connect(dialog_->hoverSliderColorColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged())); + connect(dialog_->pressedSliderColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged())); + connect(dialog_->inactiveTabColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged())); + connect(dialog_->activeTabColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged())); + connect(dialog_->menuStripeColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged())); connect(dialog_->sliderButtonRed, SIGNAL(valueChanged (int)), this, SLOT(sliderButtonRedChanged(int))); connect(dialog_->sliderButtonGreen, SIGNAL(valueChanged (int)), this, SLOT(sliderButtonGreenChanged(int))); @@ -457,7 +457,7 @@ connect(dialog_->toolbuttonHighColor, SIGNAL(changed(const QColor &)), this, SLO load(); loadDone = true; - dialog_->pixmapButtonPreview->setPixmap(*tintButton(baseImage, QColor(sliderButtonRedValue, sliderButtonGreenValue, sliderButtonBlueValue))); + dialog_->pixmapButtonPreview->setPixmap(*tintButton(baseImage, TQColor(sliderButtonRedValue, sliderButtonGreenValue, sliderButtonBlueValue))); }; @@ -475,14 +475,14 @@ void kstyle_baghira_config::setPresetColor(int i) void kstyle_baghira_config::load() { - QString tmpString = QDir::homeDirPath() + "/.qt/baghirarc"; + TQString tmpString = TQDir::homeDirPath() + "/.qt/baghirarc"; load (tmpString); } -void kstyle_baghira_config::load(QString &fileName) +void kstyle_baghira_config::load(TQString &fileName) { KConfig *config = new KConfig(fileName); -// QSettings config; +// TQSettings config; config->setGroup("BAB"); // general Design dialog_->defaultStyle->setCurrentItem(config->readNumEntry("defaultState", 0 )); @@ -498,10 +498,10 @@ void kstyle_baghira_config::load(QString &fileName) dialog_->bevelHighlights->setChecked( config->readBoolEntry( "Design_BevelAsHighlight", true)); dialog_->colorMode->setCurrentItem(config->readNumEntry("Design_ButtonStyle", 0)); dialog_->inactiveColorType->setCurrentItem(config->readNumEntry( "Design_InactiveButtonStyle", 1)); - dialog_->customInactiveColor->setColor(QColor(config->readNumEntry("Design_InactiveButtonColor",(int)colorGroup().background().rgb()))); + dialog_->customInactiveColor->setColor(TQColor(config->readNumEntry("Design_InactiveButtonColor",(int)colorGroup().background().rgb()))); dialog_->centerTabs->setChecked( config->readBoolEntry( "Design_CenterTabs", true)); // button color stuff - QColor tmpColor = QColor(config->readNumEntry("Design_ButtonColor",(int)colorGroup().button().rgb())); + TQColor tmpColor = TQColor(config->readNumEntry("Design_ButtonColor",(int)colorGroup().button().rgb())); dialog_->sliderButtonRed->setValue(sliderButtonRedValue = tmpColor.red()); dialog_->sliderButtonGreen->setValue(sliderButtonGreenValue = tmpColor.green()); dialog_->sliderButtonBlue->setValue(sliderButtonBlueValue = tmpColor.blue()); @@ -514,14 +514,14 @@ void kstyle_baghira_config::load(QString &fileName) dialog_->useRectLVH->setChecked( config->readBoolEntry( "Special_UseFlatLVH", false)); dialog_->drawTreeLines->setChecked( config->readBoolEntry( "Special_DrawTreeLines", false)); dialog_->treeLineMode->setCurrentItem(config->readNumEntry( "Special_TreelineStyle", 0)); - dialog_->treeLineColor->setColor( QColor( config->readNumEntry( "Special_TreelineColor", (int) colorGroup().mid().rgb()))); + dialog_->treeLineColor->setColor( TQColor( config->readNumEntry( "Special_TreelineColor", (int) colorGroup().mid().rgb()))); dialog_->expanderMode->setCurrentItem(config->readNumEntry( "Special_ExpanderStyle", 0)); dialog_->useCustomExpanderColor->setChecked( config->readBoolEntry( "Special_CustomExpanderColor", false)); - dialog_->customExpanderColor->setColor( QColor( config->readNumEntry( "Special_ExpanderColor", (int) colorGroup().text().rgb()))); + dialog_->customExpanderColor->setColor( TQColor( config->readNumEntry( "Special_ExpanderColor", (int) colorGroup().text().rgb()))); //Kicker dialog_->removeKickerBevel->setChecked( config->readBoolEntry( "Special_RemoveKickerBevel", true)); dialog_->roundTasks->setChecked( config->readBoolEntry( "Special_RoundTaskbuttons", false)); - QFile file(QDir::homeDirPath() + "/.kde/share/apps/kicker/applets/menuapplet.desktop"); + TQFile file(TQDir::homeDirPath() + "/.kde/share/apps/kicker/applets/menuapplet.desktop"); dialog_->replaceMenubar->setChecked( menuReplaced = file.exists() ); //Scrollbars dialog_->animateSlider->setChecked( config->readBoolEntry( "Special_AnimateSlider", true)); @@ -542,29 +542,29 @@ void kstyle_baghira_config::load(QString &fileName) //Look dialog_->shadowMenuText->setChecked( config->readBoolEntry( "Menu_ShadowText", true)); dialog_->menuColorMode->setCurrentItem(config->readNumEntry("Menu_ColorStyle")); - dialog_->menuTextColor->setColor( QColor( config->readNumEntry( "Menu_TextColor", (int) colorGroup().text().rgb()))); - dialog_->menuTextColorHigh->setColor( QColor( config->readNumEntry( "Menu_TextColorHighlight", (int) colorGroup().highlightedText().rgb()))); - dialog_->menuColor->setColor( QColor( config->readNumEntry( "Menu_Color1", (int) colorGroup().background().rgb()))); - dialog_->menuColor2->setColor( QColor( config->readNumEntry( "Menu_Color2", (int) colorGroup().background().dark(130).rgb()))); - dialog_->menuColorHigh->setColor( QColor( config->readNumEntry( "Menu_ColorHighlight", (int) colorGroup().highlight().rgb()))); + dialog_->menuTextColor->setColor( TQColor( config->readNumEntry( "Menu_TextColor", (int) colorGroup().text().rgb()))); + dialog_->menuTextColorHigh->setColor( TQColor( config->readNumEntry( "Menu_TextColorHighlight", (int) colorGroup().highlightedText().rgb()))); + dialog_->menuColor->setColor( TQColor( config->readNumEntry( "Menu_Color1", (int) colorGroup().background().rgb()))); + dialog_->menuColor2->setColor( TQColor( config->readNumEntry( "Menu_Color2", (int) colorGroup().background().dark(130).rgb()))); + dialog_->menuColorHigh->setColor( TQColor( config->readNumEntry( "Menu_ColorHighlight", (int) colorGroup().highlight().rgb()))); dialog_->drawMenuStripe->setChecked(config->readBoolEntry( "Menu_DrawMenuStripe", false)); dialog_->glossyMenus->setChecked(config->readBoolEntry( "Menu_Glossy", true)); - dialog_->menuStripeColor->setColor( QColor( config->readNumEntry( "Menu_StripeColor", (int) Qt::white.rgb()))); + dialog_->menuStripeColor->setColor( TQColor( config->readNumEntry( "Menu_StripeColor", (int) TQt::white.rgb()))); // custom colors dialog_->useCustomColors->setChecked( config->readBoolEntry( "Colors_UseCustomColors", false)); - dialog_->radioOffColor->setColor( QColor( config->readNumEntry( "Colors_RadioOff", ( int ) colorGroup().background().rgb()))); - dialog_->radioOnColor->setColor( QColor( config->readNumEntry( "Colors_RadioOn", ( int ) colorGroup().button().rgb()))); - dialog_->checkOffColor->setColor( QColor( config->readNumEntry( "Colors_CheckOff", ( int ) colorGroup().background().rgb()))); - dialog_->checkOnColor->setColor( QColor( config->readNumEntry( "Colors_CheckOn", ( int ) colorGroup().button().rgb()))); - dialog_->sliderColor->setColor( QColor( config->readNumEntry( "Colors_Slider", ( int ) colorGroup().button().rgb()))); - dialog_->hoverSliderColorColor->setColor(QColor(config->readNumEntry("Colors_SliderHovered",(int)colorGroup().button().rgb()))); - dialog_->pressedSliderColor->setColor(QColor(config->readNumEntry("Colors_SliderPressed",(int) colorGroup().button().dark(110).rgb()))); - dialog_->sliderGrooveColor->setColor(QColor(config->readNumEntry("Colors_SliderGroove",(int)colorGroup().background().rgb()))); - dialog_->inactiveTabColor->setColor(QColor(config->readNumEntry("Colors_TabInactive",(int) colorGroup().background().rgb()))); - dialog_->activeTabColor->setColor(QColor(config->readNumEntry("Colors_TabActive",(int)colorGroup().button().rgb()))); + dialog_->radioOffColor->setColor( TQColor( config->readNumEntry( "Colors_RadioOff", ( int ) colorGroup().background().rgb()))); + dialog_->radioOnColor->setColor( TQColor( config->readNumEntry( "Colors_RadioOn", ( int ) colorGroup().button().rgb()))); + dialog_->checkOffColor->setColor( TQColor( config->readNumEntry( "Colors_CheckOff", ( int ) colorGroup().background().rgb()))); + dialog_->checkOnColor->setColor( TQColor( config->readNumEntry( "Colors_CheckOn", ( int ) colorGroup().button().rgb()))); + dialog_->sliderColor->setColor( TQColor( config->readNumEntry( "Colors_Slider", ( int ) colorGroup().button().rgb()))); + dialog_->hoverSliderColorColor->setColor(TQColor(config->readNumEntry("Colors_SliderHovered",(int)colorGroup().button().rgb()))); + dialog_->pressedSliderColor->setColor(TQColor(config->readNumEntry("Colors_SliderPressed",(int) colorGroup().button().dark(110).rgb()))); + dialog_->sliderGrooveColor->setColor(TQColor(config->readNumEntry("Colors_SliderGroove",(int)colorGroup().background().rgb()))); + dialog_->inactiveTabColor->setColor(TQColor(config->readNumEntry("Colors_TabInactive",(int) colorGroup().background().rgb()))); + dialog_->activeTabColor->setColor(TQColor(config->readNumEntry("Colors_TabActive",(int)colorGroup().button().rgb()))); dialog_->tintBrush->setChecked( config->readBoolEntry( "Colors_TintBrushedMetal", false)); - brushTint = QColor(config->readNumEntry("Colors_BrushTint",(int)colorGroup().background().rgb())); + brushTint = TQColor(config->readNumEntry("Colors_BrushTint",(int)colorGroup().background().rgb())); // dialog_->brushTintSaturaion->setValue(settings.readNumEntry( "/qt/Baghira/brushTintSaturation", 3)); baseImage2 = uic_findImage("brush-me"); dialog_->pixmapBrushPreview->setPixmap(*tintBrush(baseImage2, brushTint)); @@ -572,13 +572,13 @@ void kstyle_baghira_config::load(QString &fileName) dialog_->sliderBrushGreen->setValue(sliderBrushGreenValue = brushTint.green()); dialog_->sliderBrushBlue->setValue(sliderBrushBlueValue = brushTint.blue()); config->setGroup("Menubar"); - dialog_->menuMaxWidth->setValue(config->readNumEntry("Width", QDesktopWidget().availableGeometry().width())); + dialog_->menuMaxWidth->setValue(config->readNumEntry("Width", TQDesktopWidget().availableGeometry().width())); config->setGroup("Sidebar"); delete config; config = new KConfig("kdeglobals"); config->setGroup( "Toolbar style" ); - dialog_->toolbuttonHighColor->setColor(config->readColorEntry("HighlightColor", new QColor(103,141,178)) ); + dialog_->toolbuttonHighColor->setColor(config->readColorEntry("HighlightColor", new TQColor(103,141,178)) ); delete config; } @@ -611,7 +611,7 @@ void kstyle_baghira_config::defaults() dialog_->shadowSlider->setChecked( false); dialog_->squeezeSlider->setChecked( false); dialog_->unhoveredToolButtons->setCurrentItem(2); - dialog_->toolbuttonHighColor->setColor( QColor(103,141,178) ); + dialog_->toolbuttonHighColor->setColor( TQColor(103,141,178) ); dialog_->drawTreeLines->setChecked( false); dialog_->useCustomExpanderColor->setChecked( false); dialog_->treeLineMode->setCurrentItem(0); @@ -639,7 +639,7 @@ void kstyle_baghira_config::defaults() dialog_->menuColorHigh->setColor( colorGroup().highlight().rgb()); dialog_->drawMenuStripe->setChecked(false); dialog_->glossyMenus->setChecked(true); - dialog_->menuStripeColor->setColor( Qt::white.rgb()); + dialog_->menuStripeColor->setColor( TQt::white.rgb()); // custom colors dialog_->useCustomColors->setChecked( false); @@ -659,12 +659,12 @@ void kstyle_baghira_config::defaults() void kstyle_baghira_config::save() { - QString tmpString = QDir::homeDirPath() + "/.qt/baghirarc"; + TQString tmpString = TQDir::homeDirPath() + "/.qt/baghirarc"; save(tmpString); // emit changed(true); } -void kstyle_baghira_config::changeTooluttonHighlightColor(const QColor & color) +void kstyle_baghira_config::changeTooluttonHighlightColor(const TQColor & color) { KConfig *config = new KConfig("kdeglobals"); config->setGroup( "Toolbar style" ); @@ -681,9 +681,9 @@ void kstyle_baghira_config::handleButtonStyles(int i) configChanged(); } -void kstyle_baghira_config::save(QString &fileName) +void kstyle_baghira_config::save(TQString &fileName) { -// QSettings *config = new QSettings; +// TQSettings *config = new TQSettings; KConfig *config = new KConfig(fileName); config->setGroup("BAB"); //General Design @@ -704,7 +704,7 @@ void kstyle_baghira_config::save(QString &fileName) config->writeEntry("Design_InactiveButtonColor", (int)dialog_->customInactiveColor->color().rgb()); config->writeEntry("Design_CenterTabs", dialog_->centerTabs->isOn()); //button color stuff - config->writeEntry("Design_ButtonColor", (int)(QColor(sliderButtonRedValue, sliderButtonGreenValue, sliderButtonBlueValue).rgb())); + config->writeEntry("Design_ButtonColor", (int)(TQColor(sliderButtonRedValue, sliderButtonGreenValue, sliderButtonBlueValue).rgb())); // special Widgets //listviews @@ -719,17 +719,17 @@ void kstyle_baghira_config::save(QString &fileName) //Kicker config->writeEntry("Special_RemoveKickerBevel", dialog_->removeKickerBevel->isOn()); config->writeEntry("Special_RoundTaskbuttons", dialog_->roundTasks->isOn()); - QDir tmpDir(QDir::homeDirPath() + "/.kde"); - if (!tmpDir.exists()) tmpDir.mkdir(QDir::homeDirPath() + "/.kde"); - tmpDir.setPath(QDir::homeDirPath() + "/.kde/share"); - if (!tmpDir.exists()) tmpDir.mkdir(QDir::homeDirPath() + "/.kde/share"); - tmpDir.setPath(QDir::homeDirPath() + "/.kde/share/apps"); - if (!tmpDir.exists()) tmpDir.mkdir(QDir::homeDirPath() + "/.kde/share/apps"); - tmpDir.setPath(QDir::homeDirPath() + "/.kde/share/apps/kicker"); - if (!tmpDir.exists()) tmpDir.mkdir(QDir::homeDirPath() + "/.kde/share/apps/kicker"); - tmpDir.setPath(QDir::homeDirPath() + "/.kde/share/apps/kicker/applets"); - if (!tmpDir.exists()) tmpDir.mkdir(QDir::homeDirPath() + "/.kde/share/apps/kicker/applets"); - QFile file(QDir::homeDirPath() + "/.kde/share/apps/kicker/applets/menuapplet.desktop"); + TQDir tmpDir(TQDir::homeDirPath() + "/.kde"); + if (!tmpDir.exists()) tmpDir.mkdir(TQDir::homeDirPath() + "/.kde"); + tmpDir.setPath(TQDir::homeDirPath() + "/.kde/share"); + if (!tmpDir.exists()) tmpDir.mkdir(TQDir::homeDirPath() + "/.kde/share"); + tmpDir.setPath(TQDir::homeDirPath() + "/.kde/share/apps"); + if (!tmpDir.exists()) tmpDir.mkdir(TQDir::homeDirPath() + "/.kde/share/apps"); + tmpDir.setPath(TQDir::homeDirPath() + "/.kde/share/apps/kicker"); + if (!tmpDir.exists()) tmpDir.mkdir(TQDir::homeDirPath() + "/.kde/share/apps/kicker"); + tmpDir.setPath(TQDir::homeDirPath() + "/.kde/share/apps/kicker/applets"); + if (!tmpDir.exists()) tmpDir.mkdir(TQDir::homeDirPath() + "/.kde/share/apps/kicker/applets"); + TQFile file(TQDir::homeDirPath() + "/.kde/share/apps/kicker/applets/menuapplet.desktop"); if (dialog_->replaceMenubar->isOn()) { file.open(IO_WriteOnly); @@ -741,7 +741,7 @@ Encoding=UTF-8\n\ Name=BaghiraMenu\n\ X-KDE-Library=b_menu_panelapplet\n\ X-KDE-UniqueApplet=true\n"; - file.writeBlock( msg, qstrlen(msg) ); + file.writeBlock( msg, tqstrlen(msg) ); file.close(); } else @@ -788,7 +788,7 @@ X-KDE-UniqueApplet=true\n"; config->writeEntry("Colors_TabInactive",(int) dialog_->inactiveTabColor->color().rgb()); config->writeEntry("Colors_TabActive", (int)dialog_->activeTabColor->color().rgb()); config->writeEntry("Colors_TintBrushedMetal", dialog_->tintBrush->isOn()); - config->writeEntry("Colors_BrushTint",(int)qRgb(sliderBrushRedValue, sliderBrushGreenValue, sliderBrushBlueValue)); + config->writeEntry("Colors_BrushTint",(int)tqRgb(sliderBrushRedValue, sliderBrushGreenValue, sliderBrushBlueValue)); config->setGroup("Menubar"); config->writeEntry("Width", dialog_->menuMaxWidth->value()); config->sync(); @@ -807,7 +807,7 @@ void kstyle_baghira_config::configChanged() } -QString kstyle_baghira_config::quickHelp() const +TQString kstyle_baghira_config::quickHelp() const { return i18n("Configure Your Cat"); } @@ -836,14 +836,14 @@ void kstyle_baghira_config::enableMenuColorStuff(int d) void kstyle_baghira_config::buttonLoadAction() { - QString tmpString = KFileDialog::getOpenFileName(QDir::homeDirPath(), "*", this, "Select a Baghira config file"); + TQString tmpString = KFileDialog::getOpenFileName(TQDir::homeDirPath(), "*", this, "Select a Baghira config file"); if (!tmpString.isEmpty()) load(tmpString); } void kstyle_baghira_config::buttonSaveAsAction() { - QString tmpString = KFileDialog::getSaveFileName(QDir::homeDirPath(), "*", this, "Save current Baghira configuration as"); + TQString tmpString = KFileDialog::getSaveFileName(TQDir::homeDirPath(), "*", this, "Save current Baghira configuration as"); save(tmpString); } @@ -854,19 +854,19 @@ void kstyle_baghira_config::editApp() void kstyle_baghira_config::removeApp() { - QString string = QDir::homeDirPath() + "/.baghira/" + applist->currentItem()->text(0); - QFile::remove(string); + TQString string = TQDir::homeDirPath() + "/.baghira/" + applist->currentItem()->text(0); + TQFile::remove(string); applist->takeItem(applist->currentItem()); } -void kstyle_baghira_config::removeApp(QString name) +void kstyle_baghira_config::removeApp(TQString name) { - QString string = QDir::homeDirPath() + "/.baghira/" + name; - QFile::remove(string); - applist->takeItem(applist->findItem(name, 0, Qt::ExactMatch)); + TQString string = TQDir::homeDirPath() + "/.baghira/" + name; + TQFile::remove(string); + applist->takeItem(applist->findItem(name, 0, TQt::ExactMatch)); } -void kstyle_baghira_config::addApp(QString string, QString linkString) +void kstyle_baghira_config::addApp(TQString string, TQString linkString) { applist->insertItem(new KListViewItem(applist, string, linkString)); applist->sort(); @@ -878,34 +878,34 @@ void kstyle_baghira_config::selectWindow() // use a dialog, so that all user input is blocked // use WX11BypassWM and moving away so that it's not actually visible // grab only mouse, so that keyboard can be used e.g. for switching windows - grabber = new QDialog( NULL, NULL, true, WX11BypassWM ); + grabber = new TQDialog( NULL, NULL, true, WX11BypassWM ); grabber->move( -1000, -1000 ); grabber->show(); grabber->grabMouse( crossCursor ); grabber->installEventFilter( this ); } -Atom wm_state = XInternAtom( qt_xdisplay(), "WM_STATE", False ); -// Atom wm_state = XInternAtom( qt_xdisplay(), "WM_COMMAND", False ); +Atom wm_state = XInternAtom( tqt_xdisplay(), "WM_STATE", False ); +// Atom wm_state = XInternAtom( tqt_xdisplay(), "WM_COMMAND", False ); -bool kstyle_baghira_config::eventFilter( QObject* o, QEvent* e ) +bool kstyle_baghira_config::eventFilter( TQObject* o, TQEvent* e ) // adapted from kcmkwin... again ;) { if( o != grabber ) return false; - if( e->type() != QEvent::MouseButtonRelease ) + if( e->type() != TQEvent::MouseButtonRelease ) return false; delete grabber; grabber = NULL; - if( static_cast< QMouseEvent* >( e )->button() != LeftButton ) + if( static_cast< TQMouseEvent* >( e )->button() != LeftButton ) return true; WId winId = findWindow(); XClassHint classHint; - if (XGetClassHint(qt_xdisplay(), winId, &classHint)) + if (XGetClassHint(tqt_xdisplay(), winId, &classHint)) { - QString tmpString = QString( classHint.res_class ).lower() + " (uncertain)"; - appsetter->show(tmpString, QString()); -// qWarning("class: %s",QString( classHint.res_class ).lower().ascii()); + TQString tmpString = TQString( classHint.res_class ).lower() + " (uncertain)"; + appsetter->show(tmpString, TQString()); +// tqWarning("class: %s",TQString( classHint.res_class ).lower().ascii()); XFree( classHint.res_name ); XFree( classHint.res_class ); } @@ -919,13 +919,13 @@ WId kstyle_baghira_config::findWindow() Window child; uint mask; int rootX, rootY, x, y; - Window parent = qt_xrootwin(); -// Atom wm_state = XInternAtom( qt_xdisplay(), "WM_STATE", False ); + Window parent = tqt_xrootwin(); +// Atom wm_state = XInternAtom( tqt_xdisplay(), "WM_STATE", False ); for( int i = 0; i < 10; ++i ) { - XQueryPointer( qt_xdisplay(), parent, &root, &child, + XQueryPointer( tqt_xdisplay(), parent, &root, &child, &rootX, &rootY, &x, &y, &mask ); if( child == None ) return 0; @@ -933,7 +933,7 @@ WId kstyle_baghira_config::findWindow() int format; unsigned long nitems, after; unsigned char* prop; - if( XGetWindowProperty( qt_xdisplay(), child, wm_state, 0, 0, False, AnyPropertyType, &type, &format, &nitems, &after, &prop ) == Success ) + if( XGetWindowProperty( tqt_xdisplay(), child, wm_state, 0, 0, False, AnyPropertyType, &type, &format, &nitems, &after, &prop ) == Success ) { if( prop != NULL ) XFree( prop ); @@ -968,28 +968,28 @@ void kstyle_baghira_config::menuToggled(bool active) extern "C" { - QWidget* allocate_kstyle_config(QWidget* parent){ + TQWidget* allocate_kstyle_config(TQWidget* parent){ return(new kstyle_baghira_config(parent, "BaghiraConfig")); } } -AppSetter::AppSetter(QWidget *parent, const char *name) : QWidget(parent, name, Qt::WType_Dialog | Qt::WShowModal ) +AppSetter::AppSetter(TQWidget *parent, const char *name) : TQWidget(parent, name, TQt::WType_Dialog | TQt::WShowModal ) { isEdit = FALSE; - QLabel *label1 = new QLabel(i18n("Application Name"), this); - command = new QLineEdit(this); + TQLabel *label1 = new TQLabel(i18n("Application Name"), this); + command = new TQLineEdit(this); - QLabel *linkTo = new QLabel(i18n("Just like"),this); - link = new QComboBox(this); + TQLabel *linkTo = new TQLabel(i18n("Just like"),this); + link = new TQComboBox(this); - box = new QGroupBox(2,Qt::Horizontal,i18n("Custom Settings"),this); + box = new TQGroupBox(2,TQt::Horizontal,i18n("Custom Settings"),this); box->setCheckable( true ); - new QLabel(i18n("Style"), box); - new QLabel("Deco", box); + new TQLabel(i18n("Style"), box); + new TQLabel("Deco", box); - style = new QComboBox(box); + style = new TQComboBox(box); style->insertItem(i18n("Don't set")); style->insertItem("Jaguar"); style->insertItem("Panther"); @@ -997,7 +997,7 @@ AppSetter::AppSetter(QWidget *parent, const char *name) : QWidget(parent, name, style->insertItem("Tiger"); style->insertItem("Milk"); - deco = new QComboBox(box); + deco = new TQComboBox(box); deco->insertItem(i18n("Don't set")); deco->insertItem("Jaguar"); deco->insertItem("Panther"); @@ -1005,10 +1005,10 @@ AppSetter::AppSetter(QWidget *parent, const char *name) : QWidget(parent, name, deco->insertItem("Tiger"); deco->insertItem("Milk"); - new QLabel(i18n("Buttons"), box); - new QLabel(i18n("Toolbuttons"), box); + new TQLabel(i18n("Buttons"), box); + new TQLabel(i18n("Toolbuttons"), box); - buttons = new QComboBox(box); + buttons = new TQComboBox(box); buttons->insertItem("Jaguar"); buttons->insertItem("Panther"); buttons->insertItem("iTunes"); @@ -1016,48 +1016,48 @@ AppSetter::AppSetter(QWidget *parent, const char *name) : QWidget(parent, name, buttons->insertItem("Milk"); - toolButtons = new QComboBox(box); + toolButtons = new TQComboBox(box); toolButtons->insertItem("Jaguar"); toolButtons->insertItem("Panther"); toolButtons->insertItem("iTunes"); toolButtons->insertItem("Tiger"); toolButtons->insertItem("Milk"); - new QLabel(i18n("Tab vs. Chooser"), box); - new QLabel(i18n("Inactive Button"), box); + new TQLabel(i18n("Tab vs. Chooser"), box); + new TQLabel(i18n("Inactive Button"), box); - tabs = new QComboBox(box); + tabs = new TQComboBox(box); tabs->insertItem(i18n("Don't set")); tabs->insertItem("Tabs"); tabs->insertItem("Adaptive"); tabs->insertItem("Choosers"); - inbutton = new QComboBox(box); + inbutton = new TQComboBox(box); inbutton->insertItem("Fixed"); inbutton->insertItem("Background"); inbutton->insertItem("Active Button"); - scanlines = new QCheckBox("Show scanlines", box); + scanlines = new TQCheckBox("Show scanlines", box); - QWidget *dumb = new QWidget(box); - customColors = new QCheckBox(dumb); - buttonColors = new QPushButton("Custom Colors", dumb); - QHBoxLayout *clh = new QHBoxLayout(dumb); + TQWidget *dumb = new TQWidget(box); + customColors = new TQCheckBox(dumb); + buttonColors = new TQPushButton("Custom Colors", dumb); + TQHBoxLayout *clh = new TQHBoxLayout(dumb); clh->addWidget(customColors); clh->addWidget(buttonColors); - QVBoxLayout *lv = new QVBoxLayout(this,11,6); + TQVBoxLayout *lv = new TQVBoxLayout(this,11,6); lv->addWidget(label1); lv->addWidget(command); - QHBoxLayout *lh0 = new QHBoxLayout(lv); + TQHBoxLayout *lh0 = new TQHBoxLayout(lv); lh0->addWidget(linkTo); lh0->addWidget(link); lv->addWidget(box); - QHBoxLayout *lh = new QHBoxLayout(lv); - QPushButton *cancel = new QPushButton("Cancel",this); + TQHBoxLayout *lh = new TQHBoxLayout(lv); + TQPushButton *cancel = new TQPushButton("Cancel",this); lh->addWidget(cancel); - QPushButton *ok = new QPushButton("Ok",this); + TQPushButton *ok = new TQPushButton("Ok",this); lh->addWidget(ok); colorDialog = new ColorDialog(this); @@ -1102,20 +1102,20 @@ void AppSetter::updateColors() void AppSetter::show() { link->clear(); - QDir d( QDir::homeDirPath() + "/.baghira", 0L, QDir::Name | QDir::IgnoreCase, QDir::Files | QDir::NoSymLinks | QDir::Readable | QDir::Writable ); + TQDir d( TQDir::homeDirPath() + "/.baghira", 0L, TQDir::Name | TQDir::IgnoreCase, TQDir::Files | TQDir::NoSymLinks | TQDir::Readable | TQDir::Writable ); for ( uint i = 0; i < d.count(); i++ ) link->insertItem(d[i]); - QWidget::show(); + TQWidget::show(); } -void AppSetter::show(QString appName, QString linkString) +void AppSetter::show(TQString appName, TQString linkString) { isEdit = true; oldName = appName; oldLink = linkString; command->setText(appName); FILE *file = NULL; - QString tmpString = QDir::homeDirPath() + "/.baghira/" + appName; + TQString tmpString = TQDir::homeDirPath() + "/.baghira/" + appName; if( (file = fopen(tmpString.latin1(), "r")) != NULL ) { uint s, d, b, t, tc, sc, ib; @@ -1163,10 +1163,10 @@ void AppSetter::resetColorPicker() for (int i = 0; i < 8; i++) { colorDialog->picker[i]->blockSignals(true); - colorDialog->picker[i]->setColor(QColor(colors[i])); + colorDialog->picker[i]->setColor(TQColor(colors[i])); colorDialog->picker[i]->blockSignals(false); } - ((QWidget*)colorDialog->demo)->repaint(false); + ((TQWidget*)colorDialog->demo)->repaint(false); } else { @@ -1182,7 +1182,7 @@ void AppSetter::resetColorPicker() colorDialog->picker[Alternate]->setColor(KGlobalSettings::alternateBackgroundColor()); for (int i = 0; i < 8; i++) colorDialog->picker[i]->blockSignals(false); - ((QWidget*)colorDialog->demo)->repaint(false); + ((TQWidget*)colorDialog->demo)->repaint(false); } } @@ -1191,11 +1191,11 @@ void AppSetter::save() if (command->text() != "" && (!box->isChecked() || (style->currentItem() != 0 && deco->currentItem() != 0))) { if (!isEdit) - emit addApp(command->text(), box->isChecked() ? QString() : link->currentText()); + emit addApp(command->text(), box->isChecked() ? TQString() : link->currentText()); else if (command->text() != oldName || link->currentText() != oldLink) { emit removeApp(oldName); - emit addApp(command->text(), box->isChecked() ? QString() : link->currentText()); + emit addApp(command->text(), box->isChecked() ? TQString() : link->currentText()); } if (!customColors->isChecked()) { @@ -1203,7 +1203,7 @@ void AppSetter::save() colors[i] = -1; } FILE *file = NULL; - QString tmpString = QDir::homeDirPath() + "/.baghira/" + command->text(); + TQString tmpString = TQDir::homeDirPath() + "/.baghira/" + command->text(); if (box->isChecked()) // custom settings { if( (file = fopen(tmpString.latin1(), "w")) != NULL ) @@ -1214,8 +1214,8 @@ void AppSetter::save() } else // just link { - QString tmpString2 = QDir::homeDirPath() + "/.baghira/" + link->currentText(); - QFile::remove(tmpString); // just to be sure ;) + TQString tmpString2 = TQDir::homeDirPath() + "/.baghira/" + link->currentText(); + TQFile::remove(tmpString); // just to be sure ;) symlink (tmpString2.latin1(), tmpString.latin1()); } } diff --git a/config/kstyle_baghira_config.h b/config/kstyle_baghira_config.h index 35830dd..df97cc3 100644 --- a/config/kstyle_baghira_config.h +++ b/config/kstyle_baghira_config.h @@ -22,34 +22,34 @@ #define _KSTYLE_BAGHIRA_CONFIG_H_ //#include -#include -#include +#include +#include #include #include "configdialog.h" #include "help.h" #include "about.h" class KListView; -class QPushButton; +class TQPushButton; class AppSetter; -class QTimer; -class QCheckBox; -class QComboBox; -class QGroupBox; +class TQTimer; +class TQCheckBox; +class TQComboBox; +class TQGroupBox; -class kstyle_baghira_config: public QWidget +class kstyle_baghira_config: public TQWidget { Q_OBJECT public: - kstyle_baghira_config( QWidget *parent=0, const char *name=0, const QStringList& = QStringList() ); + kstyle_baghira_config( TQWidget *parent=0, const char *name=0, const TQStringList& = TQStringList() ); ~kstyle_baghira_config(); virtual void load(); - void load(QString &fileName); - void save(QString &fileName); + void load(TQString &fileName); + void save(TQString &fileName); // virtual int buttons(); - virtual QString quickHelp() const; + virtual TQString quickHelp() const; virtual const KAboutData *aboutData()const { return myAboutData; }; @@ -70,39 +70,39 @@ public slots: signals: void changed(bool); - void editApp(QString, QString); + void editApp(TQString, TQString); protected: - bool eventFilter( QObject* o, QEvent* e ); + bool eventFilter( TQObject* o, TQEvent* e ); private: - QString crNotes[3]; + TQString crNotes[3]; AppSetter *appsetter; KListView *applist; - QImage* tintButton(QImage &src, QColor c); - QImage* tintBrush( QImage &img, QColor c/*, int saturation*/ ); + TQImage* tintButton(TQImage &src, TQColor c); + TQImage* tintBrush( TQImage &img, TQColor c/*, int saturation*/ ); WId findWindow(); KAboutData *myAboutData; Config *dialog_; Help* help_; About* about_; - QImage baseImage, baseImage2; - QDialog *grabber; - QColor buttonColor; - QColor brushTint; + TQImage baseImage, baseImage2; + TQDialog *grabber; + TQColor buttonColor; + TQColor brushTint; int sliderButtonRedValue, sliderButtonGreenValue, sliderButtonBlueValue; int sliderBrushRedValue, sliderBrushGreenValue, sliderBrushBlueValue/*, sliderBrushSaturationValue*/; bool loadDone; bool menuReplaced; - QTimer *timer; + TQTimer *timer; int crCurrent; private slots: void updateCR(); void showAbout(); void editApp(); - void addApp(QString, QString); + void addApp(TQString, TQString); void removeApp(); - void removeApp(QString); + void removeApp(TQString); void setDesign(int); void menuToggled(bool); void enableInButtonColor(int d); @@ -111,45 +111,45 @@ private slots: void buttonSaveAsAction(); void setPresetColor(int i); void selectWindow(); - void changeTooluttonHighlightColor(const QColor &); + void changeTooluttonHighlightColor(const TQColor &); void handleButtonStyles(int i); }; class ColorDialog; -class AppSetter : public QWidget +class AppSetter : public TQWidget { Q_OBJECT public: - AppSetter(QWidget *parent=0, const char *name=0); + AppSetter(TQWidget *parent=0, const char *name=0); ~AppSetter(); public slots: void show(); - void show(QString appName, QString link); + void show(TQString appName, TQString link); private: bool isEdit; int index_; int colors[8]; - QString oldName; - QString oldLink; - QLineEdit *command; - QComboBox *link; - QGroupBox *box; - QComboBox *style; - QComboBox *deco; - QComboBox *buttons; - QComboBox *toolButtons; - QComboBox *tabs; - QComboBox *inbutton; - QCheckBox *scanlines; - QCheckBox *customColors; - QPushButton *buttonColors; + TQString oldName; + TQString oldLink; + TQLineEdit *command; + TQComboBox *link; + TQGroupBox *box; + TQComboBox *style; + TQComboBox *deco; + TQComboBox *buttons; + TQComboBox *toolButtons; + TQComboBox *tabs; + TQComboBox *inbutton; + TQCheckBox *scanlines; + TQCheckBox *customColors; + TQPushButton *buttonColors; ColorDialog *colorDialog; signals: - void addApp(QString, QString); - void removeApp(QString); + void addApp(TQString, TQString); + void removeApp(TQString); private slots: void save(); diff --git a/deco/baghiraclient.cc b/deco/baghiraclient.cc index 30d6c8d..ca5eb37 100644 --- a/deco/baghiraclient.cc +++ b/deco/baghiraclient.cc @@ -15,16 +15,16 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -78,14 +78,14 @@ static const int MARGIN = 6; bool BaghiraFactory::initialized_ = false; Baghira::TitlebarType BaghiraFactory::effect_[5][2]; -Qt::AlignmentFlags BaghiraFactory::titlealign_; -QColor BaghiraFactory::colors_[5][ ColorTypeCount ][ 2 ]; +TQt::AlignmentFlags BaghiraFactory::titlealign_; +TQColor BaghiraFactory::colors_[5][ ColorTypeCount ][ 2 ]; KPixmap BaghiraFactory::pix_[5][ PixmapTypeCount ][ 2 ][ 2 ]; int BaghiraFactory::bordersize_[5] = {0,0,6,0,0};//{BorderTiny, BorderTiny, BorderVeryHuge}; -QPixmap BaghiraFactory::ButtonPixmap_[5][WindowStateAmount][ButtonTypeAmount][ButtonStateAmount][2]; -QColor BaghiraFactory::brushedMetalColor; -QColor BaghiraFactory::ButtonColor_[ButtonTypeAmount+1]; -QPixmap BaghiraFactory::nostalgia_[5][3][2]; +TQPixmap BaghiraFactory::ButtonPixmap_[5][WindowStateAmount][ButtonTypeAmount][ButtonStateAmount][2]; +TQColor BaghiraFactory::brushedMetalColor; +TQColor BaghiraFactory::ButtonColor_[ButtonTypeAmount+1]; +TQPixmap BaghiraFactory::nostalgia_[5][3][2]; int BaghiraFactory::contrast_; int BaghiraFactory::_3DImpact_[5]; int BaghiraFactory::LineImpact_[5]; @@ -103,63 +103,63 @@ uint BaghiraFactory::defaultMode_; bool BaghiraFactory::drawIcon_[5]; bool BaghiraFactory::tintBrush_; bool BaghiraFactory::showTitle_; -QColor BaghiraFactory::brushTint; +TQColor BaghiraFactory::brushTint; int BaghiraFactory::minimumTitleHeight_; ButtonStyle BaghiraFactory::buttonStyle_[5]; -QBitmap BaghiraFactory::helpMask; -QBitmap BaghiraFactory::jaguarDownMask; -QBitmap BaghiraFactory::jaguarMenuDownMask; -QBitmap BaghiraFactory::jaguarMenuMask; -QBitmap BaghiraFactory::jaguarMask; -QBitmap BaghiraFactory::milkMenuDownMask; -QBitmap BaghiraFactory::milkMenuMask; -QBitmap BaghiraFactory::milkMask; -QBitmap BaghiraFactory::pantherMenuMask; -QBitmap BaghiraFactory::pantherMask; -QBitmap BaghiraFactory::milkDownMask; -QBitmap BaghiraFactory::arrowUp; -QBitmap BaghiraFactory::arrowDown; +TQBitmap BaghiraFactory::helpMask; +TQBitmap BaghiraFactory::jaguarDownMask; +TQBitmap BaghiraFactory::jaguarMenuDownMask; +TQBitmap BaghiraFactory::jaguarMenuMask; +TQBitmap BaghiraFactory::jaguarMask; +TQBitmap BaghiraFactory::milkMenuDownMask; +TQBitmap BaghiraFactory::milkMenuMask; +TQBitmap BaghiraFactory::milkMask; +TQBitmap BaghiraFactory::pantherMenuMask; +TQBitmap BaghiraFactory::pantherMask; +TQBitmap BaghiraFactory::milkDownMask; +TQBitmap BaghiraFactory::arrowUp; +TQBitmap BaghiraFactory::arrowDown; DeMaximizer BaghiraFactory::deMaximizer_; bool BaghiraFactory::fullSpec_; bool BaghiraFactory::noModalDeco_; bool BaghiraFactory::delAppname_; -Atom baghira_deco_design = XInternAtom(qt_xdisplay(), "BAGHIRA_DECO_DESIGN", False); +Atom baghira_deco_design = XInternAtom(tqt_xdisplay(), "BAGHIRA_DECO_DESIGN", False); extern "C" KDecorationFactory* create_factory() { return new Baghira::BaghiraFactory(); } -DeMaximizer::DeMaximizer() : QWidget(0, "deMaximizer", Qt::WType_TopLevel | Qt::WStyle_NoBorder | Qt::WX11BypassWM ) +DeMaximizer::DeMaximizer() : TQWidget(0, "deMaximizer", TQt::WType_TopLevel | TQt::WStyle_NoBorder | TQt::WX11BypassWM ) { client_ = 0L; setFixedSize(16,16); setMouseTracking(TRUE); setAutoMask(TRUE); - move(QApplication::desktop()->availableGeometry().right()-17,QApplication::desktop()->availableGeometry().top()+2); + move(TQApplication::desktop()->availableGeometry().right()-17,TQApplication::desktop()->availableGeometry().top()+2); setBackgroundMode( NoBackground ); -// setBackgroundMode (Qt::X11ParentRelative); -// setPaletteBackgroundColor(Qt::green); +// setBackgroundMode (TQt::X11ParentRelative); +// setPaletteBackgroundColor(TQt::green); } -void DeMaximizer::mouseReleaseEvent( QMouseEvent *) +void DeMaximizer::mouseReleaseEvent( TQMouseEvent *) { hasMouse()?setState(1):setState(0); if (client_) client_->demaxButtonPressed(); } -void DeMaximizer::mousePressEvent ( QMouseEvent *) +void DeMaximizer::mousePressEvent ( TQMouseEvent *) { setState(2); } -void DeMaximizer::enterEvent ( QEvent *) +void DeMaximizer::enterEvent ( TQEvent *) { setState(1); } -void DeMaximizer::leaveEvent ( QEvent *) +void DeMaximizer::leaveEvent ( TQEvent *) { setState(0); } @@ -167,14 +167,14 @@ void DeMaximizer::leaveEvent ( QEvent *) void DeMaximizer::setState(int i) { erase(); - QPainter p(this); + TQPainter p(this); p.drawPixmap(0,0,pixmap[i]); p.end(); } -void DeMaximizer::setPixmap(int i, QImage &image ) +void DeMaximizer::setPixmap(int i, TQImage &image ) { - pixmap[i] = QPixmap(image); + pixmap[i] = TQPixmap(image); } @@ -182,7 +182,7 @@ void DeMaximizer::setClient(BaghiraClient *client) { if (client_) { - QObject::disconnect ( client_, SIGNAL(hide()), this, SLOT(hide()) ); + TQObject::disconnect ( client_, SIGNAL(hide()), this, SLOT(hide()) ); client_ = 0L; } if (client) @@ -199,20 +199,20 @@ void DeMaximizer::setClient(BaghiraClient *client) // ResizeHandle() // --------------- // Constructor -ResizeHandle::ResizeHandle(BaghiraClient * parent) : QWidget(parent->widget(), 0, 0) +ResizeHandle::ResizeHandle(BaghiraClient * parent) : TQWidget(parent->widget(), 0, 0) { if (!parent->widget()) return; client = parent; - setCursor(QCursor(Qt::SizeFDiagCursor)); + setCursor(TQCursor(TQt::SizeFDiagCursor)); setFixedSize(16,16); updateLook(FALSE); WId root, daddy = 0; WId *kids = 0L; uint numKids = 0; - XQueryTree(qt_xdisplay(), parent->windowId(), &root, &daddy, &kids, &numKids); + XQueryTree(tqt_xdisplay(), parent->windowId(), &root, &daddy, &kids, &numKids); if (daddy) - XReparentWindow( qt_xdisplay(), winId(), daddy, 0, 0 ); + XReparentWindow( tqt_xdisplay(), winId(), daddy, 0, 0 ); else return; move(client->width()-2*BaghiraFactory::borderSize(parent->currentStyle)-16,client->height()-client->titleheight_-16); shape(); @@ -223,10 +223,10 @@ ResizeHandle::ResizeHandle(BaghiraClient * parent) : QWidget(parent->widget(), 0 void ResizeHandle::updateLook(bool rp) { - pix = QPixmap(16,16); - QPainter p(&pix); + pix = TQPixmap(16,16); + TQPainter p(&pix); p.fillRect(pix.rect(), BaghiraFactory::effect(client->currentStyle, client->isActive()) == Baghira::Brushed ? BaghiraFactory::BrushedMetalColor().light(110):paletteBackgroundColor()); - p.setPen( BaghiraFactory::effect(client->currentStyle, client->isActive()) == Baghira::Brushed ? Qt::black:paletteForegroundColor() ); + p.setPen( BaghiraFactory::effect(client->currentStyle, client->isActive()) == Baghira::Brushed ? TQt::black:paletteForegroundColor() ); p.drawLine(0,16,16,0); p.drawLine(4,16,16,4); p.drawLine(8,16,16,8); @@ -246,16 +246,16 @@ void ResizeHandle::shape() xrects[ i ].width = i+1; xrects[ i ].height = 1; } - XShapeCombineRectangles( qt_xdisplay(), winId(), ShapeBounding, 0, 0, + XShapeCombineRectangles( tqt_xdisplay(), winId(), ShapeBounding, 0, 0, xrects, 16, ShapeSet, 0 ); delete[] xrects; } -bool ResizeHandle::eventFilter(QObject *obj, QEvent *e) +bool ResizeHandle::eventFilter(TQObject *obj, TQEvent *e) { if ( obj != parent() ) return false; - if ( e->type() == QEvent::Resize) + if ( e->type() == TQEvent::Resize) { if (client->maximizeMode() == BaghiraClient::MaximizeFull) move(client->width() - 16, client->height() - client->titleheight_ - 16); @@ -267,18 +267,18 @@ bool ResizeHandle::eventFilter(QObject *obj, QEvent *e) return FALSE; } -void ResizeHandle::mousePressEvent ( QMouseEvent * ) +void ResizeHandle::mousePressEvent ( TQMouseEvent * ) { client->performWindowOperation(/*Unrestricted*/KDecoration::ResizeOp); } -void ResizeHandle::mouseReleaseEvent ( QMouseEvent * ) +void ResizeHandle::mouseReleaseEvent ( TQMouseEvent * ) { client->performWindowOperation(KDecoration::NoOp); repaint(TRUE); } -void ResizeHandle::paintEvent ( QPaintEvent * ) +void ResizeHandle::paintEvent ( TQPaintEvent * ) { - QPainter p(this); + TQPainter p(this); p.drawPixmap(0,0,pix); } @@ -290,20 +290,20 @@ void ResizeHandle::paintEvent ( QPaintEvent * ) // Constructor BaghiraFactory::BaghiraFactory() { - helpMask = QBitmap( 14, 15, help_bits, true ); - jaguarDownMask = QBitmap( 14, 15, jaguar2_bits, true ); - jaguarMenuDownMask = QBitmap( 20, 15, jaguar_menu_down_bits, true ); - jaguarMenuMask = QBitmap( 20, 15, jaguar_menu_bits, true ); - jaguarMask = QBitmap( 14, 15, jaguar_bits, true ); - milkMenuDownMask = QBitmap( 20, 15, milk_menu_down_bits, true ); - milkMenuMask = QBitmap( 20, 15, milk_menu_bits, true ); - milkMask = QBitmap( 14, 15, milk_bits, true ); - pantherMenuMask = QBitmap( 20, 15, panther_menu_bits, true ); - pantherMask = QBitmap( 14, 15, panther_bits, true ); - milkDownMask = QBitmap( 14, 15, milk_pressed_bits, true ); - arrowUp = QBitmap( 8, 4, arrowUp_bits, true ); + helpMask = TQBitmap( 14, 15, help_bits, true ); + jaguarDownMask = TQBitmap( 14, 15, jaguar2_bits, true ); + jaguarMenuDownMask = TQBitmap( 20, 15, jaguar_menu_down_bits, true ); + jaguarMenuMask = TQBitmap( 20, 15, jaguar_menu_bits, true ); + jaguarMask = TQBitmap( 14, 15, jaguar_bits, true ); + milkMenuDownMask = TQBitmap( 20, 15, milk_menu_down_bits, true ); + milkMenuMask = TQBitmap( 20, 15, milk_menu_bits, true ); + milkMask = TQBitmap( 14, 15, milk_bits, true ); + pantherMenuMask = TQBitmap( 20, 15, panther_menu_bits, true ); + pantherMask = TQBitmap( 14, 15, panther_bits, true ); + milkDownMask = TQBitmap( 14, 15, milk_pressed_bits, true ); + arrowUp = TQBitmap( 8, 4, arrowUp_bits, true ); arrowUp.setMask( arrowUp ); - arrowDown = QBitmap( 8, 4, arrowDown_bits, true ); + arrowDown = TQBitmap( 8, 4, arrowDown_bits, true ); arrowDown.setMask( arrowDown ); readConfig(); createPixmaps(); @@ -335,12 +335,12 @@ KDecoration* BaghiraFactory::createDecoration( KDecorationBridge* b ) { // ------- // Reset the handler. Returns true if decorations need to be remade -QString BaghiraFactory::indexedString(QString s, int i){ - QString result; +TQString BaghiraFactory::indexedString(TQString s, int i){ + TQString result; result.setNum(i+1); result.prepend("_"); result.prepend(s); -// qWarning("%s",result.ascii()); +// tqWarning("%s",result.ascii()); return result; } @@ -368,7 +368,7 @@ bool BaghiraFactory::reset( unsigned long changed ) { unsigned long BaghiraFactory::readConfig() { - QSettings config; + TQSettings config; config.beginGroup("/baghira/Style"); // KConfig config( "baghirarc" ); // config.setGroup( "Style" ); @@ -378,10 +378,10 @@ unsigned long BaghiraFactory::readConfig() { if (tintBrush_) brushTint.setRgb( config.readNumEntry( "Colors_BrushTint")); - QColor oldcolor; + TQColor oldcolor; unsigned long changed = 0; oldcolor = colors_[3][ Baghira::ColorTitleBar ][ false ]; - colors_[3][ Baghira::ColorTitleBar ][ false ] = qApp->palette().active().background(); + colors_[3][ Baghira::ColorTitleBar ][ false ] = tqApp->palette().active().background(); if ( oldcolor != colors_[3][ Baghira::ColorTitleBar ][ false ] ) changed |= SettingColors; @@ -410,8 +410,8 @@ unsigned long BaghiraFactory::readConfig() { minimumTitleHeight_ = (ButtonStyle) config.readNumEntry( "minimumTitleHeight", 18 ); if ( oldMinTH != minimumTitleHeight_ ) { - QFontMetrics fm(options()->font(true, false)); - TITLESIZE = QMAX(minimumTitleHeight_, fm.height()); + TQFontMetrics fm(options()->font(true, false)); + TITLESIZE = TQMAX(minimumTitleHeight_, fm.height()); changed |= SettingFont; changed |= SettingDecoration; } @@ -431,19 +431,19 @@ unsigned long BaghiraFactory::readConfig() { if ( defaultMode__ != defaultMode_ ) changed |= SettingDecoration; - Qt::AlignmentFlags oldalign = titlealign_; - QString value = config.readEntry( "TitleAlignment", "AlignHCenter" ); + TQt::AlignmentFlags oldalign = titlealign_; + TQString value = config.readEntry( "TitleAlignment", "AlignHCenter" ); showTitle_ = TRUE; if ( value == "AlignLeft" ) - titlealign_ = Qt::AlignLeft; + titlealign_ = TQt::AlignLeft; else if ( value == "AlignHCenter" ) - titlealign_ = Qt::AlignHCenter; + titlealign_ = TQt::AlignHCenter; else if ( value == "AlignRight" ) - titlealign_ = Qt::AlignRight; + titlealign_ = TQt::AlignRight; else if ( value == "noTitle" ) { showTitle_ = FALSE; - titlealign_ = Qt::AlignAuto; + titlealign_ = TQt::AlignAuto; } if ( oldalign != titlealign_ ) changed |= SettingFont; @@ -518,13 +518,13 @@ unsigned long BaghiraFactory::readConfig() { { Baghira::TitlebarType oldeffect = effect_[i][1]; effect_[i][1] = ( Baghira::TitlebarType ) config.readNumEntry( indexedString("TitleEffect",i), i == 0 ? Baghira::Stipples : (i == 1 || i == 4) ? Baghira::Gradient : Baghira::Brushed); - // qWarning("%d",effect_[i]); + // tqWarning("%d",effect_[i]); if ( oldeffect != effect_[i][1] ) changed |= SettingDecoration; oldeffect = effect_[i][0]; effect_[i][0] = ( Baghira::TitlebarType ) config.readNumEntry( indexedString("inactiveTitleEffect",i), i == 0 ? Baghira::Stipples : (i == 1 || i == 4) ? Baghira::Gradient : Baghira::Brushed); - // qWarning("%d",effect_[i]); + // tqWarning("%d",effect_[i]); if ( oldeffect != effect_[i][0] ) changed |= SettingDecoration; @@ -534,12 +534,12 @@ unsigned long BaghiraFactory::readConfig() { changed |= SettingDecoration; oldcolor = colors_[i][ Baghira::ColorTitleBar ][ false ]; - colors_[i][ Baghira::ColorTitleBar ][ false ].setRgb((unsigned int)config.readNumEntry( indexedString("inactiveColor1",i), i == 0 ? QColor(204,214,230).rgb() : i == 1 ? QColor(246,242,246).rgb() : i == 3 ? QColor(200,200,200).rgb() : QColor(230,230,230).rgb())); + colors_[i][ Baghira::ColorTitleBar ][ false ].setRgb((unsigned int)config.readNumEntry( indexedString("inactiveColor1",i), i == 0 ? TQColor(204,214,230).rgb() : i == 1 ? TQColor(246,242,246).rgb() : i == 3 ? TQColor(200,200,200).rgb() : TQColor(230,230,230).rgb())); if ( oldcolor != colors_[i][ Baghira::ColorTitleBar ][ false ] ) changed |= SettingColors; oldcolor = colors_[i][ Baghira::ColorTitleBlend ][ false ]; - colors_[i][ Baghira::ColorTitleBlend ][ false ].setRgb((unsigned int)config.readNumEntry( indexedString("inactiveColor2",i), i == 0 ? QColor(194,196,211).rgb() : i == 1 ? QColor(238,238,238).rgb() : i == 3 ? QColor(150,150,150).rgb() : QColor(250,250,250).rgb())); + colors_[i][ Baghira::ColorTitleBlend ][ false ].setRgb((unsigned int)config.readNumEntry( indexedString("inactiveColor2",i), i == 0 ? TQColor(194,196,211).rgb() : i == 1 ? TQColor(238,238,238).rgb() : i == 3 ? TQColor(150,150,150).rgb() : TQColor(250,250,250).rgb())); if ( oldcolor != colors_[i][ Baghira::ColorTitleBlend ][ false ] ) changed |= SettingColors; } @@ -556,58 +556,58 @@ unsigned long BaghiraFactory::readConfig() { changed |= SettingDecoration; oldcolor = colors_[i][ Baghira::ColorTitleBar ][ true ]; - colors_[i][ Baghira::ColorTitleBar ][ true ].setRgb((unsigned int)config.readNumEntry( indexedString("activeColor1",i), i == 0 ? QColor(255,255,255).rgb() : i == 1 ? QColor(238,238,238).rgb() : i == 2 ? QColor(202,202,202).rgb() : i == 3 ? QColor(238,238,238).rgb() : QColor(250,250,250).rgb())); + colors_[i][ Baghira::ColorTitleBar ][ true ].setRgb((unsigned int)config.readNumEntry( indexedString("activeColor1",i), i == 0 ? TQColor(255,255,255).rgb() : i == 1 ? TQColor(238,238,238).rgb() : i == 2 ? TQColor(202,202,202).rgb() : i == 3 ? TQColor(238,238,238).rgb() : TQColor(250,250,250).rgb())); if ( oldcolor != colors_[i][ Baghira::ColorTitleBar ][ true ] ) changed |= SettingColors; oldcolor = colors_[i][ Baghira::ColorTitleBlend ][ true ]; - colors_[i][ Baghira::ColorTitleBlend ][ true ].setRgb((unsigned int)config.readNumEntry( indexedString("activeColor2",i), i == 0 ? QColor(238,234,238).rgb() : i == 1 ? QColor(205,202,205).rgb() : i == 2 ? QColor(150,150,150).rgb() : i == 3 ? QColor(211,208,211).rgb() : QColor(230,230,230).rgb())); + colors_[i][ Baghira::ColorTitleBlend ][ true ].setRgb((unsigned int)config.readNumEntry( indexedString("activeColor2",i), i == 0 ? TQColor(238,234,238).rgb() : i == 1 ? TQColor(205,202,205).rgb() : i == 2 ? TQColor(150,150,150).rgb() : i == 3 ? TQColor(211,208,211).rgb() : TQColor(230,230,230).rgb())); if ( oldcolor != colors_[i][ Baghira::ColorTitleBlend ][ true ] ) changed |= SettingColors; } oldcolor = ButtonColor_[MinButton]; - ButtonColor_[MinButton].setRgb((unsigned int)config.readNumEntry( "MinButtonColor", QColor(230,155,40).rgb() )); + ButtonColor_[MinButton].setRgb((unsigned int)config.readNumEntry( "MinButtonColor", TQColor(230,155,40).rgb() )); if ( oldcolor != ButtonColor_[MinButton] ) changed |= SettingColors; oldcolor = ButtonColor_[MaxButton]; - ButtonColor_[MaxButton].setRgb((unsigned int)config.readNumEntry( "MaxButtonColor", QColor(121,180,54).rgb() )); + ButtonColor_[MaxButton].setRgb((unsigned int)config.readNumEntry( "MaxButtonColor", TQColor(121,180,54).rgb() )); if ( oldcolor != ButtonColor_[MaxButton] ) changed |= SettingColors; oldcolor = ButtonColor_[CloseButton]; - ButtonColor_[CloseButton].setRgb((unsigned int)config.readNumEntry( "CloseButtonColor", QColor(200,85,70).rgb() )); + ButtonColor_[CloseButton].setRgb((unsigned int)config.readNumEntry( "CloseButtonColor", TQColor(200,85,70).rgb() )); if ( oldcolor != ButtonColor_[CloseButton] ) changed |= SettingColors; oldcolor = ButtonColor_[StickyButton]; - ButtonColor_[StickyButton].setRgb((unsigned int)config.readNumEntry( "StickyButtonColor", QColor(74,140,242).rgb() )); + ButtonColor_[StickyButton].setRgb((unsigned int)config.readNumEntry( "StickyButtonColor", TQColor(74,140,242).rgb() )); if ( oldcolor != ButtonColor_[StickyButton] ) changed |= SettingColors; oldcolor = ButtonColor_[AboveBelowButton]; - ButtonColor_[AboveBelowButton].setRgb((unsigned int)config.readNumEntry( "AboveButtonColor", QColor(74,140,242).rgb() )); + ButtonColor_[AboveBelowButton].setRgb((unsigned int)config.readNumEntry( "AboveButtonColor", TQColor(74,140,242).rgb() )); if ( oldcolor != ButtonColor_[AboveBelowButton] ) changed |= SettingColors; oldcolor = ButtonColor_[ShadeButton]; - ButtonColor_[ShadeButton].setRgb((unsigned int)config.readNumEntry( "ShadeButtonColor", QColor(74,140,242).rgb() )); + ButtonColor_[ShadeButton].setRgb((unsigned int)config.readNumEntry( "ShadeButtonColor", TQColor(74,140,242).rgb() )); if ( oldcolor != ButtonColor_[ShadeButton] ) changed |= SettingColors; oldcolor = ButtonColor_[MenuButton]; - ButtonColor_[MenuButton].setRgb((unsigned int)config.readNumEntry( "MenuButtonColor", QColor(74,140,242).rgb() )); + ButtonColor_[MenuButton].setRgb((unsigned int)config.readNumEntry( "MenuButtonColor", TQColor(74,140,242).rgb() )); if ( oldcolor != ButtonColor_[MenuButton] ) changed |= SettingColors; oldcolor = ButtonColor_[HelpButton]; - ButtonColor_[HelpButton].setRgb((unsigned int)config.readNumEntry( "HelpButtonColor", QColor(0,0,0).rgb() )); + ButtonColor_[HelpButton].setRgb((unsigned int)config.readNumEntry( "HelpButtonColor", TQColor(0,0,0).rgb() )); if ( oldcolor != ButtonColor_[HelpButton] ) changed |= SettingColors; oldcolor = ButtonColor_[InactiveButton]; - ButtonColor_[InactiveButton].setRgb((unsigned int)config.readNumEntry( "InactiveButtonColor", QColor(255,255,255).rgb() )); + ButtonColor_[InactiveButton].setRgb((unsigned int)config.readNumEntry( "InactiveButtonColor", TQColor(255,255,255).rgb() )); if ( oldcolor != ButtonColor_[InactiveButton] ) changed |= SettingColors; @@ -616,9 +616,9 @@ unsigned long BaghiraFactory::readConfig() { return changed; } -QImage* BaghiraFactory::tintGlossy( const QImage &src, const QColor &c ) const +TQImage* BaghiraFactory::tintGlossy( const TQImage &src, const TQColor &c ) const { - QImage *dest = new QImage( src.width(), src.height(), 32); + TQImage *dest = new TQImage( src.width(), src.height(), 32); dest->setAlphaBuffer( true ); unsigned int *data = ( unsigned int * ) src.bits(); unsigned int *destData = ( unsigned int* ) dest->bits(); @@ -634,14 +634,14 @@ QImage* BaghiraFactory::tintGlossy( const QImage &src, const QColor &c ) const int sq = CLAMP((int)((45.0/128.0)*s+55),0,100); // float srcPercent, destPercent; for ( int current = 0 ; current < total ; ++current ) { - alpha = qAlpha( data[ current ] ); + alpha = tqAlpha( data[ current ] ); if (alpha < 230){ destData[ current ] = data[ current ]; continue; //do not handle translucent parts to not affect blending } - red = qRed( data[ current ] ); - green = qGreen( data[ current ] ); - blue = qBlue( data[ current ] ); + red = tqRed( data[ current ] ); + green = tqGreen( data[ current ] ); + blue = tqBlue( data[ current ] ); if ( current > u3rd || red < 223 ){ SATURATION_COLOR2(sq, red, green, blue, srcR, srcG, srcB) } else { @@ -649,17 +649,17 @@ QImage* BaghiraFactory::tintGlossy( const QImage &src, const QColor &c ) const } // force back to valid colorspace ! COLOR_SPACE(destR, destG, destB); - destData[ current ] = qRgba( destR, destG, destB, alpha ); + destData[ current ] = tqRgba( destR, destG, destB, alpha ); } return ( dest ); } -QImage* BaghiraFactory::tintBrush( const QImage &img, const QColor &c ) const +TQImage* BaghiraFactory::tintBrush( const TQImage &img, const TQColor &c ) const { // if ( img.depth() != 32 ) // img = img.convertDepth( 32 ); - QImage *dest = new QImage( img.width(), img.height(), 32); + TQImage *dest = new TQImage( img.width(), img.height(), 32); unsigned int *data = ( unsigned int * ) img.bits(); unsigned int *destData = ( unsigned int* ) dest->bits(); int total = img.width() * img.height(); @@ -674,29 +674,29 @@ QImage* BaghiraFactory::tintBrush( const QImage &img, const QColor &c ) const SATURATION_COLOR(180, 180, 180); COLOR_SPACE(destR, destG, destB); - brushedMetalColor = QColor(destR, destG, destB); + brushedMetalColor = TQColor(destR, destG, destB); // float srcPercent, destPercent; for ( current = 0 ; current < total ; ++current ) { - alpha = qAlpha( data[ current ] ); - blue = qBlue( data[ current ] ); - red = qRed( data[ current ] ); - green = qGreen( data[ current ] ); + alpha = tqAlpha( data[ current ] ); + blue = tqBlue( data[ current ] ); + red = tqRed( data[ current ] ); + green = tqGreen( data[ current ] ); SATURATION_COLOR(red, green, blue); // force back to valid colorspace ! COLOR_SPACE(destR, destG, destB); - destData[ current ] = qRgba( destR, destG, destB, alpha ); + destData[ current ] = tqRgba( destR, destG, destB, alpha ); } return ( dest ); } void BaghiraFactory::createOS8Buttons(int style){ - QPainter p; - QColor initColor; + TQPainter p; + TQColor initColor; for ( int active = 0; active <= 1; ++active ){ for (int t = 0; t < 3; t++){ - initColor = QColor(color(style, Baghira::ColorTitleBar, active ).dark(100 + t*15)); - nostalgia_[style][t][active] = QPixmap(BUTTONSIZE, BUTTONSIZE); + initColor = TQColor(color(style, Baghira::ColorTitleBar, active ).dark(100 + t*15)); + nostalgia_[style][t][active] = TQPixmap(BUTTONSIZE, BUTTONSIZE); p.begin(&nostalgia_[style][t][active]); p.setPen(color(style, Baghira::ColorTitleBar, active )); p.drawPoint(0,BUTTONSIZE-1); @@ -744,22 +744,22 @@ void BaghiraFactory::createOS8Buttons(int style){ p.drawLine(BUTTONSIZE-1,1,BUTTONSIZE-1,BUTTONSIZE-1); //================================== // black frame - p.setPen(Qt::black); + p.setPen(TQt::black); p.drawRect(1,1,BUTTONSIZE-2,BUTTONSIZE-2); p.end(); } } } -QPixmap &BaghiraFactory::ButtonPixmap( Baghira::WindowState wState, +TQPixmap &BaghiraFactory::ButtonPixmap( Baghira::WindowState wState, Baghira::ButtonType type, Baghira::ButtonState state, int style, bool small ) { return ButtonPixmap_[style][ wState ][ type ][ state ][small]; } -QImage* BaghiraFactory::DecoImage( QPixmap *pix, int x, int y, int width, int height ) { - QPixmap tmpPix( width, height ); +TQImage* BaghiraFactory::DecoImage( TQPixmap *pix, int x, int y, int width, int height ) { + TQPixmap tmpPix( width, height ); bitBlt ( &tmpPix, 0, 0, pix, x, y, width, height ); - QImage *returnImage = new QImage( tmpPix.convertToImage() ); + TQImage *returnImage = new TQImage( tmpPix.convertToImage() ); return returnImage; } @@ -768,11 +768,11 @@ QImage* BaghiraFactory::DecoImage( QPixmap *pix, int x, int y, int width, int he // ---------------- // Create a gradient -void BaghiraFactory::createGradient(KPixmap &pix, const QColor &light, const QColor &dark, Baghira::TitlebarType effect) +void BaghiraFactory::createGradient(KPixmap &pix, const TQColor &light, const TQColor &dark, Baghira::TitlebarType effect) { if (pix.width() == 0) return; - QPainter p; + TQPainter p; switch( effect ){ case Baghira::Stipples: KPixmapEffect::unbalancedGradient(pix, light, light.dark(110), KPixmapEffect::VerticalGradient, 0); @@ -788,7 +788,7 @@ void BaghiraFactory::createGradient(KPixmap &pix, const QColor &light, const QCo { p.begin(&pix); p.fillRect(pix.rect(),light); - QColor mid; + TQColor mid; mid.setRgb((light.red()+2*dark.red())/3,(light.green()+2*dark.green())/3,(light.blue()+2*dark.blue())/3); p.setPen(mid); for( int i = pix.height() - 1; i > 0; i-=4 ) @@ -822,7 +822,7 @@ void BaghiraFactory::createGradient(KPixmap &pix, const QColor &light, const QCo } } -static bool blend( const QImage & upper, const QImage & lower, QImage & output) +static bool blend( const TQImage & upper, const TQImage & lower, TQImage & output) // adopted from kimageeffect::blend - what is not endian safe... { if @@ -886,15 +886,15 @@ static bool blend( const QImage & upper, const QImage & lower, QImage & output) // --------------- // Create all our pixmaps void BaghiraFactory::createPixmaps() { -// QPainter painter; - QColorGroup group; - QPainter icyAPainter; - QImage tmpResult; - QImage tmpResult2; - QImage tmpDeco; - QImage buttonImage; - QImage btnIcons[MenuButton]; - btnIcons[AboveBelowButton] = QImage(); +// TQPainter painter; + TQColorGroup group; + TQPainter icyAPainter; + TQImage tmpResult; + TQImage tmpResult2; + TQImage tmpDeco; + TQImage buttonImage; + TQImage btnIcons[MenuButton]; + btnIcons[AboveBelowButton] = TQImage(); // load icon images - useless for nostalgia style, but i assume they'll be used at least once ;) btnIcons[MinButton] = uic_findImage( "icon_minimize" ); btnIcons[MaxButton] = uic_findImage( "icon_maximize" ); @@ -925,21 +925,21 @@ void BaghiraFactory::createPixmaps() { createGradient( tbar, color(style, Baghira::ColorTitleBar, active ), color(style, Baghira::ColorTitleBlend, active ), effect_[style][active] ); } else if (brushedMode){ - QPixmap brushTile; - QPixmap brushGradient; + TQPixmap brushTile; + TQPixmap brushGradient; if (tintBrush_){ - brushTile = QPixmap(*tintBrush(uic_findImage( "brushed-tile" ), brushTint)); - brushGradient = QPixmap(*tintBrush(uic_findImage( "brushed-gradient" ), brushTint)); + brushTile = TQPixmap(*tintBrush(uic_findImage( "brushed-tile" ), brushTint)); + brushGradient = TQPixmap(*tintBrush(uic_findImage( "brushed-gradient" ), brushTint)); } else{ brushTile = uic_findImage( "brushed-tile" ); brushGradient = uic_findImage( "brushed-gradient" ); - brushedMetalColor = QColor(180,180,180); + brushedMetalColor = TQColor(180,180,180); } // resize pixmap tbar.resize( 256, small ? TITLESIZESMALL : TITLESIZE ); tcenter.resize( 1024, small ? TITLESIZESMALL : TITLESIZE ); - QPainter painter(&tbar); + TQPainter painter(&tbar); painter.drawTiledPixmap( 0,0, tbar.width(), tbar.height(), brushTile ); painter.end(); painter.begin(&tcenter); @@ -947,7 +947,7 @@ void BaghiraFactory::createPixmaps() { } else{ tbar.resize( 32, small ? TITLESIZESMALL : TITLESIZE); - KPixmap tmp = QPixmap(*tintGlossy(uic_findImage( "deco_glossy" ), color(style, Baghira::ColorTitleBar, active ))); + KPixmap tmp = TQPixmap(*tintGlossy(uic_findImage( "deco_glossy" ), color(style, Baghira::ColorTitleBar, active ))); if (tbar.height() > 18){ for (int i = 8; i < tbar.height() - 10; i++){ bitBlt(&tbar, 0, i, &tmp, 0, 8, 32, 1); @@ -975,7 +975,7 @@ void BaghiraFactory::createPixmaps() { ButtonColor_[bt] ); /*brushedMode ? blend( tmpResult2, tmpDeco, tmpResult ) : */blend( tmpResult2, tmpDeco, tmpResult ); if (bs > ButtonActive) blend( btnIcons[bt], tmpResult, tmpResult ); - ButtonPixmap_[style][ active ][ bt ][ bs ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ bt ][ bs ][small] = TQPixmap( tmpResult ); } } @@ -986,7 +986,7 @@ void BaghiraFactory::createPixmaps() { tmpResult2 = *tintGlossy( buttonImage, ButtonColor_[bt].dark(120)); /*brushedMode ? blend( tmpResult2, tmpDeco, tmpResult ) : */blend( tmpResult2, tmpDeco, tmpResult ); KImageEffect::blendOnLower( xoff, yoff, btnIcons[bt], tmpResult); // must shift as well - ButtonPixmap_[style][ active ][ bt ][ Pressed ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ bt ][ Pressed ][small] = TQPixmap( tmpResult ); } @@ -1001,7 +1001,7 @@ void BaghiraFactory::createPixmaps() { ButtonColor_[HelpButton].dark(120) : ButtonColor_[HelpButton] ); /*brushedMode ? blend( tmpResult2, tmpDeco, tmpResult ) : */blend( tmpResult2, tmpDeco, tmpResult ); - ButtonPixmap_[style][ active ][ HelpButton ][ bs ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ HelpButton ][ bs ][small] = TQPixmap( tmpResult ); } tmpDeco = *DecoImage( &tbar, 0, ( tbar.height() - BUTTONSIZE ) / 2, MENUBUTTONWIDTH, BUTTONSIZE ); @@ -1013,7 +1013,7 @@ void BaghiraFactory::createPixmaps() { ButtonColor_[InactiveButton] : ButtonColor_[MenuButton] ); /*brushedMode ? blend( tmpResult2, tmpDeco, tmpResult ) : */blend( tmpResult2, tmpDeco, tmpResult ); - ButtonPixmap_[style][ active ][ MenuButton ][ bs ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ MenuButton ][ bs ][small] = TQPixmap( tmpResult ); } @@ -1022,7 +1022,7 @@ void BaghiraFactory::createPixmaps() { buttonImage = uic_findImage( "button_jaguar_menu_down"); tmpResult2 = *tintGlossy( buttonImage, ButtonColor_[MenuButton].dark(120)); /*brushedMode ? blend( tmpResult2, tmpDeco, tmpResult ) : */blend( tmpResult2, tmpDeco, tmpResult ); - ButtonPixmap_[style][ active ][ MenuButton ][ Pressed ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ MenuButton ][ Pressed ][small] = TQPixmap( tmpResult ); break; @@ -1041,7 +1041,7 @@ void BaghiraFactory::createPixmaps() { for (int bs = ButtonInactive; bs < Pressed; bs++){ /*brushedMode ? blend( buttonImage, tmpDeco, tmpResult ) : */blend( buttonImage, tmpDeco, tmpResult ); if (bs > ButtonActive) blend( btnIcons[bt], tmpResult, tmpResult ); - ButtonPixmap_[style][ active ][ bt ][ bs ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ bt ][ bs ][small] = TQPixmap( tmpResult ); } } @@ -1050,14 +1050,14 @@ void BaghiraFactory::createPixmaps() { for (int bt = MinButton; bt < MenuButton; bt++){ /*brushedMode ? blend( buttonImage, tmpDeco, tmpResult ) : */blend( buttonImage, tmpDeco, tmpResult ); blend( btnIcons[bt], tmpResult, tmpResult ); - ButtonPixmap_[style][ active ][ bt ][ Pressed ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ bt ][ Pressed ][small] = TQPixmap( tmpResult ); } // HelpButton buttonImage = uic_findImage( "icon_help"); for (int bs = ButtonInactive; bs < ButtonStateAmount; bs++){ /*brushedMode ? blend( buttonImage, tmpDeco, tmpResult ) : */blend( buttonImage, tmpDeco, tmpResult ); - ButtonPixmap_[style][ active ][ HelpButton ][ bs ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ HelpButton ][ bs ][small] = TQPixmap( tmpResult ); } tmpDeco = *DecoImage( &tbar, 0, ( tbar.height() - BUTTONSIZE ) / 2, MENUBUTTONWIDTH, BUTTONSIZE ); @@ -1066,13 +1066,13 @@ void BaghiraFactory::createPixmaps() { buttonImage = uic_findImage( "button_milk_menu"); for (int bs = ButtonInactive; bs < Pressed; bs++){ /*brushedMode ? blend( buttonImage, tmpDeco, tmpResult ) : */blend( buttonImage, tmpDeco, tmpResult ); - ButtonPixmap_[style][ active ][ MenuButton ][ bs ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ MenuButton ][ bs ][small] = TQPixmap( tmpResult ); } // pressed MenuButton // as pressed milk buttons differ buttonImage = uic_findImage( "button_milk_menu_down"); /*brushedMode ? blend( buttonImage, tmpDeco, tmpResult ) : */blend( buttonImage, tmpDeco, tmpResult ); - ButtonPixmap_[style][ active ][ MenuButton ][ Pressed ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ MenuButton ][ Pressed ][small] = TQPixmap( tmpResult ); break; @@ -1088,14 +1088,14 @@ void BaghiraFactory::createPixmaps() { for (int bt = MinButton; bt < ButtonTypeAmount; bt++){ for (int bs = ButtonInactive; bs < ButtonStateAmount; bs++){ if (bs < Hovered) - ButtonPixmap_[style][ active ][ bt ][ bs ][small] = QPixmap( nostalgia_[style][1][active] ); + ButtonPixmap_[style][ active ][ bt ][ bs ][small] = TQPixmap( nostalgia_[style][1][active] ); else if (bs == Hovered) - ButtonPixmap_[style][ active ][ bt ][ bs ][small] = QPixmap( nostalgia_[style][0][active] ); + ButtonPixmap_[style][ active ][ bt ][ bs ][small] = TQPixmap( nostalgia_[style][0][active] ); else - ButtonPixmap_[style][ active ][ bt ][ bs ][small] = QPixmap( nostalgia_[style][2][active] ); + ButtonPixmap_[style][ active ][ bt ][ bs ][small] = TQPixmap( nostalgia_[style][2][active] ); if (bs > ButtonInactive){ icyAPainter.begin(&ButtonPixmap_[style][ active ][ bt ][ bs ][small]); - icyAPainter.setPen(Qt::black); + icyAPainter.setPen(TQt::black); if (bt == MinButton){ icyAPainter.drawLine(2,B_3,BUTTONSIZE - 3,B_3); icyAPainter.drawLine(2,B_6,BUTTONSIZE - 3,B_6); @@ -1109,7 +1109,7 @@ void BaghiraFactory::createPixmaps() { continue; } if (bt == StickyButton){ - icyAPainter.fillRect(BUTTONSIZE/2-1,BUTTONSIZE/2-1,2,2,Qt::black); + icyAPainter.fillRect(BUTTONSIZE/2-1,BUTTONSIZE/2-1,2,2,TQt::black); icyAPainter.end(); continue; } @@ -1121,10 +1121,10 @@ void BaghiraFactory::createPixmaps() { continue; } if (bt == HelpButton){ - QFont tmpFont = QFont(options() ->font( true, false )); + TQFont tmpFont = TQFont(options() ->font( true, false )); tmpFont.setPixelSize(BUTTONSIZE - 4); icyAPainter.setFont(tmpFont); - icyAPainter.drawText( 0, 0, BUTTONSIZE, BUTTONSIZE, Qt::AlignHCenter | Qt::AlignVCenter, "?" ); + icyAPainter.drawText( 0, 0, BUTTONSIZE, BUTTONSIZE, TQt::AlignHCenter | TQt::AlignVCenter, "?" ); icyAPainter.end(); continue; } @@ -1138,7 +1138,7 @@ void BaghiraFactory::createPixmaps() { if (bt == MenuButton){ buttonImage = ButtonPixmap_[style][ active ][ bt ][ bs ][small].convertToImage(); blend( buttonImage , tmpDeco, tmpDeco ); - ButtonPixmap_[style][ active ][ bt ][ bs ][small] = QPixmap(tmpDeco); + ButtonPixmap_[style][ active ][ bt ][ bs ][small] = TQPixmap(tmpDeco); } } } @@ -1164,7 +1164,7 @@ void BaghiraFactory::createPixmaps() { if (bs > ButtonActive) blend( btnIcons[bt], tmpResult2, tmpResult2 ); if (bt == MaxButton && bs > ButtonInactive) deMaximizer_.setPixmap(bs - 1, tmpResult2); blend( tmpResult2, tmpDeco, tmpResult ); - ButtonPixmap_[style][ active ][ bt ][ bs ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ bt ][ bs ][small] = TQPixmap( tmpResult ); } } @@ -1180,7 +1180,7 @@ void BaghiraFactory::createPixmaps() { ButtonColor_[HelpButton].dark(120) : ButtonColor_[HelpButton] ); /*brushedMode ? blend( tmpResult2, tmpDeco, tmpResult ) : */blend( tmpResult2, tmpDeco, tmpResult ); - ButtonPixmap_[style][ active ][ HelpButton ][ bs ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ HelpButton ][ bs ][small] = TQPixmap( tmpResult ); } tmpDeco = *DecoImage( &tbar, 0, ( tbar.height() - BUTTONSIZE ) / 2, MENUBUTTONWIDTH, BUTTONSIZE ); @@ -1194,7 +1194,7 @@ void BaghiraFactory::createPixmaps() { ButtonColor_[MenuButton].dark(120) : ButtonColor_[MenuButton] ); /*brushedMode ? blend( tmpResult2, tmpDeco, tmpResult ) : */blend( tmpResult2, tmpDeco, tmpResult ); - ButtonPixmap_[style][ active ][ MenuButton ][ bs ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ MenuButton ][ bs ][small] = TQPixmap( tmpResult ); } } } @@ -1207,8 +1207,8 @@ void BaghiraFactory::createPixmaps() { // ------------- // Return list of valid border sizes -QValueList BaghiraFactory::borderSizes() const { - return QValueList() << BorderTiny << BorderNormal +TQValueList BaghiraFactory::borderSizes() const { + return TQValueList() << BorderTiny << BorderNormal << BorderLarge << BorderVeryLarge << BorderHuge << BorderVeryHuge; } @@ -1222,11 +1222,11 @@ QValueList BaghiraFactory::borderSizes() const { // -------------- // Constructor -BaghiraButton::BaghiraButton( BaghiraClient *parent, const char *name, const QString& tip, bool small, ButtonType type, int style ) -: QButton( parent->widget(), name ), client_( parent ), type_( type ), deco_( 0 ), icon_(), small_( small ), lastmouse_( 0 ), mouseover_( false ), _blocked(false) { +BaghiraButton::BaghiraButton( BaghiraClient *parent, const char *name, const TQString& tip, bool small, ButtonType type, int style ) +: TQButton( parent->widget(), name ), client_( parent ), type_( type ), deco_( 0 ), icon_(), small_( small ), lastmouse_( 0 ), mouseover_( false ), _blocked(false) { setBackgroundMode( NoBackground ); setCursor( arrowCursor ); - QToolTip::add( this, tip ); + TQToolTip::add( this, tip ); down_ = false; mouseover_ = false; mask = NULL; @@ -1255,8 +1255,8 @@ BaghiraButton::~BaghiraButton() // ---------- // Return size hint -QSize BaghiraButton::sizeHint() const { - return QSize( BUTTONSIZE, BUTTONSIZE ); +TQSize BaghiraButton::sizeHint() const { + return TQSize( BUTTONSIZE, BUTTONSIZE ); } ////////////////////////////////////////////////////////////////////////////// @@ -1264,19 +1264,19 @@ QSize BaghiraButton::sizeHint() const { // ------------ // Mouse has entered the button -void BaghiraButton::enterEvent( QEvent *e ) { +void BaghiraButton::enterEvent( TQEvent *e ) { #if 0 if (type_ == CloseButton) { _blocked = true; - QTimer::singleShot(250,this,SLOT(delayedEnterEvent())); - QButton::enterEvent( e ); + TQTimer::singleShot(250,this,SLOT(delayedEnterEvent())); + TQButton::enterEvent( e ); return; } #endif mouseover_ = true; repaint( false ); - QButton::enterEvent( e ); + TQButton::enterEvent( e ); } void BaghiraButton::delayedEnterEvent() @@ -1294,13 +1294,13 @@ void BaghiraButton::delayedEnterEvent() // ------------ // Mouse has left the button -void BaghiraButton::leaveEvent( QEvent *e ) +void BaghiraButton::leaveEvent( TQEvent *e ) { mouseover_ = false; if ( type_ == Baghira::MenuButton ) down_ = false; repaint( false ); - QButton::leaveEvent( e ); + TQButton::leaveEvent( e ); } ////////////////////////////////////////////////////////////////////////////// @@ -1308,9 +1308,9 @@ void BaghiraButton::leaveEvent( QEvent *e ) // ----------------- // Button has been pressed -void BaghiraButton::mousePressEvent( QMouseEvent* e ) +void BaghiraButton::mousePressEvent( TQMouseEvent* e ) { - if (_blocked && !(e->state() & Qt::ControlButton)) + if (_blocked && !(e->state() & TQt::ControlButton)) return; lastmouse_ = e->button(); @@ -1327,14 +1327,14 @@ void BaghiraButton::mousePressEvent( QMouseEvent* e ) button = NoButton; // middle & right buttons inappropriate } down_ = true; - QMouseEvent me( e->type(), e->pos(), e->globalPos(), button, e->state() ); + TQMouseEvent me( e->type(), e->pos(), e->globalPos(), button, e->state() ); repaint( false ); - QButton::mousePressEvent( &me ); + TQButton::mousePressEvent( &me ); } // void BaghiraButton::setOn(bool on) // { -// QButton::setOn(on); +// TQButton::setOn(on); // } ////////////////////////////////////////////////////////////////////////////// @@ -1342,7 +1342,7 @@ void BaghiraButton::mousePressEvent( QMouseEvent* e ) // ----------------- // Button has been released -void BaghiraButton::mouseReleaseEvent( QMouseEvent* e ) { +void BaghiraButton::mouseReleaseEvent( TQMouseEvent* e ) { lastmouse_ = e->button(); if (mask){ @@ -1355,9 +1355,9 @@ void BaghiraButton::mouseReleaseEvent( QMouseEvent* e ) { button = NoButton; // middle & right buttons inappropriate } down_ = false; - QMouseEvent me( e->type(), e->pos(), e->globalPos(), button, e->state() ); + TQMouseEvent me( e->type(), e->pos(), e->globalPos(), button, e->state() ); repaint( false ); - QButton::mouseReleaseEvent( &me ); + TQButton::mouseReleaseEvent( &me ); } inline ButtonState BaghiraButton::state() { @@ -1376,7 +1376,7 @@ inline ButtonState BaghiraButton::state() { // ------------ // Draw the button -void BaghiraButton::drawButton( QPainter *painter ) { +void BaghiraButton::drawButton( TQPainter *painter ) { if ( !BaghiraFactory::initialized() ) return ; @@ -1400,7 +1400,7 @@ void BaghiraButton::drawButton( QPainter *painter ) { } } -void BaghiraButton::setMasks(QBitmap *bitmask, QBitmap *bitmaskDown){ +void BaghiraButton::setMasks(TQBitmap *bitmask, TQBitmap *bitmaskDown){ clearMask(); mask = bitmask; maskDown = bitmaskDown; @@ -1455,7 +1455,7 @@ void BaghiraClient::init() int format, result; unsigned long n, left; currentStyle = BaghiraFactory::defaultMode(); - result = XGetWindowProperty(qt_xdisplay(), windowId(), baghira_deco_design, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, &data); + result = XGetWindowProperty(tqt_xdisplay(), windowId(), baghira_deco_design, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, &data); if (result == Success && data != None) // found set design { memcpy (¤tStyle, data, sizeof (unsigned int)); @@ -1465,11 +1465,11 @@ void BaghiraClient::init() { XClassHint classHint; FILE *file = NULL; - if ( XGetClassHint( qt_xdisplay(), windowId(), &classHint ) ) + if ( XGetClassHint( tqt_xdisplay(), windowId(), &classHint ) ) { - QString tmpString; + TQString tmpString; // overwrite file from bab starter? - don't worry, if there's been one and deleted by the style we've got the X setting (much better as it will take care of all subwindows) - tmpString = QDir::homeDirPath() + "/.baghira/.bab/" + QString( classHint.res_class ).lower(); + tmpString = TQDir::homeDirPath() + "/.baghira/.bab/" + TQString( classHint.res_class ).lower(); if( (file = fopen(tmpString.latin1(), "r")) != NULL ) { fscanf(file,"%d\n%d\n", &format, ¤tStyle); @@ -1478,7 +1478,7 @@ void BaghiraClient::init() } else { - tmpString = QDir::homeDirPath() + "/.baghira/" + QString( classHint.res_class ).lower(); + tmpString = TQDir::homeDirPath() + "/.baghira/" + TQString( classHint.res_class ).lower(); if( (file = fopen(tmpString.latin1(), "r")) != NULL ) { fscanf(file,"%d\n%d\n", &format, ¤tStyle); @@ -1490,7 +1490,7 @@ void BaghiraClient::init() } if (file == NULL) { - QString tmpString = QDir::homeDirPath() + "/.baghira/.bab/.deco"; + TQString tmpString = TQDir::homeDirPath() + "/.baghira/.bab/.deco"; if( (file = fopen(tmpString.latin1(), "r")) != NULL ) { fscanf(file,"%d\n%d\n", &format, ¤tStyle); @@ -1501,7 +1501,7 @@ void BaghiraClient::init() if (currentStyle > 4) currentStyle = BaghiraFactory::defaultMode(); #else - QSettings config; + TQSettings config; config.beginGroup("/baghira/Style"); if (config.readBoolEntry( "Design_Default", 1 ) == 2) { @@ -1527,20 +1527,20 @@ void BaghiraClient::init() titleheight_ = TITLESIZE; // setup layout - QVBoxLayout *mainlayout = new QVBoxLayout( widget() ); - QHBoxLayout *titlelayout = new QHBoxLayout(); - windowlayout = new QHBoxLayout(); + TQVBoxLayout *mainlayout = new TQVBoxLayout( widget() ); + TQHBoxLayout *titlelayout = new TQHBoxLayout(); + windowlayout = new TQHBoxLayout(); - titlebar_ = new QSpacerItem( 1, titleheight_, QSizePolicy::Expanding, QSizePolicy::Fixed ); - mainlayout->setResizeMode( QLayout::FreeResize ); + titlebar_ = new TQSpacerItem( 1, titleheight_, TQSizePolicy::Expanding, TQSizePolicy::Fixed ); + mainlayout->setResizeMode( TQLayout::FreeResize ); mainlayout->addLayout( titlelayout ); mainlayout->addLayout( windowlayout ); windowlayout->addSpacing( BaghiraFactory::borderSize(currentStyle) ); if ( isPreview() ) - windowlayout->addWidget( new QLabel( i18n( "
Baghira preview
" ), widget() ) ); + windowlayout->addWidget( new TQLabel( i18n( "
Baghira preview
" ), widget() ) ); else - windowlayout->addItem( new QSpacerItem( 0, 18 ) ); + windowlayout->addItem( new TQSpacerItem( 0, 18 ) ); windowlayout->addSpacing( BaghiraFactory::borderSize(currentStyle) ); @@ -1562,12 +1562,12 @@ void BaghiraClient::init() #endif if (BaghiraFactory::effect(currentStyle, true) >= Baghira::Brushed || BaghiraFactory::effect(currentStyle, false) >= Baghira::Brushed) - HandlePix = QPixmap(BaghiraFactory::pix(currentStyle, TitleBar, isActive(), false )); + HandlePix = TQPixmap(BaghiraFactory::pix(currentStyle, TitleBar, isActive(), false )); else if ( BaghiraFactory::bgStipple() ) { - HandlePix = QPixmap( 32, 32); - QPainter painter; - QColor c = widget()->colorGroup().background(); + HandlePix = TQPixmap( 32, 32); + TQPainter painter; + TQColor c = widget()->colorGroup().background(); HandlePix.fill(c); painter.begin( &HandlePix ); painter.setPen( c.dark( 100 + (BaghiraFactory::contrast()/2) ) ); @@ -1587,7 +1587,7 @@ void BaghiraClient::init() } } -QString BaghiraClient::caption() const +TQString BaghiraClient::caption() const { if (!BaghiraFactory::delAppname()) return KDecoration::caption(); @@ -1617,17 +1617,17 @@ QString BaghiraClient::caption() const // ------------ // Add buttons to title layout -void BaghiraClient::addButtons( QBoxLayout *layout, const QString& s ) +void BaghiraClient::addButtons( TQBoxLayout *layout, const TQString& s ) { if (noDeco_) return; // const unsigned char *bitmap; - QString tip; - QBitmap *m = NULL; - QBitmap *mn = NULL; - QBitmap *mD = NULL; - QBitmap *mnD = NULL; - QBitmap *mH = NULL; + TQString tip; + TQBitmap *m = NULL; + TQBitmap *mn = NULL; + TQBitmap *mD = NULL; + TQBitmap *mnD = NULL; + TQBitmap *mH = NULL; if (BaghiraFactory::effect(currentStyle, true) == Baghira::Brushed){ m = BaghiraFactory::buttonStyle(currentStyle) == Baghira::Panther ? &BaghiraFactory::pantherMask : @@ -1660,7 +1660,7 @@ void BaghiraClient::addButtons( QBoxLayout *layout, const QString& s ) mH = &BaghiraFactory::helpMask; } if ( s.length() > 0 ) { -// qWarning("%s",s.ascii()); +// tqWarning("%s",s.ascii()); layout->addSpacing( MARGIN ); excursion = excursion + plusminus * MARGIN; bool buttonAdded; @@ -1812,29 +1812,29 @@ void BaghiraClient::addButtons( QBoxLayout *layout, const QString& s ) // ------------- // Event filter -bool BaghiraClient::eventFilter( QObject *obj, QEvent *e ) +bool BaghiraClient::eventFilter( TQObject *obj, TQEvent *e ) { if ( obj != widget() ) return false; switch ( e->type() ) { - case QEvent::MouseButtonDblClick: { - mouseDoubleClickEvent( static_cast( e ) ); + case TQEvent::MouseButtonDblClick: { + mouseDoubleClickEvent( static_cast( e ) ); return true; } - case QEvent::MouseButtonPress: { - if (titlebar_->geometry().contains( static_cast(e)->pos() ) && static_cast(e)->state() == Qt::ControlButton){ + case TQEvent::MouseButtonPress: { + if (titlebar_->geometry().contains( static_cast(e)->pos() ) && static_cast(e)->state() == TQt::ControlButton){ currentStyle < 4 ? currentStyle++ : currentStyle = 0; #if KDE_IS_VERSION(3,3,91) unsigned long wmDesign = currentStyle; - XChangeProperty(qt_xdisplay(), windowId(), baghira_deco_design, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &wmDesign, 1L); + XChangeProperty(tqt_xdisplay(), windowId(), baghira_deco_design, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &wmDesign, 1L); #endif widget()->repaint(); - QBitmap *m = NULL; - QBitmap *mn = NULL; - QBitmap *mD = NULL; - QBitmap *mnD = NULL; - QBitmap *mH = NULL; + TQBitmap *m = NULL; + TQBitmap *mn = NULL; + TQBitmap *mD = NULL; + TQBitmap *mnD = NULL; + TQBitmap *mH = NULL; if (BaghiraFactory::effect(currentStyle, true) == Baghira::Brushed){ m = BaghiraFactory::buttonStyle(currentStyle) == Baghira::Panther ? &BaghiraFactory::pantherMask : @@ -1884,41 +1884,41 @@ bool BaghiraClient::eventFilter( QObject *obj, QEvent *e ) return true; } if (BaghiraFactory::allowEasyClosing()){ - if (maximizeMode() == MaximizeFull && isActive() && (leftClose && static_cast( e )->x() == 0 && static_cast( e )->y() == 0) || (rightClose && static_cast( e )->x() == ((QWidget *)obj)->width() -1 && static_cast( e )->y() == 0)) + if (maximizeMode() == MaximizeFull && isActive() && (leftClose && static_cast( e )->x() == 0 && static_cast( e )->y() == 0) || (rightClose && static_cast( e )->x() == ((TQWidget *)obj)->width() -1 && static_cast( e )->y() == 0)) performEasyClose = true; - else processMousePressEvent( static_cast( e ) ); + else processMousePressEvent( static_cast( e ) ); } - else processMousePressEvent( static_cast( e ) ); + else processMousePressEvent( static_cast( e ) ); return true; } - case QEvent::MouseButtonRelease:{ - if (performEasyClose && maximizeMode() == MaximizeFull && (leftClose && static_cast( e )->x() == 0 && static_cast( e )->y() == 0) || (rightClose && static_cast( e )->x() == ((QWidget *)obj)->width() -1 && static_cast( e )->y() == 0)){ + case TQEvent::MouseButtonRelease:{ + if (performEasyClose && maximizeMode() == MaximizeFull && (leftClose && static_cast( e )->x() == 0 && static_cast( e )->y() == 0) || (rightClose && static_cast( e )->x() == ((TQWidget *)obj)->width() -1 && static_cast( e )->y() == 0)){ closeWindow(); performEasyClose = false; return true; } return FALSE; } - case QEvent::Paint: { - paintEvent( static_cast( e ) ); + case TQEvent::Paint: { + paintEvent( static_cast( e ) ); return true; } - case QEvent::Resize: { - resizeEvent( static_cast( e ) ); + case TQEvent::Resize: { + resizeEvent( static_cast( e ) ); return true; } - case QEvent::Show: { + case TQEvent::Show: { #if KDE_IS_VERSION(3,3,91) if (!grip && BaghiraFactory::resizeGrip() && isResizable()) grip = new ResizeHandle(this); #endif - showEvent( static_cast( e ) ); + showEvent( static_cast( e ) ); return true; } - case QEvent::Hide: { + case TQEvent::Hide: { emit hide(); } - case QEvent::Wheel: { - wheelEvent(static_cast( e )); + case TQEvent::Wheel: { + wheelEvent(static_cast( e )); return true; } default: { @@ -1934,15 +1934,15 @@ bool BaghiraClient::eventFilter( QObject *obj, QEvent *e ) // ----------------------- // Doubleclick on title -void BaghiraClient::mouseDoubleClickEvent( QMouseEvent *e ) +void BaghiraClient::mouseDoubleClickEvent( TQMouseEvent *e ) { if ( titlebar_->geometry().contains( e->pos() ) ) titlebarDblClickOperation(); } -void BaghiraClient::wheelEvent( QWheelEvent *e ) +void BaghiraClient::wheelEvent( TQWheelEvent *e ) { - if (titlebar_->geometry().contains( e->pos() ) && e->state() == Qt::ControlButton){ + if (titlebar_->geometry().contains( e->pos() ) && e->state() == TQt::ControlButton){ // surf through the desktops :) int target, cD; if (e->delta() > 0){ @@ -1961,20 +1961,20 @@ void BaghiraClient::wheelEvent( QWheelEvent *e ) // ------------ // Repaint the window -void BaghiraClient::paintEvent( QPaintEvent* ) +void BaghiraClient::paintEvent( TQPaintEvent* ) { if ( !BaghiraFactory::initialized() || noDeco_) return ; - QPainter painter( widget() ); - QColorGroup group; + TQPainter painter( widget() ); + TQColorGroup group; - QRect title( 0, 0, width(), titlebar_->geometry().height() ); - QRect left( 0, title.height(), BaghiraFactory::borderSize(currentStyle), height() - + TQRect title( 0, 0, width(), titlebar_->geometry().height() ); + TQRect left( 0, title.height(), BaghiraFactory::borderSize(currentStyle), height() - title.height() ); - QRect right( width() - BaghiraFactory::borderSize(currentStyle), title.height(), + TQRect right( width() - BaghiraFactory::borderSize(currentStyle), title.height(), BaghiraFactory::borderSize(currentStyle), height() - title.height() ); - QRect handle( 0, height() - BaghiraFactory::borderSize(currentStyle), + TQRect handle( 0, height() - BaghiraFactory::borderSize(currentStyle), width(), BaghiraFactory::borderSize(currentStyle) ); int x, y, x2, y2, h, w; @@ -2002,7 +2002,7 @@ void BaghiraClient::paintEvent( QPaintEvent* ) y2 = title.bottom(); int shapeW = w; - const QColor *ttbar = &(BaghiraFactory::color(currentStyle, Baghira::ColorTitleBar, isActive())); + const TQColor *ttbar = &(BaghiraFactory::color(currentStyle, Baghira::ColorTitleBar, isActive())); int tmp3Dimpact_ = 100 + BaghiraFactory::_3DImpact(currentStyle); @@ -2062,7 +2062,7 @@ void BaghiraClient::paintEvent( QPaintEvent* ) } } - const QColor *ttblend = &(BaghiraFactory::color(currentStyle, Baghira::ColorTitleBlend, isActive())); + const TQColor *ttblend = &(BaghiraFactory::color(currentStyle, Baghira::ColorTitleBlend, isActive())); if (BaghiraFactory::LineImpact(currentStyle) > 0) { @@ -2081,7 +2081,7 @@ void BaghiraClient::paintEvent( QPaintEvent* ) BaghiraFactory::drawIcon(currentStyle) ? iconWidth = 16 : iconWidth = 0; if (BaghiraFactory::drawIcon(currentStyle) || BaghiraFactory::effect(currentStyle, isActive()) == Baghira::Nostalgia) { - QRect textBound = painter.boundingRect ( x + 2 * MARGIN + iconWidth, y, w - MARGIN * 2 - iconWidth, h, BaghiraFactory::titleAlign() | AlignVCenter, caption() ); + TQRect textBound = painter.boundingRect ( x + 2 * MARGIN + iconWidth, y, w - MARGIN * 2 - iconWidth, h, BaghiraFactory::titleAlign() | AlignVCenter, caption() ); iconLeft = textBound.x() - MARGIN - iconWidth; if ( iconLeft < x + MARGIN ) iconLeft = x + MARGIN; @@ -2089,7 +2089,7 @@ void BaghiraClient::paintEvent( QPaintEvent* ) { ICONX = iconLeft; ICONY = y + ( titleheight_ - 16 ) / 2; - painter.drawPixmap( ICONX, ICONY, icon().pixmap( QIconSet::Small, QIconSet::Normal ) ); + painter.drawPixmap( ICONX, ICONY, icon().pixmap( TQIconSet::Small, TQIconSet::Normal ) ); } if (BaghiraFactory::effect(currentStyle, isActive()) == Baghira::Nostalgia) @@ -2108,13 +2108,13 @@ void BaghiraClient::paintEvent( QPaintEvent* ) iconLeft = x + MARGIN; ICONX = iconLeft; ICONY = y + ( titleheight_ - 16 ) / 2; - painter.drawPixmap( ICONX, ICONY, icon().pixmap( QIconSet::Small, QIconSet::Normal ) ); + painter.drawPixmap( ICONX, ICONY, icon().pixmap( TQIconSet::Small, TQIconSet::Normal ) ); } // draw outer frame if ( !isShade() ) { - QColor background = widget() ->colorGroup().background(); + TQColor background = widget() ->colorGroup().background(); // left side left.rect( &x, &y, &w, &h ); @@ -2258,12 +2258,12 @@ void BaghiraClient::paintEvent( QPaintEvent* ) // ------------- // Window is being resized -void BaghiraClient::resizeEvent( QResizeEvent* ) +void BaghiraClient::resizeEvent( TQResizeEvent* ) { if (noDeco_) return; /*if ( widget() ->isShown() ) { - QRegion region = widget() ->rect(); + TQRegion region = widget() ->rect(); region = region.subtract( titlebar_->geometry() ); widget() ->erase( region ); }*/ @@ -2278,41 +2278,41 @@ void BaghiraClient::resizeEvent( QResizeEvent* ) void BaghiraClient::doShape() { // return; - QRegion mask; + TQRegion mask; if (!(BaghiraFactory::allowEasyClosing() && maximizeMode() == MaximizeFull)){ int r = width(); int b = height() - 1; - mask = QRegion( 0, 0, r, b+1 ); + mask = TQRegion( 0, 0, r, b+1 ); if (BaghiraFactory::shapeUL(currentStyle)){ // Remove top-left corner. - mask -= QRegion( 0, 0, 5, 1 ); - mask -= QRegion( 0, 1, 3, 1 ); - mask -= QRegion( 0, 2, 2, 1 ); - mask -= QRegion( 0, 3, 1, 2 ); + mask -= TQRegion( 0, 0, 5, 1 ); + mask -= TQRegion( 0, 1, 3, 1 ); + mask -= TQRegion( 0, 2, 2, 1 ); + mask -= TQRegion( 0, 3, 1, 2 ); } if (BaghiraFactory::shapeUR(currentStyle)){ // Remove top-right corner. - mask -= QRegion( r - 5, 0, 5, 1 ); - mask -= QRegion( r - 3, 1, 3, 1 ); - mask -= QRegion( r - 2, 2, 2, 1 ); - mask -= QRegion( r - 1, 3, 1, 2 ); + mask -= TQRegion( r - 5, 0, 5, 1 ); + mask -= TQRegion( r - 3, 1, 3, 1 ); + mask -= TQRegion( r - 2, 2, 2, 1 ); + mask -= TQRegion( r - 1, 3, 1, 2 ); } if (BaghiraFactory::shapeLL(currentStyle)){ // Remove bottom-left corner. - mask -= QRegion(0, b-0, 5, 1); - mask -= QRegion(0, b-1, 3, 1); - mask -= QRegion(0, b-2, 2, 1); - mask -= QRegion(0, b-4, 1, 2); + mask -= TQRegion(0, b-0, 5, 1); + mask -= TQRegion(0, b-1, 3, 1); + mask -= TQRegion(0, b-2, 2, 1); + mask -= TQRegion(0, b-4, 1, 2); } if (BaghiraFactory::shapeLR(currentStyle)){ // Remove bottom-right corner. - mask -= QRegion(r - 5, b-0, 5, 1); - mask -= QRegion(r - 3, b-1, 3, 1); - mask -= QRegion(r - 2, b-2, 2, 1); - mask -= QRegion(r - 1, b-4, 1, 2); + mask -= TQRegion(r - 5, b-0, 5, 1); + mask -= TQRegion(r - 3, b-1, 3, 1); + mask -= TQRegion(r - 2, b-2, 2, 1); + mask -= TQRegion(r - 1, b-4, 1, 2); } } setMask( mask, 1 ); @@ -2324,7 +2324,7 @@ void BaghiraClient::doShape() // ----------- // Window is being shown -void BaghiraClient::showEvent( QShowEvent* ) +void BaghiraClient::showEvent( TQShowEvent* ) { if (noDeco_) return; @@ -2408,9 +2408,9 @@ void BaghiraClient::desktopChange() bool d = isOnAllDesktops(); if ( button[ StickyButton ] ) { - QToolTip::remove + TQToolTip::remove ( button[ StickyButton ] ); - QToolTip::add + TQToolTip::add ( button[ StickyButton ], d ? i18n( "Un-Sticky" ) : i18n( "Sticky" ) ); } } @@ -2448,9 +2448,9 @@ void BaghiraClient::maximizeChange() BaghiraFactory::deMaximizer().hide(); } if ( button[ MaxButton ] ) { - QToolTip::remove + TQToolTip::remove ( button[ MaxButton ] ); - QToolTip::add + TQToolTip::add ( button[ MaxButton ], m ? i18n( "Restore" ) : i18n( "Maximize" ) ); } } @@ -2493,7 +2493,7 @@ void BaghiraClient::borders( int &l, int &r, int &t, int &b ) const // -------- // Called to resize the window -void BaghiraClient::resize( const QSize &size ) +void BaghiraClient::resize( const TQSize &size ) { if (noDeco_) return; @@ -2505,9 +2505,9 @@ void BaghiraClient::resize( const QSize &size ) // ------------- // Return the minimum allowable size for this decoration -QSize BaghiraClient::minimumSize() const +TQSize BaghiraClient::minimumSize() const { - return QSize( 100, 60 ); + return TQSize( 100, 60 ); } ////////////////////////////////////////////////////////////////////////////// @@ -2515,7 +2515,7 @@ QSize BaghiraClient::minimumSize() const // --------------- // Return mouse position (for resizing) -KDecoration::Position BaghiraClient::mousePosition( const QPoint &point ) const +KDecoration::Position BaghiraClient::mousePosition( const TQPoint &point ) const { if (noDeco_) return PositionCenter; @@ -2574,7 +2574,7 @@ void BaghiraClient::maxButtonPressed() { void BaghiraClient::menuButtonPressed() { if ( button[ MenuButton ] ) { - QPoint pt( button[ MenuButton ] ->rect().bottomLeft().x(), + TQPoint pt( button[ MenuButton ] ->rect().bottomLeft().x(), button[ MenuButton ] ->rect().bottomLeft().y() + 4 ); KDecorationFactory* f = factory(); showWindowMenu( button[ MenuButton ] ->mapToGlobal( pt ) ); diff --git a/deco/baghiraclient.h b/deco/baghiraclient.h index c77ea0d..28c4963 100644 --- a/deco/baghiraclient.h +++ b/deco/baghiraclient.h @@ -27,8 +27,8 @@ #ifndef BAGHIRACLIENT_H #define BAGHIRACLIENT_H -#include -#include +#include +#include #include #include #include @@ -40,9 +40,9 @@ #define TITLESIZESMALL 18; #define MARGIN 4;*/ -class QSpacerItem; -class QPoint; -class QBitmap; +class TQSpacerItem; +class TQPoint; +class TQBitmap; class KWinModule; namespace Baghira { @@ -106,7 +106,7 @@ enum TitlebarType{ class BaghiraClient; // #if KDE_IS_VERSION(3,3,91) -class ResizeHandle : public QWidget +class ResizeHandle : public TQWidget { //#if KDE_IS_VERSION(3,3,91) friend class BaghiraClient; @@ -115,20 +115,20 @@ friend class BaghiraClient; public: ResizeHandle(BaghiraClient *parent); protected: - virtual void mousePressEvent ( QMouseEvent * ); - virtual void mouseReleaseEvent ( QMouseEvent * ); - virtual void paintEvent ( QPaintEvent * ); + virtual void mousePressEvent ( TQMouseEvent * ); + virtual void mouseReleaseEvent ( TQMouseEvent * ); + virtual void paintEvent ( TQPaintEvent * ); void updateLook(bool rp = FALSE); private: - bool eventFilter(QObject *obj, QEvent *e); + bool eventFilter(TQObject *obj, TQEvent *e); void shape(); BaghiraClient *client; - QPixmap pix; + TQPixmap pix; #endif }; // #endif -class DeMaximizer : public QWidget +class DeMaximizer : public TQWidget { friend class BaghiraClient; friend class BaghiraFactory; @@ -137,14 +137,14 @@ public: DeMaximizer(); void setClient(BaghiraClient *); protected: - void mouseReleaseEvent( QMouseEvent * e ); - void mousePressEvent ( QMouseEvent * e ); - void enterEvent ( QEvent * e ); - void leaveEvent ( QEvent * e ); - void setPixmap(int i, QImage &image); + void mouseReleaseEvent( TQMouseEvent * e ); + void mousePressEvent ( TQMouseEvent * e ); + void enterEvent ( TQEvent * e ); + void leaveEvent ( TQEvent * e ); + void setPixmap(int i, TQImage &image); private: BaghiraClient *client_; - QPixmap pixmap[5]; + TQPixmap pixmap[5]; void setState(int i); }; @@ -157,22 +157,22 @@ public: virtual ~BaghiraFactory(); virtual KDecoration *createDecoration(KDecorationBridge *b); virtual bool reset(unsigned long changed); - virtual QValueList borderSizes() const; - static QPixmap &ButtonPixmap(Baghira::WindowState wState, Baghira::ButtonType type, Baghira::ButtonState state, int current, bool small); - QImage* DecoImage(QPixmap *pix, int x, int y, int width, int height); + virtual TQValueList borderSizes() const; + static TQPixmap &ButtonPixmap(Baghira::WindowState wState, Baghira::ButtonType type, Baghira::ButtonState state, int current, bool small); + TQImage* DecoImage(TQPixmap *pix, int x, int y, int width, int height); - static QBitmap helpMask, jaguarDownMask, jaguarMenuDownMask, + static TQBitmap helpMask, jaguarDownMask, jaguarMenuDownMask, jaguarMenuMask, jaguarMask, milkMenuDownMask, milkMenuMask, milkMask, pantherMenuMask, pantherMask, milkDownMask, arrowUp, arrowDown; static bool initialized(); static bool noModalDeco(); static bool delAppname(); - static QColor &color(int current, Baghira::ColorType c, bool active=true); + static TQColor &color(int current, Baghira::ColorType c, bool active=true); static KPixmap &pix(int current, PixmapType p, bool active=true, bool small=false); static TitlebarType &effect(int current, bool active); static ButtonStyle buttonStyle(int current); - static Qt::AlignmentFlags titleAlign(); + static TQt::AlignmentFlags titleAlign(); static int borderSize(int current); static int contrast(); static int _3DImpact(int current); @@ -193,17 +193,17 @@ public: TitlebarType titleEffect(); static DeMaximizer &deMaximizer(); static bool fullSpec(); - static QColor &BrushedMetalColor(); + static TQColor &BrushedMetalColor(); private: -// bool blend( const QImage & upper, const QImage & lower, QImage & output); +// bool blend( const TQImage & upper, const TQImage & lower, TQImage & output); unsigned long readConfig(); void createPixmaps(); - void createGradient(KPixmap &pix, const QColor &light, const QColor &dark, Baghira::TitlebarType effect); + void createGradient(KPixmap &pix, const TQColor &light, const TQColor &dark, Baghira::TitlebarType effect); void createOS8Buttons(int style); - QString indexedString(QString s, int index); - QImage* tintBrush( const QImage &img, const QColor &c ) const; - QImage* tintGlossy(const QImage &src, const QColor &c ) const; + TQString indexedString(TQString s, int index); + TQImage* tintBrush( const TQImage &img, const TQColor &c ) const; + TQImage* tintGlossy(const TQImage &src, const TQColor &c ) const; private: @@ -220,13 +220,13 @@ private: static bool drawIcon_[5]; static ButtonStyle buttonStyle_[5]; static TitlebarType effect_[5][2]; - static Qt::AlignmentFlags titlealign_; - static QColor colors_[5][ColorTypeCount][2]; + static TQt::AlignmentFlags titlealign_; + static TQColor colors_[5][ColorTypeCount][2]; static KPixmap pix_[5][PixmapTypeCount][2][2]; - static QPixmap ButtonPixmap_[5][WindowStateAmount][ButtonTypeAmount][ButtonStateAmount][2]; - static QColor ButtonColor_[ButtonTypeAmount+1]; - static QColor brushedMetalColor; - static QPixmap nostalgia_[5][3][2]; + static TQPixmap ButtonPixmap_[5][WindowStateAmount][ButtonTypeAmount][ButtonStateAmount][2]; + static TQColor ButtonColor_[ButtonTypeAmount+1]; + static TQColor brushedMetalColor; + static TQPixmap nostalgia_[5][3][2]; static int contrast_; static int bordersize_[5]; @@ -237,7 +237,7 @@ private: static bool tintBrush_; static bool showTitle_; - static QColor brushTint; + static TQColor brushTint; static DeMaximizer deMaximizer_; static bool fullSpec_; @@ -304,10 +304,10 @@ inline ButtonStyle BaghiraFactory::buttonStyle(int current) inline bool BaghiraFactory::initialized() { return initialized_; } -inline QColor &BaghiraFactory::BrushedMetalColor() +inline TQColor &BaghiraFactory::BrushedMetalColor() { return brushedMetalColor; } -inline QColor &BaghiraFactory::color(int current, Baghira::ColorType c, bool active) +inline TQColor &BaghiraFactory::color(int current, Baghira::ColorType c, bool active) { return colors_[current][c][active]; } inline KPixmap &BaghiraFactory::pix(int current, PixmapType p, bool active, bool small) @@ -316,7 +316,7 @@ inline KPixmap &BaghiraFactory::pix(int current, PixmapType p, bool active, bool inline Baghira::TitlebarType &BaghiraFactory::effect(int current, bool active) { return effect_[current][active]; } -inline Qt::AlignmentFlags BaghiraFactory::titleAlign() +inline TQt::AlignmentFlags BaghiraFactory::titleAlign() { return titlealign_; } inline int BaghiraFactory::borderSize(int current) @@ -324,29 +324,29 @@ inline int BaghiraFactory::borderSize(int current) // BaghiraButton /////////////////////////////////////////////////////////////// -class BaghiraButton : public QButton +class BaghiraButton : public TQButton { Q_OBJECT public: - BaghiraButton(BaghiraClient *parent=0, const char *name=0, const QString &tip=NULL, bool small=false, ButtonType type=MinButton, int style=0); + BaghiraButton(BaghiraClient *parent=0, const char *name=0, const TQString &tip=NULL, bool small=false, ButtonType type=MinButton, int style=0); ~BaghiraButton(); - QSize sizeHint() const; + TQSize sizeHint() const; int lastMousePress() const; void reset(); - inline void setMasks(QBitmap *bitmask, QBitmap *bitmaskDown); + inline void setMasks(TQBitmap *bitmask, TQBitmap *bitmaskDown); Baghira::ButtonState state(); inline void setType(Baghira::ButtonType type) {type_ = type; } - QBitmap *mask; - QBitmap *maskDown; + TQBitmap *mask; + TQBitmap *maskDown; private: - void enterEvent(QEvent *e); - void leaveEvent(QEvent *e); - void mousePressEvent(QMouseEvent *e); - void mouseReleaseEvent(QMouseEvent *e); - void drawButton(QPainter *painter); + void enterEvent(TQEvent *e); + void leaveEvent(TQEvent *e); + void mousePressEvent(TQMouseEvent *e); + void mouseReleaseEvent(TQMouseEvent *e); + void drawButton(TQPainter *painter); private slots: void delayedEnterEvent(); @@ -355,8 +355,8 @@ private: bool _blocked; BaghiraClient *client_; ButtonType type_; - QBitmap *deco_; - QPixmap *pixmap[2][5]; + TQBitmap *deco_; + TQPixmap *pixmap[2][5]; KPixmap icon_; bool small_; int lastmouse_; @@ -382,7 +382,7 @@ public: virtual ~BaghiraClient(); virtual void init(); - QString caption() const; + TQString caption() const; virtual void activeChange(); virtual void desktopChange(); @@ -393,9 +393,9 @@ public: void demaxButtonPressed(); virtual void borders(int &l, int &r, int &t, int &b) const; - virtual void resize(const QSize &size); - virtual QSize minimumSize() const; - virtual Position mousePosition(const QPoint &point) const; + virtual void resize(const TQSize &size); + virtual TQSize minimumSize() const; + virtual Position mousePosition(const TQPoint &point) const; uint currentStyle; signals: @@ -406,14 +406,14 @@ protected: int titleheight_; private: - void addButtons(QBoxLayout* layout, const QString& buttons); + void addButtons(TQBoxLayout* layout, const TQString& buttons); - bool eventFilter(QObject *obj, QEvent *e); - void mouseDoubleClickEvent(QMouseEvent *e); - void wheelEvent(QWheelEvent *e); - void paintEvent(QPaintEvent *); - void resizeEvent(QResizeEvent *); - void showEvent(QShowEvent *); + bool eventFilter(TQObject *obj, TQEvent *e); + void mouseDoubleClickEvent(TQMouseEvent *e); + void wheelEvent(TQWheelEvent *e); + void paintEvent(TQPaintEvent *); + void resizeEvent(TQResizeEvent *); + void showEvent(TQShowEvent *); private slots: void doShape(); @@ -425,8 +425,8 @@ private slots: private: BaghiraButton *button[ButtonTypeAmount]; - QSpacerItem *titlebar_; - QPixmap HandlePix; + TQSpacerItem *titlebar_; + TQPixmap HandlePix; int excursion; // skewness because of unequality of left/right buttons - bad for center aligned titles... int plusminus; bool isFaded; @@ -434,10 +434,10 @@ private: bool rightClose; bool performEasyClose; bool noDeco_; - QHBoxLayout *windowlayout; + TQHBoxLayout *windowlayout; int ICONX, ICONY; ResizeHandle *grip; - QString caption_; + TQString caption_; }; } // namespace Baghira diff --git a/deco/config/aquariusbutton.cc b/deco/config/aquariusbutton.cc index 6201abc..dcc1638 100644 --- a/deco/config/aquariusbutton.cc +++ b/deco/config/aquariusbutton.cc @@ -1,7 +1,7 @@ #include "aquariusbutton.h" -#include -#include -#include +#include +#include +#include #include #include "config.h" @@ -33,7 +33,7 @@ destG = (S*destG + (100-S)*G)/100; \ destB = (S*destB + (100-S)*B)/100; -static bool blend( const QImage & upper, const QImage & lower, QImage & output) +static bool blend( const TQImage & upper, const TQImage & lower, TQImage & output) // adopted from kimageeffect::blend - what is not endian safe... { if @@ -92,7 +92,7 @@ static bool blend( const QImage & upper, const QImage & lower, QImage & output) return true; } -AquariusButton::AquariusButton( QPixmap &pixmap, QWidget* parent, const char* name) : QWidget( parent, name){ +AquariusButton::AquariusButton( TQPixmap &pixmap, TQWidget* parent, const char* name) : TQWidget( parent, name){ pixmap = pixmap; image = pixmap.convertToImage(); setFixedSize( pixmap.size() ); @@ -101,18 +101,18 @@ AquariusButton::AquariusButton( QPixmap &pixmap, QWidget* parent, const char* na AquariusButton::~AquariusButton(){ } -QColor AquariusButton::Color(){ +TQColor AquariusButton::Color(){ return color; } -void AquariusButton::setColor(QColor c){ +void AquariusButton::setColor(TQColor c){ color = c; tint(color); repaint(false); } -void AquariusButton::tint(QColor &c){ - QImage dest( image.width(), image.height(), 32, 0 ); +void AquariusButton::tint(TQColor &c){ + TQImage dest( image.width(), image.height(), 32, 0 ); dest.setAlphaBuffer( true ); unsigned int *data = ( unsigned int * ) image.bits(); unsigned int *destData = ( unsigned int* ) dest.bits(); @@ -127,34 +127,34 @@ void AquariusButton::tint(QColor &c){ int sq = CLAMP((int)((45.0/128.0)*s+55),0,100); // float srcPercent, destPercent; for ( int current = 0 ; current < total ; ++current ) { - alpha = qAlpha( data[ current ] ); + alpha = tqAlpha( data[ current ] ); if (alpha < 230){ destData[ current ] = data[ current ]; continue; //do not handle translucent parts to not affect blending } - red = qRed( data[ current ] ); - green = qGreen( data[ current ] ); - blue = qBlue( data[ current ] ); + red = tqRed( data[ current ] ); + green = tqGreen( data[ current ] ); + blue = tqBlue( data[ current ] ); SATURATION_COLOR2(sq, red, green, blue); // force back to valid colorspace ! COLOR_SPACE(destR, destG, destB); - destData[ current ] = qRgba( destR, destG, destB, alpha ); + destData[ current ] = tqRgba( destR, destG, destB, alpha ); } - QPixmap backPix = QPixmap(dest.size()); - QPainter tmpPainter(&backPix); + TQPixmap backPix = TQPixmap(dest.size()); + TQPainter tmpPainter(&backPix); tmpPainter.fillRect(0, 0, dest.width(),dest.height(), backgroundBrush()); tmpPainter.end(); - QImage back = backPix.convertToImage(); + TQImage back = backPix.convertToImage(); blend(dest,back,back); - pixmap = QPixmap(back); + pixmap = TQPixmap(back); } -void AquariusButton::mousePressEvent( QMouseEvent *e ){ +void AquariusButton::mousePressEvent( TQMouseEvent *e ){ emit clicked(); } -void AquariusButton::paintEvent( QPaintEvent *e){ - QPainter tmpPainter(this); +void AquariusButton::paintEvent( TQPaintEvent *e){ + TQPainter tmpPainter(this); tmpPainter.drawPixmap(0,0, pixmap); } diff --git a/deco/config/aquariusbutton.h b/deco/config/aquariusbutton.h index 04fec0d..3632408 100644 --- a/deco/config/aquariusbutton.h +++ b/deco/config/aquariusbutton.h @@ -1,32 +1,32 @@ #ifndef AQUARIUSBUTTON_H #define AQUARIUSBUTTON_H -//#include -#include -#include +//#include +#include +#include -class QPixmap; -class QColor; +class TQPixmap; +class TQColor; -class AquariusButton : public QWidget +class AquariusButton : public TQWidget { Q_OBJECT public: - AquariusButton( QPixmap &pixmap, QWidget* parent = 0, const char* name = 0); + AquariusButton( TQPixmap &pixmap, TQWidget* parent = 0, const char* name = 0); ~AquariusButton(); - QColor Color(); + TQColor Color(); public slots: - void setColor(QColor c); + void setColor(TQColor c); protected: - QPixmap pixmap; - QImage image; - QColor color; - void tint(QColor &c); - void mousePressEvent( QMouseEvent *e ); - void paintEvent( QPaintEvent *e); + TQPixmap pixmap; + TQImage image; + TQColor color; + void tint(TQColor &c); + void mousePressEvent( TQMouseEvent *e ); + void paintEvent( TQPaintEvent *e); signals: diff --git a/deco/config/baghiraconfig.cc b/deco/config/baghiraconfig.cc index 2054976..711105c 100644 --- a/deco/config/baghiraconfig.cc +++ b/deco/config/baghiraconfig.cc @@ -11,19 +11,19 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "baghiraconfig.h" #include "configdialog.h" @@ -38,11 +38,11 @@ // ------------- // Constructor -BaghiraConfig::BaghiraConfig(KConfig*, QWidget* parent) - : QObject(parent), /*config_(0),*/ dialog_(0) +BaghiraConfig::BaghiraConfig(KConfig*, TQWidget* parent) + : TQObject(parent), /*config_(0),*/ dialog_(0) { // config_ = new KConfig("baghirarc"); -// config_ = new QSettings; +// config_ = new TQSettings; // config_->beginGroup("/baghira/Deco"); KGlobal::locale()->insertCatalogue("kwin_baghira_config"); @@ -164,11 +164,11 @@ BaghiraConfig::~BaghiraConfig() void BaghiraConfig::load(KConfig*) { - QSettings *config_ = new QSettings; + TQSettings *config_ = new TQSettings; config_->beginGroup("/baghira/Deco"); - QString value = config_->readEntry("TitleAlignment", "AlignHCenter"); - QRadioButton *button = (QRadioButton*)dialog_->titlealign-> + TQString value = config_->readEntry("TitleAlignment", "AlignHCenter"); + TQRadioButton *button = (TQRadioButton*)dialog_->titlealign-> child((const char *)value.latin1()); if (button) button->setChecked(true); @@ -183,10 +183,10 @@ void BaghiraConfig::load(KConfig*) dialog_->noModalDeco->setChecked(config_->readBoolEntry("NoModalDeco",false)); dialog_->delAppname->setChecked(config_->readBoolEntry("RemoveAppname",false)); - dialog_->activeColor1_J->setColor(QColor((unsigned int)config_->readNumEntry("activeColor1_1",QColor(255,255,255).rgb()))); - dialog_->inactiveColor1_J->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_1",QColor(204,214,230).rgb()))); - dialog_->activeColor2_J->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_1",QColor(238,234,238).rgb()))); - dialog_->inactiveColor2_J->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_1",QColor(194,196,211).rgb()))); + dialog_->activeColor1_J->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor1_1",TQColor(255,255,255).rgb()))); + dialog_->inactiveColor1_J->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor1_1",TQColor(204,214,230).rgb()))); + dialog_->activeColor2_J->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor2_1",TQColor(238,234,238).rgb()))); + dialog_->inactiveColor2_J->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor2_1",TQColor(194,196,211).rgb()))); dialog_->buttonStyle_J->setCurrentItem(config_->readNumEntry("ButtonStyle_1",1)); dialog_->titleeffect_J->setCurrentItem(config_->readNumEntry("TitleEffect_1", 1)); dialog_->i_titleeffect_J->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_1", 1)); @@ -199,10 +199,10 @@ void BaghiraConfig::load(KConfig*) dialog_->LineImpact_J->setValue(config_->readNumEntry("LineImpact_1",40)); dialog_->borderSize_J->setValue(config_->readNumEntry("BorderSize_1",0)); - dialog_->activeColor1_P->setColor(QColor((unsigned int)config_->readNumEntry("activeColor1_2",QColor(238,238,238).rgb()))); - dialog_->inactiveColor1_P->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_2",QColor(246,242,246).rgb()))); - dialog_->activeColor2_P->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_2",QColor(205,202,205).rgb()))); - dialog_->inactiveColor2_P->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_2",QColor(238,238,238).rgb()))); + dialog_->activeColor1_P->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor1_2",TQColor(238,238,238).rgb()))); + dialog_->inactiveColor1_P->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor1_2",TQColor(246,242,246).rgb()))); + dialog_->activeColor2_P->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor2_2",TQColor(205,202,205).rgb()))); + dialog_->inactiveColor2_P->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor2_2",TQColor(238,238,238).rgb()))); dialog_->buttonStyle_P->setCurrentItem(config_->readNumEntry("ButtonStyle_2",0)); dialog_->titleeffect_P->setCurrentItem(config_->readNumEntry("TitleEffect_2", 0)); dialog_->i_titleeffect_P->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_2", 0)); @@ -215,10 +215,10 @@ void BaghiraConfig::load(KConfig*) dialog_->LineImpact_P->setValue(config_->readNumEntry("LineImpact_2",40)); dialog_->borderSize_P->setValue(config_->readNumEntry("BorderSize_2",0)); - dialog_->activeColor1_B->setColor(QColor((unsigned int)config_->readNumEntry("activeColor1_3",QColor(202,202,202).rgb()))); - dialog_->inactiveColor1_B->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_3",QColor(200,200,200).rgb()))); - dialog_->activeColor2_B->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_3",QColor(150,150,150).rgb()))); - dialog_->inactiveColor2_B->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_3",QColor(150,150,150).rgb()))); + dialog_->activeColor1_B->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor1_3",TQColor(202,202,202).rgb()))); + dialog_->inactiveColor1_B->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor1_3",TQColor(200,200,200).rgb()))); + dialog_->activeColor2_B->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor2_3",TQColor(150,150,150).rgb()))); + dialog_->inactiveColor2_B->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor2_3",TQColor(150,150,150).rgb()))); dialog_->buttonStyle_B->setCurrentItem(config_->readNumEntry("ButtonStyle_3",0)); dialog_->titleeffect_B->setCurrentItem(config_->readNumEntry("TitleEffect_3", 4)); dialog_->i_titleeffect_B->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_3", 4)); @@ -231,8 +231,8 @@ void BaghiraConfig::load(KConfig*) dialog_->LineImpact_B->setValue(config_->readNumEntry("LineImpact_3",0)); dialog_->borderSize_B->setValue(config_->readNumEntry("BorderSize_3",6)); - dialog_->activeColor1_T->setColor(QColor((unsigned int)config_->readNumEntry("activeColor1_4",QColor(238,238,238).rgb()))); - dialog_->activeColor2_T->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_4",QColor(205,202,205).rgb()))); + dialog_->activeColor1_T->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor1_4",TQColor(238,238,238).rgb()))); + dialog_->activeColor2_T->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor2_4",TQColor(205,202,205).rgb()))); dialog_->buttonStyle_T->setCurrentItem(config_->readNumEntry("ButtonStyle_4",0)); dialog_->shapeUL_T->setChecked(config_->readBoolEntry("ShapeUL_4",true)); dialog_->shapeUR_T->setChecked(config_->readBoolEntry("ShapeUR_4",true)); @@ -242,10 +242,10 @@ void BaghiraConfig::load(KConfig*) dialog_->_3DImpact_T->setValue(config_->readNumEntry("3DImpact_4",20)); dialog_->borderSize_T->setValue(config_->readNumEntry("BorderSize_4",0)); - dialog_->activeColor1_S->setColor(QColor((unsigned int)config_->readNumEntry("activeColor1_5",QColor(250,250,250).rgb()))); - dialog_->inactiveColor1_S->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_5",QColor(230,230,230).rgb()))); - dialog_->activeColor2_S->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_5",QColor(230,230,230).rgb()))); - dialog_->inactiveColor2_S->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_5",QColor(250,250,250).rgb()))); + dialog_->activeColor1_S->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor1_5",TQColor(250,250,250).rgb()))); + dialog_->inactiveColor1_S->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor1_5",TQColor(230,230,230).rgb()))); + dialog_->activeColor2_S->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor2_5",TQColor(230,230,230).rgb()))); + dialog_->inactiveColor2_S->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor2_5",TQColor(250,250,250).rgb()))); dialog_->buttonStyle_S->setCurrentItem(config_->readNumEntry("ButtonStyle_5",0)); dialog_->titleeffect_S->setCurrentItem(config_->readNumEntry("TitleEffect_5", 0)); dialog_->i_titleeffect_S->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_5", 0)); @@ -258,16 +258,16 @@ void BaghiraConfig::load(KConfig*) dialog_->LineImpact_S->setValue(config_->readNumEntry("LineImpact_5",30)); dialog_->borderSize_S->setValue(config_->readNumEntry("BorderSize_5",0)); - buttonDialog_->inactiveColor->setColor(QColor((unsigned int)config_->readNumEntry("InactiveButtonColor", QColor(255,255,255).rgb()))); - buttonDialog_->closeColor->setColor(QColor((unsigned int)config_->readNumEntry("CloseButtonColor", QColor(200,85,70).rgb()))); - buttonDialog_->minColor->setColor(QColor((unsigned int)config_->readNumEntry("MinButtonColor", QColor(230,155,40).rgb()))); - buttonDialog_-> maxColor->setColor(QColor((unsigned int)config_->readNumEntry("MaxButtonColor", QColor(121,180,54).rgb()))); - buttonDialog_->menuColor->setColor(QColor((unsigned int)config_->readNumEntry("MenuButtonColor", QColor(74,140,242).rgb()))); - buttonDialog_->helpColor->setColor(QColor((unsigned int)config_->readNumEntry("HelpButtonColor", QColor(0,0,0).rgb()))); - buttonDialog_->stickyColor->setColor(QColor((unsigned int)config_->readNumEntry("StickyButtonColor", QColor(74,140,242).rgb()))); - buttonDialog_->aboveColor->setColor(QColor((unsigned int)config_->readNumEntry("AboveButtonColor", QColor(74,140,242).rgb()))); - buttonDialog_->behindColor->setColor(QColor((unsigned int)config_->readNumEntry("BehindButtonColor", QColor(74,140,242).rgb()))); - buttonDialog_->shadeColor->setColor(QColor((unsigned int)config_->readNumEntry("ShadeButtonColor", QColor(74,140,242).rgb()))); + buttonDialog_->inactiveColor->setColor(TQColor((unsigned int)config_->readNumEntry("InactiveButtonColor", TQColor(255,255,255).rgb()))); + buttonDialog_->closeColor->setColor(TQColor((unsigned int)config_->readNumEntry("CloseButtonColor", TQColor(200,85,70).rgb()))); + buttonDialog_->minColor->setColor(TQColor((unsigned int)config_->readNumEntry("MinButtonColor", TQColor(230,155,40).rgb()))); + buttonDialog_-> maxColor->setColor(TQColor((unsigned int)config_->readNumEntry("MaxButtonColor", TQColor(121,180,54).rgb()))); + buttonDialog_->menuColor->setColor(TQColor((unsigned int)config_->readNumEntry("MenuButtonColor", TQColor(74,140,242).rgb()))); + buttonDialog_->helpColor->setColor(TQColor((unsigned int)config_->readNumEntry("HelpButtonColor", TQColor(0,0,0).rgb()))); + buttonDialog_->stickyColor->setColor(TQColor((unsigned int)config_->readNumEntry("StickyButtonColor", TQColor(74,140,242).rgb()))); + buttonDialog_->aboveColor->setColor(TQColor((unsigned int)config_->readNumEntry("AboveButtonColor", TQColor(74,140,242).rgb()))); + buttonDialog_->behindColor->setColor(TQColor((unsigned int)config_->readNumEntry("BehindButtonColor", TQColor(74,140,242).rgb()))); + buttonDialog_->shadeColor->setColor(TQColor((unsigned int)config_->readNumEntry("ShadeButtonColor", TQColor(74,140,242).rgb()))); buttonDialog_->init(); config_->endGroup(); delete config_; @@ -281,11 +281,11 @@ void BaghiraConfig::load(KConfig*) void BaghiraConfig::save(KConfig*) { - QSettings *config_ = new QSettings; + TQSettings *config_ = new TQSettings; config_->beginGroup("/baghira/Deco"); - QRadioButton *button = (QRadioButton*)dialog_->titlealign->selected(); - if (button) config_->writeEntry("TitleAlignment", QString(button->name())); + TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->selected(); + if (button) config_->writeEntry("TitleAlignment", TQString(button->name())); config_->writeEntry("DrawComicFrame", dialog_->drawComicFrame->isChecked()); config_->writeEntry("AddAutoSpacing", dialog_->addAutoSpacing->isChecked()); config_->writeEntry("ResizeGrip", dialog_->ResizeGrip->isChecked()); @@ -397,7 +397,7 @@ void BaghiraConfig::save(KConfig*) void BaghiraConfig::defaults() { - QRadioButton *button = (QRadioButton*)dialog_->titlealign->child("AlignHCenter"); + TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->child("AlignHCenter"); if (button) button->setChecked(true); dialog_->allowEasyClosing->setChecked(false); dialog_->minTH->setValue(22); @@ -410,10 +410,10 @@ void BaghiraConfig::defaults() dialog_->noModalDeco->setChecked(false); dialog_->delAppname->setChecked(false); - dialog_->activeColor1_J->setColor(QColor(255,255,255)); - dialog_->inactiveColor1_J->setColor(QColor(204,214,230)); - dialog_->activeColor2_J->setColor(QColor(238,234,238)); - dialog_->inactiveColor2_J->setColor(QColor(194,196,211)); + dialog_->activeColor1_J->setColor(TQColor(255,255,255)); + dialog_->inactiveColor1_J->setColor(TQColor(204,214,230)); + dialog_->activeColor2_J->setColor(TQColor(238,234,238)); + dialog_->inactiveColor2_J->setColor(TQColor(194,196,211)); dialog_->buttonStyle_J->setCurrentItem(1); dialog_->titleeffect_J->setCurrentItem(1); dialog_->i_titleeffect_J->setCurrentItem(1); @@ -426,10 +426,10 @@ void BaghiraConfig::defaults() dialog_->LineImpact_J->setValue(40); dialog_->borderSize_J->setValue(0); - dialog_->activeColor1_P->setColor(QColor(238,238,238)); - dialog_->inactiveColor1_P->setColor(QColor(246,242,246)); - dialog_->activeColor2_P->setColor(QColor(205,202,205)); - dialog_->inactiveColor2_P->setColor(QColor(238,238,238)); + dialog_->activeColor1_P->setColor(TQColor(238,238,238)); + dialog_->inactiveColor1_P->setColor(TQColor(246,242,246)); + dialog_->activeColor2_P->setColor(TQColor(205,202,205)); + dialog_->inactiveColor2_P->setColor(TQColor(238,238,238)); dialog_->buttonStyle_P->setCurrentItem(0); dialog_->titleeffect_P->setCurrentItem(0); dialog_->i_titleeffect_P->setCurrentItem(0); @@ -442,10 +442,10 @@ void BaghiraConfig::defaults() dialog_->LineImpact_P->setValue(30); dialog_->borderSize_P->setValue(0); - dialog_->activeColor1_B->setColor(QColor(210,210,210)); - dialog_->inactiveColor1_B->setColor(QColor(200,200,200)); - dialog_->activeColor2_B->setColor(QColor(150,150,150)); - dialog_->inactiveColor2_B->setColor(QColor(140,140,140)); + dialog_->activeColor1_B->setColor(TQColor(210,210,210)); + dialog_->inactiveColor1_B->setColor(TQColor(200,200,200)); + dialog_->activeColor2_B->setColor(TQColor(150,150,150)); + dialog_->inactiveColor2_B->setColor(TQColor(140,140,140)); dialog_->buttonStyle_B->setCurrentItem(0); dialog_->titleeffect_B->setCurrentItem(4); dialog_->i_titleeffect_B->setCurrentItem(4); @@ -458,8 +458,8 @@ void BaghiraConfig::defaults() dialog_->LineImpact_B->setValue(0); dialog_->borderSize_B->setValue(6); - dialog_->activeColor1_T->setColor(QColor(238,238,238)); - dialog_->activeColor2_T->setColor(QColor(211,208,211)); + dialog_->activeColor1_T->setColor(TQColor(238,238,238)); + dialog_->activeColor2_T->setColor(TQColor(211,208,211)); dialog_->buttonStyle_T->setCurrentItem(0); dialog_->shapeUL_T->setChecked(true); dialog_->shapeUR_T->setChecked(true); @@ -469,10 +469,10 @@ void BaghiraConfig::defaults() dialog_->_3DImpact_T->setValue(20); dialog_->borderSize_T->setValue(0); - dialog_->activeColor1_S->setColor(QColor(250,250,250)); - dialog_->inactiveColor1_S->setColor(QColor(230,230,230)); - dialog_->activeColor2_S->setColor(QColor(230,230,230)); - dialog_->inactiveColor2_S->setColor(QColor(250,250,250)); + dialog_->activeColor1_S->setColor(TQColor(250,250,250)); + dialog_->inactiveColor1_S->setColor(TQColor(230,230,230)); + dialog_->activeColor2_S->setColor(TQColor(230,230,230)); + dialog_->inactiveColor2_S->setColor(TQColor(250,250,250)); dialog_->buttonStyle_S->setCurrentItem(0); dialog_->titleeffect_S->setCurrentItem(0); dialog_->i_titleeffect_S->setCurrentItem(0); @@ -502,12 +502,12 @@ const int graphiteDarkPreset[10][3] = {{255,255,255},{103,118,134},{103,118,134} const ColorTable* presetColors[NUMBEROFCOLORS] = {&aquaPreset, &graphitePreset, &graphiteDarkPreset}; -ButtonColors::ButtonColors(QWidget *parent, const char * name) : QDialog(parent, name){ +ButtonColors::ButtonColors(TQWidget *parent, const char * name) : TQDialog(parent, name){ save = false; - layout = new QGridLayout(this,2,2,11,6, "Grid"); - buttonLayout = new QVBoxLayout(0,0,6); + layout = new TQGridLayout(this,2,2,11,6, "Grid"); + buttonLayout = new TQVBoxLayout(0,0,6); - QPixmap tmpPix = QPixmap(uic_findImage("preview")); + TQPixmap tmpPix = TQPixmap(uic_findImage("preview")); inactiveButton = new AquariusButton(tmpPix,this, "Inactive Button"); buttonLayout->addWidget(inactiveButton); closeButton = new AquariusButton(tmpPix,this, "Close Button"); @@ -524,34 +524,34 @@ ButtonColors::ButtonColors(QWidget *parent, const char * name) : QDialog(parent, buttonLayout->addWidget(behindButton); shadeButton = new AquariusButton(tmpPix,this, "Shade Button"); buttonLayout->addWidget(shadeButton); - tmpPix = QPixmap(uic_findImage("preview-menu")); + tmpPix = TQPixmap(uic_findImage("preview-menu")); menuButton = new AquariusButton(tmpPix,this, "Menu Button"); buttonLayout->addWidget(menuButton); - tmpPix = QPixmap(uic_findImage("icon_help")); + tmpPix = TQPixmap(uic_findImage("icon_help")); helpButton = new AquariusButton(tmpPix,this, "Help Button"); buttonLayout->addWidget(helpButton); - twoButts = new QHBoxLayout(0,0,6); - presets_ = new QComboBox(this); + twoButts = new TQHBoxLayout(0,0,6); + presets_ = new TQComboBox(this); for (int i = 0; i < NUMBEROFCOLORS; i++) presets_->insertItem ( presetColorName[i], i ); twoButts->addWidget(presets_); - cancel = new QPushButton("Cancel", this); + cancel = new TQPushButton("Cancel", this); cancel->setDefault( true ); twoButts->addWidget(cancel); twoButts->addStretch(); layout->addLayout(twoButts,1,0); - ok = new QPushButton("OK", this); + ok = new TQPushButton("OK", this); layout->addWidget(ok,1,1); layout->addLayout(buttonLayout,0,1); - pickerLayout = new QVBoxLayout(0,0,6,0); + pickerLayout = new TQVBoxLayout(0,0,6,0); - indicator = new QLabel(inactiveButton->name(), this); - indicator->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter | Qt::ExpandTabs); - QFont tmpFont = font(); + indicator = new TQLabel(inactiveButton->name(), this); + indicator->setAlignment(TQt::AlignHCenter | TQt::AlignVCenter | TQt::ExpandTabs); + TQFont tmpFont = font(); tmpFont.setBold( true ); tmpFont.setPointSize( 24 ); indicator->setFont(tmpFont); @@ -592,7 +592,7 @@ ButtonColors::ButtonColors(QWidget *parent, const char * name) : QDialog(parent, layout->addLayout(pickerLayout,0,0); - resize( QSize(485, 177).expandedTo(minimumSizeHint()) ); + resize( TQSize(485, 177).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); connect(presets_,SIGNAL(activated(int)), this, SLOT(setColorGroup(int))); @@ -613,16 +613,16 @@ ButtonColors::ButtonColors(QWidget *parent, const char * name) : QDialog(parent, connect(behindButton, SIGNAL(clicked()), this, SLOT(activateBehind()) ); connect(shadeButton, SIGNAL(clicked()), this, SLOT(activateShade()) ); - connect(inactiveColor, SIGNAL(colorChanged(QColor)), inactiveButton, SLOT(setColor(QColor)) ); - connect(closeColor, SIGNAL(colorChanged(QColor)), closeButton, SLOT(setColor(QColor)) ); - connect(minColor, SIGNAL(colorChanged(QColor)), minButton, SLOT(setColor(QColor)) ); - connect(maxColor, SIGNAL(colorChanged(QColor)), maxButton, SLOT(setColor(QColor)) ); - connect(menuColor, SIGNAL(colorChanged(QColor)), menuButton, SLOT(setColor(QColor)) ); - connect(helpColor, SIGNAL(colorChanged(QColor)), helpButton, SLOT(setColor(QColor)) ); - connect(stickyColor, SIGNAL(colorChanged(QColor)), stickyButton, SLOT(setColor(QColor)) ); - connect(aboveColor, SIGNAL(colorChanged(QColor)), aboveButton, SLOT(setColor(QColor)) ); - connect(behindColor, SIGNAL(colorChanged(QColor)), behindButton, SLOT(setColor(QColor)) ); - connect(shadeColor, SIGNAL(colorChanged(QColor)), shadeButton, SLOT(setColor(QColor)) ); + connect(inactiveColor, SIGNAL(colorChanged(TQColor)), inactiveButton, SLOT(setColor(TQColor)) ); + connect(closeColor, SIGNAL(colorChanged(TQColor)), closeButton, SLOT(setColor(TQColor)) ); + connect(minColor, SIGNAL(colorChanged(TQColor)), minButton, SLOT(setColor(TQColor)) ); + connect(maxColor, SIGNAL(colorChanged(TQColor)), maxButton, SLOT(setColor(TQColor)) ); + connect(menuColor, SIGNAL(colorChanged(TQColor)), menuButton, SLOT(setColor(TQColor)) ); + connect(helpColor, SIGNAL(colorChanged(TQColor)), helpButton, SLOT(setColor(TQColor)) ); + connect(stickyColor, SIGNAL(colorChanged(TQColor)), stickyButton, SLOT(setColor(TQColor)) ); + connect(aboveColor, SIGNAL(colorChanged(TQColor)), aboveButton, SLOT(setColor(TQColor)) ); + connect(behindColor, SIGNAL(colorChanged(TQColor)), behindButton, SLOT(setColor(TQColor)) ); + connect(shadeColor, SIGNAL(colorChanged(TQColor)), shadeButton, SLOT(setColor(TQColor)) ); } @@ -630,16 +630,16 @@ ButtonColors::~ButtonColors(){ } void ButtonColors::setColorGroup(int i){ - inactiveColor->setColor(QColor((*presetColors[i])[0][0],(*presetColors[i])[0][1],(*presetColors[i])[0][2]).rgb()); - closeColor->setColor(QColor((*presetColors[i])[1][0],(*presetColors[i])[1][1],(*presetColors[i])[1][2]).rgb()); - minColor->setColor(QColor((*presetColors[i])[2][0],(*presetColors[i])[2][1],(*presetColors[i])[2][2]).rgb()); - maxColor->setColor(QColor((*presetColors[i])[3][0],(*presetColors[i])[3][1],(*presetColors[i])[3][2]).rgb()); - menuColor->setColor(QColor((*presetColors[i])[4][0],(*presetColors[i])[4][1],(*presetColors[i])[4][2]).rgb()); - helpColor->setColor(QColor((*presetColors[i])[5][0],(*presetColors[i])[5][1],(*presetColors[i])[5][2]).rgb()); - stickyColor->setColor(QColor((*presetColors[i])[6][0],(*presetColors[i])[6][1],(*presetColors[i])[6][2]).rgb()); - aboveColor->setColor(QColor((*presetColors[i])[7][0],(*presetColors[i])[7][1],(*presetColors[i])[7][2]).rgb()); - behindColor->setColor(QColor((*presetColors[i])[8][0],(*presetColors[i])[8][1],(*presetColors[i])[8][2]).rgb()); - shadeColor->setColor(QColor((*presetColors[i])[9][0],(*presetColors[i])[9][1],(*presetColors[i])[9][2]).rgb()); + inactiveColor->setColor(TQColor((*presetColors[i])[0][0],(*presetColors[i])[0][1],(*presetColors[i])[0][2]).rgb()); + closeColor->setColor(TQColor((*presetColors[i])[1][0],(*presetColors[i])[1][1],(*presetColors[i])[1][2]).rgb()); + minColor->setColor(TQColor((*presetColors[i])[2][0],(*presetColors[i])[2][1],(*presetColors[i])[2][2]).rgb()); + maxColor->setColor(TQColor((*presetColors[i])[3][0],(*presetColors[i])[3][1],(*presetColors[i])[3][2]).rgb()); + menuColor->setColor(TQColor((*presetColors[i])[4][0],(*presetColors[i])[4][1],(*presetColors[i])[4][2]).rgb()); + helpColor->setColor(TQColor((*presetColors[i])[5][0],(*presetColors[i])[5][1],(*presetColors[i])[5][2]).rgb()); + stickyColor->setColor(TQColor((*presetColors[i])[6][0],(*presetColors[i])[6][1],(*presetColors[i])[6][2]).rgb()); + aboveColor->setColor(TQColor((*presetColors[i])[7][0],(*presetColors[i])[7][1],(*presetColors[i])[7][2]).rgb()); + behindColor->setColor(TQColor((*presetColors[i])[8][0],(*presetColors[i])[8][1],(*presetColors[i])[8][2]).rgb()); + shadeColor->setColor(TQColor((*presetColors[i])[9][0],(*presetColors[i])[9][1],(*presetColors[i])[9][2]).rgb()); } void ButtonColors::setPicker(ColorPicker *picker){ @@ -721,7 +721,7 @@ void ButtonColors::init(){ extern "C" { - QObject* allocate_config(KConfig* config, QWidget* parent) { + TQObject* allocate_config(KConfig* config, TQWidget* parent) { return(new BaghiraConfig(config, parent)); } } diff --git a/deco/config/baghiraconfig.cc.new b/deco/config/baghiraconfig.cc.new index 8d83666..2f35515 100644 --- a/deco/config/baghiraconfig.cc.new +++ b/deco/config/baghiraconfig.cc.new @@ -11,19 +11,19 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "baghiraconfig.h" #include "configdialog.h" @@ -39,11 +39,11 @@ // ------------- // Constructor -BaghiraConfig::BaghiraConfig(KConfig*, QWidget* parent) - : QObject(parent), /*config_(0),*/ dialog_(0) +BaghiraConfig::BaghiraConfig(KConfig*, TQWidget* parent) + : TQObject(parent), /*config_(0),*/ dialog_(0) { // config_ = new KConfig("baghirarc"); -// config_ = new QSettings; +// config_ = new TQSettings; // config_->beginGroup("/baghira/Deco"); KGlobal::locale()->insertCatalogue("kwin_baghira_config"); @@ -165,11 +165,11 @@ BaghiraConfig::~BaghiraConfig() void BaghiraConfig::load(KConfig*) { - QSettings *config_ = new QSettings; + TQSettings *config_ = new TQSettings; config_->beginGroup("/baghira/Deco"); - QString value = config_->readEntry("TitleAlignment", "AlignHCenter"); - QRadioButton *button = (QRadioButton*)dialog_->titlealign-> + TQString value = config_->readEntry("TitleAlignment", "AlignHCenter"); + TQRadioButton *button = (TQRadioButton*)dialog_->titlealign-> child((const char *)value.latin1()); if (button) button->setChecked(true); @@ -184,10 +184,10 @@ void BaghiraConfig::load(KConfig*) dialog_->noModalDeco->setChecked(config_->readBoolEntry("NoModalDeco",false)); dialog_->delAppname->setChecked(config_->readBoolEntry("RemoveAppname",false)); - dialog_->activeColor1_J->setColor(QColor((unsigned int)config_->readNumEntry("activeColor1_1",QColor(255,255,255).rgb()))); - dialog_->inactiveColor1_J->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_1",QColor(204,214,230).rgb()))); - dialog_->activeColor2_J->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_1",QColor(238,234,238).rgb()))); - dialog_->inactiveColor2_J->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_1",QColor(194,196,211).rgb()))); + dialog_->activeColor1_J->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor1_1",TQColor(255,255,255).rgb()))); + dialog_->inactiveColor1_J->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor1_1",TQColor(204,214,230).rgb()))); + dialog_->activeColor2_J->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor2_1",TQColor(238,234,238).rgb()))); + dialog_->inactiveColor2_J->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor2_1",TQColor(194,196,211).rgb()))); dialog_->buttonStyle_J->setCurrentItem(config_->readNumEntry("ButtonStyle_1",1)); dialog_->titleeffect_J->setCurrentItem(config_->readNumEntry("TitleEffect_1", 1)); dialog_->i_titleeffect_J->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_1", 1)); @@ -200,10 +200,10 @@ void BaghiraConfig::load(KConfig*) dialog_->LineImpact_J->setValue(config_->readNumEntry("LineImpact_1",40)); dialog_->borderSize_J->setValue(config_->readNumEntry("BorderSize_1",0)); - dialog_->activeColor1_P->setColor(QColor((unsigned int)config_->readNumEntry("activeColor1_2",QColor(238,238,238).rgb()))); - dialog_->inactiveColor1_P->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_2",QColor(246,242,246).rgb()))); - dialog_->activeColor2_P->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_2",QColor(205,202,205).rgb()))); - dialog_->inactiveColor2_P->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_2",QColor(238,238,238).rgb()))); + dialog_->activeColor1_P->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor1_2",TQColor(238,238,238).rgb()))); + dialog_->inactiveColor1_P->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor1_2",TQColor(246,242,246).rgb()))); + dialog_->activeColor2_P->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor2_2",TQColor(205,202,205).rgb()))); + dialog_->inactiveColor2_P->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor2_2",TQColor(238,238,238).rgb()))); dialog_->buttonStyle_P->setCurrentItem(config_->readNumEntry("ButtonStyle_2",0)); dialog_->titleeffect_P->setCurrentItem(config_->readNumEntry("TitleEffect_2", 0)); dialog_->i_titleeffect_P->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_2", 0)); @@ -216,10 +216,10 @@ void BaghiraConfig::load(KConfig*) dialog_->LineImpact_P->setValue(config_->readNumEntry("LineImpact_2",40)); dialog_->borderSize_P->setValue(config_->readNumEntry("BorderSize_2",0)); - dialog_->activeColor1_B->setColor(QColor((unsigned int)config_->readNumEntry("activeColor1_3",QColor(202,202,202).rgb()))); - dialog_->inactiveColor1_B->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_3",QColor(200,200,200).rgb()))); - dialog_->activeColor2_B->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_3",QColor(150,150,150).rgb()))); - dialog_->inactiveColor2_B->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_3",QColor(150,150,150).rgb()))); + dialog_->activeColor1_B->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor1_3",TQColor(202,202,202).rgb()))); + dialog_->inactiveColor1_B->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor1_3",TQColor(200,200,200).rgb()))); + dialog_->activeColor2_B->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor2_3",TQColor(150,150,150).rgb()))); + dialog_->inactiveColor2_B->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor2_3",TQColor(150,150,150).rgb()))); dialog_->buttonStyle_B->setCurrentItem(config_->readNumEntry("ButtonStyle_3",0)); dialog_->titleeffect_B->setCurrentItem(config_->readNumEntry("TitleEffect_3", 4)); dialog_->i_titleeffect_B->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_3", 4)); @@ -232,8 +232,8 @@ void BaghiraConfig::load(KConfig*) dialog_->LineImpact_B->setValue(config_->readNumEntry("LineImpact_3",0)); dialog_->borderSize_B->setValue(config_->readNumEntry("BorderSize_3",6)); - dialog_->activeColor1_T->setColor(QColor((unsigned int)config_->readNumEntry("activeColor1_4",QColor(238,238,238).rgb()))); - dialog_->activeColor2_T->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_4",QColor(205,202,205).rgb()))); + dialog_->activeColor1_T->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor1_4",TQColor(238,238,238).rgb()))); + dialog_->activeColor2_T->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor2_4",TQColor(205,202,205).rgb()))); dialog_->buttonStyle_T->setCurrentItem(config_->readNumEntry("ButtonStyle_4",0)); dialog_->shapeUL_T->setChecked(config_->readBoolEntry("ShapeUL_4",true)); dialog_->shapeUR_T->setChecked(config_->readBoolEntry("ShapeUR_4",true)); @@ -243,10 +243,10 @@ void BaghiraConfig::load(KConfig*) dialog_->_3DImpact_T->setValue(config_->readNumEntry("3DImpact_4",20)); dialog_->borderSize_T->setValue(config_->readNumEntry("BorderSize_4",0)); - dialog_->activeColor1_S->setColor(QColor((unsigned int)config_->readNumEntry("activeColor1_5",QColor(250,250,250).rgb()))); - dialog_->inactiveColor1_S->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_5",QColor(230,230,230).rgb()))); - dialog_->activeColor2_S->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_5",QColor(230,230,230).rgb()))); - dialog_->inactiveColor2_S->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_5",QColor(250,250,250).rgb()))); + dialog_->activeColor1_S->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor1_5",TQColor(250,250,250).rgb()))); + dialog_->inactiveColor1_S->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor1_5",TQColor(230,230,230).rgb()))); + dialog_->activeColor2_S->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor2_5",TQColor(230,230,230).rgb()))); + dialog_->inactiveColor2_S->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor2_5",TQColor(250,250,250).rgb()))); dialog_->buttonStyle_S->setCurrentItem(config_->readNumEntry("ButtonStyle_5",0)); dialog_->titleeffect_S->setCurrentItem(config_->readNumEntry("TitleEffect_5", 0)); dialog_->i_titleeffect_S->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_5", 0)); @@ -259,16 +259,16 @@ void BaghiraConfig::load(KConfig*) dialog_->LineImpact_S->setValue(config_->readNumEntry("LineImpact_5",30)); dialog_->borderSize_S->setValue(config_->readNumEntry("BorderSize_5",0)); - buttonDialog_->inactiveColor->setColor(QColor((unsigned int)config_->readNumEntry("InactiveButtonColor", QColor(255,255,255).rgb()))); - buttonDialog_->closeColor->setColor(QColor((unsigned int)config_->readNumEntry("CloseButtonColor", QColor(200,85,70).rgb()))); - buttonDialog_->minColor->setColor(QColor((unsigned int)config_->readNumEntry("MinButtonColor", QColor(230,155,40).rgb()))); - buttonDialog_-> maxColor->setColor(QColor((unsigned int)config_->readNumEntry("MaxButtonColor", QColor(121,180,54).rgb()))); - buttonDialog_->menuColor->setColor(QColor((unsigned int)config_->readNumEntry("MenuButtonColor", QColor(74,140,242).rgb()))); - buttonDialog_->helpColor->setColor(QColor((unsigned int)config_->readNumEntry("HelpButtonColor", QColor(0,0,0).rgb()))); - buttonDialog_->stickyColor->setColor(QColor((unsigned int)config_->readNumEntry("StickyButtonColor", QColor(74,140,242).rgb()))); - buttonDialog_->aboveColor->setColor(QColor((unsigned int)config_->readNumEntry("AboveButtonColor", QColor(74,140,242).rgb()))); - buttonDialog_->behindColor->setColor(QColor((unsigned int)config_->readNumEntry("BehindButtonColor", QColor(74,140,242).rgb()))); - buttonDialog_->shadeColor->setColor(QColor((unsigned int)config_->readNumEntry("ShadeButtonColor", QColor(74,140,242).rgb()))); + buttonDialog_->inactiveColor->setColor(TQColor((unsigned int)config_->readNumEntry("InactiveButtonColor", TQColor(255,255,255).rgb()))); + buttonDialog_->closeColor->setColor(TQColor((unsigned int)config_->readNumEntry("CloseButtonColor", TQColor(200,85,70).rgb()))); + buttonDialog_->minColor->setColor(TQColor((unsigned int)config_->readNumEntry("MinButtonColor", TQColor(230,155,40).rgb()))); + buttonDialog_-> maxColor->setColor(TQColor((unsigned int)config_->readNumEntry("MaxButtonColor", TQColor(121,180,54).rgb()))); + buttonDialog_->menuColor->setColor(TQColor((unsigned int)config_->readNumEntry("MenuButtonColor", TQColor(74,140,242).rgb()))); + buttonDialog_->helpColor->setColor(TQColor((unsigned int)config_->readNumEntry("HelpButtonColor", TQColor(0,0,0).rgb()))); + buttonDialog_->stickyColor->setColor(TQColor((unsigned int)config_->readNumEntry("StickyButtonColor", TQColor(74,140,242).rgb()))); + buttonDialog_->aboveColor->setColor(TQColor((unsigned int)config_->readNumEntry("AboveButtonColor", TQColor(74,140,242).rgb()))); + buttonDialog_->behindColor->setColor(TQColor((unsigned int)config_->readNumEntry("BehindButtonColor", TQColor(74,140,242).rgb()))); + buttonDialog_->shadeColor->setColor(TQColor((unsigned int)config_->readNumEntry("ShadeButtonColor", TQColor(74,140,242).rgb()))); buttonDialog_->init(); config_->endGroup(); delete config_; @@ -282,11 +282,11 @@ void BaghiraConfig::load(KConfig*) void BaghiraConfig::save(KConfig*) { - QSettings *config_ = new QSettings; + TQSettings *config_ = new TQSettings; config_->beginGroup("/baghira/Deco"); - QRadioButton *button = (QRadioButton*)dialog_->titlealign->selected(); - if (button) config_->writeEntry("TitleAlignment", QString(button->name())); + TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->selected(); + if (button) config_->writeEntry("TitleAlignment", TQString(button->name())); config_->writeEntry("DrawComicFrame", dialog_->drawComicFrame->isChecked()); config_->writeEntry("AddAutoSpacing", dialog_->addAutoSpacing->isChecked()); config_->writeEntry("ResizeGrip", dialog_->ResizeGrip->isChecked()); @@ -398,7 +398,7 @@ void BaghiraConfig::save(KConfig*) void BaghiraConfig::defaults() { - QRadioButton *button = (QRadioButton*)dialog_->titlealign->child("AlignHCenter"); + TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->child("AlignHCenter"); if (button) button->setChecked(true); dialog_->allowEasyClosing->setChecked(false); dialog_->minTH->setValue(22); @@ -411,10 +411,10 @@ void BaghiraConfig::defaults() dialog_->noModalDeco->setChecked(false); dialog_->delAppname->setChecked(false); - dialog_->activeColor1_J->setColor(QColor(255,255,255)); - dialog_->inactiveColor1_J->setColor(QColor(204,214,230)); - dialog_->activeColor2_J->setColor(QColor(238,234,238)); - dialog_->inactiveColor2_J->setColor(QColor(194,196,211)); + dialog_->activeColor1_J->setColor(TQColor(255,255,255)); + dialog_->inactiveColor1_J->setColor(TQColor(204,214,230)); + dialog_->activeColor2_J->setColor(TQColor(238,234,238)); + dialog_->inactiveColor2_J->setColor(TQColor(194,196,211)); dialog_->buttonStyle_J->setCurrentItem(1); dialog_->titleeffect_J->setCurrentItem(1); dialog_->i_titleeffect_J->setCurrentItem(1); @@ -427,10 +427,10 @@ void BaghiraConfig::defaults() dialog_->LineImpact_J->setValue(40); dialog_->borderSize_J->setValue(0); - dialog_->activeColor1_P->setColor(QColor(238,238,238)); - dialog_->inactiveColor1_P->setColor(QColor(246,242,246)); - dialog_->activeColor2_P->setColor(QColor(205,202,205)); - dialog_->inactiveColor2_P->setColor(QColor(238,238,238)); + dialog_->activeColor1_P->setColor(TQColor(238,238,238)); + dialog_->inactiveColor1_P->setColor(TQColor(246,242,246)); + dialog_->activeColor2_P->setColor(TQColor(205,202,205)); + dialog_->inactiveColor2_P->setColor(TQColor(238,238,238)); dialog_->buttonStyle_P->setCurrentItem(0); dialog_->titleeffect_P->setCurrentItem(0); dialog_->i_titleeffect_P->setCurrentItem(0); @@ -443,10 +443,10 @@ void BaghiraConfig::defaults() dialog_->LineImpact_P->setValue(30); dialog_->borderSize_P->setValue(0); - dialog_->activeColor1_B->setColor(QColor(210,210,210)); - dialog_->inactiveColor1_B->setColor(QColor(200,200,200)); - dialog_->activeColor2_B->setColor(QColor(150,150,150)); - dialog_->inactiveColor2_B->setColor(QColor(140,140,140)); + dialog_->activeColor1_B->setColor(TQColor(210,210,210)); + dialog_->inactiveColor1_B->setColor(TQColor(200,200,200)); + dialog_->activeColor2_B->setColor(TQColor(150,150,150)); + dialog_->inactiveColor2_B->setColor(TQColor(140,140,140)); dialog_->buttonStyle_B->setCurrentItem(0); dialog_->titleeffect_B->setCurrentItem(4); dialog_->i_titleeffect_B->setCurrentItem(4); @@ -459,8 +459,8 @@ void BaghiraConfig::defaults() dialog_->LineImpact_B->setValue(0); dialog_->borderSize_B->setValue(6); - dialog_->activeColor1_T->setColor(QColor(238,238,238)); - dialog_->activeColor2_T->setColor(QColor(211,208,211)); + dialog_->activeColor1_T->setColor(TQColor(238,238,238)); + dialog_->activeColor2_T->setColor(TQColor(211,208,211)); dialog_->buttonStyle_T->setCurrentItem(0); dialog_->shapeUL_T->setChecked(true); dialog_->shapeUR_T->setChecked(true); @@ -470,10 +470,10 @@ void BaghiraConfig::defaults() dialog_->_3DImpact_T->setValue(20); dialog_->borderSize_T->setValue(0); - dialog_->activeColor1_S->setColor(QColor(250,250,250)); - dialog_->inactiveColor1_S->setColor(QColor(230,230,230)); - dialog_->activeColor2_S->setColor(QColor(230,230,230)); - dialog_->inactiveColor2_S->setColor(QColor(250,250,250)); + dialog_->activeColor1_S->setColor(TQColor(250,250,250)); + dialog_->inactiveColor1_S->setColor(TQColor(230,230,230)); + dialog_->activeColor2_S->setColor(TQColor(230,230,230)); + dialog_->inactiveColor2_S->setColor(TQColor(250,250,250)); dialog_->buttonStyle_S->setCurrentItem(0); dialog_->titleeffect_S->setCurrentItem(0); dialog_->i_titleeffect_S->setCurrentItem(0); @@ -503,12 +503,12 @@ const int graphiteDarkPreset[10][3] = {{255,255,255},{103,118,134},{103,118,134} const ColorTable* presetColors[NUMBEROFCOLORS] = {&aquaPreset, &graphitePreset, &graphiteDarkPreset}; -ButtonColors::ButtonColors(QWidget *parent, const char * name) : QDialog(parent, name){ +ButtonColors::ButtonColors(TQWidget *parent, const char * name) : TQDialog(parent, name){ save = false; - layout = new QGridLayout(this,2,2,11,6, "Grid"); - buttonLayout = new QVBoxLayout(0,0,6); + layout = new TQGridLayout(this,2,2,11,6, "Grid"); + buttonLayout = new TQVBoxLayout(0,0,6); - QPixmap tmpPix = QPixmap(uic_findImage("preview")); + TQPixmap tmpPix = TQPixmap(uic_findImage("preview")); inactiveButton = new AquariusButton(tmpPix,this, "Inactive Button"); buttonLayout->addWidget(inactiveButton); closeButton = new AquariusButton(tmpPix,this, "Close Button"); @@ -525,34 +525,34 @@ ButtonColors::ButtonColors(QWidget *parent, const char * name) : QDialog(parent, buttonLayout->addWidget(behindButton); shadeButton = new AquariusButton(tmpPix,this, "Shade Button"); buttonLayout->addWidget(shadeButton); - tmpPix = QPixmap(uic_findImage("preview-menu")); + tmpPix = TQPixmap(uic_findImage("preview-menu")); menuButton = new AquariusButton(tmpPix,this, "Menu Button"); buttonLayout->addWidget(menuButton); - tmpPix = QPixmap(uic_findImage("icon_help")); + tmpPix = TQPixmap(uic_findImage("icon_help")); helpButton = new AquariusButton(tmpPix,this, "Help Button"); buttonLayout->addWidget(helpButton); - twoButts = new QHBoxLayout(0,0,6); - presets_ = new QComboBox(this); + twoButts = new TQHBoxLayout(0,0,6); + presets_ = new TQComboBox(this); for (int i = 0; i < NUMBEROFCOLORS; i++) presets_->insertItem ( presetColorName[i], i ); twoButts->addWidget(presets_); - cancel = new QPushButton("Cancel", this); + cancel = new TQPushButton("Cancel", this); cancel->setDefault( true ); twoButts->addWidget(cancel); twoButts->addStretch(); layout->addLayout(twoButts,1,0); - ok = new QPushButton("OK", this); + ok = new TQPushButton("OK", this); layout->addWidget(ok,1,1); layout->addLayout(buttonLayout,0,1); - pickerLayout = new QVBoxLayout(0,0,6,0); + pickerLayout = new TQVBoxLayout(0,0,6,0); - indicator = new QLabel(inactiveButton->name(), this); - indicator->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter | Qt::ExpandTabs); - QFont tmpFont = font(); + indicator = new TQLabel(inactiveButton->name(), this); + indicator->setAlignment(TQt::AlignHCenter | TQt::AlignVCenter | TQt::ExpandTabs); + TQFont tmpFont = font(); tmpFont.setBold( true ); tmpFont.setPointSize( 24 ); indicator->setFont(tmpFont); @@ -593,7 +593,7 @@ ButtonColors::ButtonColors(QWidget *parent, const char * name) : QDialog(parent, layout->addLayout(pickerLayout,0,0); - resize( QSize(485, 177).expandedTo(minimumSizeHint()) ); + resize( TQSize(485, 177).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); connect(presets_,SIGNAL(activated(int)), this, SLOT(setColorGroup(int))); @@ -614,16 +614,16 @@ ButtonColors::ButtonColors(QWidget *parent, const char * name) : QDialog(parent, connect(behindButton, SIGNAL(clicked()), this, SLOT(activateBehind()) ); connect(shadeButton, SIGNAL(clicked()), this, SLOT(activateShade()) ); - connect(inactiveColor, SIGNAL(colorChanged(QColor)), inactiveButton, SLOT(setColor(QColor)) ); - connect(closeColor, SIGNAL(colorChanged(QColor)), closeButton, SLOT(setColor(QColor)) ); - connect(minColor, SIGNAL(colorChanged(QColor)), minButton, SLOT(setColor(QColor)) ); - connect(maxColor, SIGNAL(colorChanged(QColor)), maxButton, SLOT(setColor(QColor)) ); - connect(menuColor, SIGNAL(colorChanged(QColor)), menuButton, SLOT(setColor(QColor)) ); - connect(helpColor, SIGNAL(colorChanged(QColor)), helpButton, SLOT(setColor(QColor)) ); - connect(stickyColor, SIGNAL(colorChanged(QColor)), stickyButton, SLOT(setColor(QColor)) ); - connect(aboveColor, SIGNAL(colorChanged(QColor)), aboveButton, SLOT(setColor(QColor)) ); - connect(behindColor, SIGNAL(colorChanged(QColor)), behindButton, SLOT(setColor(QColor)) ); - connect(shadeColor, SIGNAL(colorChanged(QColor)), shadeButton, SLOT(setColor(QColor)) ); + connect(inactiveColor, SIGNAL(colorChanged(TQColor)), inactiveButton, SLOT(setColor(TQColor)) ); + connect(closeColor, SIGNAL(colorChanged(TQColor)), closeButton, SLOT(setColor(TQColor)) ); + connect(minColor, SIGNAL(colorChanged(TQColor)), minButton, SLOT(setColor(TQColor)) ); + connect(maxColor, SIGNAL(colorChanged(TQColor)), maxButton, SLOT(setColor(TQColor)) ); + connect(menuColor, SIGNAL(colorChanged(TQColor)), menuButton, SLOT(setColor(TQColor)) ); + connect(helpColor, SIGNAL(colorChanged(TQColor)), helpButton, SLOT(setColor(TQColor)) ); + connect(stickyColor, SIGNAL(colorChanged(TQColor)), stickyButton, SLOT(setColor(TQColor)) ); + connect(aboveColor, SIGNAL(colorChanged(TQColor)), aboveButton, SLOT(setColor(TQColor)) ); + connect(behindColor, SIGNAL(colorChanged(TQColor)), behindButton, SLOT(setColor(TQColor)) ); + connect(shadeColor, SIGNAL(colorChanged(TQColor)), shadeButton, SLOT(setColor(TQColor)) ); } @@ -631,16 +631,16 @@ ButtonColors::~ButtonColors(){ } void ButtonColors::setColorGroup(int i){ - inactiveColor->setColor(QColor((*presetColors[i])[0][0],(*presetColors[i])[0][1],(*presetColors[i])[0][2]).rgb()); - closeColor->setColor(QColor((*presetColors[i])[1][0],(*presetColors[i])[1][1],(*presetColors[i])[1][2]).rgb()); - minColor->setColor(QColor((*presetColors[i])[2][0],(*presetColors[i])[2][1],(*presetColors[i])[2][2]).rgb()); - maxColor->setColor(QColor((*presetColors[i])[3][0],(*presetColors[i])[3][1],(*presetColors[i])[3][2]).rgb()); - menuColor->setColor(QColor((*presetColors[i])[4][0],(*presetColors[i])[4][1],(*presetColors[i])[4][2]).rgb()); - helpColor->setColor(QColor((*presetColors[i])[5][0],(*presetColors[i])[5][1],(*presetColors[i])[5][2]).rgb()); - stickyColor->setColor(QColor((*presetColors[i])[6][0],(*presetColors[i])[6][1],(*presetColors[i])[6][2]).rgb()); - aboveColor->setColor(QColor((*presetColors[i])[7][0],(*presetColors[i])[7][1],(*presetColors[i])[7][2]).rgb()); - behindColor->setColor(QColor((*presetColors[i])[8][0],(*presetColors[i])[8][1],(*presetColors[i])[8][2]).rgb()); - shadeColor->setColor(QColor((*presetColors[i])[9][0],(*presetColors[i])[9][1],(*presetColors[i])[9][2]).rgb()); + inactiveColor->setColor(TQColor((*presetColors[i])[0][0],(*presetColors[i])[0][1],(*presetColors[i])[0][2]).rgb()); + closeColor->setColor(TQColor((*presetColors[i])[1][0],(*presetColors[i])[1][1],(*presetColors[i])[1][2]).rgb()); + minColor->setColor(TQColor((*presetColors[i])[2][0],(*presetColors[i])[2][1],(*presetColors[i])[2][2]).rgb()); + maxColor->setColor(TQColor((*presetColors[i])[3][0],(*presetColors[i])[3][1],(*presetColors[i])[3][2]).rgb()); + menuColor->setColor(TQColor((*presetColors[i])[4][0],(*presetColors[i])[4][1],(*presetColors[i])[4][2]).rgb()); + helpColor->setColor(TQColor((*presetColors[i])[5][0],(*presetColors[i])[5][1],(*presetColors[i])[5][2]).rgb()); + stickyColor->setColor(TQColor((*presetColors[i])[6][0],(*presetColors[i])[6][1],(*presetColors[i])[6][2]).rgb()); + aboveColor->setColor(TQColor((*presetColors[i])[7][0],(*presetColors[i])[7][1],(*presetColors[i])[7][2]).rgb()); + behindColor->setColor(TQColor((*presetColors[i])[8][0],(*presetColors[i])[8][1],(*presetColors[i])[8][2]).rgb()); + shadeColor->setColor(TQColor((*presetColors[i])[9][0],(*presetColors[i])[9][1],(*presetColors[i])[9][2]).rgb()); } void ButtonColors::setPicker(ColorPicker *picker){ @@ -722,7 +722,7 @@ void ButtonColors::init(){ extern "C" { - QObject* allocate_config(KConfig* config, QWidget* parent) { + TQObject* allocate_config(KConfig* config, TQWidget* parent) { return(new BaghiraConfig(config, parent)); } } diff --git a/deco/config/baghiraconfig.h b/deco/config/baghiraconfig.h index 07b04a5..af16605 100644 --- a/deco/config/baghiraconfig.h +++ b/deco/config/baghiraconfig.h @@ -27,26 +27,26 @@ #ifndef BAGHIRACONFIG_H #define BAGHIRACONFIG_H -#include -#include +#include +#include #include "colorpicker.h" #include "aquariusbutton.h" class KConfig; -class QSettings; +class TQSettings; class ConfigDialog; -class QLabel; -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QPushButton; -class QComboBox; +class TQLabel; +class TQVBoxLayout; +class TQHBoxLayout; +class TQGridLayout; +class TQPushButton; +class TQComboBox; -class ButtonColors : public QDialog +class ButtonColors : public TQDialog { Q_OBJECT public: - ButtonColors(QWidget* parent, const char * name = 0); + ButtonColors(TQWidget* parent, const char * name = 0); ~ButtonColors(); ColorPicker *inactiveColor; ColorPicker *closeColor; @@ -71,10 +71,10 @@ public: AquariusButton *behindButton; AquariusButton *shadeButton; - QHBoxLayout *twoButts; - QPushButton *cancel; - QPushButton *ok; - QComboBox *presets_; + TQHBoxLayout *twoButts; + TQPushButton *cancel; + TQPushButton *ok; + TQComboBox *presets_; bool save; public slots: @@ -95,10 +95,10 @@ private: |------------|---| */ - QVBoxLayout *buttonLayout; - QVBoxLayout *pickerLayout; - QGridLayout *layout; - QLabel *indicator; + TQVBoxLayout *buttonLayout; + TQVBoxLayout *pickerLayout; + TQGridLayout *layout; + TQLabel *indicator; void setPicker(ColorPicker *picker); @@ -120,11 +120,11 @@ private slots: }; -class BaghiraConfig : public QObject +class BaghiraConfig : public TQObject { Q_OBJECT public: - BaghiraConfig(KConfig* config, QWidget* parent); + BaghiraConfig(KConfig* config, TQWidget* parent); ~BaghiraConfig(); signals: @@ -136,7 +136,7 @@ public slots: void defaults(); private: -// QSettings *config_; +// TQSettings *config_; ConfigDialog *dialog_; ButtonColors *buttonDialog_; }; diff --git a/deco/config/baghiraconfig.h.new b/deco/config/baghiraconfig.h.new index 0f75139..edffcc9 100644 --- a/deco/config/baghiraconfig.h.new +++ b/deco/config/baghiraconfig.h.new @@ -27,27 +27,27 @@ #ifndef BAGHIRACONFIG_H #define BAGHIRACONFIG_H -#include -#include -#include +#include +#include +#include #include "colorpicker.h" #include "aquariusbutton.h" class KConfig; -class QSettings; +class TQSettings; class ConfigDialog; -class QLabel; -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QPushButton; -class QComboBox; +class TQLabel; +class TQVBoxLayout; +class TQHBoxLayout; +class TQGridLayout; +class TQPushButton; +class TQComboBox; -class ButtonColors : public QDialog +class ButtonColors : public TQDialog { Q_OBJECT public: - ButtonColors(QWidget* parent, const char * name = 0); + ButtonColors(TQWidget* parent, const char * name = 0); ~ButtonColors(); ColorPicker *inactiveColor; ColorPicker *closeColor; @@ -72,10 +72,10 @@ public: AquariusButton *behindButton; AquariusButton *shadeButton; - QHBoxLayout *twoButts; - QPushButton *cancel; - QPushButton *ok; - QComboBox *presets_; + TQHBoxLayout *twoButts; + TQPushButton *cancel; + TQPushButton *ok; + TQComboBox *presets_; bool save; public slots: @@ -96,10 +96,10 @@ private: |------------|---| */ - QVBoxLayout *buttonLayout; - QVBoxLayout *pickerLayout; - QGridLayout *layout; - QLabel *indicator; + TQVBoxLayout *buttonLayout; + TQVBoxLayout *pickerLayout; + TQGridLayout *layout; + TQLabel *indicator; void setPicker(ColorPicker *picker); @@ -122,11 +122,11 @@ private slots: class CustomDecoSettings; -class BaghiraConfig : public QObject +class BaghiraConfig : public TQObject { Q_OBJECT public: - BaghiraConfig(KConfig* config, QWidget* parent); + BaghiraConfig(KConfig* config, TQWidget* parent); ~BaghiraConfig(); signals: @@ -138,10 +138,10 @@ public slots: void defaults(); private: -// QSettings *config_; +// TQSettings *config_; ConfigDialog *dialog_; ButtonColors *buttonDialog_; - typedef QValueList DecoList; + typedef TQValueList DecoList; DecoList decoList; }; diff --git a/deco/config/colorpicker.cc b/deco/config/colorpicker.cc index 5e11312..6934920 100644 --- a/deco/config/colorpicker.cc +++ b/deco/config/colorpicker.cc @@ -1,51 +1,51 @@ #include "colorpicker.h" -#include -#include -#include -#include +#include +#include +#include +#include -ColorPicker::ColorPicker(QWidget* parent, const char* name) : QGroupBox( parent, name){ -// box = new QGroupBox(parent); -// setFrameShape(QFrame::GroupBoxPanel); -// setFrameShadow(QFrame::Sunken); - setColumnLayout(0, Qt::Vertical ); +ColorPicker::ColorPicker(TQWidget* parent, const char* name) : TQGroupBox( parent, name){ +// box = new TQGroupBox(parent); +// setFrameShape(TQFrame::GroupBoxPanel); +// setFrameShadow(TQFrame::Sunken); + setColumnLayout(0, TQt::Vertical ); layout()->setSpacing( 6 ); layout()->setMargin( 11 ); - QVBoxLayout *vLayout = new QVBoxLayout(layout()); -// gridLayout->setAlignment( Qt::AlignTop ); + TQVBoxLayout *vLayout = new TQVBoxLayout(layout()); +// gridLayout->setAlignment( TQt::AlignTop ); - QHBoxLayout *redLayout = new QHBoxLayout(); - redSlider = new QSlider(0, 255, 1, 0, Qt::Horizontal, this, "redSlider"); + TQHBoxLayout *redLayout = new TQHBoxLayout(); + redSlider = new TQSlider(0, 255, 1, 0, TQt::Horizontal, this, "redSlider"); redLayout->addWidget(redSlider); - redValue = new QSpinBox(0,255,1,this); + redValue = new TQSpinBox(0,255,1,this); redValue->setValue(0); redLayout->addWidget(redValue); vLayout->addLayout(redLayout); - QHBoxLayout *greenLayout = new QHBoxLayout(); - greenSlider = new QSlider(0, 255, 1, 0, Qt::Horizontal, this, "greenSlider"); + TQHBoxLayout *greenLayout = new TQHBoxLayout(); + greenSlider = new TQSlider(0, 255, 1, 0, TQt::Horizontal, this, "greenSlider"); greenLayout->addWidget(greenSlider); - greenValue = new QSpinBox(0,255,1,this); + greenValue = new TQSpinBox(0,255,1,this); greenValue->setValue(0); greenLayout->addWidget(greenValue); vLayout->addLayout(greenLayout); - QHBoxLayout *blueLayout = new QHBoxLayout(); - blueSlider = new QSlider(0, 255, 1, 0, Qt::Horizontal, this, "blueSlider"); + TQHBoxLayout *blueLayout = new TQHBoxLayout(); + blueSlider = new TQSlider(0, 255, 1, 0, TQt::Horizontal, this, "blueSlider"); blueLayout->addWidget(blueSlider); - blueValue = new QSpinBox(0,255,1,this); + blueValue = new TQSpinBox(0,255,1,this); blueValue->setValue(0); blueLayout->addWidget(blueValue); vLayout->addLayout(blueLayout); -// resize( QSize(350, 100).expandedTo(minimumSizeHint()) ); +// resize( TQSize(350, 100).expandedTo(minimumSizeHint()) ); //connections connect(redSlider, SIGNAL(valueChanged (int)), this, SLOT(setRed(int))); @@ -59,7 +59,7 @@ ColorPicker::ColorPicker(QWidget* parent, const char* name) : QGroupBox( parent, ColorPicker::~ColorPicker(){ } -void ColorPicker::setColor(QColor color){ +void ColorPicker::setColor(TQColor color){ redSlider->blockSignals(true); redSlider->setValue( color.red() ); redSlider->blockSignals(false); @@ -88,7 +88,7 @@ void ColorPicker::setRed(int red){ redValue->blockSignals(true); redValue->setValue(red); redValue->blockSignals(false); - emit colorChanged(QColor(red, greenSlider->value(), blueSlider->value())); + emit colorChanged(TQColor(red, greenSlider->value(), blueSlider->value())); } void ColorPicker::setGreen(int green){ @@ -98,7 +98,7 @@ void ColorPicker::setGreen(int green){ greenValue->blockSignals(true); greenValue->setValue(green); greenValue->blockSignals(false); - emit colorChanged(QColor(redSlider->value(), green, blueSlider->value())); + emit colorChanged(TQColor(redSlider->value(), green, blueSlider->value())); } void ColorPicker::setBlue(int blue){ @@ -108,11 +108,11 @@ void ColorPicker::setBlue(int blue){ blueValue->blockSignals(true); blueValue->setValue(blue); blueValue->blockSignals(false); - emit colorChanged(QColor(redSlider->value(), greenSlider->value(), blue)); + emit colorChanged(TQColor(redSlider->value(), greenSlider->value(), blue)); } -QColor ColorPicker::Color(){ - return QColor(redSlider->value(), greenSlider->value(), blueSlider->value()); +TQColor ColorPicker::Color(){ + return TQColor(redSlider->value(), greenSlider->value(), blueSlider->value()); } void ColorPicker::reset(){ diff --git a/deco/config/colorpicker.h b/deco/config/colorpicker.h index 3b4ec48..7e4f776 100644 --- a/deco/config/colorpicker.h +++ b/deco/config/colorpicker.h @@ -1,25 +1,25 @@ #ifndef COLORPICKER_H #define COLORPICKER_H -//#include -#include +//#include +#include -class QSlider; -class QSpinBox; -class QColor; -//class QGroupBox; +class TQSlider; +class TQSpinBox; +class TQColor; +//class TQGroupBox; -class ColorPicker : public QGroupBox +class ColorPicker : public TQGroupBox { Q_OBJECT public: - ColorPicker( QWidget* parent = 0, const char* name = 0); + ColorPicker( TQWidget* parent = 0, const char* name = 0); ~ColorPicker(); - QColor Color(); + TQColor Color(); public slots: - void setColor(QColor color); + void setColor(TQColor color); void setRed(int red); void setGreen(int green); void setBlue(int blue); @@ -27,17 +27,17 @@ public slots: void init(); protected: - QSlider *redSlider; - QSlider *greenSlider; - QSlider *blueSlider; - QSpinBox *redValue; - QSpinBox *greenValue; - QSpinBox *blueValue; - QColor color_; -// QGroupBox *box; + TQSlider *redSlider; + TQSlider *greenSlider; + TQSlider *blueSlider; + TQSpinBox *redValue; + TQSpinBox *greenValue; + TQSpinBox *blueValue; + TQColor color_; +// TQGroupBox *box; signals: - void colorChanged(QColor color); + void colorChanged(TQColor color); }; diff --git a/deco/config/configdialog.ui b/deco/config/configdialog.ui index a52dadf..9ecbf2e 100644 --- a/deco/config/configdialog.ui +++ b/deco/config/configdialog.ui @@ -1,6 +1,6 @@ ConfigDialog - + ConfigDialog @@ -19,7 +19,7 @@ unnamed - + generalbox @@ -36,7 +36,7 @@ unnamed - + layout133 @@ -44,7 +44,7 @@ unnamed - + textLabel1_3 @@ -69,7 +69,7 @@ - + minTH @@ -85,7 +85,7 @@ - + ResizeGrip @@ -96,7 +96,7 @@ Starts in Brushed Metal mode instead of default, if the Style is set to Brushed Metal - + addAutoSpacing @@ -104,7 +104,7 @@ Add auto spacing - + fullSpec @@ -115,7 +115,7 @@ Check this to have any window in fullscreen Mode - demaximize the window by clicking into the top right corner of your screen - + drawComicFrame @@ -126,7 +126,7 @@ Draws a black frame around the window (not the Titlebar).<br>Anyway i suggest to get the kwin dropshadow patch. - + noModalDeco @@ -134,7 +134,7 @@ Hide deco for fixed size modal windows - + maxResizable @@ -142,7 +142,7 @@ Keep maximized resizable - + allowEasyClosing @@ -153,7 +153,7 @@ Allows Closing by clicking into the top left or right corner <br> Close Button must be most left or right element (also no spacers) <br> Closes on Mouse Button release (so you have the chance to move the mouse away and keep the Window) <br> The Window must be active and maximized <br> Unfortunately you will not be able tho resize the Window from that corner - + Jaguar @@ -183,7 +183,7 @@ defaultMode - + textLabel1_7 @@ -205,7 +205,7 @@ Horizontal - + delAppname @@ -216,7 +216,7 @@ from multipart titles - + titlealign @@ -233,7 +233,7 @@ from multipart titles unnamed - + AlignLeft @@ -261,7 +261,7 @@ from multipart titles - + AlignHCenter @@ -292,7 +292,7 @@ from multipart titles - + AlignRight @@ -303,7 +303,7 @@ from multipart titles - + noTitle @@ -347,7 +347,7 @@ from multipart titles - + ButtonColorConfig @@ -372,11 +372,11 @@ from multipart titles - + tab - + jaguarTab @@ -387,7 +387,7 @@ from multipart titles unnamed - + layout7_3 @@ -395,7 +395,7 @@ from multipart titles unnamed - + textLabel1_4_3 @@ -420,7 +420,7 @@ from multipart titles - + _3DImpact_J @@ -433,7 +433,7 @@ from multipart titles - + layout10 @@ -441,7 +441,7 @@ from multipart titles unnamed - + textLabel2 @@ -466,7 +466,7 @@ from multipart titles - + LineImpact_J @@ -482,7 +482,7 @@ from multipart titles - + layout40 @@ -490,7 +490,7 @@ from multipart titles unnamed - + layout35 @@ -498,7 +498,7 @@ from multipart titles unnamed - + textLabel1_2_4_3 @@ -506,7 +506,7 @@ from multipart titles ButtonStyle - + textLabel1_8_3 @@ -517,7 +517,7 @@ from multipart titles titleeffect - + textLabel1_8_3_2 @@ -547,7 +547,7 @@ from multipart titles - + layout39 @@ -555,7 +555,7 @@ from multipart titles unnamed - + Panther @@ -580,7 +580,7 @@ from multipart titles buttonStyle_J - + Gradient @@ -624,7 +624,7 @@ from multipart titles Select an effect for the titlebar to change its appearance - + Gradient @@ -670,7 +670,7 @@ from multipart titles - + layout38 @@ -678,7 +678,7 @@ from multipart titles unnamed - + textLabel1 @@ -689,7 +689,7 @@ from multipart titles AlignCenter - + layout33 @@ -715,7 +715,7 @@ from multipart titles - + layout34 @@ -745,7 +745,7 @@ from multipart titles - + groupBox2_4 @@ -756,7 +756,7 @@ from multipart titles unnamed - + layout45 @@ -764,7 +764,7 @@ from multipart titles unnamed - + shapeUL_J @@ -789,7 +789,7 @@ from multipart titles - + shapeLL_J @@ -799,7 +799,7 @@ from multipart titles - + layout44 @@ -807,7 +807,7 @@ from multipart titles unnamed - + shapeUR_J @@ -832,7 +832,7 @@ from multipart titles - + shapeLR_J @@ -859,7 +859,7 @@ from multipart titles - + borderSize_J @@ -867,7 +867,7 @@ from multipart titles 16 - + textLabel1_6_3 @@ -928,7 +928,7 @@ from multipart titles - + drawIcon_J @@ -938,7 +938,7 @@ from multipart titles - + pantherTab @@ -949,7 +949,7 @@ from multipart titles unnamed - + layout10_2 @@ -957,7 +957,7 @@ from multipart titles unnamed - + textLabel2_2 @@ -982,7 +982,7 @@ from multipart titles - + LineImpact_P @@ -998,7 +998,7 @@ from multipart titles - + groupBox2_3 @@ -1009,7 +1009,7 @@ from multipart titles unnamed - + layout51 @@ -1017,7 +1017,7 @@ from multipart titles unnamed - + shapeUL_P @@ -1042,7 +1042,7 @@ from multipart titles - + shapeLL_P @@ -1052,7 +1052,7 @@ from multipart titles - + layout52 @@ -1060,7 +1060,7 @@ from multipart titles unnamed - + shapeUR_P @@ -1085,7 +1085,7 @@ from multipart titles - + shapeLR_P @@ -1129,7 +1129,7 @@ from multipart titles - + borderSize_P @@ -1137,7 +1137,7 @@ from multipart titles 16 - + textLabel1_6_2 @@ -1181,7 +1181,7 @@ from multipart titles - + layout7_2 @@ -1189,7 +1189,7 @@ from multipart titles unnamed - + textLabel1_4_4 @@ -1214,7 +1214,7 @@ from multipart titles - + _3DImpact_P @@ -1227,7 +1227,7 @@ from multipart titles - + layout50 @@ -1235,7 +1235,7 @@ from multipart titles unnamed - + layout31 @@ -1243,7 +1243,7 @@ from multipart titles unnamed - + textLabel1_2_4 @@ -1251,7 +1251,7 @@ from multipart titles ButtonStyle - + textLabel1_8 @@ -1262,7 +1262,7 @@ from multipart titles titleeffect - + textLabel1_8_4 @@ -1292,7 +1292,7 @@ from multipart titles - + layout30 @@ -1300,7 +1300,7 @@ from multipart titles unnamed - + Panther @@ -1325,7 +1325,7 @@ from multipart titles buttonStyle_P - + Gradient @@ -1369,7 +1369,7 @@ from multipart titles Select an effect for the titlebar to change its appearance - + Gradient @@ -1415,7 +1415,7 @@ from multipart titles - + layout49 @@ -1423,7 +1423,7 @@ from multipart titles unnamed - + textLabel1_2 @@ -1434,7 +1434,7 @@ from multipart titles AlignCenter - + layout47 @@ -1460,7 +1460,7 @@ from multipart titles - + layout48 @@ -1490,7 +1490,7 @@ from multipart titles - + drawIcon_P @@ -1500,7 +1500,7 @@ from multipart titles - + brushedTab @@ -1511,7 +1511,7 @@ from multipart titles unnamed - + layout10_3 @@ -1519,7 +1519,7 @@ from multipart titles unnamed - + textLabel2_3 @@ -1544,7 +1544,7 @@ from multipart titles - + LineImpact_B @@ -1560,7 +1560,7 @@ from multipart titles - + layout7 @@ -1568,7 +1568,7 @@ from multipart titles unnamed - + textLabel1_4 @@ -1593,7 +1593,7 @@ from multipart titles - + _3DImpact_B @@ -1606,7 +1606,7 @@ from multipart titles - + layout57 @@ -1614,7 +1614,7 @@ from multipart titles unnamed - + layout27 @@ -1622,7 +1622,7 @@ from multipart titles unnamed - + textLabel1_2_4_2 @@ -1630,7 +1630,7 @@ from multipart titles ButtonStyle - + textLabel1_8_2 @@ -1641,7 +1641,7 @@ from multipart titles titleeffect - + textLabel1_8_2_2 @@ -1671,7 +1671,7 @@ from multipart titles - + layout26 @@ -1679,7 +1679,7 @@ from multipart titles unnamed - + Panther @@ -1704,7 +1704,7 @@ from multipart titles buttonStyle_B - + Gradient @@ -1748,7 +1748,7 @@ from multipart titles Select an effect for the titlebar to change its appearance - + Gradient @@ -1794,7 +1794,7 @@ from multipart titles - + layout56 @@ -1802,7 +1802,7 @@ from multipart titles unnamed - + textLabel1_5 @@ -1813,7 +1813,7 @@ from multipart titles AlignCenter - + layout54 @@ -1839,7 +1839,7 @@ from multipart titles - + layout55 @@ -1869,7 +1869,7 @@ from multipart titles - + groupBox2_2 @@ -1880,7 +1880,7 @@ from multipart titles unnamed - + layout58 @@ -1888,7 +1888,7 @@ from multipart titles unnamed - + shapeUL_B @@ -1913,7 +1913,7 @@ from multipart titles - + shapeLL_B @@ -1923,7 +1923,7 @@ from multipart titles - + layout59 @@ -1931,7 +1931,7 @@ from multipart titles unnamed - + shapeUR_B @@ -1956,7 +1956,7 @@ from multipart titles - + shapeLR_B @@ -1983,7 +1983,7 @@ from multipart titles - + textLabel1_6 @@ -1991,7 +1991,7 @@ from multipart titles Border Size - + borderSize_B @@ -2055,7 +2055,7 @@ from multipart titles - + drawIcon_B @@ -2065,7 +2065,7 @@ from multipart titles - + TabPage @@ -2076,7 +2076,7 @@ from multipart titles unnamed - + layout7_4 @@ -2084,7 +2084,7 @@ from multipart titles unnamed - + textLabel1_4_2 @@ -2109,7 +2109,7 @@ from multipart titles - + _3DImpact_T @@ -2122,7 +2122,7 @@ from multipart titles - + groupBox2_2_2 @@ -2133,7 +2133,7 @@ from multipart titles unnamed - + layout58_2 @@ -2141,7 +2141,7 @@ from multipart titles unnamed - + shapeUL_T @@ -2166,7 +2166,7 @@ from multipart titles - + shapeLL_T @@ -2176,7 +2176,7 @@ from multipart titles - + layout59_2 @@ -2184,7 +2184,7 @@ from multipart titles unnamed - + shapeUR_T @@ -2209,7 +2209,7 @@ from multipart titles - + shapeLR_T @@ -2236,7 +2236,7 @@ from multipart titles - + textLabel1_6_4 @@ -2244,7 +2244,7 @@ from multipart titles Border Size - + borderSize_T @@ -2308,7 +2308,7 @@ from multipart titles - + layout42 @@ -2316,7 +2316,7 @@ from multipart titles unnamed - + layout27_2 @@ -2324,7 +2324,7 @@ from multipart titles unnamed - + textLabel1_2_4_2_2 @@ -2332,7 +2332,7 @@ from multipart titles ButtonStyle - + textLabel1_8_2_3 @@ -2343,7 +2343,7 @@ from multipart titles titleeffect - + textLabel1_8_2_2_2 @@ -2373,7 +2373,7 @@ from multipart titles - + layout82 @@ -2381,7 +2381,7 @@ from multipart titles unnamed - + Panther @@ -2406,7 +2406,7 @@ from multipart titles buttonStyle_T - + textLabel1_9 @@ -2414,7 +2414,7 @@ from multipart titles (Gradient) - + textLabel1_9_2 @@ -2424,7 +2424,7 @@ from multipart titles - + layout41 @@ -2432,7 +2432,7 @@ from multipart titles unnamed - + textLabel1_5_2 @@ -2443,7 +2443,7 @@ from multipart titles AlignCenter - + layout54_2 @@ -2469,7 +2469,7 @@ from multipart titles - + textLabel1_10 @@ -2484,7 +2484,7 @@ from multipart titles - + drawIcon_T @@ -2494,7 +2494,7 @@ from multipart titles - + TabPage @@ -2505,7 +2505,7 @@ from multipart titles unnamed - + drawIcon_S @@ -2513,7 +2513,7 @@ from multipart titles Draw Icon - + layout7_5 @@ -2521,7 +2521,7 @@ from multipart titles unnamed - + textLabel1_4_5 @@ -2546,7 +2546,7 @@ from multipart titles - + _3DImpact_S @@ -2559,7 +2559,7 @@ from multipart titles - + layout57_2 @@ -2567,7 +2567,7 @@ from multipart titles unnamed - + layout27_3 @@ -2575,7 +2575,7 @@ from multipart titles unnamed - + textLabel1_2_4_2_3 @@ -2583,7 +2583,7 @@ from multipart titles ButtonStyle - + textLabel1_8_2_4 @@ -2594,7 +2594,7 @@ from multipart titles titleeffect - + textLabel1_8_2_2_3 @@ -2624,7 +2624,7 @@ from multipart titles - + layout26_2 @@ -2632,7 +2632,7 @@ from multipart titles unnamed - + Panther @@ -2657,7 +2657,7 @@ from multipart titles buttonStyle_S - + Gradient @@ -2701,7 +2701,7 @@ from multipart titles Select an effect for the titlebar to change its appearance - + Gradient @@ -2747,7 +2747,7 @@ from multipart titles - + layout56_2 @@ -2755,7 +2755,7 @@ from multipart titles unnamed - + textLabel1_5_3 @@ -2766,7 +2766,7 @@ from multipart titles AlignCenter - + layout54_3 @@ -2792,7 +2792,7 @@ from multipart titles - + layout55_2 @@ -2822,7 +2822,7 @@ from multipart titles - + groupBox2_2_3 @@ -2833,7 +2833,7 @@ from multipart titles unnamed - + layout58_3 @@ -2841,7 +2841,7 @@ from multipart titles unnamed - + shapeUL_S @@ -2866,7 +2866,7 @@ from multipart titles - + shapeLL_S @@ -2876,7 +2876,7 @@ from multipart titles - + layout59_3 @@ -2884,7 +2884,7 @@ from multipart titles unnamed - + shapeUR_S @@ -2909,7 +2909,7 @@ from multipart titles - + shapeLR_S @@ -2936,7 +2936,7 @@ from multipart titles - + textLabel1_6_5 @@ -2944,7 +2944,7 @@ from multipart titles Border Size - + borderSize_S @@ -3008,7 +3008,7 @@ from multipart titles - + layout10_3_2 @@ -3016,7 +3016,7 @@ from multipart titles unnamed - + textLabel2_3_2 @@ -3041,7 +3041,7 @@ from multipart titles - + LineImpact_S diff --git a/deco/config/configdialog.ui.new b/deco/config/configdialog.ui.new index b17dbd1..bd812d8 100644 --- a/deco/config/configdialog.ui.new +++ b/deco/config/configdialog.ui.new @@ -1,6 +1,6 @@ ConfigDialog - + ConfigDialog @@ -19,7 +19,7 @@ unnamed - + titlealign @@ -36,7 +36,7 @@ unnamed - + AlignLeft @@ -64,7 +64,7 @@ - + AlignHCenter @@ -95,7 +95,7 @@ - + AlignRight @@ -106,7 +106,7 @@ - + noTitle @@ -133,7 +133,7 @@ - + generalbox @@ -150,7 +150,7 @@ unnamed - + Jaguar @@ -180,7 +180,7 @@ defaultMode - + delAppname @@ -203,7 +203,7 @@ from multipart titles Horizontal - + drawComicFrame @@ -214,7 +214,7 @@ from multipart titles Draws a black frame around the window (not the Titlebar).<br>Anyway i suggest to get the kwin dropshadow patch. - + noModalDeco @@ -222,7 +222,7 @@ from multipart titles Hide deco for fixed size modal windows - + maxResizable @@ -230,7 +230,7 @@ from multipart titles Keep maximized resizable - + ResizeGrip @@ -241,7 +241,7 @@ from multipart titles Starts in Brushed Metal mode instead of default, if the Style is set to Brushed Metal - + textLabel1_7 @@ -249,7 +249,7 @@ from multipart titles Default Mode is - + fullSpec @@ -260,7 +260,7 @@ from multipart titles Check this to have any window in fullscreen Mode - demaximize the window by clicking into the top right corner of your screen - + allowEasyClosing @@ -271,7 +271,7 @@ from multipart titles Allows Closing by clicking into the top left or right corner <br> Close Button must be most left or right element (also no spacers) <br> Closes on Mouse Button release (so you have the chance to move the mouse away and keep the Window) <br> The Window must be active and maximized <br> Unfortunately you will not be able tho resize the Window from that corner - + addAutoSpacing @@ -279,7 +279,7 @@ from multipart titles Add auto spacing - + layout133 @@ -287,7 +287,7 @@ from multipart titles unnamed - + textLabel1_3 @@ -312,7 +312,7 @@ from multipart titles - + minTH @@ -328,7 +328,7 @@ from multipart titles - + ButtonColorConfig @@ -338,7 +338,7 @@ from multipart titles - + decoStack @@ -351,14 +351,14 @@ from multipart titles 2 - + WStackPage 0 - + textLabel2 @@ -376,7 +376,7 @@ from multipart titles - + pushButton2 @@ -384,7 +384,7 @@ from multipart titles Add style - + pushButton3 diff --git a/deco/config/customdecosettings.ui b/deco/config/customdecosettings.ui index 2533091..2a98265 100644 --- a/deco/config/customdecosettings.ui +++ b/deco/config/customdecosettings.ui @@ -1,6 +1,6 @@ CustomDecoSettings - + CustomDecoSettings @@ -19,7 +19,7 @@ unnamed - + boxCorner @@ -30,7 +30,7 @@ unnamed - + layout45 @@ -38,7 +38,7 @@ unnamed - + shapeUL @@ -63,7 +63,7 @@ - + shapeLL @@ -73,7 +73,7 @@ - + layout44 @@ -81,7 +81,7 @@ unnamed - + shapeUR @@ -106,7 +106,7 @@ - + shapeLR @@ -133,7 +133,7 @@ - + borderSize @@ -141,7 +141,7 @@ 16 - + labelBorderSize @@ -202,7 +202,7 @@ - + layout10 @@ -210,7 +210,7 @@ unnamed - + labelTitleshadow @@ -235,7 +235,7 @@ - + LineImpact @@ -251,7 +251,7 @@ - + layout7_3 @@ -259,7 +259,7 @@ unnamed - + label3D @@ -284,7 +284,7 @@ - + _3DImpact @@ -297,7 +297,7 @@ - + layout35 @@ -305,7 +305,7 @@ unnamed - + labelButtonstyle @@ -313,7 +313,7 @@ ButtonStyle - + labelTitle @@ -324,7 +324,7 @@ titleeffect - + labelInTitle @@ -337,7 +337,7 @@ - + layout38 @@ -345,7 +345,7 @@ unnamed - + labelColors @@ -356,7 +356,7 @@ AlignCenter - + layout33 @@ -382,7 +382,7 @@ - + layout34 @@ -410,7 +410,7 @@ - + layout39 @@ -418,7 +418,7 @@ unnamed - + Panther @@ -443,7 +443,7 @@ buttonStyle - + Gradient @@ -487,7 +487,7 @@ Select an effect for the titlebar to change its appearance - + Gradient @@ -550,7 +550,7 @@ - + drawIcon @@ -558,7 +558,7 @@ Draw Icon - + DecoName diff --git a/kickermenu-3.3/menuapplet.cpp b/kickermenu-3.3/menuapplet.cpp index 205ed63..e508c48 100644 --- a/kickermenu-3.3/menuapplet.cpp +++ b/kickermenu-3.3/menuapplet.cpp @@ -24,17 +24,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define _MENUAPPLET_CPP_ -#include // avoid X11 #define's +#include // avoid X11 #define's #include "menuapplet.h" #include -#include +#include #include -#include +#include #include #include -#include +#include #include #include #include @@ -45,9 +45,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* KMenuBar from KDE3.1 and older won't work very well with this applet. - This is because QMenuBar tries really hard to keep its preffered size, + This is because TQMenuBar tries really hard to keep its preffered size, se even if the X window for the menubar has the size enforced by this - applet, Qt thinks it has the size Qt wants. This results in parts + applet, TQt thinks it has the size TQt wants. This results in parts of the menubar not being repainted. Also, old KMenuBar always forced with to be the width of the screen, so even if the menubar has only few entries, this applet will still indicate the menubar doesn't @@ -57,11 +57,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -extern Time qt_x_time; +extern Time tqt_x_time; extern "C" { - KPanelApplet* init( QWidget* parent_P, const QString& configFile_P ) + KPanelApplet* init( TQWidget* parent_P, const TQString& configFile_P ) { KGlobal::locale()->insertCatalogue("kmenuapplet"); return new KickerMenuApplet::Applet( configFile_P, parent_P ); @@ -78,7 +78,7 @@ const long SUPPORTED_WINDOW_TYPES = NET::NormalMask | NET::DesktopMask | NET::Do | NET::ToolbarMask | NET::MenuMask | NET::DialogMask | NET::OverrideMask | NET::TopMenuMask | NET::UtilityMask | NET::SplashMask; -Applet::Applet( const QString& configFile_P, QWidget* parent_P ) +Applet::Applet( const TQString& configFile_P, TQWidget* parent_P ) : KPanelApplet( configFile_P, Stretch, 0, parent_P, "menuapplet" ), DCOPObject( "menuapplet" ), module( NULL ), @@ -91,8 +91,8 @@ Applet::Applet( const QString& configFile_P, QWidget* parent_P ) { // for windowindicator setBackgroundOrigin(AncestorOrigin); - QIntDict(97); //allowing 97 entries - should be enough, if not - who cares: just a label and hashtables are slightly faster than lists... - windowIndicator = new QMenuBar(this); + TQIntDict(97); //allowing 97 entries - should be enough, if not - who cares: just a label and hashtables are slightly faster than lists... + windowIndicator = new TQMenuBar(this); windowList = new KWindowListMenu(windowIndicator); connect(windowList, SIGNAL(aboutToShow()), this, SLOT(initPopup())); windowIndicator->insertItem( "KDE", windowList, 0); @@ -138,13 +138,13 @@ void Applet::windowRemoved(WId w_P) void Applet::windowAdded( WId w_P ) { - QString* title; - NETWinInfo info( qt_xdisplay(), w_P, qt_xrootwin(), NET::WMWindowType); + TQString* title; + NETWinInfo info( tqt_xdisplay(), w_P, tqt_xrootwin(), NET::WMWindowType); XClassHint classHint; - if (!windowTitleDict[w_P] && w_P != qt_xrootwin() && XGetClassHint( qt_xdisplay(), w_P, &classHint ) ) + if (!windowTitleDict[w_P] && w_P != tqt_xrootwin() && XGetClassHint( tqt_xdisplay(), w_P, &classHint ) ) { // much better way to get a nice name! - title = new QString( classHint.res_class ); + title = new TQString( classHint.res_class ); XFree( classHint.res_name ); XFree( classHint.res_class ); windowTitleDict.insert(w_P, title); @@ -152,10 +152,10 @@ void Applet::windowAdded( WId w_P ) else { //fallback // for windowindicator - if (!windowTitleDict[w_P] && w_P != qt_xrootwin()){ + if (!windowTitleDict[w_P] && w_P != tqt_xrootwin()){ KWin::WindowInfo tmpInfo = KWin::windowInfo( w_P, NET::WMName ); //generate title: - title = new QString(tmpInfo.name()); + title = new TQString(tmpInfo.name()); if (title->contains("K3b")){ // hack, weil herr trueg zwar ein erstklassiges brennprogramm schreiben, sich aber leider nicht an windowmanager konventionen halten kan... ;) *title = "K3b"; @@ -181,7 +181,7 @@ void Applet::windowAdded( WId w_P ) if( transient_for == None ) return; MenuEmbed* embed; - if( transient_for == qt_xrootwin()) + if( transient_for == tqt_xrootwin()) embed = new MenuEmbed( transient_for, true, this ); else { @@ -214,12 +214,12 @@ void Applet::windowAdded( WId w_P ) void Applet::activeWindowChanged( WId w_P ) { // kdDebug() << "active:" << w_P << endl; - QFont tmpFont; + TQFont tmpFont; for( WId window = w_P; window != None; window = tryTransientFor( window )) { - for( QValueList< MenuEmbed* >::ConstIterator it = menus.begin(); + for( TQValueList< MenuEmbed* >::ConstIterator it = menus.begin(); it != menus.end(); ++it ) { @@ -228,7 +228,7 @@ void Applet::activeWindowChanged( WId w_P ) tmpFont = (*it)->font(); tmpFont.setBold(true); windowIndicator->setFont(tmpFont); - QString *newTitle = windowTitleDict[w_P]; + TQString *newTitle = windowTitleDict[w_P]; newTitle ? windowIndicator->changeItem(0, *newTitle): windowIndicator->changeItem(0, "KDE"); @@ -254,7 +254,7 @@ void Applet::activeWindowChanged( WId w_P ) } if( try_desktop ) { - for( QValueList< MenuEmbed* >::ConstIterator it = menus.begin(); + for( TQValueList< MenuEmbed* >::ConstIterator it = menus.begin(); it != menus.end(); ++it ) { @@ -263,7 +263,7 @@ void Applet::activeWindowChanged( WId w_P ) tmpFont = (*it)->font(); tmpFont.setBold(true); windowIndicator->setFont(tmpFont); - QString *newTitle = windowTitleDict[w_P]; + TQString *newTitle = windowTitleDict[w_P]; newTitle ? windowIndicator->changeItem(0, *newTitle): windowIndicator->changeItem(0, "KDE"); @@ -277,7 +277,7 @@ void Applet::activeWindowChanged( WId w_P ) } } } - QString *newTitle = windowTitleDict[w_P]; + TQString *newTitle = windowTitleDict[w_P]; newTitle ? windowIndicator->changeItem(0, *newTitle): windowIndicator->changeItem(0, "KDE"); @@ -305,16 +305,16 @@ void Applet::activateMenu( MenuEmbed* embed_P ) moveMenu( NULL ); } -bool Applet::eventFilter( QObject* obj_P, QEvent* ev_P ) +bool Applet::eventFilter( TQObject* obj_P, TQEvent* ev_P ) { - if( ev_P->type() == QEvent::Resize && obj_P == active_menu ) + if( ev_P->type() == TQEvent::Resize && obj_P == active_menu ) moveMenu( NULL ); return false; } void Applet::growClicked() { - moveMenu( static_cast< const QWidget* >( sender())); + moveMenu( static_cast< const TQWidget* >( sender())); } void Applet::updateGrowIndicators() @@ -338,7 +338,7 @@ void Applet::updateGrowIndicators() grow_indicator_right.hide(); } -void Applet::moveMenu( const QWidget* indicator_P ) +void Applet::moveMenu( const TQWidget* indicator_P ) { if( active_menu == NULL ) { @@ -378,14 +378,14 @@ WId Applet::tryTransientFor( WId w_P ) if( info.state() & NET::Modal ) return None;*/ WId ret = KWin::transientFor( w_P ); - if( ret == qt_xrootwin()) + if( ret == tqt_xrootwin()) ret = None; return ret; } void Applet::menuLost( MenuEmbed* embed ) { - for( QValueList< MenuEmbed* >::Iterator it = menus.begin(); + for( TQValueList< MenuEmbed* >::Iterator it = menus.begin(); it != menus.end(); ++it ) { @@ -406,9 +406,9 @@ void Applet::menuLost( MenuEmbed* embed ) } } -void Applet::resizeEvent( QResizeEvent* ev ) +void Applet::resizeEvent( TQResizeEvent* ev ) { - for( QValueList< MenuEmbed* >::ConstIterator it = menus.begin(); + for( TQValueList< MenuEmbed* >::ConstIterator it = menus.begin(); it != menus.end(); ++it ) (*it)->setFixedSize( width() - windowIndicator->width()-1 ,height()); @@ -416,7 +416,7 @@ void Applet::resizeEvent( QResizeEvent* ev ) moveMenu( NULL ); } -void Applet::paletteChange(const QPalette & /* oldPalette */) +void Applet::paletteChange(const TQPalette & /* oldPalette */) { if( active_menu != NULL ) { @@ -428,7 +428,7 @@ void Applet::paletteChange(const QPalette & /* oldPalette */) void Applet::claimSelection() { assert( selection == NULL ); - selection = new KSelectionOwner( makeSelectionAtom(), DefaultScreen( qt_xdisplay())); + selection = new KSelectionOwner( makeSelectionAtom(), DefaultScreen( tqt_xdisplay())); // force taking the selection, but don't kill previous owner if( selection->claim( true, false )) { @@ -440,8 +440,8 @@ void Applet::claimSelection() connect( module, SIGNAL( windowRemoved( WId )), this, SLOT( windowRemoved( WId ))); connect( module, SIGNAL( activeWindowChanged( WId )), this, SLOT( activeWindowChanged( WId ))); - QValueList< WId > windows = module->windows(); - for( QValueList< WId >::ConstIterator it = windows.begin(); + TQValueList< WId > windows = module->windows(); + for( TQValueList< WId >::ConstIterator it = windows.begin(); it != windows.end(); ++it ) windowAdded( *it ); @@ -456,7 +456,7 @@ void Applet::lostSelection() if( selection == NULL ) return; // kdDebug() << "lost selection" << endl; - for( QValueList< MenuEmbed* >::ConstIterator it = menus.begin(); + for( TQValueList< MenuEmbed* >::ConstIterator it = menus.begin(); it != menus.end(); ++it ) delete (*it); // delete all MenuEmbed's = release all menus @@ -464,7 +464,7 @@ void Applet::lostSelection() active_menu = NULL; if( selection_watcher == NULL ) { - selection_watcher = new KSelectionWatcher( makeSelectionAtom(), DefaultScreen( qt_xdisplay())); + selection_watcher = new KSelectionWatcher( makeSelectionAtom(), DefaultScreen( tqt_xdisplay())); connect( selection_watcher, SIGNAL( lostOwner()), this, SLOT( claimSelection())); } delete module; @@ -481,9 +481,9 @@ void Applet::readSettings() desktop_menu = cfg.readBoolEntry( "ShowMenubar", false ); cfg.setGroup( "KDE" ); if( cfg.readBoolEntry( "macStyle", false ) || desktop_menu ) - QToolTip::remove( this ); + TQToolTip::remove( this ); else - QToolTip::add( this, i18n( + TQToolTip::add( this, i18n( "You do not appear to have enabled the standalone menubar; " "enable it in the Behavior control module for desktop." )); if( !isDisabled() && active_menu == NULL ) @@ -513,11 +513,11 @@ static void initAtoms() { char nm[ 100 ]; - sprintf( nm, "_KDE_TOPMENU_OWNER_S%d", DefaultScreen( qt_xdisplay())); + sprintf( nm, "_KDE_TOPMENU_OWNER_S%d", DefaultScreen( tqt_xdisplay())); char nm2[] = "_KDE_TOPMENU_MINSIZE"; char* names[ 2 ] = { nm, nm2 }; Atom atoms[ 2 ]; - XInternAtoms( qt_xdisplay(), names, 2, False, atoms ); + XInternAtoms( tqt_xdisplay(), names, 2, False, atoms ); selection_atom = atoms[ 0 ]; msg_type_atom = atoms[ 1 ]; } @@ -530,7 +530,7 @@ Atom Applet::makeSelectionAtom() } MenuEmbed::MenuEmbed( WId mainwindow_P, bool desktop_P, - QWidget* parent_P, const char* name_P ) + TQWidget* parent_P, const char* name_P ) : QXEmbed( parent_P, name_P ), main_window( mainwindow_P ), desktop( desktop_P ) @@ -552,7 +552,7 @@ bool MenuEmbed::x11Event( XEvent* ev_P ) && ev_P->xconfigurerequest.value_mask & ( CWWidth | CWHeight )) { XConfigureRequestEvent& ev = ev_P->xconfigurerequest; - QSize new_size = size(); + TQSize new_size = size(); if( ev.value_mask & CWWidth ) new_size.setWidth( ev.width ); if( ev.value_mask & CWHeight ) @@ -565,7 +565,7 @@ bool MenuEmbed::x11Event( XEvent* ev_P ) // int x, y; // unsigned int w, h, d, b; // Window root; -// XGetGeometry( qt_xdisplay(), embeddedWinId(), &root, &x, &y, &w, &h, &b, &d ); +// XGetGeometry( tqt_xdisplay(), embeddedWinId(), &root, &x, &y, &w, &h, &b, &d ); // kdDebug() << "RES3:" << width() << ":" << height() << ":" << w << ":" << h << endl; return true; } @@ -574,12 +574,12 @@ bool MenuEmbed::x11Event( XEvent* ev_P ) void MenuEmbed::sendSyntheticConfigureNotifyEvent() { - QPoint globalPos = mapToGlobal(QPoint(0,0)); + TQPoint globalPos = mapToGlobal(TQPoint(0,0)); if (embeddedWinId()) { XConfigureEvent c; memset(&c, 0, sizeof(c)); c.type = ConfigureNotify; - c.display = qt_xdisplay(); + c.display = tqt_xdisplay(); c.send_event = True; c.event = embeddedWinId(); c.window = winId(); @@ -590,7 +590,7 @@ void MenuEmbed::sendSyntheticConfigureNotifyEvent() c.border_width = 0; c.above = None; c.override_redirect = 0; - XSendEvent( qt_xdisplay(), c.event, TRUE, StructureNotifyMask, (XEvent*)&c ); + XSendEvent( tqt_xdisplay(), c.event, TRUE, StructureNotifyMask, (XEvent*)&c ); } } @@ -603,18 +603,18 @@ void MenuEmbed::setMinimumSize( int w, int h ) { // kdDebug() << "RES2:" << width() << ":" << height() << ":" << minimumWidth() << ":" << minimumHeight() << endl; XEvent ev; - ev.xclient.display = qt_xdisplay(); + ev.xclient.display = tqt_xdisplay(); ev.xclient.type = ClientMessage; ev.xclient.window = embeddedWinId(); assert( msg_type_atom != None ); ev.xclient.message_type = msg_type_atom; ev.xclient.format = 32; - ev.xclient.data.l[0] = qt_x_time; + ev.xclient.data.l[0] = tqt_x_time; ev.xclient.data.l[1] = minimumWidth(); ev.xclient.data.l[2] = minimumHeight(); ev.xclient.data.l[3] = 0; ev.xclient.data.l[4] = 0; - XSendEvent( qt_xdisplay(), embeddedWinId(), False, NoEventMask, &ev ); + XSendEvent( tqt_xdisplay(), embeddedWinId(), False, NoEventMask, &ev ); } } diff --git a/kickermenu-3.3/menuapplet.h b/kickermenu-3.3/menuapplet.h index 7825bd2..915a033 100644 --- a/kickermenu-3.3/menuapplet.h +++ b/kickermenu-3.3/menuapplet.h @@ -26,9 +26,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define _MENUAPPLET_H_ #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -50,15 +50,15 @@ class Applet : public KPanelApplet, public DCOPObject k_dcop: ASYNC configure(); public: - Applet( const QString& configFile, QWidget *parent ); + Applet( const TQString& configFile, TQWidget *parent ); virtual ~Applet(); virtual int widthForHeight( int height ) const; virtual int heightForWidth( int width ) const; - virtual bool eventFilter( QObject* obj, QEvent* ev ); + virtual bool eventFilter( TQObject* obj, TQEvent* ev ); void menuLost( MenuEmbed* embed ); protected: - virtual void resizeEvent( QResizeEvent* ); - virtual void paletteChange(const QPalette& ); + virtual void resizeEvent( TQResizeEvent* ); + virtual void paletteChange(const TQPalette& ); private slots: void windowAdded( WId w ); void activeWindowChanged( WId w ); @@ -72,12 +72,12 @@ class Applet : public KPanelApplet, public DCOPObject private: bool isDisabled() const; // does it own the manager selection? void updateGrowIndicators(); - void moveMenu( const QWidget* indicator ); + void moveMenu( const TQWidget* indicator ); WId tryTransientFor( WId w ); void activateMenu( MenuEmbed* embed ); static Atom makeSelectionAtom(); KWinModule* module; - QValueList< MenuEmbed* > menus; + TQValueList< MenuEmbed* > menus; MenuEmbed* active_menu; KArrowButton grow_indicator_left, grow_indicator_right; KSelectionOwner* selection; @@ -85,8 +85,8 @@ class Applet : public KPanelApplet, public DCOPObject bool desktop_menu; DCOPClient dcopclient; // to show current active window (not necessary equal to the menubar) - QMenuBar *windowIndicator; - QIntDictwindowTitleDict; + TQMenuBar *windowIndicator; + TQIntDictwindowTitleDict; KWindowListMenu* windowList; }; @@ -96,11 +96,11 @@ class MenuEmbed Q_OBJECT public: MenuEmbed( WId mainwindow, bool desktop, - QWidget* parent = NULL, const char* name = NULL ); + TQWidget* parent = NULL, const char* name = NULL ); WId mainWindow() const; bool isDesktopMenu() const; virtual void setMinimumSize( int w, int h ); - void setMinimumSize( const QSize& s ) { setMinimumSize( s.width(), s.height()); } + void setMinimumSize( const TQSize& s ) { setMinimumSize( s.width(), s.height()); } protected: virtual void windowChanged( WId w ); virtual bool x11Event( XEvent* ev ); diff --git a/kickermenu/menuapplet.cpp b/kickermenu/menuapplet.cpp index 97e35de..6ff5d75 100644 --- a/kickermenu/menuapplet.cpp +++ b/kickermenu/menuapplet.cpp @@ -24,13 +24,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define _MENUAPPLET_CPP_ -#include -#include -#include -#include -#include -#include -#include // avoid X11 #define's +#include +#include +#include +#include +#include +#include +#include // avoid X11 #define's #include #include #include @@ -49,9 +49,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* KMenuBar from KDE3.1 and older won't work very well with this applet. - This is because QMenuBar tries really hard to keep its preffered size, + This is because TQMenuBar tries really hard to keep its preffered size, se even if the X window for the menubar has the size enforced by this - applet, Qt thinks it has the size Qt wants. This results in parts + applet, TQt thinks it has the size TQt wants. This results in parts of the menubar not being repainted. Also, old KMenuBar always forced with to be the width of the screen, so even if the menubar has only few entries, this applet will still indicate the menubar doesn't @@ -61,11 +61,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -extern Time qt_x_time; +extern Time tqt_x_time; extern "C" { - KDE_EXPORT KPanelApplet* init( QWidget* parent_P, const QString& configFile_P ) + KDE_EXPORT KPanelApplet* init( TQWidget* parent_P, const TQString& configFile_P ) { KGlobal::locale()->insertCatalogue("kmenuapplet"); return new KickerMenuApplet::Applet( configFile_P, parent_P ); @@ -85,25 +85,25 @@ const long SUPPORTED_WINDOW_TYPES = NET::NormalMask | NET::DesktopMask | NET::Do | NET::ToolbarMask | NET::MenuMask | NET::DialogMask | NET::OverrideMask | NET::TopMenuMask | NET::UtilityMask | NET::SplashMask; -Applet::Applet( const QString& configFile_P, QWidget* parent_P ) : KPanelApplet( configFile_P, Normal, 0, parent_P, "menuapplet" ), DCOPObject( "menuapplet" ), module( NULL ), active_menu( NULL ), selection( NULL ), selection_watcher( NULL ), desktop_menu( false ), topEdgeOffset( 0 ) +Applet::Applet( const TQString& configFile_P, TQWidget* parent_P ) : KPanelApplet( configFile_P, Normal, 0, parent_P, "menuapplet" ), DCOPObject( "menuapplet" ), module( NULL ), active_menu( NULL ), selection( NULL ), selection_watcher( NULL ), desktop_menu( false ), topEdgeOffset( 0 ) { - KConfig config(QDir::homeDirPath() + "/.qt/baghirarc"); + KConfig config(TQDir::homeDirPath() + "/.qt/baghirarc"); config.setGroup("Menubar"); - _maxWidth = config.readNumEntry("Width", QDesktopWidget().availableGeometry().width()); - _menuMover = new QLabel("<<|>>", this ); + _maxWidth = config.readNumEntry("Width", TQDesktopWidget().availableGeometry().width()); + _menuMover = new TQLabel("<<|>>", this ); _menuMover->adjustSize(); _menuMover->setFixedSize(_menuMover->size()); _menuMover->move(_maxWidth - _menuMover->width(),0); _menuMover->hide(); _menuMover->installEventFilter(this); - windowIndicator = new QMenuBar(this); + windowIndicator = new TQMenuBar(this); windowIndicator->installEventFilter(this); - windowIndicator->setBackgroundOrigin(QWidget::WidgetOrigin); + windowIndicator->setBackgroundOrigin(TQWidget::WidgetOrigin); windowIndicator->setLineWidth(0); windowList = new KWindowListMenu(windowIndicator); connect(windowList, SIGNAL(aboutToShow()), this, SLOT(initPopup())); windowIndicator->insertItem( "KDE", windowList, 0); - QFont tmpFont = KGlobalSettings::menuFont(); + TQFont tmpFont = KGlobalSettings::menuFont(); windowIndicator->setFont(tmpFont); // windowIndicator->adjustSize(); // int tmpHeight = windowIndicator->height(); @@ -136,7 +136,7 @@ void Applet::fontChanged() { if (!windowIndicator) return; - QFont tmpFont = KGlobalSettings::menuFont(); + TQFont tmpFont = KGlobalSettings::menuFont(); // windowIndicator->setFont(tmpFont); // windowIndicator->adjustSize(); // int tmpHeight = windowIndicator->height(); @@ -167,32 +167,32 @@ void Applet::moveMenu() if (!wannaMove) return; active_menu->move( active_menu->x() + menuDX, active_menu->y()); - QTimer::singleShot(100, this, SLOT(moveMenu())); + TQTimer::singleShot(100, this, SLOT(moveMenu())); } -bool Applet::eventFilter(QObject *o, QEvent *ev) +bool Applet::eventFilter(TQObject *o, TQEvent *ev) { if (o == _menuMover) { - if (ev->type() == QEvent::MouseButtonPress && active_menu) + if (ev->type() == TQEvent::MouseButtonPress && active_menu) { - if (((QMouseEvent*)ev)->x() < _menuMover->width()/2) + if (((TQMouseEvent*)ev)->x() < _menuMover->width()/2) { menuDX = -5; wannaMove = true; active_menu->move( active_menu->x() - 5, active_menu->y()); - QTimer::singleShot(200, this, SLOT(moveMenu())); + TQTimer::singleShot(200, this, SLOT(moveMenu())); } else { menuDX = 5; wannaMove = true; active_menu->move( active_menu->x() + 5, active_menu->y()); - QTimer::singleShot(200, this, SLOT(moveMenu())); + TQTimer::singleShot(200, this, SLOT(moveMenu())); } return false; } - if (ev->type() == QEvent::MouseButtonRelease) + if (ev->type() == TQEvent::MouseButtonRelease) { wannaMove = false; return false; @@ -201,8 +201,8 @@ bool Applet::eventFilter(QObject *o, QEvent *ev) } #if 0 // to fake menu consistency - doesn't work to good so far - if (o == windowIndicator && ev->type() == QEvent::MouseMove && - (((QMouseEvent*)ev)->x() == windowIndicator->width()-1) && + if (o == windowIndicator && ev->type() == TQEvent::MouseMove && + (((TQMouseEvent*)ev)->x() == windowIndicator->width()-1) && windowIndicator->isItemActive( 0 )) // moving out to the right { @@ -212,25 +212,25 @@ bool Applet::eventFilter(QObject *o, QEvent *ev) } else // #endif - if (ev->type() == QEvent::PaletteChange) + if (ev->type() == TQEvent::PaletteChange) { // this is necessary as the background origin is set from somwhere outside - it's no kmenubar - so we set it back - QWidget *w = (QWidget*)o; + TQWidget *w = (TQWidget*)o; // #if 0 if (w == windowIndicator) // #endif { - if (w->backgroundOrigin() != QWidget::WidgetOrigin) + if (w->backgroundOrigin() != TQWidget::WidgetOrigin) { w->blockSignals(TRUE); // to avoid loops - w->setBackgroundOrigin(QWidget::WidgetOrigin); + w->setBackgroundOrigin(TQWidget::WidgetOrigin); w->blockSignals(FALSE); } } // #if 0 - else if (w->backgroundOrigin() != QWidget::ParentOrigin) + else if (w->backgroundOrigin() != TQWidget::ParentOrigin) { w->blockSignals(TRUE); - w->setBackgroundOrigin(QWidget::ParentOrigin); + w->setBackgroundOrigin(TQWidget::ParentOrigin); w->blockSignals(FALSE); } return FALSE; @@ -241,7 +241,7 @@ bool Applet::eventFilter(QObject *o, QEvent *ev) void Applet::windowAdded( WId w_P ) { - NETWinInfo info( qt_xdisplay(), w_P, qt_xrootwin(), NET::WMWindowType ); + NETWinInfo info( tqt_xdisplay(), w_P, tqt_xrootwin(), NET::WMWindowType ); Window transient_for = KWin::transientFor( w_P ); if( info.windowType( SUPPORTED_WINDOW_TYPES ) != NET::TopMenu ) @@ -251,7 +251,7 @@ void Applet::windowAdded( WId w_P ) return; MenuEmbed* embed; - if( transient_for == qt_xrootwin()) + if( transient_for == tqt_xrootwin()) { embed = new MenuEmbed( transient_for, true, this ); } @@ -260,11 +260,11 @@ void Applet::windowAdded( WId w_P ) KWin::WindowInfo info2 = KWin::windowInfo( transient_for, NET::WMWindowType | NET::WMName ); embed = new MenuEmbed( transient_for, info2.windowType( SUPPORTED_WINDOW_TYPES ) == NET::Desktop, this ); // ========= NAMING =================== - QString title(info2.name()); + TQString title(info2.name()); XClassHint classHint; - if (XGetClassHint( qt_xdisplay(), w_P, &classHint ) ) + if (XGetClassHint( tqt_xdisplay(), w_P, &classHint ) ) { // much better way to get a nice name! - QString name( classHint.res_class ); + TQString name( classHint.res_class ); if (name.contains("SDL_App")) goto titlejump; // mainly for scummvm apps - jumps to netwm caption parsing XFree( classHint.res_name ); @@ -333,7 +333,7 @@ void Applet::activeWindowChanged( WId w_P ) window != None; window = tryTransientFor( window )) { - for( QValueList< MenuEmbed* >::ConstIterator it = menus.begin(); + for( TQValueList< MenuEmbed* >::ConstIterator it = menus.begin(); it != menus.end(); ++it ) { @@ -372,7 +372,7 @@ void Applet::activeWindowChanged( WId w_P ) if( try_desktop ) #endif { - for( QValueList< MenuEmbed* >::ConstIterator it = menus.begin(); + for( TQValueList< MenuEmbed* >::ConstIterator it = menus.begin(); it != menus.end(); ++it ) { @@ -440,14 +440,14 @@ WId Applet::tryTransientFor( WId w_P ) if( info.state() & NET::Modal ) return None;*/ WId ret = KWin::transientFor( w_P ); - if( ret == qt_xrootwin()) + if( ret == tqt_xrootwin()) ret = None; return ret; } void Applet::menuLost( MenuEmbed* embed ) { - for( QValueList< MenuEmbed* >::Iterator it = menus.begin(); it != menus.end(); ++it ) + for( TQValueList< MenuEmbed* >::Iterator it = menus.begin(); it != menus.end(); ++it ) { if( *it == embed ) { @@ -471,16 +471,16 @@ void Applet::positionChange( Position ) } // Detect mouse movement at the top screen edge also if the menubar -// has a popup open - in such case, Qt has a grab, and this avoids +// has a popup open - in such case, TQt has a grab, and this avoids // Kicker's FittsLawFrame. Therefore move the menubar a bit higher, // so that it actually is positioned exactly at the screen edge // (i.e. at a negative y coordinate within this applet, due to // Kicker's frame). void Applet::updateTopEdgeOffset() { - QPoint p = topLevelWidget()->mapToGlobal( QPoint( 0, 0 )); + TQPoint p = topLevelWidget()->mapToGlobal( TQPoint( 0, 0 )); if( p.y() <= 2 ) // 2 = work also when running in appletproxy - topEdgeOffset = mapToGlobal( QPoint( 0, 0 )).y() - p.y(); + topEdgeOffset = mapToGlobal( TQPoint( 0, 0 )).y() - p.y(); else topEdgeOffset = 0; if( active_menu != NULL ) @@ -492,7 +492,7 @@ void Applet::updateTopEdgeOffset() // } } -void Applet::paletteChange(const QPalette & /* oldPalette */) +void Applet::paletteChange(const TQPalette & /* oldPalette */) { if( active_menu != NULL ) { @@ -504,7 +504,7 @@ void Applet::paletteChange(const QPalette & /* oldPalette */) void Applet::claimSelection() { assert( selection == NULL ); - selection = new KSelectionOwner( makeSelectionAtom(), DefaultScreen( qt_xdisplay())); + selection = new KSelectionOwner( makeSelectionAtom(), DefaultScreen( tqt_xdisplay())); // force taking the selection, but don't kill previous owner if( selection->claim( true, false )) { @@ -514,8 +514,8 @@ void Applet::claimSelection() module = new KWinModule; connect( module, SIGNAL( windowAdded( WId )), this, SLOT( windowAdded( WId ))); connect( module, SIGNAL( activeWindowChanged( WId )), this, SLOT( activeWindowChanged( WId ))); - QValueList< WId > windows = module->windows(); - for( QValueList< WId >::ConstIterator it = windows.begin(); it != windows.end(); ++it ) + TQValueList< WId > windows = module->windows(); + for( TQValueList< WId >::ConstIterator it = windows.begin(); it != windows.end(); ++it ) windowAdded( *it ); activeWindowChanged( module->activeWindow()); } @@ -528,7 +528,7 @@ void Applet::lostSelection() if( selection == NULL ) return; // kdDebug() << "lost selection" << endl; - for( QValueList< MenuEmbed* >::ConstIterator it = menus.begin(); + for( TQValueList< MenuEmbed* >::ConstIterator it = menus.begin(); it != menus.end(); ++it ) delete (*it); // delete all MenuEmbed's = release all menus @@ -536,7 +536,7 @@ void Applet::lostSelection() active_menu = NULL; if( selection_watcher == NULL ) { - selection_watcher = new KSelectionWatcher( makeSelectionAtom(), DefaultScreen( qt_xdisplay())); + selection_watcher = new KSelectionWatcher( makeSelectionAtom(), DefaultScreen( tqt_xdisplay())); connect( selection_watcher, SIGNAL( lostOwner()), this, SLOT( claimSelection())); } delete module; @@ -553,9 +553,9 @@ void Applet::readSettings() desktop_menu = cfg.readBoolEntry( "ShowMenubar", false ); cfg.setGroup( "KDE" ); if( cfg.readBoolEntry( "macStyle", false ) || desktop_menu ) - QToolTip::remove( this ); + TQToolTip::remove( this ); else - QToolTip::add( this, i18n( + TQToolTip::add( this, i18n( "You do not appear to have enabled the standalone menubar; " "enable it in the Behavior control module for desktop." )); if( !isDisabled() && active_menu == NULL ) @@ -591,11 +591,11 @@ static void initAtoms() { char nm[ 100 ]; - sprintf( nm, "_KDE_TOPMENU_OWNER_S%d", DefaultScreen( qt_xdisplay())); + sprintf( nm, "_KDE_TOPMENU_OWNER_S%d", DefaultScreen( tqt_xdisplay())); char nm2[] = "_KDE_TOPMENU_MINSIZE"; char* names[ 2 ] = { nm, nm2 }; Atom atoms[ 2 ]; - XInternAtoms( qt_xdisplay(), names, 2, False, atoms ); + XInternAtoms( tqt_xdisplay(), names, 2, False, atoms ); selection_atom = atoms[ 0 ]; msg_type_atom = atoms[ 1 ]; } @@ -608,7 +608,7 @@ Atom Applet::makeSelectionAtom() } MenuEmbed::MenuEmbed( WId mainwindow_P, bool desktop_P, - QWidget* parent_P, const char* name_P ) + TQWidget* parent_P, const char* name_P ) : QXEmbed( parent_P, name_P ), main_window( mainwindow_P ), desktop( desktop_P ) @@ -629,7 +629,7 @@ bool MenuEmbed::x11Event( XEvent* ev_P ) && ev_P->xconfigurerequest.value_mask & ( CWWidth | CWHeight )) { XConfigureRequestEvent& ev = ev_P->xconfigurerequest; - QSize new_size = size(); + TQSize new_size = size(); if( ev.value_mask & CWWidth ) new_size.setWidth( ev.width ); if( ev.value_mask & CWHeight ) @@ -646,7 +646,7 @@ bool MenuEmbed::x11Event( XEvent* ev_P ) // int x, y; // unsigned int w, h, d, b; // Window root; -// XGetGeometry( qt_xdisplay(), embeddedWinId(), &root, &x, &y, &w, &h, &b, &d ); +// XGetGeometry( tqt_xdisplay(), embeddedWinId(), &root, &x, &y, &w, &h, &b, &d ); // kdDebug() << "RES3:" << width() << ":" << height() << ":" << w << ":" << h << endl; return true; } @@ -655,12 +655,12 @@ bool MenuEmbed::x11Event( XEvent* ev_P ) void MenuEmbed::sendSyntheticConfigureNotifyEvent() { - QPoint globalPos = mapToGlobal(QPoint(0,0)); + TQPoint globalPos = mapToGlobal(TQPoint(0,0)); if (embeddedWinId()) { XConfigureEvent c; memset(&c, 0, sizeof(c)); c.type = ConfigureNotify; - c.display = qt_xdisplay(); + c.display = tqt_xdisplay(); c.send_event = True; c.event = embeddedWinId(); c.window = winId(); @@ -671,7 +671,7 @@ void MenuEmbed::sendSyntheticConfigureNotifyEvent() c.border_width = 0; c.above = None; c.override_redirect = 0; - XSendEvent( qt_xdisplay(), c.event, TRUE, StructureNotifyMask, (XEvent*)&c ); + XSendEvent( tqt_xdisplay(), c.event, TRUE, StructureNotifyMask, (XEvent*)&c ); } } @@ -684,18 +684,18 @@ void MenuEmbed::setMinimumSize( int w, int h ) { // kdDebug() << "RES2:" << width() << ":" << height() << ":" << minimumWidth() << ":" << minimumHeight() << endl; XEvent ev; - ev.xclient.display = qt_xdisplay(); + ev.xclient.display = tqt_xdisplay(); ev.xclient.type = ClientMessage; ev.xclient.window = embeddedWinId(); assert( msg_type_atom != None ); ev.xclient.message_type = msg_type_atom; ev.xclient.format = 32; - ev.xclient.data.l[0] = qt_x_time; + ev.xclient.data.l[0] = tqt_x_time; ev.xclient.data.l[1] = minimumWidth(); ev.xclient.data.l[2] = minimumHeight(); ev.xclient.data.l[3] = 0; ev.xclient.data.l[4] = 0; - XSendEvent( qt_xdisplay(), embeddedWinId(), False, NoEventMask, &ev ); + XSendEvent( tqt_xdisplay(), embeddedWinId(), False, NoEventMask, &ev ); } } diff --git a/kickermenu/menuapplet.h b/kickermenu/menuapplet.h index f353869..facd256 100644 --- a/kickermenu/menuapplet.h +++ b/kickermenu/menuapplet.h @@ -26,8 +26,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define _MENUAPPLET_H_ #include -#include -#include +#include +#include #include #include #include @@ -38,8 +38,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -class QHBoxLayout; -class QLabel; +class TQHBoxLayout; +class TQLabel; namespace KickerMenuApplet { @@ -55,17 +55,17 @@ k_dcop: virtual void showWindowList(); public: friend class MenuEmbed; - Applet( const QString& configFile, QWidget *parent ); + Applet( const TQString& configFile, TQWidget *parent ); virtual ~Applet(); virtual int widthForHeight( int height ) const; virtual int heightForWidth( int width ) const; void menuLost( MenuEmbed* embed ); void updateMenuGeometry( MenuEmbed* embed ); protected: - virtual void paletteChange(const QPalette& ); + virtual void paletteChange(const TQPalette& ); virtual void positionChange( Position p ); - bool eventFilter(QObject *, QEvent *ev); - QMenuBar *windowIndicator; + bool eventFilter(TQObject *, TQEvent *ev); + TQMenuBar *windowIndicator; private slots: void moveMenu(); void windowAdded( WId w ); @@ -83,7 +83,7 @@ private: static Atom makeSelectionAtom(); void updateTopEdgeOffset(); KWinModule* module; - QValueList< MenuEmbed* > menus; + TQValueList< MenuEmbed* > menus; MenuEmbed* active_menu; KSelectionOwner* selection; KSelectionWatcher* selection_watcher; @@ -91,8 +91,8 @@ private: DCOPClient dcopclient; int topEdgeOffset; KWindowListMenu* windowList; - QHBoxLayout *layout; - QLabel *_menuMover; + TQHBoxLayout *layout; + TQLabel *_menuMover; bool wannaMove; int menuDX; }; @@ -101,12 +101,12 @@ class MenuEmbed : public QXEmbed { Q_OBJECT public: - MenuEmbed( WId mainwindow, bool desktop, QWidget* parent = NULL, const char* name = NULL ); + MenuEmbed( WId mainwindow, bool desktop, TQWidget* parent = NULL, const char* name = NULL ); WId mainWindow() const; bool isDesktopMenu() const; virtual void setMinimumSize( int w, int h ); - void setMinimumSize( const QSize& s ) { setMinimumSize( s.width(), s.height()); } - QString title; + void setMinimumSize( const TQSize& s ) { setMinimumSize( s.width(), s.height()); } + TQString title; protected: virtual void windowChanged( WId w ); virtual bool x11Event( XEvent* ev ); diff --git a/sessionapplet/dmctl.cpp b/sessionapplet/dmctl.cpp index 52ab3eb..eb7fc7c 100644 --- a/sessionapplet/dmctl.cpp +++ b/sessionapplet/dmctl.cpp @@ -68,7 +68,7 @@ DM::DM() : fd( -1 ) break; case OldKDM: { - QString tf( ctl ); + TQString tf( ctl ); tf.truncate( tf.find( ',' ) ); fd = ::open( tf.latin1(), O_WRONLY ); } @@ -85,7 +85,7 @@ DM::~DM() bool DM::exec( const char *cmd ) { - QCString buf; + TQCString buf; return exec( cmd, buf ); } @@ -103,7 +103,7 @@ DM::exec( const char *cmd ) * from KDM. */ bool -DM::exec( const char *cmd, QCString &buf ) +DM::exec( const char *cmd, TQCString &buf ) { bool ret = false; int tl; @@ -151,7 +151,7 @@ DM::canShutdown() if (DMType == OldKDM) return strstr( ctl, ",maysd" ) != 0; - QCString re; + TQCString re; return exec( "caps\n", re ) && re.find( "\tshutdown" ) >= 0; } @@ -159,13 +159,13 @@ DM::canShutdown() void DM::shutdown( KApplication::ShutdownType shutdownType, KApplication::ShutdownMode shutdownMode, - const QString &bootOption ) + const TQString &bootOption ) { if (!bootOption.isEmpty() && DMType != NewKDM) return; if (shutdownType != KApplication::ShutdownTypeNone) { - QCString cmd( "shutdown\t" ); + TQCString cmd( "shutdown\t" ); cmd.append( shutdownType == KApplication::ShutdownTypeReboot ? "reboot\t" : "halt\t" ); if (!bootOption.isNull()) @@ -181,16 +181,16 @@ DM::shutdown( KApplication::ShutdownType shutdownType, } bool -DM::bootOptions( QStringList &opts, int &defopt, int ¤t ) +DM::bootOptions( TQStringList &opts, int &defopt, int ¤t ) { if (DMType != NewKDM) return false; - QCString re; + TQCString re; if (!exec( "listbootoptions\n", re )) return false; - opts = QStringList::split( '\t', QString::fromLocal8Bit( re.data() ) ); + opts = TQStringList::split( '\t', TQString::fromLocal8Bit( re.data() ) ); if (opts.size() < 4) return false; @@ -202,8 +202,8 @@ DM::bootOptions( QStringList &opts, int &defopt, int ¤t ) if (!ok) return false; - opts = QStringList::split( ' ', opts[1] ); - for (QStringList::Iterator it = opts.begin(); it != opts.end(); ++it) + opts = TQStringList::split( ' ', opts[1] ); + for (TQStringList::Iterator it = opts.begin(); it != opts.end(); ++it) (*it).replace( "\\s", " " ); return true; @@ -221,7 +221,7 @@ DM::isSwitchable() if (DMType == OldKDM) return dpy[0] == ':'; - QCString re; + TQCString re; return exec( "caps\n", re ) && re.find( "\tlocal" ) >= 0; } @@ -232,7 +232,7 @@ DM::numReserve() if (DMType == OldKDM) return strstr( ctl, ",rsvd" ) ? 1 : -1; - QCString re; + TQCString re; int p; if (!(exec( "caps\n", re ) && (p = re.find( "\treserve " )) >= 0)) @@ -252,13 +252,13 @@ DM::localSessions( SessList &list ) if (DMType == OldKDM) return false; - QCString re; + TQCString re; if (!exec( "list\talllocal\n", re )) return false; - QStringList sess = QStringList::split( QChar('\t'), re.data() + 3 ); - for (QStringList::ConstIterator it = sess.begin(); it != sess.end(); ++it) { - QStringList ts = QStringList::split( QChar(','), *it, true ); + TQStringList sess = TQStringList::split( TQChar('\t'), re.data() + 3 ); + for (TQStringList::ConstIterator it = sess.begin(); it != sess.end(); ++it) { + TQStringList ts = TQStringList::split( TQChar(','), *it, true ); SessEnt se; se.display = ts[0]; if (ts[1][0] == '@') @@ -275,11 +275,11 @@ DM::localSessions( SessList &list ) } void -DM::sess2Str2( const SessEnt &se, QString &user, QString &loc ) +DM::sess2Str2( const SessEnt &se, TQString &user, TQString &loc ) { if (se.tty) { user = i18n("user: ...", "%1: TTY login").arg( se.user ); - loc = se.vt ? QString("vt%1").arg( se.vt ) : se.display ; + loc = se.vt ? TQString("vt%1").arg( se.vt ) : se.display ; } else { user = se.user.isEmpty() ? @@ -292,15 +292,15 @@ DM::sess2Str2( const SessEnt &se, QString &user, QString &loc ) .arg( se.user ).arg( se.session ); loc = se.vt ? - QString("%1, vt%2").arg( se.display ).arg( se.vt ) : + TQString("%1, vt%2").arg( se.display ).arg( se.vt ) : se.display; } } -QString +TQString DM::sess2Str( const SessEnt &se ) { - QString user, loc; + TQString user, loc; sess2Str2( se, user, loc ); return i18n("session (location)", "%1 (%2)").arg( user ).arg( loc ); @@ -309,7 +309,7 @@ DM::sess2Str( const SessEnt &se ) bool DM::switchVT( int vt ) { - return exec( QString("activate\tvt%1\n").arg(vt).latin1() ); + return exec( TQString("activate\tvt%1\n").arg(vt).latin1() ); } void diff --git a/sessionapplet/dmctl.h b/sessionapplet/dmctl.h index bc58fcb..a8328d2 100644 --- a/sessionapplet/dmctl.h +++ b/sessionapplet/dmctl.h @@ -24,12 +24,12 @@ #include struct SessEnt { - QString display, from, user, session; + TQString display, from, user, session; int vt; bool self:1, tty:1; }; -typedef QValueList SessList; +typedef TQValueList SessList; class DM { @@ -42,7 +42,7 @@ public: bool canShutdown(); void shutdown( KApplication::ShutdownType shutdownType, KApplication::ShutdownMode shutdownMode, - const QString &bootOption = QString::null ); + const TQString &bootOption = TQString::null ); void setLock( bool on ); @@ -53,15 +53,15 @@ public: bool switchVT( int vt ); void lockSwitchVT( int vt ); - bool bootOptions( QStringList &opts, int &dflt, int &curr ); + bool bootOptions( TQStringList &opts, int &dflt, int &curr ); - static QString sess2Str( const SessEnt &se ); - static void sess2Str2( const SessEnt &se, QString &user, QString &loc ); + static TQString sess2Str( const SessEnt &se ); + static void sess2Str2( const SessEnt &se, TQString &user, TQString &loc ); private: int fd; - bool exec( const char *cmd, QCString &ret ); + bool exec( const char *cmd, TQCString &ret ); bool exec( const char *cmd ); #else // Q_WS_X11 @@ -72,7 +72,7 @@ public: bool canShutdown() { return false; } void shutdown( KApplication::ShutdownType shutdownType, KApplication::ShutdownMode shutdownMode, - const QString &bootOption = QString::null ) {} + const TQString &bootOption = TQString::null ) {} void setLock( bool ) {} @@ -82,7 +82,7 @@ public: bool localSessions( SessList &list ) { return false; } void switchVT( int vt ) {} - bool bootOptions( QStringList &opts, int &dflt, int &curr ); + bool bootOptions( TQStringList &opts, int &dflt, int &curr ); #endif // Q_WS_X11 diff --git a/sessionapplet/usermanager.cpp b/sessionapplet/usermanager.cpp index faf491f..107d9b8 100644 --- a/sessionapplet/usermanager.cpp +++ b/sessionapplet/usermanager.cpp @@ -20,9 +20,9 @@ #include #include -// #include -#include -#include +// #include +#include +#include #include #include #include @@ -40,7 +40,7 @@ #define _ICONSET_(i) KGlobal::iconLoader()->loadIconSet(i, KIcon::Small, 0, false) -UserManager::UserManager(const QString& configFile, Type type, int actions, QWidget *parent, const char *name) +UserManager::UserManager(const TQString& configFile, Type type, int actions, TQWidget *parent, const char *name) : KPanelApplet(configFile, type, actions, parent, name) { @@ -53,24 +53,24 @@ UserManager::UserManager(const QString& configFile, Type type, int actions, QWid menu = new KMenuBar(this); menu->setTopLevelMenu(false); - menu->setFrameShape ( QFrame::NoFrame ); + menu->setFrameShape ( TQFrame::NoFrame ); menu->setMargin ( 0 ); menu->setLineWidth ( 0 ); // sessions - sessionPopup = new QPopupMenu(this); + sessionPopup = new TQPopupMenu(this); menu->insertItem ( getenv("USER"), sessionPopup, 0); connect( sessionPopup, SIGNAL(aboutToShow()), SLOT(slotPopulateSessions()) ); connect( sessionPopup, SIGNAL(activated(int)), SLOT(slotSessionActivated(int)) ); // languages - langPopup = new QPopupMenu(this); + langPopup = new TQPopupMenu(this); KConfigBase *config = KGlobal::config(); config->setGroup("Locale"); langList = config->readListEntry ("Language", ':'); -// QString flag( locate( "locale", QString::fromLatin1( "l10n/%1/flag.png" ).arg(langList[0]) ) ); -// langLabel = new QLabel(this); +// TQString flag( locate( "locale", TQString::fromLatin1( "l10n/%1/flag.png" ).arg(langList[0]) ) ); +// langLabel = new TQLabel(this); // langLabel->setPixmap(_ICONSET_(flag).pixmap()); menu->insertItem ( '[' + langList[0].section('_',0,0) + ']', langPopup, 1 ); @@ -83,7 +83,7 @@ UserManager::UserManager(const QString& configFile, Type type, int actions, QWid setFixedWidth(menu->width()+5); mainView = menu; - menu->move(menu->mapToParent(QPoint(0,0)).x(),0); + menu->move(menu->mapToParent(TQPoint(0,0)).x(),0); menu->show(); } @@ -108,7 +108,7 @@ void UserManager::about() void UserManager::lock() { - QCString appname( "kdesktop" ); + TQCString appname( "kdesktop" ); // if ( kicker_screen_number ) // appname.sprintf("kdesktop-screen-%d", kicker_screen_number); kapp->dcopClient()->send(appname, "KScreensaverIface", "lock()", ""); @@ -127,18 +127,18 @@ void UserManager::slotPopulateLanguages() config->setGroup("Locale"); langList = config->readListEntry ("Language", ':'); int i = 0; - for ( QStringList::ConstIterator it = langList.begin(); + for ( TQStringList::ConstIterator it = langList.begin(); it != langList.end(); ++it ) { - KConfig entry(locate( "locale", QString::fromLatin1( "%1/entry.desktop" ).arg(*it) )); + KConfig entry(locate( "locale", TQString::fromLatin1( "%1/entry.desktop" ).arg(*it) )); entry.setGroup("KCM Locale"); - QString name = entry.readEntry("Name", i18n("without name")); + TQString name = entry.readEntry("Name", i18n("without name")); - QString flag( locate( "locale", QString::fromLatin1( "%1/flag.png" ).arg(*it) ) ); + TQString flag( locate( "locale", TQString::fromLatin1( "%1/flag.png" ).arg(*it) ) ); langPopup->insertItem( _ICONSET_(flag), name, i ); i++; } -// langPopup->popup(langLabel->mapToGlobal(QPoint(0,height()))); +// langPopup->popup(langLabel->mapToGlobal(TQPoint(0,height()))); } void UserManager::slotLanguageActivated( int i ) @@ -149,7 +149,7 @@ void UserManager::slotLanguageActivated( int i ) // langLabel->setPixmap(*langPopup->pixmap(i)); KConfig *config = new KConfig("kdeglobals"); config->setGroup("Locale"); - QString tmp = langList[i]; + TQString tmp = langList[i]; langList.remove(langList.at(i)); langList.prepend(tmp); config->writeEntry ("Language", langList, ':'); @@ -265,7 +265,7 @@ void UserManager::doNewSession( bool lock_ ) void UserManager::saveSession() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send( "ksmserver", "default", "saveCurrentSession()", data ); } @@ -273,7 +273,7 @@ void UserManager::saveSession() extern "C" { - KPanelApplet* init( QWidget *parent, const QString& configFile) + KPanelApplet* init( TQWidget *parent, const TQString& configFile) { KGlobal::locale()->insertCatalogue("usermanager"); return new UserManager(configFile, KPanelApplet::Normal, KPanelApplet::About, parent, "usermanager"); diff --git a/sessionapplet/usermanager.h b/sessionapplet/usermanager.h index 87f8864..80357ec 100644 --- a/sessionapplet/usermanager.h +++ b/sessionapplet/usermanager.h @@ -27,22 +27,22 @@ #endif #include -#include -#include -#include +#include +#include +#include #include class KMenuBar; -class QPopunMenu; -// class QLabel; +class TQPopunMenu; +// class TQLabel; class UserManager : public KPanelApplet { Q_OBJECT public: - UserManager(const QString& configFile, Type t = Normal, int actions = 0, - QWidget *parent = 0, const char *name = 0); + UserManager(const TQString& configFile, Type t = Normal, int actions = 0, + TQWidget *parent = 0, const char *name = 0); /** destructor */ ~UserManager(); @@ -64,15 +64,15 @@ protected: private: KConfig *ksConfig; - QWidget *mainView; + TQWidget *mainView; KMenuBar *menu; - QPopupMenu *sessionPopup; - QPopupMenu *langPopup; - QStringList langList; - QIconSet exitIcon; - QIconSet lockIcon; - QIconSet fileSaveIcon; -// QLabel *langLabel; + TQPopupMenu *sessionPopup; + TQPopupMenu *langPopup; + TQStringList langList; + TQIconSet exitIcon; + TQIconSet lockIcon; + TQIconSet fileSaveIcon; +// TQLabel *langLabel; }; #endif diff --git a/sidebar/baghirasidebar.cpp b/sidebar/baghirasidebar.cpp index 0969bad..e24ebdf 100644 --- a/sidebar/baghirasidebar.cpp +++ b/sidebar/baghirasidebar.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include #include #include "dndlistbox.h" @@ -9,20 +9,20 @@ #include "baghirasidebar.h" #include "baghirasidebar.moc" -baghiraSidebar::baghiraSidebar(KInstance *inst,QObject *parent,QWidget *widgetParent, QString &desktopName, const char* name): +baghiraSidebar::baghiraSidebar(KInstance *inst,TQObject *parent,TQWidget *widgetParent, TQString &desktopName, const char* name): KonqSidebarPlugin(inst,parent,widgetParent,desktopName,name) { scrollView = new LinkView(widgetParent); - scrollView->setHScrollBarMode(QScrollView::AlwaysOff); - connect (scrollView->Hardware(), SIGNAL(clicked(QListBoxItem *)), this, SLOT(callURL(QListBoxItem *))); - connect (scrollView->Locations(), SIGNAL(clicked(QListBoxItem *)), this, SLOT(callURL(QListBoxItem *))); + scrollView->setHScrollBarMode(TQScrollView::AlwaysOff); + connect (scrollView->Hardware(), SIGNAL(clicked(TQListBoxItem *)), this, SLOT(callURL(TQListBoxItem *))); + connect (scrollView->Locations(), SIGNAL(clicked(TQListBoxItem *)), this, SLOT(callURL(TQListBoxItem *))); } baghiraSidebar::~baghiraSidebar() { } -void baghiraSidebar::callURL(QListBoxItem *item) +void baghiraSidebar::callURL(TQListBoxItem *item) { emit openURLRequest(KURL(((ListBoxLink*)(item))->URL()), KParts::URLArgs(true,0,0)); } @@ -46,7 +46,7 @@ void baghiraSidebar::handleURL(const KURL &url) } extern "C" { - KDE_EXPORT bool add_konqsidebar_baghirasidebar(QString* fn, QString* param, QMap *map) { + KDE_EXPORT bool add_konqsidebar_baghirasidebar(TQString* fn, TQString* param, TQMap *map) { Q_UNUSED(param); map->insert("Type", "Link"); @@ -61,7 +61,7 @@ extern "C" { extern "C" { - void* create_konqsidebar_baghirasidebar(KInstance *instance,QObject *par,QWidget *widp,QString &desktopname,const char *name) + void* create_konqsidebar_baghirasidebar(KInstance *instance,TQObject *par,TQWidget *widp,TQString &desktopname,const char *name) { return new baghiraSidebar(instance,par,widp,desktopname,name); } diff --git a/sidebar/baghirasidebar.h b/sidebar/baghirasidebar.h index dae8fc5..d0b9929 100644 --- a/sidebar/baghirasidebar.h +++ b/sidebar/baghirasidebar.h @@ -11,7 +11,7 @@ class LinkView; class KListBox; -class QListBoxItem; +class TQListBoxItem; class baghiraSidebar : public KonqSidebarPlugin { @@ -25,22 +25,22 @@ public: * @param parent The sidebar internal button info class responsible for this plugin. * @param widgetParent The container which will contain the plugins widget. * @param desktopName The filename of the configuration file. - * @param name A Qt object name for your plugin. + * @param name A TQt object name for your plugin. **/ - baghiraSidebar(KInstance *inst,QObject *parent, QWidget *widgetParent, QString &desktopName, const char* name=0); + baghiraSidebar(KInstance *inst,TQObject *parent, TQWidget *widgetParent, TQString &desktopName, const char* name=0); /** destructor */ ~baghiraSidebar(); - virtual QWidget *getWidget(){return scrollView;} - virtual void *provides(const QString &) {return 0;} + virtual TQWidget *getWidget(){return scrollView;} + virtual void *provides(const TQString &) {return 0;} protected: LinkView *scrollView; virtual void handleURL(const KURL &url); private slots: - void callURL(QListBoxItem *); + void callURL(TQListBoxItem *); signals: void openURLRequest(const KURL &url, const KParts::URLArgs &args); diff --git a/sidebar/baghirasidebariface.h b/sidebar/baghirasidebariface.h index c5e160d..9be73ad 100644 --- a/sidebar/baghirasidebariface.h +++ b/sidebar/baghirasidebariface.h @@ -27,9 +27,9 @@ class BaghiraSidebarIface : virtual public DCOPObject { K_DCOP k_dcop: - virtual void mediumAdded(const QString &name) = 0; - virtual void mediumRemoved(const QString &name) = 0; - virtual void mediumChanged(const QString &name) = 0; + virtual void mediumAdded(const TQString &name) = 0; + virtual void mediumRemoved(const TQString &name) = 0; + virtual void mediumChanged(const TQString &name) = 0; }; #endif diff --git a/sidebar/dndlistbox.cpp b/sidebar/dndlistbox.cpp index 8fe78cf..4f8928d 100644 --- a/sidebar/dndlistbox.cpp +++ b/sidebar/dndlistbox.cpp @@ -1,9 +1,9 @@ #include -#include +#include #include -#include -#include +#include +#include #include #include #include @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include "listboxlink.h" #include "linkconfig.h" #include "dndlistbox.h" @@ -37,11 +37,11 @@ #define MEDIA_PROPS 12 #define MEDIALIST_PROPS 13 -ResizingLinkBox::ResizingLinkBox( QWidget * parent, const char * name, WFlags f ) : KListBox( parent, name, f) +ResizingLinkBox::ResizingLinkBox( TQWidget * parent, const char * name, WFlags f ) : KListBox( parent, name, f) { - KConfig config(QDir::homeDirPath() + "/.qt/baghirarc"); + KConfig config(TQDir::homeDirPath() + "/.qt/baghirarc"); config.setGroup("Sidebar"); - size_ = config.readNumEntry (QString(name) + "_IconSize", 48); + size_ = config.readNumEntry (TQString(name) + "_IconSize", 48); popupMenu = new KPopupMenu; popupMenu->insertTitle (i18n("Icon Size"),122,122); popupMenu->insertItem("16x16", this, SLOT(setIconSize(int)),0,16,123); @@ -52,14 +52,14 @@ ResizingLinkBox::ResizingLinkBox( QWidget * parent, const char * name, WFlags f popupMenu->insertItem("128x128", this, SLOT(setIconSize(int)),0,128,128); } -void ResizingLinkBox::insertItem( const QListBoxItem *lbi, int index ) +void ResizingLinkBox::insertItem( const TQListBoxItem *lbi, int index ) { KListBox::insertItem( lbi, index ); if (height() <= numRows()*itemHeight()) emit itemNumberChanged(TRUE); } -void ResizingLinkBox::insertItem( const QListBoxItem *lbi, const QListBoxItem *after ) +void ResizingLinkBox::insertItem( const TQListBoxItem *lbi, const TQListBoxItem *after ) { KListBox::insertItem( lbi, after ); if (height() <= numRows()*itemHeight()) @@ -67,7 +67,7 @@ void ResizingLinkBox::insertItem( const QListBoxItem *lbi, const QListBoxItem *a } -void ResizingLinkBox::insertItem( const QString & icon, const QString & title, const QString & url ) +void ResizingLinkBox::insertItem( const TQString & icon, const TQString & title, const TQString & url ) { insertItem( new ListBoxLink(icon, size_, title, url ) ); } @@ -83,9 +83,9 @@ void ResizingLinkBox::removeItem( int index ) void ResizingLinkBox::setIconSize(int size) { size_ = size; - KConfig *config = new KConfig(QDir::homeDirPath() + "/.qt/baghirarc"); + KConfig *config = new KConfig(TQDir::homeDirPath() + "/.qt/baghirarc"); config->setGroup("Sidebar"); - config->writeEntry (QString(name()) + "_IconSize", size); + config->writeEntry (TQString(name()) + "_IconSize", size); config->sync(); ListBoxLink *runner; ListBoxDevice *current; @@ -107,14 +107,14 @@ void ResizingLinkBox::setIconSize(int size) blockSignals ( false ); } -void ResizingLinkBox::mousePressEvent ( QMouseEvent *mpe ) +void ResizingLinkBox::mousePressEvent ( TQMouseEvent *mpe ) { KListBox::mousePressEvent( mpe ); } -void ResizingLinkBox::mouseReleaseEvent ( QMouseEvent *mpe ) +void ResizingLinkBox::mouseReleaseEvent ( TQMouseEvent *mpe ) { - if (mpe->button() == Qt::LeftButton) + if (mpe->button() == TQt::LeftButton) { ListBoxLink *link = (ListBoxLink*)itemAt(mpe->pos()); if (isSelected(link)) emit clicked(link); @@ -124,17 +124,17 @@ void ResizingLinkBox::mouseReleaseEvent ( QMouseEvent *mpe ) KListBox::mouseReleaseEvent( mpe ); } -void ResizingLinkBox::contentsWheelEvent ( QWheelEvent * we ) +void ResizingLinkBox::contentsWheelEvent ( TQWheelEvent * we ) { - if (we->state() == Qt::ControlButton) + if (we->state() == TQt::ControlButton) KListBox::contentsWheelEvent ( we ); else emit scrolled(0, -we->delta()); } -MediaListBox::MediaListBox( QWidget * parent, const char * name, WFlags f ) : ResizingLinkBox(parent, name, f), DCOPObject("BaghiraSidebarIface") +MediaListBox::MediaListBox( TQWidget * parent, const char * name, WFlags f ) : ResizingLinkBox(parent, name, f), DCOPObject("BaghiraSidebarIface") { - KConfig config(QDir::homeDirPath() + "/.qt/baghirarc"); + KConfig config(TQDir::homeDirPath() + "/.qt/baghirarc"); config.setGroup("Sidebar"); hiddenDevices = config.readListEntry("HiddenDevices"); currentFloppy = 0L; @@ -150,24 +150,24 @@ MediaListBox::MediaListBox( QWidget * parent, const char * name, WFlags f ) : Re insertItem(new ListBoxDevice("system", size_, i18n("My Computer"), "media:/", "", "", TRUE, FALSE, FALSE)); insertItem(new ListBoxDevice("network", size_, i18n("Network"), "lan:/localhost", "", "", TRUE, FALSE, FALSE)); #endif - insertItem(new ListBoxDevice("hdd_mount", size_, i18n("Startvolume"), QDir::rootDirPath(), "", "", TRUE, FALSE, FALSE)); + insertItem(new ListBoxDevice("hdd_mount", size_, i18n("Startvolume"), TQDir::rootDirPath(), "", "", TRUE, FALSE, FALSE)); client = KApplication::dcopClient(); - client->connectDCOPSignal("kded", "mediamanager", "mediumAdded(QString)", "BaghiraSidebarIface", "mediumAdded(QString)", FALSE); - client->connectDCOPSignal("kded", "mediamanager", "mediumRemoved(QString)", "BaghiraSidebarIface", "mediumRemoved(const QString)", FALSE); - client->connectDCOPSignal("kded", "mediamanager", "mediumChanged(QString)", "BaghiraSidebarIface", "mediumChanged(QString)", FALSE); + client->connectDCOPSignal("kded", "mediamanager", "mediumAdded(TQString)", "BaghiraSidebarIface", "mediumAdded(TQString)", FALSE); + client->connectDCOPSignal("kded", "mediamanager", "mediumRemoved(TQString)", "BaghiraSidebarIface", "mediumRemoved(const TQString)", FALSE); + client->connectDCOPSignal("kded", "mediamanager", "mediumChanged(TQString)", "BaghiraSidebarIface", "mediumChanged(TQString)", FALSE); /* Get the media info - huhhh ;) */ - QByteArray data, replyData; - QCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data, replyData; + TQCString replyType; + TQDataStream arg(data, IO_WriteOnly); arg << ""; // ask for the full list if (!client->call("kded", "mediamanager", "fullList()", data, replyType, replyData)) - qDebug("there was some error using DCOP."); + tqDebug("there was some error using DCOP."); else { - QDataStream reply(replyData, IO_ReadOnly); - if (replyType == "QStringList") + TQDataStream reply(replyData, IO_ReadOnly); + if (replyType == "TQStringList") { - QStringList result; + TQStringList result; reply >> result; blockSignals ( true ); for (uint i = 0; i < result.size()/MEDIALIST_PROPS; i++) @@ -195,7 +195,7 @@ MediaListBox::MediaListBox( QWidget * parent, const char * name, WFlags f ) : Re blockSignals ( false ); } else - qWarning("fullList() returned an unexpected type of reply!"); + tqWarning("fullList() returned an unexpected type of reply!"); } // setCurrentItem( 0 ); } @@ -206,7 +206,7 @@ MediaListBox::~MediaListBox() ListBoxDevice *runner; for ( runner = deviceList.first(); runner; runner = deviceList.next() ) hiddenDevices.append(runner->name()); - KConfig config(QDir::homeDirPath() + "/.qt/baghirarc"); + KConfig config(TQDir::homeDirPath() + "/.qt/baghirarc"); config.setGroup("Sidebar"); config.writeEntry("HiddenDevices", hiddenDevices); } @@ -261,9 +261,9 @@ void MediaListBox::toggleDevice(int id) } } -ListBoxDevice *MediaListBox::createListBoxDevice(QStringList & deviceProperties, uint n) +ListBoxDevice *MediaListBox::createListBoxDevice(TQStringList & deviceProperties, uint n) { - QString icon; + TQString icon; icon = deviceProperties[MEDIALIST_PROPS*n+ICON_NAME]; if (icon.isNull()) { @@ -272,7 +272,7 @@ ListBoxDevice *MediaListBox::createListBoxDevice(QStringList & deviceProperties, icon.truncate( icon.length()-2 ); if (icon.contains("floppy")) icon.prepend("3"); } - QString label; + TQString label; label = deviceProperties[MEDIALIST_PROPS*n+USER_LABEL]; if (label.isNull()) { @@ -286,7 +286,7 @@ ListBoxDevice *MediaListBox::createListBoxDevice(QStringList & deviceProperties, #endif } -int MediaListBox::index (const QString & name ) +int MediaListBox::index (const TQString & name ) { ListBoxDevice *device; for (uint i = 0; i < count(); i++) @@ -297,20 +297,20 @@ int MediaListBox::index (const QString & name ) return -1; } -void MediaListBox::mediumAdded(const QString &name) +void MediaListBox::mediumAdded(const TQString &name) { - QByteArray data, replyData; - QCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data, replyData; + TQCString replyType; + TQDataStream arg(data, IO_WriteOnly); arg << name; // ask for this item only - if (!client->call("kded", "mediamanager", "properties(QString)", data, replyType, replyData)) - qDebug("there was some error using DCOP."); + if (!client->call("kded", "mediamanager", "properties(TQString)", data, replyType, replyData)) + tqDebug("there was some error using DCOP."); else { - QDataStream reply(replyData, IO_ReadOnly); - if (replyType == "QStringList") + TQDataStream reply(replyData, IO_ReadOnly); + if (replyType == "TQStringList") { - QStringList result; + TQStringList result; reply >> result; ListBoxDevice *dev = createListBoxDevice(result); if (hiddenDevices.contains(dev->name())) @@ -325,24 +325,24 @@ void MediaListBox::mediumAdded(const QString &name) } } else - qWarning("properties() returned an unexpected type of reply!"); + tqWarning("properties() returned an unexpected type of reply!"); } } -void MediaListBox::mediumRemoved(const QString &name) +void MediaListBox::mediumRemoved(const TQString &name) { - QByteArray data, replyData; - QCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data, replyData; + TQCString replyType; + TQDataStream arg(data, IO_WriteOnly); arg << name; // ask for this item only - if (!client->call("kded", "mediamanager", "properties(QString)", data, replyType, replyData)) - qDebug("there was some error using DCOP."); + if (!client->call("kded", "mediamanager", "properties(TQString)", data, replyType, replyData)) + tqDebug("there was some error using DCOP."); else { - QDataStream reply(replyData, IO_ReadOnly); - if (replyType == "QStringList") + TQDataStream reply(replyData, IO_ReadOnly); + if (replyType == "TQStringList") { - QStringList result; + TQStringList result; reply >> result; int i = index(name); if (i<0) @@ -351,24 +351,24 @@ void MediaListBox::mediumRemoved(const QString &name) removeItem(i); } else - qWarning("properties() returned an unexpected type of reply!"); + tqWarning("properties() returned an unexpected type of reply!"); } } -void MediaListBox::mediumChanged(const QString &name) +void MediaListBox::mediumChanged(const TQString &name) { - QByteArray data, replyData; - QCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data, replyData; + TQCString replyType; + TQDataStream arg(data, IO_WriteOnly); arg << name; // ask for this item only - if (!client->call("kded", "mediamanager", "properties(QString)", data, replyType, replyData)) - qDebug("there was some error using DCOP."); + if (!client->call("kded", "mediamanager", "properties(TQString)", data, replyType, replyData)) + tqDebug("there was some error using DCOP."); else { - QDataStream reply(replyData, IO_ReadOnly); - if (replyType == "QStringList") + TQDataStream reply(replyData, IO_ReadOnly); + if (replyType == "TQStringList") { - QStringList result; + TQStringList result; reply >> result; int i = index(name); if (i<0) @@ -406,16 +406,16 @@ void MediaListBox::mediumChanged(const QString &name) blockSignals(false); } else - qWarning("properties() returned an unexpected type of reply!"); + tqWarning("properties() returned an unexpected type of reply!"); } } #define _FLOPPYID_ 0 #define _FLOPPYINDEX_ 0 -void MediaListBox::mousePressEvent ( QMouseEvent *mpe ) +void MediaListBox::mousePressEvent ( TQMouseEvent *mpe ) { - if (mpe->button() == Qt::RightButton) + if (mpe->button() == TQt::RightButton) { popupMenu->removeItem(_FLOPPYID_); ListBoxDevice *device = (ListBoxDevice*)itemAt(mpe->pos()); @@ -427,7 +427,7 @@ void MediaListBox::mousePressEvent ( QMouseEvent *mpe ) popupMenu->popup(mpe->globalPos()); return; } - if (mpe->button() == Qt::LeftButton && mpe->x() > width()-22) + if (mpe->button() == TQt::LeftButton && mpe->x() > width()-22) { ListBoxDevice *device = (ListBoxDevice*)itemAt(mpe->pos()); int dy = itemRect(device).y(); @@ -445,7 +445,7 @@ void MediaListBox::mousePressEvent ( QMouseEvent *mpe ) ResizingLinkBox::mousePressEvent( mpe ); } -void MediaListBox::resizeEvent ( QResizeEvent * re) +void MediaListBox::resizeEvent ( TQResizeEvent * re) { if (width() != re->oldSize().width()) { @@ -455,13 +455,13 @@ void MediaListBox::resizeEvent ( QResizeEvent * re) ResizingLinkBox::resizeEvent(re); } -DnDListBox::DnDListBox( QWidget * parent, const char * name, WFlags f ): +DnDListBox::DnDListBox( TQWidget * parent, const char * name, WFlags f ): ResizingLinkBox( parent, name, f), _poof(0), _poofIndex(0), _poofAnimPix(0), _poofPix(0) { setAcceptDrops(true); dialog = new LinkConfig(); connect(dialog->buttonOk, SIGNAL(clicked()), this, SLOT(updateLink())); - setCursor(Qt::PointingHandCursor); + setCursor(TQt::PointingHandCursor); } DnDListBox::~DnDListBox() @@ -471,18 +471,18 @@ DnDListBox::~DnDListBox() void DnDListBox::poof(ListBoxLink *link) { _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); KWin::setShadowSize(_poof->winId(), 0); _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(); removeItem ( index(link) ); @@ -503,30 +503,30 @@ void DnDListBox::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 DnDListBox::dragEnterEvent ( QDragEnterEvent *dee ) +void DnDListBox::dragEnterEvent ( TQDragEnterEvent *dee ) { // dragging_ = true; - if (QUriDrag::canDecode(dee) || BaghiraLinkDrag::canDecode(dee) || QTextDrag::canDecode(dee)) + if (TQUriDrag::canDecode(dee) || BaghiraLinkDrag::canDecode(dee) || TQTextDrag::canDecode(dee)) dee->accept(true); } -void DnDListBox::dropEvent ( QDropEvent *de ) +void DnDListBox::dropEvent ( TQDropEvent *de ) { - QStrList list; - QString title; - QString command; - QString icon; + TQStrList list; + TQString title; + TQString command; + TQString icon; int oldIndex; - QCString subtype; + TQCString subtype; if (BaghiraLinkDrag::decode(de, &title, &command, &icon, &oldIndex)) // internal move { BaghiraLinkDrag::setAccepted(); - QListBoxItem *after = itemAt(de->pos()); + TQListBoxItem *after = itemAt(de->pos()); int newIndex = index(after); if (!dragging_ || oldIndex < 0 || oldIndex > count()-2) insertItem (new ListBoxLink(icon, size_, title, command), after?newIndex:count()); @@ -536,16 +536,16 @@ void DnDListBox::dropEvent ( QDropEvent *de ) removeItem ( (newIndex < 0 || oldIndex < newIndex) ? oldIndex : oldIndex + 1 ); } } - else if ( QUriDrag::decode(de, list) ) + else if ( TQUriDrag::decode(de, list) ) { char *uri; KURL url; - QListBoxItem *after = itemAt(de->pos()); + TQListBoxItem *after = itemAt(de->pos()); for ( uri = list.first(); uri; uri = list.next() ) { url = KURL(uri); if (url.protocol() == "http") - insertItem(new ListBoxLink("html", size_, url.host()+(url.path()=="/"?QString(""):url.path()), uri), after?index(after):count()); + insertItem(new ListBoxLink("html", size_, url.host()+(url.path()=="/"?TQString(""):url.path()), uri), after?index(after):count()); else { KFileItem item = KFileItem(KFileItem::Unknown, KFileItem::Unknown, url, true); @@ -553,14 +553,14 @@ void DnDListBox::dropEvent ( QDropEvent *de ) } } } - else if (QTextDrag::decode(de, command, subtype)) + else if (TQTextDrag::decode(de, command, subtype)) { KURL url(command); if (url.isValid()) { - QListBoxItem *after = itemAt(de->pos()); + TQListBoxItem *after = itemAt(de->pos()); if (url.protocol() == "http") - insertItem(new ListBoxLink("html", size_, url.host()+(url.path()=="/"?QString(""):url.path()), command), after?index(after):count()); + insertItem(new ListBoxLink("html", size_, url.host()+(url.path()=="/"?TQString(""):url.path()), command), after?index(after):count()); else { KFileItem item = KFileItem(KFileItem::Unknown, KFileItem::Unknown, url, true); @@ -569,13 +569,13 @@ void DnDListBox::dropEvent ( QDropEvent *de ) } else if (command.contains('@')) { - QListBoxItem *after = itemAt(de->pos()); + TQListBoxItem *after = itemAt(de->pos()); command.replace(" ",""); insertItem(new ListBoxLink("kmail", size_, command, "mailto:"+command), after?index(after):count()); } else if (command.contains("'at'")) //last chance for anti-spam addy { - QListBoxItem *after = itemAt(de->pos()); + TQListBoxItem *after = itemAt(de->pos()); command.replace(" ",""); command.replace("'at'","@"); insertItem(new ListBoxLink("kmail", size_, command, "mailto:"+command), after?index(after):count()); @@ -583,9 +583,9 @@ void DnDListBox::dropEvent ( QDropEvent *de ) } } -void DnDListBox::mousePressEvent ( QMouseEvent *mpe ) +void DnDListBox::mousePressEvent ( TQMouseEvent *mpe ) { - if (mpe->button() == Qt::RightButton) + if (mpe->button() == TQt::RightButton) { currentItem = 0; popupMenu->removeItem(0); @@ -598,22 +598,22 @@ void DnDListBox::mousePressEvent ( QMouseEvent *mpe ) popupMenu->popup(mpe->globalPos()); return; } - if (mpe->button() == Qt::MidButton) + if (mpe->button() == TQt::MidButton) { - pasteURL(QClipboard::Selection, itemAt(mpe->pos())); + pasteURL(TQClipboard::Selection, itemAt(mpe->pos())); return; } ResizingLinkBox::mousePressEvent( mpe ); } -void DnDListBox::mouseReleaseEvent ( QMouseEvent *mre ) +void DnDListBox::mouseReleaseEvent ( TQMouseEvent *mre ) { if (!dragging_) ResizingLinkBox::mouseReleaseEvent( mre ); } -void DnDListBox::mouseMoveEvent ( QMouseEvent * mme ) +void DnDListBox::mouseMoveEvent ( TQMouseEvent * mme ) { - if (mme->state() & Qt::LeftButton) + if (mme->state() & TQt::LeftButton) { if (!dragging_) { @@ -622,9 +622,9 @@ void DnDListBox::mouseMoveEvent ( QMouseEvent * mme ) { dragging_ = true; BaghiraLinkDrag *d = new BaghiraLinkDrag( link->text(), link->URL(), link->icon(), index(link), this ); - d->setPixmap(*link->pixmap(),QPoint(22,22)); + d->setPixmap(*link->pixmap(),TQPoint(22,22)); d->drag(); - if (mme->state() & Qt::ControlButton || BaghiraLinkDrag::accepted()) + if (mme->state() & TQt::ControlButton || BaghiraLinkDrag::accepted()) return; poof(link); // do NOT delete d. @@ -635,14 +635,14 @@ void DnDListBox::mouseMoveEvent ( QMouseEvent * mme ) dragging_ = false; } -void DnDListBox::pasteURL(int mode, QListBoxItem *after) +void DnDListBox::pasteURL(int mode, TQListBoxItem *after) { - QString string = qApp->clipboard()->text( (QClipboard::Mode)mode ); + TQString string = tqApp->clipboard()->text( (TQClipboard::Mode)mode ); KURL url(string); if (url.isValid()) { if (url.protocol() == "http") - insertItem(new ListBoxLink("html", size_, url.host()+(url.path()=="/"?QString(""):url.path()), string), after?index(after):count()); + insertItem(new ListBoxLink("html", size_, url.host()+(url.path()=="/"?TQString(""):url.path()), string), after?index(after):count()); else { KFileItem item = KFileItem(KFileItem::Unknown, KFileItem::Unknown, url, true); diff --git a/sidebar/dndlistbox.h b/sidebar/dndlistbox.h index b84dbcc..25e6e85 100644 --- a/sidebar/dndlistbox.h +++ b/sidebar/dndlistbox.h @@ -7,50 +7,50 @@ #endif #include -#include -#include +#include +#include #include "baghirasidebariface.h" class DCOPClient; -class QDragEnterEvent; -class QDragMoveEvent; -class QDragLeaveEvent; -class QDropEvent; -class QKeyEvent; -class QPoint; +class TQDragEnterEvent; +class TQDragMoveEvent; +class TQDragLeaveEvent; +class TQDropEvent; +class TQKeyEvent; +class TQPoint; class KPopupMenu; class LinkConfig; class ListBoxLink; class ListBoxDevice; -class QResizeEvent; +class TQResizeEvent; class ResizingLinkBox : public KListBox { Q_OBJECT public: - ResizingLinkBox( QWidget * parent = 0, const char * name = 0, WFlags f = 0 ); + ResizingLinkBox( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ); ~ResizingLinkBox(){}; - void insertItem( const QListBoxItem *, int index=-1 ); - void insertItem( const QListBoxItem *lbi, const QListBoxItem *after ); - void insertItem( const QString & icon, const QString & title, const QString & url ); - void insertItem( const QString &text, int index=-1 ) + void insertItem( const TQListBoxItem *, int index=-1 ); + void insertItem( const TQListBoxItem *lbi, const TQListBoxItem *after ); + void insertItem( const TQString & icon, const TQString & title, const TQString & url ); + void insertItem( const TQString &text, int index=-1 ) { - insertItem( new QListBoxText(text), index ); + insertItem( new TQListBoxText(text), index ); } - void insertItem( const QPixmap &pixmap, int index=-1 ) + void insertItem( const TQPixmap &pixmap, int index=-1 ) { - insertItem( new QListBoxPixmap(pixmap), index ); + insertItem( new TQListBoxPixmap(pixmap), index ); } - void insertItem( const QPixmap &pixmap, const QString &text, int index=-1 ){ - insertItem( new QListBoxPixmap(pixmap, text), index ); + void insertItem( const TQPixmap &pixmap, const TQString &text, int index=-1 ){ + insertItem( new TQListBoxPixmap(pixmap, text), index ); } void removeItem( int index ); protected: - void mousePressEvent ( QMouseEvent * ); - void mouseReleaseEvent ( QMouseEvent * ); - void contentsWheelEvent ( QWheelEvent * ); + void mousePressEvent ( TQMouseEvent * ); + void mouseReleaseEvent ( TQMouseEvent * ); + void contentsWheelEvent ( TQWheelEvent * ); KPopupMenu *popupMenu; uint size_; private slots: @@ -64,24 +64,24 @@ class MediaListBox : public ResizingLinkBox, virtual public BaghiraSidebarIface { Q_OBJECT public: - MediaListBox( QWidget * parent = 0, const char * name = 0, WFlags f = 0 ); + MediaListBox( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ); ~MediaListBox(); - ListBoxDevice *createListBoxDevice(QStringList & deviceProperties, uint n = 0); - void mediumAdded(const QString &name); - void mediumRemoved(const QString &name); - void mediumChanged(const QString &name); - int index (const QString & name ); + ListBoxDevice *createListBoxDevice(TQStringList & deviceProperties, uint n = 0); + void mediumAdded(const TQString &name); + void mediumRemoved(const TQString &name); + void mediumChanged(const TQString &name); + int index (const TQString & name ); void removeItem( int index ); protected: - void mousePressEvent ( QMouseEvent * ); - void resizeEvent ( QResizeEvent * ); + void mousePressEvent ( TQMouseEvent * ); + void resizeEvent ( TQResizeEvent * ); private: KPopupMenu *devicePopup; DCOPClient *client; ListBoxDevice *currentFloppy; - typedef QPtrList DeviceList; + typedef TQPtrList DeviceList; DeviceList deviceList; - QStringList hiddenDevices; + TQStringList hiddenDevices; private slots: void kfloppy(); void toggleDevice(int id); @@ -92,31 +92,31 @@ class DnDListBox : public ResizingLinkBox Q_OBJECT public: - DnDListBox( QWidget * parent = 0, const char * name = 0, WFlags f = 0 ); + DnDListBox( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ); /** destructor */ ~DnDListBox(); void poof(ListBoxLink *link); protected: - void mousePressEvent ( QMouseEvent * ); - void mouseReleaseEvent ( QMouseEvent * ); - void mouseMoveEvent ( QMouseEvent * e ); - void dragEnterEvent ( QDragEnterEvent * ); -// void dragMoveEvent ( QDragMoveEvent * ); -// void dragLeaveEvent ( QDragLeaveEvent * ); - void dropEvent ( QDropEvent * ); + void mousePressEvent ( TQMouseEvent * ); + void mouseReleaseEvent ( TQMouseEvent * ); + void mouseMoveEvent ( TQMouseEvent * e ); + void dragEnterEvent ( TQDragEnterEvent * ); +// void dragMoveEvent ( TQDragMoveEvent * ); +// void dragLeaveEvent ( TQDragLeaveEvent * ); + void dropEvent ( TQDropEvent * ); void startDrag(); private: ListBoxLink *currentItem; //TODO: unshadow int KListBox::currentItem() LinkConfig *dialog; bool dragging_; - void pasteURL(int mode, QListBoxItem *after = 0); + void pasteURL(int mode, TQListBoxItem *after = 0); bool _draggedMe; int _poofIndex; - QPixmap *_poofPix; - QPixmap *_poofAnimPix; - QWidget *_poof; + TQPixmap *_poofPix; + TQPixmap *_poofAnimPix; + TQWidget *_poof; private slots: void configureLink(); void updateLink(); diff --git a/sidebar/linkconfig.ui b/sidebar/linkconfig.ui index 14ccf55..db753bc 100644 --- a/sidebar/linkconfig.ui +++ b/sidebar/linkconfig.ui @@ -1,6 +1,6 @@ LinkConfig - + LinkConfig @@ -22,7 +22,7 @@ unnamed - + layout11 @@ -30,7 +30,7 @@ unnamed - + textLabel1 @@ -43,7 +43,7 @@ title - + textLabel2 @@ -66,7 +66,7 @@ - + layout10 @@ -91,7 +91,7 @@ - + buttonOk @@ -108,7 +108,7 @@ true - + buttonCancel diff --git a/sidebar/linkview.cpp b/sidebar/linkview.cpp index 8becf29..fa9223b 100644 --- a/sidebar/linkview.cpp +++ b/sidebar/linkview.cpp @@ -1,54 +1,54 @@ #include -#include -#include +#include +#include #include -#include +#include #include -#include +#include #include "dndlistbox.h" #include "listboxlink.h" #include "linkview.h" #include "linkview.moc" // internal class to eat invalid leave envents (i.e. leave that does not leave the rect but just enters the splitter, as styles (like baghira ;) may post install eventfilters that'd cause useless repaints and therefore flicker if the scroller appereance changes ;) -class EventKiller : public QObject +class EventKiller : public TQObject { protected: - virtual bool eventFilter( QObject *o, QEvent *e) + virtual bool eventFilter( TQObject *o, TQEvent *e) { - if (e->type() == QEvent::Leave) - return ((QScrollView*)o)->rect().contains(((QScrollView*)o)->mapFromGlobal (QCursor::pos())); + if (e->type() == TQEvent::Leave) + return ((TQScrollView*)o)->rect().contains(((TQScrollView*)o)->mapFromGlobal (TQCursor::pos())); return false; } }; -LinkView::LinkView(QWidget * parent, const char * name, WFlags f): - QScrollView(parent, name, f) +LinkView::LinkView(TQWidget * parent, const char * name, WFlags f): + TQScrollView(parent, name, f) { - setFrameShape( QFrame::StyledPanel ); - setFrameShadow( QFrame::Sunken ); - setBackgroundMode(Qt::PaletteBase); + setFrameShape( TQFrame::StyledPanel ); + setFrameShadow( TQFrame::Sunken ); + setBackgroundMode(TQt::PaletteBase); _blocked = FALSE; - splitter = new QSplitter( Qt::Vertical, viewport() ); + splitter = new TQSplitter( TQt::Vertical, viewport() ); addChild(splitter); splitter->setMargin(5); - splitter->setBackgroundMode(Qt::PaletteBase); - splitter->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum); - splitter->setFrameShape( QFrame::NoFrame ); + splitter->setBackgroundMode(TQt::PaletteBase); + splitter->setSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Minimum); + splitter->setFrameShape( TQFrame::NoFrame ); splitter->setChildrenCollapsible(TRUE); splitter->setHandleWidth( 3 ); splitter->setOpaqueResize(); hardware = new MediaListBox(splitter, "hardware"); - splitter->setResizeMode( hardware, QSplitter::KeepSize ); - hardware->setFrameShape( QFrame::NoFrame ); - hardware->setHScrollBarMode(QScrollView::AlwaysOff); - hardware->setVScrollBarMode(QScrollView::AlwaysOff); + splitter->setResizeMode( hardware, TQSplitter::KeepSize ); + hardware->setFrameShape( TQFrame::NoFrame ); + hardware->setHScrollBarMode(TQScrollView::AlwaysOff); + hardware->setVScrollBarMode(TQScrollView::AlwaysOff); locations = new DnDListBox(splitter, "locations"); -// splitter->setResizeMode( locations, QSplitter::KeepSize ); - locations->setFrameShape( QFrame::NoFrame ); - locations->setHScrollBarMode(QScrollView::AlwaysOff); - locations->setVScrollBarMode(QScrollView::AlwaysOff); +// splitter->setResizeMode( locations, TQSplitter::KeepSize ); + locations->setFrameShape( TQFrame::NoFrame ); + locations->setHScrollBarMode(TQScrollView::AlwaysOff); + locations->setVScrollBarMode(TQScrollView::AlwaysOff); // custom area, locations loadLinks(); locations->setCurrentItem(0); @@ -60,8 +60,8 @@ LinkView::LinkView(QWidget * parent, const char * name, WFlags f): connect (locations, SIGNAL(scrolled(int,int)), this, SLOT(scrollBy(int,int))); connect (hardware, SIGNAL(itemNumberChanged(bool)), this, SLOT(adjustSplitter2Hardware(bool))); connect (locations, SIGNAL(itemNumberChanged(bool)), this, SLOT(adjustSplitter2Locations())); - QTimer::singleShot(50, this, SLOT(adjustSplitter2Locations())); - QTimer::singleShot(60, this, SLOT(postInstallEventFilter())); + TQTimer::singleShot(50, this, SLOT(adjustSplitter2Locations())); + TQTimer::singleShot(60, this, SLOT(postInstallEventFilter())); } static EventKiller *eventKiller = 0L; @@ -79,13 +79,13 @@ void LinkView::postInstallEventFilter() installEventFilter(eventKiller); } -bool LinkView::eventFilter(QObject *o, QEvent *e) +bool LinkView::eventFilter(TQObject *o, TQEvent *e) { if (o != hardware) - return QScrollView::eventFilter(o, e); - if (_blocked || e->type() != QEvent::Resize) + return TQScrollView::eventFilter(o, e); + if (_blocked || e->type() != TQEvent::Resize) return FALSE; // not a resize - non of our business - QResizeEvent *rev = (QResizeEvent*)e; + TQResizeEvent *rev = (TQResizeEvent*)e; if (rev->size().height() == rev->oldSize().height()) return FALSE; // height didn't change int tmpH = rev->size().height() + locations->numRows()*locations->itemHeight()+20; @@ -122,7 +122,7 @@ void LinkView::adjustSplitter2Hardware(bool added) hardware->resize ( hardware->width(), hardware->numRows()*hardware->itemHeight() ); } -void LinkView::viewportResizeEvent( QResizeEvent *rev ) +void LinkView::viewportResizeEvent( TQResizeEvent *rev ) { int tmpH = hardware->height() + locations->numRows()*locations->itemHeight()+20; if (tmpH < rev->size().height()) @@ -144,27 +144,27 @@ void LinkView::loadLinks() { if (!locations) return; - KConfig config(QDir::homeDirPath() + "/.qt/baghirarc"); + KConfig config(TQDir::homeDirPath() + "/.qt/baghirarc"); config.setGroup("Sidebar"); splitter->setSizes(config.readIntListEntry ("Sizes")); loadedLinks = (uint)config.readNumEntry("NumLinks", 0); locations->blockSignals ( true ); if (loadedLinks == 0) // no settings stored - load defaults { - locations->insertItem("desktop", i18n("Desktop"), QDir::homeDirPath()+"/Desktop"); - locations->insertItem("folder_home", getenv("USER"), QDir::homeDirPath()); + locations->insertItem("desktop", i18n("Desktop"), TQDir::homeDirPath()+"/Desktop"); + locations->insertItem("folder_home", getenv("USER"), TQDir::homeDirPath()); locations->insertItem("kmenu", i18n("Programs"), "programs:/"); } - QString num; + TQString num; for (uint i = 0; i < loadedLinks; i++) { - QString title; - QString icon; - QString url; + TQString title; + TQString icon; + TQString url; num.setNum(i); title = config.readEntry("Link_"+num+"_Title", "???"); icon = config.readEntry("Link_"+num+"_Icon", "empty"); - url = config.readEntry("Link_"+num+"_URL", QDir::homeDirPath()); + url = config.readEntry("Link_"+num+"_URL", TQDir::homeDirPath()); locations->insertItem(icon, title, url); } locations->blockSignals ( false ); @@ -174,11 +174,11 @@ void LinkView::saveLinks() { if (!locations) return; - KConfig *config = new KConfig(QDir::homeDirPath() + "/.qt/baghirarc"); + KConfig *config = new KConfig(TQDir::homeDirPath() + "/.qt/baghirarc"); config->setGroup("Sidebar"); config->writeEntry("Sizes", splitter->sizes()); config->writeEntry("NumLinks", (int)locations->count()); - QString num; + TQString num; for (uint i = 0; i < locations->count(); i++) { num.setNum(i); diff --git a/sidebar/linkview.h b/sidebar/linkview.h index ebe54ef..8ea5577 100644 --- a/sidebar/linkview.h +++ b/sidebar/linkview.h @@ -6,18 +6,18 @@ #include #endif -#include +#include class ListBoxLink; class DnDListBox; class MediaListBox; -class LinkView : public QScrollView +class LinkView : public TQScrollView { Q_OBJECT public: - LinkView(QWidget * parent = 0, const char * name = 0, WFlags f = 0); + LinkView(TQWidget * parent = 0, const char * name = 0, WFlags f = 0); /** destructor */ ~LinkView(); @@ -27,12 +27,12 @@ public: void saveLinks(); protected: - void viewportResizeEvent( QResizeEvent * ); - bool eventFilter(QObject *, QEvent *); + void viewportResizeEvent( TQResizeEvent * ); + bool eventFilter(TQObject *, TQEvent *); private: MediaListBox *hardware; DnDListBox *locations; - QSplitter *splitter; + TQSplitter *splitter; bool _blocked; uint loadedLinks; private slots: diff --git a/sidebar/listboxlink.cpp b/sidebar/listboxlink.cpp index 47adb88..484fa12 100644 --- a/sidebar/listboxlink.cpp +++ b/sidebar/listboxlink.cpp @@ -1,23 +1,23 @@ #include #include "listboxlink.h" -#include -#include +#include +#include #include "eject.xbm" #include "lock.xbm" -static QBitmap eject = QBitmap( eject_width, eject_height, eject_bits, true ); -static QBitmap locked = QBitmap( lock_width, lock_height, lock_bits, true ); +static TQBitmap eject = TQBitmap( eject_width, eject_height, eject_bits, true ); +static TQBitmap locked = TQBitmap( lock_width, lock_height, lock_bits, true ); -ListBoxLink::ListBoxLink( const QString & icon, uint size, const QString & title, const QString & url): QListBoxPixmap(KGlobal::iconLoader()->loadIcon(icon, KIcon::Desktop, size), title),url_(url),icon_(icon) +ListBoxLink::ListBoxLink( const TQString & icon, uint size, const TQString & title, const TQString & url): TQListBoxPixmap(KGlobal::iconLoader()->loadIcon(icon, KIcon::Desktop, size), title),url_(url),icon_(icon) { } -ListBoxLink::ListBoxLink( const QPixmap & pixmap, const QString & title, const QString & url) : QListBoxPixmap(pixmap, title), url_(url), icon_(0) +ListBoxLink::ListBoxLink( const TQPixmap & pixmap, const TQString & title, const TQString & url) : TQListBoxPixmap(pixmap, title), url_(url), icon_(0) { } -ListBoxLink::ListBoxLink(ListBoxLink & link) : QListBoxPixmap(*link.pixmap(), link.text()), url_(link.URL()), icon_(link.icon()) +ListBoxLink::ListBoxLink(ListBoxLink & link) : TQListBoxPixmap(*link.pixmap(), link.text()), url_(link.URL()), icon_(link.icon()) { } @@ -25,22 +25,22 @@ ListBoxLink::~ListBoxLink() { } -void ListBoxLink::setURL(const QString & url) +void ListBoxLink::setURL(const TQString & url) { url_ = url; } -void ListBoxLink::setIcon(const QString & icon) +void ListBoxLink::setIcon(const TQString & icon) { icon_ = icon; } -int ListBoxLink::height ( const QListBox * lb ) const +int ListBoxLink::height ( const TQListBox * lb ) const { - return (QListBoxPixmap::height ( lb ) + 4); + return (TQListBoxPixmap::height ( lb ) + 4); } -ListBoxDevice::ListBoxDevice(const QString & icon, uint size, const QString & title, const QString & url, const QString & name, const QString & mountPoint, bool mounted, bool ejectable, bool removable, int id) : ListBoxLink(icon, size, title, url), name_(name), mountPoint_(mountPoint), mounted_(mounted), ejectable_(ejectable), removable_(removable),id_(id) +ListBoxDevice::ListBoxDevice(const TQString & icon, uint size, const TQString & title, const TQString & url, const TQString & name, const TQString & mountPoint, bool mounted, bool ejectable, bool removable, int id) : ListBoxLink(icon, size, title, url), name_(name), mountPoint_(mountPoint), mounted_(mounted), ejectable_(ejectable), removable_(removable),id_(id) { if (!eject.mask()) eject.setMask(eject); @@ -48,7 +48,7 @@ ListBoxDevice::ListBoxDevice(const QString & icon, uint size, const QString & ti locked.setMask(locked); } -ListBoxDevice::ListBoxDevice(const QPixmap & pixmap, const QString & title, const QString & url, const QString & name, const QString & mountPoint, bool mounted, bool ejectable, bool removable, int id) : ListBoxLink(pixmap, title, url), name_(name), mountPoint_(mountPoint), mounted_(mounted), ejectable_(ejectable), removable_(removable),id_(id) +ListBoxDevice::ListBoxDevice(const TQPixmap & pixmap, const TQString & title, const TQString & url, const TQString & name, const TQString & mountPoint, bool mounted, bool ejectable, bool removable, int id) : ListBoxLink(pixmap, title, url), name_(name), mountPoint_(mountPoint), mounted_(mounted), ejectable_(ejectable), removable_(removable),id_(id) { if (!eject.mask()) eject.setMask(eject); @@ -56,14 +56,14 @@ ListBoxDevice::ListBoxDevice(const QPixmap & pixmap, const QString & title, cons locked.setMask(locked); } -int ListBoxDevice::width ( const QListBox * lb ) const +int ListBoxDevice::width ( const TQListBox * lb ) const { if (ejectable_ && mounted_ && lb) return lb->width(); return ListBoxLink::width(lb); } -void ListBoxDevice::paint( QPainter * p ) +void ListBoxDevice::paint( TQPainter * p ) { if ((ejectable_ || removable_) && mounted_) { diff --git a/sidebar/listboxlink.h b/sidebar/listboxlink.h index 6614920..f5664e0 100644 --- a/sidebar/listboxlink.h +++ b/sidebar/listboxlink.h @@ -6,55 +6,55 @@ #include #endif -#include +#include class KListBox; -class QPainter; -class QPixmap; -class QStringList; +class TQPainter; +class TQPixmap; +class TQStringList; class KURL; -class ListBoxLink : public QListBoxPixmap +class ListBoxLink : public TQListBoxPixmap { friend class DnDListBox; public: - ListBoxLink(const QString & icon, uint size, const QString & title, const QString & url); - ListBoxLink(const QPixmap & pixmap, const QString & title, const QString & url); + ListBoxLink(const TQString & icon, uint size, const TQString & title, const TQString & url); + ListBoxLink(const TQPixmap & pixmap, const TQString & title, const TQString & url); ListBoxLink(ListBoxLink & link); ~ListBoxLink(); - QString & URL(){return url_;} - void setURL(const QString & url); - QString & icon(){return icon_;} - void setIcon(const QString & icon); - int height ( const QListBox * lb ) const; + TQString & URL(){return url_;} + void setURL(const TQString & url); + TQString & icon(){return icon_;} + void setIcon(const TQString & icon); + int height ( const TQListBox * lb ) const; private: - QString url_; //TODO: make this KURL?! - QString icon_; + TQString url_; //TODO: make this KURL?! + TQString icon_; }; class ListBoxDevice : public ListBoxLink { friend class MediaListBox; public: - ListBoxDevice(const QString & icon, uint size, const QString & title, const QString & url, const QString & name, const QString & mountPoint, bool mounted, bool ejectable = FALSE, bool removable = FALSE, int id = 0); - ListBoxDevice(const QPixmap & pixmap, const QString & title, const QString & url, const QString & name, const QString & mountPoint, bool mounted, bool ejectable = FALSE, bool removable = FALSE, int id = 0); + ListBoxDevice(const TQString & icon, uint size, const TQString & title, const TQString & url, const TQString & name, const TQString & mountPoint, bool mounted, bool ejectable = FALSE, bool removable = FALSE, int id = 0); + ListBoxDevice(const TQPixmap & pixmap, const TQString & title, const TQString & url, const TQString & name, const TQString & mountPoint, bool mounted, bool ejectable = FALSE, bool removable = FALSE, int id = 0); ~ListBoxDevice(){}; - QString & name(){return name_;} + TQString & name(){return name_;} bool mounted(){return mounted_;} bool ejectable(){return ejectable_;} bool removable(){return removable_;} - QString & mountPoint(){return mountPoint_;} + TQString & mountPoint(){return mountPoint_;} int id(){return id_;} - int width ( const QListBox * lb ) const; + int width ( const TQListBox * lb ) const; protected: - void paint( QPainter * p ); + void paint( TQPainter * p ); private: - QString name_; - QString mountPoint_; + TQString name_; + TQString mountPoint_; bool mounted_; bool ejectable_; bool removable_; 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 +#include #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(title.unicode()); + tmpChar = const_cast(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(command.unicode()); + tmpChar = const_cast(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(icon.unicode()); + tmpChar = const_cast(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 -#include +#include +#include -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 @@ ConfigDialog - + ConfigDialog @@ -22,7 +22,7 @@ unnamed - + Layout1 @@ -36,7 +36,7 @@ 6 - + buttonHelp @@ -67,7 +67,7 @@ - + buttonOk @@ -84,7 +84,7 @@ true - + buttonCancel @@ -100,7 +100,7 @@ - + buttonDetail @@ -111,7 +111,7 @@ true - + baseGroup @@ -145,7 +145,7 @@ false - + textLabel2 @@ -210,7 +210,7 @@ 48 - + textLabel5 @@ -218,7 +218,7 @@ <b>Command</b> - + textLabel1_2 @@ -226,7 +226,7 @@ <i>Keywords</i> - + textLabel1 @@ -234,7 +234,7 @@ <i><b>Name</b></i> - + textLabel4 @@ -247,7 +247,7 @@ keywords - + startupFeedback @@ -255,7 +255,7 @@ Activate startup feedback - + showInSystray @@ -282,7 +282,7 @@ - + textLabel3 @@ -306,7 +306,7 @@ - + extendedGroup @@ -317,7 +317,7 @@ unnamed - + textLabel7 @@ -339,7 +339,7 @@ Horizontal - + startInTerminal @@ -347,7 +347,7 @@ Start in terminal - + textLabel9 @@ -380,7 +380,7 @@ Horizontal - + startAsUser @@ -388,7 +388,7 @@ Start as different user - + textLabel6 @@ -421,7 +421,7 @@ Horizontal - + textLabel8 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 @@ HelpDialog - + HelpDialog @@ -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) @@ -79,7 +79,7 @@ You can use Qt richtext tags and there's no limit on the size, but keep it usefu false - + buttonClose 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 @@ LinkConfig - + LinkConfig @@ -22,7 +22,7 @@ unnamed - + layout10 @@ -47,7 +47,7 @@ - + buttonOk @@ -64,7 +64,7 @@ true - + buttonCancel @@ -114,7 +114,7 @@ false - + layout3 @@ -122,7 +122,7 @@ unnamed - + textLabel1 @@ -135,7 +135,7 @@ title - + textLabel2 @@ -151,7 +151,7 @@ <b>Command</b> - + command 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 -#include -#include -#include +#include +#include +#include +#include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -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("" + title + "", this, name); - m_titleLabel->setBackgroundOrigin(QWidget::AncestorOrigin); - m_titleLabel->setTextFormat( Qt::RichText ); - m_titleLabel->setAlignment ( Qt::AlignLeft | Qt::AlignVCenter ); + m_titleLabel = new TQLabel("" + title + "", 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("" + title + "", this, name); - m_titleLabel->setBackgroundOrigin(QWidget::AncestorOrigin); - m_titleLabel->setTextFormat( Qt::RichText ); - m_titleLabel->setAlignment ( Qt::AlignHCenter | Qt::AlignTop ); + m_titleLabel = new TQLabel("" + title + "", 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(parentWidget())) return; StartMenuButton *bt = 0L; - QObjectList *kids = const_cast(parentWidget()->children()); - QRect dRect(QPoint(x,y), size()); - QRect bRect; + TQObjectList *kids = const_cast(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(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(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(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("

" + m_service->name() + "

", this); - m_titleLabel->setTextFormat( Qt::RichText ); - m_commentLabel = new QLabel(m_service->comment(), this); + m_titleLabel = new TQLabel("

" + m_service->name() + "

", 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(children()); + TQObjectList *kids = const_cast(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(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(children()); + TQObjectList *kids = const_cast(children()); StartMenuButton *bt = 0; if (kids && !kids->isEmpty()) { - QObject *o; + TQObject *o; for ( o = kids->first(); o; o = kids->next() ) if (bt = (dynamic_cast(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(children()); + TQObjectList *kids = const_cast(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(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(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(children()); + TQObjectList *kids = const_cast(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(children()); + TQObjectList *kids = const_cast(children()); if (kids && !kids->isEmpty()) { - QObject *o; + TQObject *o; StartMenuButton *bt = 0L; for ( o = kids->first(); o; o = kids->next() ) if ((bt = (dynamic_cast(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(children()); + TQObjectList *kids = const_cast(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(o)) && QRect(bt->pos(), bt->size()).contains(pt)) + if ((bt = dynamic_cast(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(o)) && QRect(bt->pos(), bt->size()).contains(pt)) + if ((bt = dynamic_cast(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(children()); + TQObjectList *kids = const_cast(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(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 it(entryList); + TQPtrListIterator 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("Are you sure you want to remove
%1
").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 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 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("Favorite Applications
") ); } 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 it(entryList); + TQPtrListIterator 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("Favorite Applications
") ); 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 it(appList->entryList); + TQPtrListIterator 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 it(appList->entryList); + TQPtrListIterator 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 #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #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 StartMenuEntryList; - typedef QMap KeyWordList; + typedef TQSortedList StartMenuEntryList; + typedef TQMap 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 ShortcutList; + TQStringList & categories(){return appList->categories;}; + typedef TQMap 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 +#include 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 -#include -#include +#include +#include +#include #include #include #include #include #include # include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -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("To ensure usefull behaviour of the searchline, the shortcut must contain a metabutton, i.e. 'ctrl' and/or 'alt'"), 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 -#include -#include -#include -// #include +#include +#include +#include +// #include #include #include #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 ShortcutList; + typedef TQMap 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 @@ StarterConfig - + StarterConfig @@ -22,7 +22,7 @@ unnamed - + groupBox5 @@ -38,7 +38,7 @@ BaseURL - + textLabel2_3 @@ -51,7 +51,7 @@ HoverURL - + textLabel1_2 @@ -59,7 +59,7 @@ <b>Base</b> - + textLabel3 @@ -74,7 +74,7 @@ - + Layout1 @@ -88,7 +88,7 @@ 6 - + buttonHelp @@ -119,7 +119,7 @@ - + buttonOk @@ -136,7 +136,7 @@ true - + buttonCancel @@ -152,7 +152,7 @@ - + buttonGroup1 @@ -163,7 +163,7 @@ unnamed - + layout10 @@ -171,7 +171,7 @@ unnamed - + customDialogSize @@ -182,7 +182,7 @@ Custom dialog size - + dialogW @@ -193,7 +193,7 @@ 3000 - + textLabel2 @@ -201,7 +201,7 @@ x - + dialogH @@ -231,7 +231,7 @@ - + dialogFollowMouse @@ -242,7 +242,7 @@ Show dialog under mouse - + layout12 @@ -250,7 +250,7 @@ unnamed - + fixedDialogPos @@ -261,7 +261,7 @@ Fixed - + dialogX @@ -269,7 +269,7 @@ false - + textLabel2_2 @@ -277,7 +277,7 @@ : - + dialogY @@ -304,7 +304,7 @@ - + customDialogPos @@ -326,7 +326,7 @@ Horizontal - + showDialogTitlebar @@ -362,7 +362,7 @@ Horizontal - + layout6 @@ -370,7 +370,7 @@ unnamed - + textLabel1_3 @@ -381,7 +381,7 @@ Panel Position - + North @@ -421,7 +421,7 @@ - + groupBox6 @@ -432,7 +432,7 @@ unnamed - + layout11 @@ -440,7 +440,7 @@ unnamed - + customPopupSize @@ -451,7 +451,7 @@ Custom popup size - + popupW @@ -462,7 +462,7 @@ 3000 - + textLabel1 @@ -470,7 +470,7 @@ x - + popupH @@ -514,7 +514,7 @@ Horizontal - + layout6_2 @@ -522,7 +522,7 @@ unnamed - + textLabel1_3_2 @@ -533,7 +533,7 @@ Panel Position - + North @@ -573,7 +573,7 @@ - + groupBox4 @@ -584,7 +584,7 @@ unnamed - + layout9 @@ -592,7 +592,7 @@ unnamed - + textLabel2_4 @@ -600,7 +600,7 @@ Items in favorite list - + favItemAmount @@ -641,7 +641,7 @@ Horizontal - + useKTTS @@ -649,7 +649,7 @@ Talk to me (via KTTS) - + layout9 @@ -657,7 +657,7 @@ unnamed - + textLabel1_4 @@ -665,7 +665,7 @@ Icon SIze - + 16/22 @@ -699,7 +699,7 @@ - + groupBox7 @@ -710,7 +710,7 @@ unnamed - + categoryList @@ -718,7 +718,7 @@ AlwaysOff - + layout18 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 @@ StarterHelp - + StarterHelp @@ -19,11 +19,11 @@ unnamed - + tabWidget2 - + tab @@ -34,7 +34,7 @@ unnamed - + textLabel5 @@ -55,7 +55,7 @@ Pressing <b>down</b> will move the keyboard focus to the below entr - + tab @@ -66,7 +66,7 @@ Pressing <b>down</b> will move the keyboard focus to the below entr unnamed - + textLabel6 @@ -80,7 +80,7 @@ Pressing the <b>up</b> key on the topmost item will act as above.< - + TabPage @@ -91,7 +91,7 @@ Pressing the <b>up</b> key on the topmost item will act as above.< unnamed - + textLabel1 diff --git a/style/baghira.cpp b/style/baghira.cpp index bae1611..bb61570 100644 --- a/style/baghira.cpp +++ b/style/baghira.cpp @@ -3,54 +3,54 @@ #include "pixmaps.h" //#include "../deco/baghiradecobuttons.h" -#include -#include -#include -#include -#include -#include -#include -//#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -//#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +//#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include "config.h" -#define PRINTDEVICE(p) qWarning("device is %s", (p->device()->devType() == QInternal::Widget) ?\ -"Widget": (p->device()->devType() == QInternal::Pixmap) ?\ -"Pixmap": (p->device()->devType() == QInternal::Printer) ?\ -"Printer": (p->device()->devType() == QInternal::Picture) ?\ -"Picture": (p->device()->devType() == QInternal::UndefinedDevice) ?\ +#define PRINTDEVICE(p) tqWarning("device is %s", (p->device()->devType() == TQInternal::Widget) ?\ +"Widget": (p->device()->devType() == TQInternal::Pixmap) ?\ +"Pixmap": (p->device()->devType() == TQInternal::Printer) ?\ +"Printer": (p->device()->devType() == TQInternal::Picture) ?\ +"Picture": (p->device()->devType() == TQInternal::UndefinedDevice) ?\ "UndefinedDevice": "fuckdevice!" ); #define GCC_VERSION (__GNUC__ * 10000 \ @@ -73,19 +73,19 @@ int OptionHandler::menuOpacity; bool OptionHandler::menuColorButton; bool OptionHandler::shadowText; //color -QColor OptionHandler::customButtonColor, OptionHandler::menuStripeColor_; +TQColor OptionHandler::customButtonColor, OptionHandler::menuStripeColor_; //widgets bool OptionHandler::customWidgetColor; -QColor OptionHandler::customColors[ 10 ]; +TQColor OptionHandler::customColors[ 10 ]; //menu bool OptionHandler::useCustomMenuColor; -QColor OptionHandler::color, OptionHandler::color2, OptionHandler::colorHigh, OptionHandler::fgColor, OptionHandler::fgColorHigh; +TQColor OptionHandler::color, OptionHandler::color2, OptionHandler::colorHigh, OptionHandler::fgColor, OptionHandler::fgColorHigh; //Panel // bool OptionHandler::panelCustom; -// QColor OptionHandler::customPanelColor; +// TQColor OptionHandler::customPanelColor; //incativeButton int OptionHandler::inactiveButtonColor; -QColor OptionHandler::customInactiveButtonColor; +TQColor OptionHandler::customInactiveButtonColor; //Design //stipples @@ -98,7 +98,7 @@ int OptionHandler::shadowDarkness; //istviews; bool OptionHandler::drawDotlines, OptionHandler::useCustomExpanderColor; int OptionHandler::expanderStyle; -QColor OptionHandler::expanderColor, OptionHandler::dotlineColor; +TQColor OptionHandler::expanderColor, OptionHandler::dotlineColor; int OptionHandler::dotlineStyle; //slider bool OptionHandler::squeezesbslider; @@ -117,18 +117,18 @@ int OptionHandler::progressBar; bool OptionHandler::removeKickerBevel; Style OptionHandler::_toolbuttonStyle; bool OptionHandler::drawProgressLabel; -QColor OptionHandler::brushTint; -QColor OptionHandler::aDecoColor1_; -QColor OptionHandler::aDecoColor2_; -QColor OptionHandler::titleColor_[2]; -QColor OptionHandler::titleButtonColor_[3]; +TQColor OptionHandler::brushTint; +TQColor OptionHandler::aDecoColor1_; +TQColor OptionHandler::aDecoColor2_; +TQColor OptionHandler::titleColor_[2]; +TQColor OptionHandler::titleButtonColor_[3]; bool OptionHandler::tintBrush; tabStyle OptionHandler::tabStyle_; unsigned long OptionHandler::wmDesign; bool OptionHandler::animateButton; int OptionHandler::custCols[8]; -QPixmap LiquidStyle::popupBack; +TQPixmap LiquidStyle::popupBack; //============ @@ -137,12 +137,12 @@ class KAccessToolBarButton : public KToolBarButton // to get me access to the toolbbar friend class LiquidStyle; public: - KAccessToolBarButton( QWidget* parent=0, const char* name=0 ) + KAccessToolBarButton( TQWidget* parent=0, const char* name=0 ) : KToolBarButton( parent, name ) {} }; -class LiquidStylePlugin : public QStylePlugin { +class LiquidStylePlugin : public TQStylePlugin { public: LiquidStylePlugin() { ; @@ -151,13 +151,13 @@ class LiquidStylePlugin : public QStylePlugin { ; } - QStringList keys() const { - return ( QStringList() << "Baghira" ); + TQStringList keys() const { + return ( TQStringList() << "Baghira" ); } - QStyle *create( const QString & ); + TQStyle *create( const TQString & ); }; -QStyle *LiquidStylePlugin::create( const QString &s ) { +TQStyle *LiquidStylePlugin::create( const TQString &s ) { if ( s.lower() == "baghira" ) return ( new LiquidStyle() ); return ( 0 ); @@ -174,10 +174,10 @@ static const int rightBorder = 12; LiquidStyle::LiquidStyle() : KStyle( AllowMenuTransparency | FilledFrameWorkaround, ThreeButtonScrollBar ) { - QIntDictbfi(31);// assuming 31 btns will be enough - a pointer list would be more accurate, but we need to lookup this every 50ms... - QIntDictbtnShadowedDict(223);// we need around 10/color, 3 colors/button assuming 10 different colors (e.g. kcalc) - QIntDictbuttonGlowDict(109); - QIntDictbuttonDict(331); + TQIntDictbfi(31);// assuming 31 btns will be enough - a pointer list would be more accurate, but we need to lookup this every 50ms... + TQIntDictbtnShadowedDict(223);// we need around 10/color, 3 colors/button assuming 10 different colors (e.g. kcalc) + TQIntDictbuttonGlowDict(109); + TQIntDictbuttonDict(331); headerHoverID = -1; headerSortID = -1; hoveredTabIndex = -1; @@ -206,16 +206,16 @@ LiquidStyle::LiquidStyle() : KStyle( AllowMenuTransparency | FilledFrameWorkarou progAnimShift = 0; prog2AnimShift = 0; sliderAnimShift = 0; - QTimer* timer = new QTimer( this ); + TQTimer* timer = new TQTimer( this ); timer->start(50, false); // if (optionHandler->AnimateProgress()) connect(timer, SIGNAL(timeout()), this, SLOT(updateProgressPos())); activeScroller = NULL; //-------------------------------------- - tooltipPalette = qApp->palette(); - tooltipPalette.setBrush( QColorGroup::Background, QColor( 255, 255, 220 ) ); - tooltipPalette.setBrush( QColorGroup::Foreground, Qt::black ); + tooltipPalette = tqApp->palette(); + tooltipPalette.setBrush( TQColorGroup::Background, TQColor( 255, 255, 220 ) ); + tooltipPalette.setBrush( TQColorGroup::Foreground, TQt::black ); rMatrix.rotate( 90.0 ); lMatrix.rotate( 270.0 ); @@ -232,58 +232,58 @@ LiquidStyle::LiquidStyle() : KStyle( AllowMenuTransparency | FilledFrameWorkarou switch (optionHandler->buttonStyle()) { case Jaguar: - btnBorderImg = new QImage( uic_findImage("button-jaguar") ); - btnShadowImg = new QImage( uic_findImage( "button-shadow" ) ); - buttonGlow = new QImage( uic_findImage( "button-glow" ) ); - combo = new QImage( uic_findImage("combo-jaguar") ); - comboShadow = new QImage( uic_findImage( "combo-shadow" ) ); + btnBorderImg = new TQImage( uic_findImage("button-jaguar") ); + btnShadowImg = new TQImage( uic_findImage( "button-shadow" ) ); + buttonGlow = new TQImage( uic_findImage( "button-glow" ) ); + combo = new TQImage( uic_findImage("combo-jaguar") ); + comboShadow = new TQImage( uic_findImage( "combo-shadow" ) ); if (optionHandler->toolbuttonStyle() == Brushed || !optionHandler->SmoothListViewHeaders()) - rectbutton = new QImage( uic_findImage( "rectbutton" ) ); + rectbutton = new TQImage( uic_findImage( "rectbutton" ) ); else rectbutton = 0L; break; case Panther: case Tiger: - btnBorderImg = new QImage( uic_findImage("button-base") ); - btnShadowImg = new QImage( uic_findImage( "button-shadow" ) ); - buttonGlow = new QImage( uic_findImage( "button-glow" ) ); - combo = new QImage( uic_findImage("combo") ); - comboShadow = new QImage( uic_findImage( "combo-shadow" ) ); + btnBorderImg = new TQImage( uic_findImage("button-base") ); + btnShadowImg = new TQImage( uic_findImage( "button-shadow" ) ); + buttonGlow = new TQImage( uic_findImage( "button-glow" ) ); + combo = new TQImage( uic_findImage("combo") ); + comboShadow = new TQImage( uic_findImage( "combo-shadow" ) ); if (optionHandler->toolbuttonStyle() == Brushed || !optionHandler->SmoothListViewHeaders()) - rectbutton = new QImage( uic_findImage( "rectbutton" ) ); + rectbutton = new TQImage( uic_findImage( "rectbutton" ) ); else rectbutton = 0L; break; case Brushed: btnBorderImg = 0L; btnShadowImg = 0L; buttonGlow = 0L; - rectbutton = new QImage( uic_findImage( "rectbutton" ) ); + rectbutton = new TQImage( uic_findImage( "rectbutton" ) ); switch (optionHandler->toolbuttonStyle()) { case Jaguar: - combo = new QImage( uic_findImage("combo-jaguar") ); - comboShadow = new QImage( uic_findImage( "combo-shadow" ) ); + combo = new TQImage( uic_findImage("combo-jaguar") ); + comboShadow = new TQImage( uic_findImage( "combo-shadow" ) ); break; case Panther: case Tiger: case Brushed: - combo = new QImage( uic_findImage("combo") ); - comboShadow = new QImage( uic_findImage( "combo-shadow" ) ); + combo = new TQImage( uic_findImage("combo") ); + comboShadow = new TQImage( uic_findImage( "combo-shadow" ) ); break; case Milk: - combo = new QImage( uic_findImage("combo-milk") ); - comboShadow = new QImage( uic_findImage( "combo-shadow" ) ); + combo = new TQImage( uic_findImage("combo-milk") ); + comboShadow = new TQImage( uic_findImage( "combo-shadow" ) ); default: break; } break; case Milk: - btnBorderImg = new QImage( uic_findImage("button-milk") ); + btnBorderImg = new TQImage( uic_findImage("button-milk") ); btnShadowImg = 0L; buttonGlow = 0L; - combo = new QImage( uic_findImage("combo-milk") ); - comboShadow = new QImage( uic_findImage( "combo-shadow" ) ); + combo = new TQImage( uic_findImage("combo-milk") ); + comboShadow = new TQImage( uic_findImage( "combo-shadow" ) ); if (optionHandler->toolbuttonStyle() == Brushed || !optionHandler->SmoothListViewHeaders()) - rectbutton = new QImage( uic_findImage( "rectbutton" ) ); + rectbutton = new TQImage( uic_findImage( "rectbutton" ) ); else rectbutton = 0L; default: break; @@ -309,13 +309,13 @@ LiquidStyle::LiquidStyle() : KStyle( AllowMenuTransparency | FilledFrameWorkarou if (optionHandler->style() == Milk) { - slider_top = new QImage( uic_findImage( "sbslider_top-milk" ) ); - slider_btm = new QImage( uic_findImage( "sbslider_btm-milk" ) ); + slider_top = new TQImage( uic_findImage( "sbslider_top-milk" ) ); + slider_btm = new TQImage( uic_findImage( "sbslider_btm-milk" ) ); } else { - slider_top = new QImage( uic_findImage( "sbslider_top" ) ); - slider_btm = new QImage( uic_findImage( "sbslider_btm" ) ); + slider_top = new TQImage( uic_findImage( "sbslider_top" ) ); + slider_btm = new TQImage( uic_findImage( "sbslider_btm" ) ); } if ( slider_top->depth() < 32 ) @@ -326,11 +326,11 @@ LiquidStyle::LiquidStyle() : KStyle( AllowMenuTransparency | FilledFrameWorkarou if (optionHandler->shadowSbSlider()) { - slider_top_shd = new QImage( uic_findImage( "sbslider_top_shd" ) ); + slider_top_shd = new TQImage( uic_findImage( "sbslider_top_shd" ) ); if ( slider_top_shd->depth() < 32 ) * slider_top_shd = slider_top_shd->convertDepth( 32 ); - slider_btm_shd = new QImage( uic_findImage( "sbslider_btm_shd" ) ); + slider_btm_shd = new TQImage( uic_findImage( "sbslider_btm_shd" ) ); if ( slider_btm_shd->depth() < 32 ) * slider_btm_shd = slider_btm_shd->convertDepth( 32 ); } @@ -340,7 +340,7 @@ LiquidStyle::LiquidStyle() : KStyle( AllowMenuTransparency | FilledFrameWorkarou slider_btm_shd = 0L; } - roundFrame = new QImage( uic_findImage( "roundFrame" ) ); + roundFrame = new TQImage( uic_findImage( "roundFrame" ) ); if ( roundFrame->depth() < 32 ) * roundFrame = roundFrame->convertDepth( 32 ); @@ -352,28 +352,28 @@ LiquidStyle::LiquidStyle() : KStyle( AllowMenuTransparency | FilledFrameWorkarou pixmaps[ i ] = NULL; } - sbLeft = new QBitmap( 6, 7, sbarrow_left_bits, true ); + sbLeft = new TQBitmap( 6, 7, sbarrow_left_bits, true ); sbLeft->setMask( *sbLeft ); - sbRight = new QBitmap( 6, 7, sbarrow_right_bits, true ); + sbRight = new TQBitmap( 6, 7, sbarrow_right_bits, true ); sbRight->setMask( *sbRight ); - sbUp = new QBitmap( 7, 6, sbarrow_up_bits, true ); + sbUp = new TQBitmap( 7, 6, sbarrow_up_bits, true ); sbUp->setMask( *sbUp ); - sbDown = new QBitmap( 7, 6, sbarrow_down_bits, true ); + sbDown = new TQBitmap( 7, 6, sbarrow_down_bits, true ); sbDown->setMask( *sbDown ); - checkmark = new QBitmap( 6, 7, checkmark_bits, true ); + checkmark = new TQBitmap( 6, 7, checkmark_bits, true ); checkmark->setMask( *checkmark ); - isKicker = ( qstrcmp( qApp->argv() [ 0 ], "kicker" ) == 0 ) || - ( qstrcmp( qApp->argv() [ 0 ], "appletproxy" ) == 0 ); - isOOO = !qstrcmp( qApp->argv() [ 0 ], "soffice.bin" ); + isKicker = ( qstrcmp( tqApp->argv() [ 0 ], "kicker" ) == 0 ) || + ( qstrcmp( tqApp->argv() [ 0 ], "appletproxy" ) == 0 ); + isOOO = !qstrcmp( tqApp->argv() [ 0 ], "soffice.bin" ); - groupShadow = new QPixmap( 64, 64 ); - QColor c; - optionHandler->custCols[0] != -1 ? c = QColor(optionHandler->custCols[0]) : c= QColor(qApp->palette().color(QPalette::Active, isKicker?QColorGroup::Button:QColorGroup::Background)); + groupShadow = new TQPixmap( 64, 64 ); + TQColor c; + optionHandler->custCols[0] != -1 ? c = TQColor(optionHandler->custCols[0]) : c= TQColor(tqApp->palette().color(TQPalette::Active, isKicker?TQColorGroup::Button:TQColorGroup::Background)); groupShadow->fill( ( c.dark( 100 + optionHandler->ShadowDarkness() ) ).rgb() ); if ( (optionHandler->style() != Brushed) && optionHandler->useBgStipple() ) { - QPainter p; + TQPainter p; p.begin( groupShadow ); p.setPen( c.dark( 100 + optionHandler->ShadowDarkness() + (int)(optionHandler->stippleContrast()/2) ) ); for ( int i = 1; i < 64; i += 4 ) { @@ -468,10 +468,10 @@ inline void LiquidStyle::updateProgressPos() progAnimShift = (progAnimShift + 1) % 20; prog2AnimShift = (prog2AnimShift + 1) % 38; //Update the registered progressbars. - QMap::iterator iter; + TQMap::iterator iter; for (iter = progAnimWidgets.begin(); iter != progAnimWidgets.end(); iter++) { - if ( !::qt_cast(iter.key()) ) + if ( !::tqt_cast(iter.key()) ) continue; (iter.key())->repaint(false); } @@ -483,8 +483,8 @@ inline void LiquidStyle::updateSliderPos(){ activeScroller->repaint(false); } -void LiquidStyle::progressBarDestroyed(QObject* obj){ - progAnimWidgets.remove(static_cast(obj)); +void LiquidStyle::progressBarDestroyed(TQObject* obj){ + progAnimWidgets.remove(static_cast(obj)); } bool LiquidStyle::isPlain() const { @@ -492,9 +492,9 @@ bool LiquidStyle::isPlain() const { } -void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, - const QRect &r, const QColorGroup &cg, - SFlags flags, const QStyleOption &opt ) const +void LiquidStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, + const TQRect &r, const TQColorGroup &cg, + SFlags flags, const TQStyleOption &opt ) const { bool down = flags & Style_Down; bool on = flags & Style_On; @@ -504,34 +504,34 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, case PE_TabBarBase: { bool isDialog = false; - if (p->device() && p->device()->devType() == QInternal::Widget) + if (p->device() && p->device()->devType() == TQInternal::Widget) { - QWidget *w = (QWidget*)p->device(); - if (w && ::qt_cast(w) && w->children()) + TQWidget *w = (TQWidget*)p->device(); + if (w && ::tqt_cast(w) && w->children()) { - QObjectListIt it( *w->children() ); // iterate over the buttons - QObject *obj; - QTabBar *tabBar = 0L; + TQObjectListIt it( *w->children() ); // iterate over the buttons + TQObject *obj; + TQTabBar *tabBar = 0L; while ( (obj = it.current()) != 0 ) { ++it; - if (::qt_cast(obj)) + if (::tqt_cast(obj)) { - tabBar = (QTabBar*)obj; + tabBar = (TQTabBar*)obj; break; } } if (!tabBar || !tabBar->isVisible()) break; } - isDialog = optionHandler->TabStyle() == Clever && w->topLevelWidget()->inherits("QDialog"); + isDialog = optionHandler->TabStyle() == Clever && w->topLevelWidget()->inherits("TQDialog"); } if (isDialog || optionHandler->TabStyle() == Chooser) { int x = r.x(); int right = r.right(); int bottom = r.bottom(); int y2 = r.y() + 1; - QColor bright( cg.background().dark( 110 ) ); - QColor mid( cg.background().dark( 130 ) ); - QColor dark( cg.background().dark( 150 ) ); + TQColor bright( cg.background().dark( 110 ) ); + TQColor mid( cg.background().dark( 130 ) ); + TQColor dark( cg.background().dark( 150 ) ); p->setPen( dark ); p->drawLine( x + 6, y2, right - 6, y2 ); p->drawPoint(x+3,y2+1);p->drawPoint(x+4,y2+1); @@ -569,11 +569,11 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, else { drawCombo( p, cg, cg.button(), r.x()+1, r.y()+1, r.width()-2, r.height()+1, false, false, false, center); - QPen oldPen = p->pen(); + TQPen oldPen = p->pen(); // p->setClipping ( false ); p->setPen( cg.button().dark( 158 ) ); p->drawRect(r); -// p->fillRect(r, Qt::red); +// p->fillRect(r, TQt::red); // p->flush(); p->setPen(oldPen); } @@ -585,10 +585,10 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, bool sunken = on || down; bool hover = flags & Style_MouseOver; bool focused = flags & Style_HasFocus; - QColor newColor = sunken ? cg.button().dark( 110 ) : hover || focused ? cg.button() : optionHandler->InactiveButtonColor(); + TQColor newColor = sunken ? cg.button().dark( 110 ) : hover || focused ? cg.button() : optionHandler->InactiveButtonColor(); if (optionHandler->AnimateButton() && (sunken || hover || focused)) { - ButtonFadeInfo *bfi_ = /*(::qt_cast(*/opt.widget()/*))*/ ? bfi[opt.widget()->winId()] : 0L; + ButtonFadeInfo *bfi_ = /*(::tqt_cast(*/opt.widget()/*))*/ ? bfi[opt.widget()->winId()] : 0L; if (bfi_) { int index = bfi_->index; @@ -603,7 +603,7 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, else if ( ( r.width() < 21 || r.height() < 25 )) { drawCombo( p, cg, newColor, r.x(), r.y(), r.width(), r.height()+2, sunken, hover, false, center, isHTMLButton ); - QPen oldpen(p->pen()); + TQPen oldpen(p->pen()); p->setPen( newColor.dark(150)); p->drawRect(r.x(), r.y(), r.width(), r.height()); if (sunken) @@ -647,7 +647,7 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, { bool sunken = on || down; bool hover = flags & Style_MouseOver; - QPen oldpen(p->pen()); + TQPen oldpen(p->pen()); if ( isTaskContainer ) // is kicker? { if (optionHandler->SmoothListViewHeaders()) @@ -675,16 +675,16 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, } else { - if ( (p->device() && p->device()->devType() == QInternal::Widget) && ::qt_cast((QWidget*)p->device()) ) + if ( (p->device() && p->device()->devType() == TQInternal::Widget) && ::tqt_cast((TQWidget*)p->device()) ) { - QHeader *header = (QHeader*)p->device(); - int id = header->orientation() == Qt::Horizontal ? header->sectionAt( r.x() + 2 + header->offset() ) : header->sectionAt( r.y() + 2 + header->offset() ); + TQHeader *header = (TQHeader*)p->device(); + int id = header->orientation() == TQt::Horizontal ? header->sectionAt( r.x() + 2 + header->offset() ) : header->sectionAt( r.y() + 2 + header->offset() ); hover = ((id != -1) && ((currentHeader == header && id == headerHoverID ) || id == headerSortID)); if (header->mapToIndex(id) == header->count()-1 && (r.bottom() < header->rect().bottom() || r.right() < header->rect().right())) { bool hadClip = p->hasClipping(); p->setClipping( false ); - if (header->orientation() == Qt::Horizontal) + if (header->orientation() == TQt::Horizontal) p->fillRect(r.right()+1, r.y(), header->width()-r.right(), r.height(), cg.base()); else p->fillRect(r.x(), r.bottom()+1, r.width(), header->height()-r.bottom(), cg.base()); @@ -710,9 +710,9 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, case PE_ScrollBarAddPage: case PE_ScrollBarSubPage: { - QColor sbBgColor = optionHandler->useCustomColors() ? + TQColor sbBgColor = optionHandler->useCustomColors() ? optionHandler->customColor( CustomSBGroove ) : - qApp->palette().active().background(); + tqApp->palette().active().background(); bool isActive = optionHandler->ScrollerActive(); bool isHover = currentScrollBar->hasMouse(); @@ -723,10 +723,10 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, if ( flags & Style_Horizontal ) { int extent = currentScrollBar->height(); - QRect bgR( extent, 0, currentScrollBar->width() - extent * 3 + 1, extent ); + TQRect bgR( extent, 0, currentScrollBar->width() - extent * 3 + 1, extent ); if ( sbBuffer.size() != currentScrollBar->size() ) const_cast( this )->sbBuffer.resize( currentScrollBar->size() ); - QPainter painter; + TQPainter painter; painter.begin( &sbBuffer ); // pixmaps if (drawSlider) @@ -758,7 +758,7 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, (isHover || isActive || isOOO) ? *getPixmap( HSBSliderTopActive ) : *getPixmap( HSBSliderTop ) ); // mid part last, as i have to redefine clip section - painter.setClipRect(r.x() + 7 + offset2, r.y() + 1, r.width() - 14 - 2*offset2, 13, QPainter::CoordPainter); + painter.setClipRect(r.x() + 7 + offset2, r.y() + 1, r.width() - 14 - 2*offset2, 13, TQPainter::CoordPainter); painter.drawTiledPixmap( r.x() + 7 + offset2 + ((isHover && !isPressed) ? (sliderAnimShift - 32) : 0), r.y() + 1, r.width() - 14 - 2*offset2 - ((isHover && !isPressed) ? (sliderAnimShift - 32) : 0), 13, isPressed ? *getPixmap( HSBSliderMidPressed ) : (isHover || isActive || isOOO) ? *getPixmap( HSBSliderMidActive ) : @@ -772,11 +772,11 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, else { int extent = currentScrollBar->width(); - QRect bgR( 0, extent, extent, currentScrollBar->height() - extent * 3 + 1 ); + TQRect bgR( 0, extent, extent, currentScrollBar->height() - extent * 3 + 1 ); if ( sbBuffer.size() != currentScrollBar->size() ) const_cast( this ) -> sbBuffer.resize( currentScrollBar->size() ); - QPainter painter; + TQPainter painter; painter.begin( &sbBuffer ); // set painter to pixelbuffer if (drawSlider) { @@ -809,7 +809,7 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, (isHover || isActive || isOOO) ? *getPixmap( VSBSliderBtmActive ) : *getPixmap( VSBSliderBtm ) ); // mid part last, as i have to redefine clipping section - painter.setClipRect(r.x() + 1, r.y() + 7+offset2, 13, r.height() - 14 - 2*offset2, QPainter::CoordPainter); + painter.setClipRect(r.x() + 1, r.y() + 7+offset2, 13, r.height() - 14 - 2*offset2, TQPainter::CoordPainter); painter.drawTiledPixmap( r.x() + 1, r.y() + 7 + offset2 - ((isHover && !isPressed) ? sliderAnimShift : 0), 13, r.height() - 14 - 2*offset2 + ((isHover && !isPressed) ? sliderAnimShift : 0), isPressed ? *getPixmap( VSBSliderMidPressed ) : @@ -823,10 +823,10 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, } case PE_ScrollBarAddLine: { - QColor c( optionHandler->useCustomColors() ? + TQColor c( optionHandler->useCustomColors() ? optionHandler->customColor( CustomSBGroove ) : - qApp->palette().active().background() ); - QColor pixColor = flags & Style_Down ? qApp->palette().active().button() : c; + tqApp->palette().active().background() ); + TQColor pixColor = flags & Style_Down ? tqApp->palette().active().button() : c; bool drawSlider = currentScrollBar->minValue() < currentScrollBar->maxValue(); @@ -846,18 +846,18 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, } if (drawSlider) { - p->setPen( flags & Style_Down ? cg.button() : QColor(85,85,85) ); - p->setBrush( flags & Style_Down ? cg.button() : QColor(85,85,85) ); + p->setPen( flags & Style_Down ? cg.button() : TQColor(85,85,85) ); + p->setBrush( flags & Style_Down ? cg.button() : TQColor(85,85,85) ); p->drawPixmap( r.x() + 4, r.y() + 4, flags & Style_Horizontal ? *sbRight : *sbDown ); } break; } case PE_ScrollBarSubLine: { - QColor c( optionHandler->useCustomColors() ? + TQColor c( optionHandler->useCustomColors() ? optionHandler->customColor( CustomSBGroove ) : - qApp->palette().active().background() ); - QColor pixColor = flags & Style_Down ? qApp->palette().active().button() : c; + tqApp->palette().active().background() ); + TQColor pixColor = flags & Style_Down ? tqApp->palette().active().button() : c; bool top = flags & Style_Horizontal ? r.x() == 0 : r.y() == 0; bool drawSlider = currentScrollBar->minValue() < currentScrollBar->maxValue(); @@ -892,8 +892,8 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, } if (drawSlider) { - p->setPen( flags & Style_Down ? cg.button() : QColor(85,85,85) ); - p->setBrush( flags & Style_Down ? cg.button() : QColor(85,85,85) ); + p->setPen( flags & Style_Down ? cg.button() : TQColor(85,85,85) ); + p->setBrush( flags & Style_Down ? cg.button() : TQColor(85,85,85) ); if (currentScrollBar->minValue() < currentScrollBar->maxValue()) p->drawPixmap( r.x() + 4, r.y() + 4, flags & Style_Horizontal ? *sbLeft : *sbUp ); } break; @@ -902,7 +902,7 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, { bool hover = flags & Style_MouseOver; bool pressed = flags & Style_Down; -// bool isMasked = p->device() && p->device() ->devType() == QInternal::Widget && ( ( QWidget * ) p->device() ) ->autoMask(); +// bool isMasked = p->device() && p->device() ->devType() == TQInternal::Widget && ( ( TQWidget * ) p->device() ) ->autoMask(); #if 0 if ( isMasked ) { @@ -937,7 +937,7 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, } case PE_IndicatorMask: { - p->fillRect( r, Qt::color1 ); + p->fillRect( r, TQt::color1 ); break; } case PE_ExclusiveIndicator: @@ -964,8 +964,8 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, case PE_Splitter: case PE_DockWindowResizeHandle: { - QPen oldpen(p->pen()); - QBrush oldbrush(p->brush()); + TQPen oldpen(p->pen()); + TQBrush oldbrush(p->brush()); if (highlightWidget == p->device()) { if (flags & Style_Horizontal) @@ -1017,17 +1017,17 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, case PE_PanelGroupBox: case PE_GroupBoxFrame: { - QColor bgColor; - QWidget* w = (p->device() && p->device()->devType() == QInternal::Widget) ? - (QWidget*)(p->device()) : 0; - QGroupBox* gb = ::qt_cast(w); + TQColor bgColor; + TQWidget* w = (p->device() && p->device()->devType() == TQInternal::Widget) ? + (TQWidget*)(p->device()) : 0; + TQGroupBox* gb = ::tqt_cast(w); optionHandler->drawGroupBoxShadow() ? - bgColor = QColor(cg.background().dark( 100 + optionHandler->ShadowDarkness() )) : - bgColor = QColor(cg.background()); - QColor bright( bgColor.dark( 110 ) ); - QColor mid( bgColor.dark( 130 ) ); - QColor dark( bgColor.dark( 150 ) ); + bgColor = TQColor(cg.background().dark( 100 + optionHandler->ShadowDarkness() )) : + bgColor = TQColor(cg.background()); + TQColor bright( bgColor.dark( 110 ) ); + TQColor mid( bgColor.dark( 130 ) ); + TQColor dark( bgColor.dark( 150 ) ); int titleHeight = (gb && !gb->title().isEmpty() && pe == PE_PanelGroupBox) ? p->fontMetrics().height()+(gb->isCheckable()?4:1) : 0; @@ -1045,44 +1045,44 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, if (gb && titleHeight) { bool hadClip = p->hasClipping(); - QRegion oldClip = p->clipRegion(); + TQRegion oldClip = p->clipRegion(); if (gb->parentWidget()) { - const QPixmap *pix = gb->parentWidget()->paletteBackgroundPixmap(); + const TQPixmap *pix = gb->parentWidget()->paletteBackgroundPixmap(); if (optionHandler->drawGroupBoxShadow()) { - QPointArray pa1(3); + TQPointArray pa1(3); pa1.setPoint(0, x,y2); pa1.setPoint(1, x+5,y2); pa1.setPoint(2, x,y2+5); - QPointArray pa2(3); + TQPointArray pa2(3); pa2.setPoint(0, right-5,y2); pa2.setPoint(1, right,y2); pa2.setPoint(2, right,y2+5); - QPointArray pa3(3); + TQPointArray pa3(3); pa3.setPoint(0, right,bottom-5); pa3.setPoint(1, right,bottom); pa3.setPoint(2, right-5,bottom); - QPointArray pa4(3); + TQPointArray pa4(3); pa4.setPoint(0, x+5,bottom); pa4.setPoint(1, x,bottom); pa4.setPoint(2, x,bottom-5); - QRegion reg2(0,0, r.right(), titleHeight); - p->setClipRegion(QRegion(pa1)+QRegion(pa2)+QRegion(pa3)+QRegion(pa4)+reg2); + TQRegion reg2(0,0, r.right(), titleHeight); + p->setClipRegion(TQRegion(pa1)+TQRegion(pa2)+TQRegion(pa3)+TQRegion(pa4)+reg2); } else p->setClipRect(0,0,r.right(),titleHeight); - pix ? p->drawTiledPixmap( QRect( 0, 0, w->width(), w->height()), *pix, w->backgroundOffset()) : p->fillRect(QRect(0, 0, w->width(), w->height()),w->parentWidget()->backgroundBrush()); + pix ? p->drawTiledPixmap( TQRect( 0, 0, w->width(), w->height()), *pix, w->backgroundOffset()) : p->fillRect(TQRect(0, 0, w->width(), w->height()),w->parentWidget()->backgroundBrush()); } if (gb && !gb->isCheckable()) { - QString title = gb->title(); - QFont font( p->font() ); + TQString title = gb->title(); + TQFont font( p->font() ); font.setBold( true ); p->setFont( font ); - drawItem( p, QRect(10,0,r.width(),titleHeight), ShowPrefix, cg, flags & Style_Enabled, 0, title, -1, &cg.text() ); + drawItem( p, TQRect(10,0,r.width(),titleHeight), ShowPrefix, cg, flags & Style_Enabled, 0, title, -1, &cg.text() ); } p->setClipRegion(oldClip); p->setClipping(hadClip); @@ -1185,12 +1185,12 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, { // don't ask bool isDialog = optionHandler->TabStyle() == Clever && - (p->device() && p->device()->devType() == QInternal::Widget)&& - ((QWidget*)p->device())->topLevelWidget()->inherits("QDialog"); + (p->device() && p->device()->devType() == TQInternal::Widget)&& + ((TQWidget*)p->device())->topLevelWidget()->inherits("TQDialog"); - QColor bright( cg.background().dark( 110 ) ); - QColor mid( cg.background().dark( 130 ) ); - QColor dark( cg.background().dark( 150 ) ); + TQColor bright( cg.background().dark( 110 ) ); + TQColor mid( cg.background().dark( 130 ) ); + TQColor dark( cg.background().dark( 150 ) ); int x = r.x(); int right = r.right(); int bottom = r.bottom(); int y2 = r.y(); if (isDialog || optionHandler->TabStyle() == Chooser) { @@ -1238,7 +1238,7 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, case PE_PanelLineEdit: { bool focused = flags & Style_HasFocus; - bool isHTML = p->device() && p->device()->devType() == QInternal::Widget && isHTMLWidget((QWidget*)p->device()); + bool isHTML = p->device() && p->device()->devType() == TQInternal::Widget && isHTMLWidget((TQWidget*)p->device()); drawEditFrame( p, r, cg, isHTML, focused, false); break; } @@ -1246,7 +1246,7 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, { int x, y, w , h; r.rect( &x, &y, &w, &h ); - QColor c( optionHandler->UseCustomMenuColor()? + TQColor c( optionHandler->UseCustomMenuColor()? optionHandler->Color(): optionHandler->MenuColorButton()? optionHandler->buttonColor(): @@ -1269,7 +1269,7 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, case PE_DockWindowSeparator: { break; //don't draw anything - if (!(p->device() && p->device()->devType() == QInternal::Widget && ::qt_cast((QWidget*)p->device()))) + if (!(p->device() && p->device()->devType() == TQInternal::Widget && ::tqt_cast((TQWidget*)p->device()))) { if ( !( flags & Style_Horizontal ) ) { @@ -1295,8 +1295,8 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, bool hover = flags & Style_MouseOver; int x = r.x() + ( r.width() - 7 ) / 2; int y = pe == PE_SpinWidgetDown ? r.y() + 1 : r.bottom() - 7; - QPen oldPen( p->pen() ); - QBrush oldBrush( p->brush() ); + TQPen oldPen( p->pen() ); + TQBrush oldBrush( p->brush() ); p->setPen( sunken ? cg.button() : hover ? cg.mid() : cg.text() ); p->setBrush( sunken ? cg.button() : hover ? cg.mid() : cg.text() ); p->drawPixmap( x, y, pe == PE_SpinWidgetUp ? *sbUp : *sbDown ); @@ -1306,7 +1306,7 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, } case PE_CheckMark: { - QPen oldPen( p->pen() ); + TQPen oldPen( p->pen() ); p->setPen( flags & Style_On ? cg.highlightedText() : optionHandler->textColor() ); p->drawPixmap(r.x() + r.width()/2 - 4,r.y() + r.height()/2 - 4,*checkmark); p->setPen( oldPen ); @@ -1316,9 +1316,9 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, { if ( (pe >= PE_ArrowUp && pe <= PE_ArrowLeft ) || pe == PE_HeaderArrow) { - QBrush oldBrush(p->brush()); - QColor tmpC = flags & Style_Enabled ? (flags & Style_Down || flags & Style_Sunken) && pe != PE_HeaderArrow ? cg.light() : cg.buttonText() : cg.mid(); - if (tmpC == Qt::black) tmpC = QColor(85,85,85); + TQBrush oldBrush(p->brush()); + TQColor tmpC = flags & Style_Enabled ? (flags & Style_Down || flags & Style_Sunken) && pe != PE_HeaderArrow ? cg.light() : cg.buttonText() : cg.mid(); + if (tmpC == TQt::black) tmpC = TQColor(85,85,85); p->setBrush(tmpC); int x = r.width() > 7 ? r.x() + r.width()/2 - 4 : r.right() - 7; int y = r.height() > 7 ? r.y() + r.height()/2 - 4 : r.bottom() - 7; @@ -1362,10 +1362,10 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, } // general switch } -void LiquidStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter* p, - const QWidget* widget, const QRect &r, - const QColorGroup &cg, SFlags flags, - const QStyleOption &opt ) const +void LiquidStyle::drawKStylePrimitive( KStylePrimitive kpe, TQPainter* p, + const TQWidget* widget, const TQRect &r, + const TQColorGroup &cg, SFlags flags, + const TQStyleOption &opt ) const { switch ( kpe ) { @@ -1376,7 +1376,7 @@ void LiquidStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter* p, int x, y, w, h; r.rect( &x, &y, &w, &h ); w = (int)((w-3)/2); - QColor c( (optionHandler->style() == Brushed) ? cg.background() : cg.background().dark(120) ); + TQColor c( (optionHandler->style() == Brushed) ? cg.background() : cg.background().dark(120) ); p->setPen(c); p->setBrush(c); for (int i = 0; i < h-3; i += 5 ) @@ -1393,7 +1393,7 @@ void LiquidStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter* p, int x, y, w, h; r.rect( &x, &y, &w, &h ); w = (int)((w-3)/2); - QColor c( widget->hasMouse() ? cg.button() : cg.background().dark(110) ); + TQColor c( widget->hasMouse() ? cg.button() : cg.background().dark(110) ); p->setPen(c); p->setBrush(c); for (int i = 0; i < h-3; i += 5 ) @@ -1431,8 +1431,8 @@ void LiquidStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter* p, { int x, y, w, h; r.rect( &x, &y, &w, &h ); - if (qstrcmp( qApp->argv() [ 0 ], "kmix" ) == 0) x = x+3; - if ( ( ( const QSlider * ) widget ) ->orientation() == Qt::Horizontal ) + if (qstrcmp( tqApp->argv() [ 0 ], "kmix" ) == 0) x = x+3; + if ( ( ( const TQSlider * ) widget ) ->orientation() == TQt::Horizontal ) { int x2 = x + w - 1; y = y + ( h - 5 ) / 2; @@ -1471,18 +1471,18 @@ void LiquidStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter* p, p->drawPixmap( r.x(), r.y(), *getPixmap( flags & Style_Enabled ? RadioOffHover : RadioOff)); break; } - if ((( const QSlider * ) widget ) ->orientation() == Qt::Horizontal) + if ((( const TQSlider * ) widget ) ->orientation() == TQt::Horizontal) (widget && widget->height() < 17) ? p->drawPixmap( r.x(), r.y(), *getPixmap( flags & Style_Enabled ? RadioOffHover : RadioOff)) : p->drawPixmap( r.x(), (optionHandler->style() == Milk) ? r.y() : r.y()+2, *getPixmap( flags & Style_Enabled ? HSlider : HSliderInactive)); else { - bool right = (( const QSlider * ) widget )->tickmarks() == QSlider::NoMarks || (( const QSlider * ) widget )->tickmarks() == QSlider::Right; + bool right = (( const TQSlider * ) widget )->tickmarks() == TQSlider::NoMarks || (( const TQSlider * ) widget )->tickmarks() == TQSlider::Right; (widget && widget->width() < 17) ? p->drawPixmap( r.x()+2, r.y(), *getPixmap( flags & Style_Enabled ? RadioOffHover : RadioOff)) : p->drawPixmap( (optionHandler->style() == Milk) ? r.x() : right ? r.x()+5 : r.x()-3, r.y(), *getPixmap( flags & Style_Enabled ? (right ? VSlider : VSliderAbove) : (right ? VSliderInactive : VSliderAboveInactive))); } break; } case KPE_ListViewExpander: { - p->fillRect(r,Qt::green); + p->fillRect(r,TQt::green); // int radius = ( r.width() - 4 ) / 2; // int centerx = r.x() + r.width() / 2; // int centery = r.y() + r.height() / 2; @@ -1491,7 +1491,7 @@ void LiquidStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter* p, // red = ( cg.dark().red() >> 1 ) + ( cg.base().red() >> 1 ); // green = ( cg.dark().green() >> 1 ) + ( cg.base().green() >> 1 ); // blue = ( cg.dark().blue() >> 1 ) + ( cg.base().blue() >> 1 ); - // QColor blendColor( red, green, blue ); + // TQColor blendColor( red, green, blue ); // // p->setPen( cg.dark() ); // p->drawLine( r.x() + 1, r.y(), r.right() - 1, r.y() ); @@ -1518,10 +1518,10 @@ void LiquidStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter* p, } } -void LiquidStyle::drawControl( ControlElement element, QPainter *p, - const QWidget *widget, const QRect &r, - const QColorGroup &cg, SFlags flags, - const QStyleOption &opt ) const +void LiquidStyle::drawControl( ControlElement element, TQPainter *p, + const TQWidget *widget, const TQRect &r, + const TQColorGroup &cg, SFlags flags, + const TQStyleOption &opt ) const { switch ( element ) { @@ -1534,30 +1534,30 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, } case CE_ProgressBarContents: { -// qWarning("%s - %s,%s : %s,%s",qApp->argv()[0],widget->className(),widget->name(),widget->parentWidget()->className(),widget->parentWidget()->name()); - const QProgressBar *progress = ( const QProgressBar * ) widget; - QRect contentsR( subRect( SR_ProgressBarContents, widget ) ); +// tqWarning("%s - %s,%s : %s,%s",tqApp->argv()[0],widget->className(),widget->name(),widget->parentWidget()->className(),widget->parentWidget()->name()); + const TQProgressBar *progress = ( const TQProgressBar * ) widget; + TQRect contentsR( subRect( SR_ProgressBarContents, widget ) ); double val = progress->progress(); - bool reverse = QApplication::reverseLayout(); + bool reverse = TQApplication::reverseLayout(); val = val / progress->totalSteps(); if ( val > 0.0 ) { - int w = QMIN( contentsR.width(), ( int ) (val * contentsR.width() ) ); + int w = TQMIN( contentsR.width(), ( int ) (val * contentsR.width() ) ); if ( w > 1 ) { int x = contentsR.x(); int y = contentsR.y(); - QRect progressRect; + TQRect progressRect; if (reverse) - progressRect = QRect(x+(contentsR.width()-w), y, w, contentsR.height()+1); + progressRect = TQRect(x+(contentsR.width()-w), y, w, contentsR.height()+1); else - progressRect = QRect(x, y, w, contentsR.height()+1); + progressRect = TQRect(x, y, w, contentsR.height()+1); if (optionHandler->ProgressBar() == liquid) { int x2 = x + w - 1; int y2 = contentsR.bottom(); //Clip to the old rectangle - p->setClipRect(progressRect, QPainter::CoordPainter); + p->setClipRect(progressRect, TQPainter::CoordPainter); //Expand progressRect.setLeft(progressRect.x() - progAnimShift); p->setPen(cg.button().dark(120)); @@ -1567,7 +1567,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, p->setPen(cg.button().dark(110)); p->drawLine(x2, y, x2, y2); p->drawLine(x, y2, x2, y2); - QPixmap * pix = getPixmap( Progress ); + TQPixmap * pix = getPixmap( Progress ); p->drawTiledPixmap(/*x+1, y+1, w-2, contentsR.height()-2*/progressRect, *pix); } else if (optionHandler->ProgressBar() == baghira) @@ -1579,11 +1579,11 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, ButtonTile *progress2Tile = progress2Dict.find( cg.button().rgb() ); if ( !progress2Tile ) { - QPixmap *pix = getPixmap(progress2); + TQPixmap *pix = getPixmap(progress2); progress2Tile = separateTiles( pix, 0, 15, 38, 1, 0, true); if ( !progress2Tile ) { - qWarning( "Progress tile is NULL!" ); + tqWarning( "Progress tile is NULL!" ); return ; } else @@ -1593,7 +1593,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, } } //Clip to the old rectangle - p->setClipRect(progressRect, QPainter::CoordPainter); + p->setClipRect(progressRect, TQPainter::CoordPainter); //Expand progressRect.setLeft(progressRect.x() - 38 + prog2AnimShift); int h; /*x, y, w;*/ @@ -1610,10 +1610,10 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, }/* case CE_ToolButtonLabel: { - const QToolButton *toolbutton = (const QToolButton *) widget; - QRect rect = r; - Qt::ArrowType arrowType = opt.isDefault() - ? Qt::DownArrow : opt.arrowType(); + const TQToolButton *toolbutton = (const TQToolButton *) widget; + TQRect rect = r; + TQt::ArrowType arrowType = opt.isDefault() + ? TQt::DownArrow : opt.arrowType(); int shiftX = 0; int shiftY = 0; @@ -1627,11 +1627,11 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, PrimitiveElement pe; switch (arrowType) { - case Qt::LeftArrow: pe = PE_ArrowLeft; break; - case Qt::RightArrow: pe = PE_ArrowRight; break; - case Qt::UpArrow: pe = PE_ArrowUp; break; + case TQt::LeftArrow: pe = PE_ArrowLeft; break; + case TQt::RightArrow: pe = PE_ArrowRight; break; + case TQt::UpArrow: pe = PE_ArrowUp; break; default: - case Qt::DownArrow: pe = PE_ArrowDown; break; + case TQt::DownArrow: pe = PE_ArrowDown; break; } rect.moveBy(shiftX, shiftY); @@ -1639,13 +1639,13 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, } else { - QColor btext = Qt::black;//(flags & (Style_Down | Style_On)) ? qApp->palette().color(QPalette::Active,QColorGroup::ButtonText) : toolbutton->paletteForegroundColor(); + TQColor btext = TQt::black;//(flags & (Style_Down | Style_On)) ? tqApp->palette().color(TQPalette::Active,TQColorGroup::ButtonText) : toolbutton->paletteForegroundColor(); if (toolbutton->iconSet().isNull() && ! toolbutton->text().isNull() && ! toolbutton->usesTextLabel()) { int alignment = AlignCenter | ShowPrefix; - if (!styleHint(SH_UnderlineAccelerator, widget, QStyleOption::Default, 0)) + if (!styleHint(SH_UnderlineAccelerator, widget, TQStyleOption::Default, 0)) alignment |= NoAccel; rect.moveBy(shiftX, shiftY); @@ -1653,36 +1653,36 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, flags & Style_Enabled, 0, toolbutton->text(), toolbutton->text().length(), &btext); } else { - QPixmap pm; - QIconSet::Size size = - toolbutton->usesBigPixmap() ? QIconSet::Large : QIconSet::Small; - QIconSet::State state = - toolbutton->isOn() ? QIconSet::On : QIconSet::Off; - QIconSet::Mode mode; + TQPixmap pm; + TQIconSet::Size size = + toolbutton->usesBigPixmap() ? TQIconSet::Large : TQIconSet::Small; + TQIconSet::State state = + toolbutton->isOn() ? TQIconSet::On : TQIconSet::Off; + TQIconSet::Mode mode; if (! toolbutton->isEnabled()) - mode = QIconSet::Disabled; + mode = TQIconSet::Disabled; else if (flags & (Style_Down | Style_On) || (flags & Style_Raised) && (flags & Style_AutoRaise)) - mode = QIconSet::Active; + mode = TQIconSet::Active; else - mode = QIconSet::Normal; + mode = TQIconSet::Normal; pm = toolbutton->iconSet().pixmap( size, mode, state ); if ( toolbutton->usesTextLabel() ) { p->setFont( toolbutton->font() ); - QRect pr = rect, tr = rect; + TQRect pr = rect, tr = rect; int alignment = ShowPrefix; - if (!styleHint(SH_UnderlineAccelerator, widget, QStyleOption::Default, 0)) + if (!styleHint(SH_UnderlineAccelerator, widget, TQStyleOption::Default, 0)) alignment |= NoAccel; - if ( toolbutton->textPosition() == QToolButton::Under ) + if ( toolbutton->textPosition() == TQToolButton::Under ) { int fh = p->fontMetrics().height(); pr.addCoords( 0, 1, 0, -fh-3 ); tr.addCoords( 0, pr.bottom(), 0, -3 ); pr.moveBy(shiftX, shiftY); - drawItem( p, pr, AlignCenter, cg, TRUE, &pm, QString::null ); + drawItem( p, pr, AlignCenter, cg, TRUE, &pm, TQString::null ); alignment |= AlignCenter; } else @@ -1691,7 +1691,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, tr.addCoords( pr.right(), 0, 0, 0 ); pr.moveBy(shiftX, shiftY); - drawItem( p, pr, AlignCenter, cg, TRUE, &pm, QString::null ); + drawItem( p, pr, AlignCenter, cg, TRUE, &pm, TQString::null ); alignment |= AlignLeft | AlignVCenter; } @@ -1703,7 +1703,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, else { rect.moveBy(shiftX, shiftY); - drawItem( p, rect, AlignCenter, cg, TRUE, &pm, QString::null ); + drawItem( p, rect, AlignCenter, cg, TRUE, &pm, TQString::null ); } } } @@ -1714,42 +1714,42 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, /* case CE_HeaderLabel: { - QRect rect = r; - const QHeader* header = (const QHeader *) widget; + TQRect rect = r; + const TQHeader* header = (const TQHeader *) widget; int section = opt.headerSection(); - QIconSet* icon = header->iconSet( section ); + TQIconSet* icon = header->iconSet( section ); if ( icon ) { - QPixmap pixmap = icon->pixmap( QIconSet::Small, + TQPixmap pixmap = icon->pixmap( TQIconSet::Small, flags & Style_Enabled ? - QIconSet::Normal : QIconSet::Disabled ); + TQIconSet::Normal : TQIconSet::Disabled ); int pixw = pixmap.width(); int pixh = pixmap.height(); // "pixh - 1" because of tricky integer division - QRect pixRect = rect; + TQRect pixRect = rect; pixRect.setY( rect.center().y() - (pixh - 1) / 2 ); drawItem ( p, pixRect, AlignVCenter, cg, flags & Style_Enabled, - &pixmap, QString::null ); + &pixmap, TQString::null ); rect.setLeft( rect.left() + pixw + 2 ); } drawItem ( p, rect, AlignVCenter, cg, flags & Style_Enabled, - 0, header->label( section ), -1, (isTaskContainer && (flags & Style_MouseOver)) ? &(qApp->palette().color(QPalette::Active,QColorGroup::ButtonText)) : &(cg.buttonText()) ); + 0, header->label( section ), -1, (isTaskContainer && (flags & Style_MouseOver)) ? &(tqApp->palette().color(TQPalette::Active,TQColorGroup::ButtonText)) : &(cg.buttonText()) ); break; }*/ case CE_ProgressBarLabel: { if (optionHandler->DrawProgressLabel()) { - QRect contentsR( subRect( SR_ProgressBarContents, widget ) ); + TQRect contentsR( subRect( SR_ProgressBarContents, widget ) ); if ( !contentsR.isValid() ) return ; - QFont font( p->font() ); + TQFont font( p->font() ); font.setBold( true ); p->setFont( font ); p->setPen( widget->colorGroup().buttonText() ); - p->setClipRect(r, QPainter::CoordPainter); - p->drawText( contentsR, AlignCenter, ( ( const QProgressBar * ) widget ) ->progressString() ); + p->setClipRect(r, TQPainter::CoordPainter); + p->drawText( contentsR, AlignCenter, ( ( const TQProgressBar * ) widget ) ->progressString() ); } break; } @@ -1757,7 +1757,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, { // new style with tiled pixmaps if ( !widget || !widget->parentWidget(true) ) break; - const QTabBar *tabBar = ( const QTabBar * ) widget; + const TQTabBar *tabBar = ( const TQTabBar * ) widget; bool selected = flags & Style_Selected; bool hover = currentTabBar && currentTabBar == tabBar && tabBar->indexOf(opt.tab()->identifier()) == hoveredTabIndex; @@ -1771,7 +1771,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, else pos = center; - QColor c; + TQColor c; if (hover || selected) { if (optionHandler->useCustomColors()) @@ -1787,14 +1787,14 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, c = optionHandler->InactiveButtonColor(); } - bool isDialog = optionHandler->TabStyle() == Clever && widget->topLevelWidget()->inherits("QDialog"); + bool isDialog = optionHandler->TabStyle() == Clever && widget->topLevelWidget()->inherits("TQDialog"); if (isDialog || optionHandler->TabStyle() == Chooser) drawCombo( p, cg, c, r.x(), r.y(), r.width(), r.height(), false, false, false, pos ); else { LiquidStyle *ptr = const_cast( this ); - bool above = tabBar->shape() == QTabBar::RoundedAbove || tabBar->shape() == QTabBar::TriangularAbove; - QPixmap *pix; + bool above = tabBar->shape() == TQTabBar::RoundedAbove || tabBar->shape() == TQTabBar::TriangularAbove; + TQPixmap *pix; if (above) pix = selected ? getPixmap( TabDown ) : getPixmap( Tab ); else @@ -1804,7 +1804,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, tabTile = separateTiles( pix, 9, 15, 67, 1, 0, false); if ( !tabTile ) { - qWarning( "Tab tile is NULL!" ); + tqWarning( "Tab tile is NULL!" ); return ; } else @@ -1850,38 +1850,38 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, { if ( opt.isDefault() ) return ; - QTab *t = opt.tab(); - const QTabBar * tb = ( const QTabBar * ) widget; + TQTab *t = opt.tab(); + const TQTabBar * tb = ( const TQTabBar * ) widget; if ( ( tb->currentTab() != t->identifier() )) { if (optionHandler->TabStyle() == TrueTab || - (optionHandler->TabStyle() == Clever && !(widget->topLevelWidget()->inherits("QDialog")))) + (optionHandler->TabStyle() == Clever && !(widget->topLevelWidget()->inherits("TQDialog")))) { - drawItem( p, QRect( r.x(), r.y() + 1, r.width(), r.height() ), AlignCenter | ShowPrefix, cg, flags & Style_Enabled, 0, t->text(), -1/*, &cg.text()*/ ); + drawItem( p, TQRect( r.x(), r.y() + 1, r.width(), r.height() ), AlignCenter | ShowPrefix, cg, flags & Style_Enabled, 0, t->text(), -1/*, &cg.text()*/ ); break; } - drawItem( p, QRect( r.x(), r.y(), r.width(), r.height() ), AlignCenter | ShowPrefix, cg, flags & Style_Enabled, 0, t->text(), -1/*, &cg.text()*/ ); + drawItem( p, TQRect( r.x(), r.y(), r.width(), r.height() ), AlignCenter | ShowPrefix, cg, flags & Style_Enabled, 0, t->text(), -1/*, &cg.text()*/ ); break; } - drawItem( p, QRect( r.x(), r.y(), r.width(), r.height() ), AlignCenter | ShowPrefix, cg, flags & Style_Enabled, 0, t->text(), -1/*, &cg.text()*/ ); + drawItem( p, TQRect( r.x(), r.y(), r.width(), r.height() ), AlignCenter | ShowPrefix, cg, flags & Style_Enabled, 0, t->text(), -1/*, &cg.text()*/ ); break; } case CE_PushButton: { // if (_htmlWidgetWId == widget->winId()) // return; - QPushButton *btn = ( QPushButton* ) widget; + TQPushButton *btn = ( TQPushButton* ) widget; const_cast( this ) ->isHTMLButton = isHTMLWidget( btn ); ButtonFadeInfo *bfi_ = bfi[btn->winId()]; if ( widget == highlightWidget || (bfi_ && !bfi_->fadeIn) ) flags |= Style_MouseOver; if (btn->isDefault()) flags |= Style_HasFocus; - // Qt messes this up with WindowOrigin, so we do it ourselves :P + // TQt messes this up with WindowOrigin, so we do it ourselves :P if ( !isPlain() && !btn->autoMask() ) const_cast( this ) ->btnOffset = btn->backgroundOffset(); - const_cast( this ) ->paintWidget = const_cast( widget ); - drawPrimitive( PE_ButtonDefault, p, r, cg, flags, QStyleOption( btn )); + const_cast( this ) ->paintWidget = const_cast( widget ); + drawPrimitive( PE_ButtonDefault, p, r, cg, flags, TQStyleOption( btn )); const_cast( this ) ->paintWidget = 0L; const_cast( this ) ->isHTMLButton = false; break; @@ -1890,7 +1890,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, { // if (_htmlWidgetWId == widget->winId()) // return; - const QPushButton *btn = ( const QPushButton* ) widget; + const TQPushButton *btn = ( const TQPushButton* ) widget; int x, y, w, h; r.rect( &x, &y, &w, &h ); @@ -1900,15 +1900,15 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, int xoff = x; if ( btn->iconSet() && !btn->iconSet() ->isNull() ) { - QIconSet::Mode mode = btn->isEnabled() ? QIconSet::Normal : QIconSet::Disabled; - if ( mode == QIconSet::Normal && btn->hasFocus() ) - mode = QIconSet::Active; + TQIconSet::Mode mode = btn->isEnabled() ? TQIconSet::Normal : TQIconSet::Disabled; + if ( mode == TQIconSet::Normal && btn->hasFocus() ) + mode = TQIconSet::Active; - QIconSet::State state = QIconSet::Off; + TQIconSet::State state = TQIconSet::Off; if ( btn->isToggleButton() && btn->isOn() ) - state = QIconSet::On; + state = TQIconSet::On; - QPixmap pix( btn->iconSet() ->pixmap( QIconSet::Small, mode, state ) ); + TQPixmap pix( btn->iconSet() ->pixmap( TQIconSet::Small, mode, state ) ); xoff += (x<6?8:2); if (btn->text().isEmpty() && !btn->pixmap()) p->drawPixmap( x + w/2 - pix.width()/2, y + h / 2 - pix.height() / 2, pix ); @@ -1918,18 +1918,18 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, if ( btn->isMenuButton() ) { - drawPrimitive( PE_ArrowDown, p, QRect( w-14, (int)(h/2), 7, 7 ) , cg, flags, opt ); + drawPrimitive( PE_ArrowDown, p, TQRect( w-14, (int)(h/2), 7, 7 ) , cg, flags, opt ); w -= 14; } - QColor tmp; + TQColor tmp; tmp = btn->isDown() && !optionHandler->IcyButtons() ? btn->colorGroup().highlightedText() : btn->colorGroup().buttonText(); - drawItem( p, QRect( xoff, optionHandler->style() == Milk ? y-1 : y, w, h ), AlignCenter | ShowPrefix, cg, btn->isEnabled(), btn->pixmap(), btn->text(), -1, &tmp ); + drawItem( p, TQRect( xoff, optionHandler->style() == Milk ? y-1 : y, w, h ), AlignCenter | ShowPrefix, cg, btn->isEnabled(), btn->pixmap(), btn->text(), -1, &tmp ); break; } case CE_MenuBarItem: { - QMenuItem *mi = opt.menuItem(); + TQMenuItem *mi = opt.menuItem(); bool active = flags & Style_Active; bool focused = flags & Style_HasFocus; @@ -1940,13 +1940,13 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, p->fillRect(r,cg.highlight()); } - // QColor tmpColor( cg.background().dark( 120 ) ); + // TQColor tmpColor( cg.background().dark( 120 ) ); if ( optionHandler->useShadowText() && !( active && focused )) { p->setPen(cg.background().dark( 120 )); p->drawText(r, AlignCenter | AlignVCenter | ShowPrefix | DontClip | SingleLine, mi->text()); } - // drawItem( p, QRect( r.x() + 1, r.y() + 1, r.width(), r.height() ), AlignCenter | AlignVCenter | ShowPrefix | DontClip | SingleLine, cg, flags & Style_Enabled, mi->pixmap(), mi->text(), -1, &tmpColor ); + // drawItem( p, TQRect( r.x() + 1, r.y() + 1, r.width(), r.height() ), AlignCenter | AlignVCenter | ShowPrefix | DontClip | SingleLine, cg, flags & Style_Enabled, mi->pixmap(), mi->text(), -1, &tmpColor ); // drawItem( p, r, AlignCenter | AlignVCenter | ShowPrefix | DontClip | SingleLine, cg, flags & Style_Enabled, mi->pixmap(), mi->text(), -1, active && focused ? &(cg.highlightedText()) : &(cg.text()) ); p->setPen(active && focused ? cg.highlightedText() : cg.text()); @@ -1958,8 +1958,8 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, int x,y,w, h; r.rect( &x, &y, &w, &h ); - const QPopupMenu *popupmenu = ( const QPopupMenu * ) widget; - QMenuItem *mi = opt.menuItem(); + const TQPopupMenu *popupmenu = ( const TQPopupMenu * ) widget; + TQMenuItem *mi = opt.menuItem(); int tab = opt.tabWidth(); int maxpmw = opt.maxIconWidth(); @@ -1969,10 +1969,10 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, bool enabled = flags & Style_Enabled; int checkcol = maxpmw; - QColor menuBgColor( optionHandler->UseCustomMenuColor() ? optionHandler->Color() : optionHandler->bgColor() ); + TQColor menuBgColor( optionHandler->UseCustomMenuColor() ? optionHandler->Color() : optionHandler->bgColor() ); if ( checkable ) - checkcol = QMAX( maxpmw, 20 ); + checkcol = TQMAX( maxpmw, 20 ); if ( mi && mi->isSeparator() ) { @@ -2004,10 +2004,10 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, if ( !mi ) return ; - // Menu contents drawing code based on Qt's styles. Qt is property of + // Menu contents drawing code based on TQt's styles. TQt is property of // TrollTech: www.trolltech.com. Used with permission. int xpos = x; - QRect vrect = visualRect( QRect( xpos, y, checkcol, h ), r ); + TQRect vrect = visualRect( TQRect( xpos, y, checkcol, h ), r ); int xvis = vrect.x(); // icon @@ -2015,17 +2015,17 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, p->fillRect(x,y,h,h, optionHandler->menuStripeColor()); if ( mi->iconSet() ) { - QIconSet::Mode mode = dis ? QIconSet::Disabled : QIconSet::Normal; + TQIconSet::Mode mode = dis ? TQIconSet::Disabled : TQIconSet::Normal; if ( act && !dis ) - mode = QIconSet::Active; - QPixmap pixmap; + mode = TQIconSet::Active; + TQPixmap pixmap; if ( checkable && mi->isChecked() ) - pixmap = mi->iconSet() ->pixmap( QIconSet::Small, mode, QIconSet::On ); + pixmap = mi->iconSet() ->pixmap( TQIconSet::Small, mode, TQIconSet::On ); else - pixmap = mi->iconSet() ->pixmap( QIconSet::Small, mode ); + pixmap = mi->iconSet() ->pixmap( TQIconSet::Small, mode ); int pixw = pixmap.width(); int pixh = pixmap.height(); - QRect pmr( 0, 0, pixw, pixh ); + TQRect pmr( 0, 0, pixw, pixh ); pmr.moveCenter( vrect.center() ); p->setPen( cg.text() ); p->drawPixmap( pmr.topLeft(), pixmap ); @@ -2041,10 +2041,10 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, cflags |= Style_Enabled; if ( act ) cflags |= Style_On; - drawPrimitive( PE_CheckMark, p, visualRect( QRect( xp, y + windowsItemFrame, checkcol - 2 * windowsItemFrame, h - 2 * windowsItemFrame ), r ), cg, cflags ); + drawPrimitive( PE_CheckMark, p, visualRect( TQRect( xp, y + windowsItemFrame, checkcol - 2 * windowsItemFrame, h - 2 * windowsItemFrame ), r ), cg, cflags ); } } - QColor discol; + TQColor discol; if ( dis ) { discol = cg.text(); @@ -2054,7 +2054,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, int xm = windowsItemFrame + checkcol + windowsItemHMargin; xpos += xm; - vrect = visualRect( QRect( xpos, y + windowsItemVMargin, w - xm - tab + 1, h - 2 * windowsItemVMargin ), r ); + vrect = visualRect( TQRect( xpos, y + windowsItemVMargin, w - xm - tab + 1, h - 2 * windowsItemVMargin ), r ); xvis = vrect.x(); if ( mi->custom() ) { @@ -2070,10 +2070,10 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, } // Text - QString s = mi->text(); + TQString s = mi->text(); if ( !s.isNull() ) { - QColor textColor, shadowColor; + TQColor textColor, shadowColor; shadowColor = optionHandler->bgColor().dark( 130 ); if ( dis ) @@ -2087,12 +2087,12 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, int t = s.find( '\t' ); int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine; - text_flags |= ( QApplication::reverseLayout() ? AlignRight : AlignLeft ); + text_flags |= ( TQApplication::reverseLayout() ? AlignRight : AlignLeft ); if ( t >= 0 ) { // draw tab text int xp; xp = x + w - tab - 20 - windowsItemHMargin - windowsItemFrame + 1; - QString tabStr( s.right( s.length() - t - 1 ) ); + TQString tabStr( s.right( s.length() - t - 1 ) ); if ( !tabStr.isEmpty() ) { if ( optionHandler->useShadowText() ) @@ -2116,7 +2116,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, else if ( mi->pixmap() ) // draw pixmap { - QPixmap * pixmap = mi->pixmap(); + TQPixmap * pixmap = mi->pixmap(); if ( pixmap->depth() == 1 ) p->setBackgroundMode( OpaqueMode ); p->drawPixmap( xvis, y + windowsItemFrame, *pixmap ); @@ -2128,21 +2128,21 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, { int dim = (int)((float)( h - 2 * windowsItemFrame ) / 2); PrimitiveElement arrow; - arrow = ( QApplication::reverseLayout() ? PE_ArrowLeft : PE_ArrowRight ); + arrow = ( TQApplication::reverseLayout() ? PE_ArrowLeft : PE_ArrowRight ); xpos = x + w - windowsArrowHMargin - windowsItemFrame/* - dim*/-8; - vrect = visualRect( QRect( xpos, y + h / 2 - dim / 2, /*dim*/8, dim ), r ); + vrect = visualRect( TQRect( xpos, y + h / 2 - dim / 2, /*dim*/8, dim ), r ); if ( act ) { if ( !dis ) discol = cg.highlightedText(); - QColorGroup g2( discol, cg.highlight(), white, white, dis ? discol : white, discol, white ); + TQColorGroup g2( discol, cg.highlight(), white, white, dis ? discol : white, discol, white ); drawPrimitive( arrow, p, vrect, g2, Style_Enabled ); } else { if ( !dis ) discol = optionHandler->textColor(); - QColorGroup g2( discol, cg.background(), white, white, dis ? discol : white, discol, white ); + TQColorGroup g2( discol, cg.background(), white, white, dis ? discol : white, discol, white ); drawPrimitive( arrow, p, vrect, g2, mi->isEnabled() ? Style_Enabled : Style_Default ); } } @@ -2159,10 +2159,10 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, } -// void LiquidStyle::drawControlMask( ControlElement element, QPainter *p, const QWidget *widget, const QRect &r, const QStyleOption& opt ) const { +// void LiquidStyle::drawControlMask( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& opt ) const { // switch ( element ) { // case CE_PushButton: { -// p->fillRect( r, Qt::color1 ); +// p->fillRect( r, TQt::color1 ); // break; // } // default: @@ -2171,7 +2171,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, // } // } -// void LiquidStyle::drawComplexControlMask( ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r, const QStyleOption &opt ) const { +// void LiquidStyle::drawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption &opt ) const { // // switch ( control ) { // // case CC_ComboBox: { // // drawControlMask( CE_PushButton, p, widget, r, opt ); @@ -2182,7 +2182,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, // // } // } -void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags flags, SCFlags controls, SCFlags active, const QStyleOption &opt ) const +void LiquidStyle::drawComplexControl( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQColorGroup &cg, SFlags flags, SCFlags controls, SCFlags active, const TQStyleOption &opt ) const { switch ( control ) { @@ -2191,11 +2191,11 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const bool sunken = (active & SC_ComboBoxArrow);// || (flags & Style_Active) || (flags & Style_Sunken) || (active & SC_ComboBoxListBoxPopup); bool hovered = (widget == highlightWidget) || (flags & Style_HasFocus); // bool isHtml = isHTMLWidget( widget ); - const_cast( this ) ->paintWidget = const_cast( widget ); - QPen oldPen( p->pen() ); + const_cast( this ) ->paintWidget = const_cast( widget ); + TQPen oldPen( p->pen() ); if ( controls & SC_ComboBoxArrow ) { - if ( controls & SC_ComboBoxEditField && ( ( const QComboBox * ) widget ) ->editable()) + if ( controls & SC_ComboBoxEditField && ( ( const TQComboBox * ) widget ) ->editable()) { // editable? #if 0 if ( optionHandler->buttonStyle() == Brushed ) @@ -2245,13 +2245,13 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const } case CC_ToolButton: { - const QToolButton *toolbutton = ( const QToolButton * ) widget; - const_cast( this ) ->paintWidget = const_cast( widget ); + const TQToolButton *toolbutton = ( const TQToolButton * ) widget; + const_cast( this ) ->paintWidget = const_cast( widget ); const KAccessToolBarButton *toolbutton2 = 0L; - QRect button, menuarea; + TQRect button, menuarea; button = querySubControlMetrics( control, widget, SC_ToolButton, opt ); menuarea = querySubControlMetrics( control, widget, SC_ToolButtonMenu, opt ); - if (::qt_cast(toolbutton)) + if (::tqt_cast(toolbutton)) { toolbutton2 = (const KAccessToolBarButton*)toolbutton; #if GCC_VERSION < 40000 @@ -2259,7 +2259,7 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const button.setBottom(button.bottom() - p->fontMetrics().height() - 1); #endif } - else if (toolbutton->usesTextLabel() && toolbutton->textPosition() == QToolButton::BelowIcon) + else if (toolbutton->usesTextLabel() && toolbutton->textPosition() == TQToolButton::BelowIcon) button.setBottom(button.bottom() - p->fontMetrics().height()); menuarea.setX(menuarea.x() - 1); SFlags bflags = flags, mflags = flags; @@ -2276,11 +2276,11 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const bool sunken = mflags & ( Style_Down /*| Style_On*/ ); bool hover = bflags & (Style_MouseOver | Style_On ); - if ( !optionHandler->useToolButtonFrame())// || !(toolbutton->parentWidget() && ( ::qt_cast(toolbutton->parentWidget()) || toolbutton->parentWidget()->inherits("KonqFrameTabs")))) + if ( !optionHandler->useToolButtonFrame())// || !(toolbutton->parentWidget() && ( ::tqt_cast(toolbutton->parentWidget()) || toolbutton->parentWidget()->inherits("KonqFrameTabs")))) { - if ((!(hover || sunken) || (toolbutton->usesTextLabel() && toolbutton->textPosition() == QToolButton::BelowIcon)) && toolbutton->parentWidget() && !::qt_cast(toolbutton->parent()) && toolbutton->parentWidget()->paletteBackgroundPixmap() && !toolbutton->parentWidget()->paletteBackgroundPixmap()->isNull()) + if ((!(hover || sunken) || (toolbutton->usesTextLabel() && toolbutton->textPosition() == TQToolButton::BelowIcon)) && toolbutton->parentWidget() && !::tqt_cast(toolbutton->parent()) && toolbutton->parentWidget()->paletteBackgroundPixmap() && !toolbutton->parentWidget()->paletteBackgroundPixmap()->isNull()) { - QPixmap pixmap = *(toolbutton->parentWidget()->paletteBackgroundPixmap()); + TQPixmap pixmap = *(toolbutton->parentWidget()->paletteBackgroundPixmap()); if (hover || sunken) p->drawTiledPixmap( r.x(), button.bottom()+1, r.width(), p->fontMetrics().height(), pixmap, toolbutton->x(), toolbutton->y()+button.height() ); else @@ -2288,10 +2288,10 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const } if (hover || sunken) { - const_cast( this ) ->paintWidget = const_cast( widget ); + const_cast( this ) ->paintWidget = const_cast( widget ); if (optionHandler->toolbuttonStyle() != Brushed) drawCombo( p, cg, sunken ? cg.button().light( 110 ) : - (hover || (cg.button() != qApp->palette().active().button())) ? cg.button() : + (hover || (cg.button() != tqApp->palette().active().button())) ? cg.button() : optionHandler->InactiveButtonColor(), button.x(), button.y(), button.width(), button.height(), sunken, hover, false, full ); else @@ -2306,7 +2306,7 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const myPosition pos = full; KToolBar *bar = NULL; - if (toolbutton2 && toolbutton2->parentWidget() && ::qt_cast(toolbutton2->parentWidget()) ) + if (toolbutton2 && toolbutton2->parentWidget() && ::tqt_cast(toolbutton2->parentWidget()) ) { //position calculation - would be nice if ktoolbarbutton provided this as flag bar = (KToolBar*)toolbutton2->parentWidget(); int buttonId = toolbutton2->id(); @@ -2328,7 +2328,7 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const pos = right : pos = center; } - else if (bar->orientation() == Qt::Horizontal) + else if (bar->orientation() == TQt::Horizontal) { if (buttonIndex == 0) { @@ -2380,15 +2380,15 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const if (optionHandler->toolbuttonStyle() != Brushed) { - (bar && bar->orientation() == Qt::Vertical) ? - drawCombo( p, cg, sunken ? cg.button().light( 110 ) : (hover || (cg.button() != qApp->palette().active().button())) ? cg.button() : optionHandler->InactiveButtonColor(), button.x(), (pos == full || pos == left) ? button.y() : button.y() - 7, button.width(), (pos == full) ? button.height()+2 : (pos == center) ? button.height()+16 : button.height()+9, sunken, hover, false, center ) : - drawCombo( p, cg, sunken ? cg.button().light( 110 ) : (hover || (cg.button() != qApp->palette().active().button())) ? cg.button() : optionHandler->InactiveButtonColor(), button.x(), button.y(), button.width(), button.height()/*+2*/, sunken, hover, false, pos ); + (bar && bar->orientation() == TQt::Vertical) ? + drawCombo( p, cg, sunken ? cg.button().light( 110 ) : (hover || (cg.button() != tqApp->palette().active().button())) ? cg.button() : optionHandler->InactiveButtonColor(), button.x(), (pos == full || pos == left) ? button.y() : button.y() - 7, button.width(), (pos == full) ? button.height()+2 : (pos == center) ? button.height()+16 : button.height()+9, sunken, hover, false, center ) : + drawCombo( p, cg, sunken ? cg.button().light( 110 ) : (hover || (cg.button() != tqApp->palette().active().button())) ? cg.button() : optionHandler->InactiveButtonColor(), button.x(), button.y(), button.width(), button.height()/*+2*/, sunken, hover, false, pos ); } else { - (bar && bar->orientation() == Qt::Vertical) ? - drawRectangularButton( p, cg, sunken ? cg.button().light( 110 ) : (hover || (cg.button() != qApp->palette().active().button())) ? cg.button() : optionHandler->InactiveButtonColor(), button.x(), (pos == full || pos == left) ? button.y() : button.y()-4, button.width(), (pos == full) ? button.height() : (pos == center) ? button.height()+8 : button.height()+4, sunken, hover, false) : - drawRectangularButton( p, cg, sunken ? cg.button().light( 110 ) : (hover || (cg.button() != qApp->palette().active().button())) ? cg.button() : optionHandler->InactiveButtonColor(), button.x(), button.y(), button.width(), button.height(), sunken, hover, false, pos); + (bar && bar->orientation() == TQt::Vertical) ? + drawRectangularButton( p, cg, sunken ? cg.button().light( 110 ) : (hover || (cg.button() != tqApp->palette().active().button())) ? cg.button() : optionHandler->InactiveButtonColor(), button.x(), (pos == full || pos == left) ? button.y() : button.y()-4, button.width(), (pos == full) ? button.height() : (pos == center) ? button.height()+8 : button.height()+4, sunken, hover, false) : + drawRectangularButton( p, cg, sunken ? cg.button().light( 110 ) : (hover || (cg.button() != tqApp->palette().active().button())) ? cg.button() : optionHandler->InactiveButtonColor(), button.x(), button.y(), button.width(), button.height(), sunken, hover, false, pos); } } } @@ -2402,7 +2402,7 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const #if 0 if ( toolbutton->hasFocus() && !toolbutton->focusProxy() ) { - QRect fr = toolbutton->rect(); + TQRect fr = toolbutton->rect(); fr.addCoords( 3, 3, -3, -3 ); drawPrimitive( PE_FocusRect, p, fr, cg ); } @@ -2412,12 +2412,12 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const } case CC_ScrollBar: { - const_cast( this ) ->currentScrollBar = ( QScrollBar * ) widget; + const_cast( this ) ->currentScrollBar = ( TQScrollBar * ) widget; KStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); break; } case CC_SpinWidget: { - const QSpinWidget * sw = (const QSpinWidget *) widget; + const TQSpinWidget * sw = (const TQSpinWidget *) widget; SFlags flags; PrimitiveElement pe; @@ -2433,8 +2433,8 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const flags |= Style_Raised; pe = PE_SpinWidgetUp; - QRect re = sw->upRect(); - QColorGroup ucg = sw->isUpEnabled() ? cg : sw->palette().disabled(); + TQRect re = sw->upRect(); + TQColorGroup ucg = sw->isUpEnabled() ? cg : sw->palette().disabled(); p->fillRect(re, ucg.base()); drawPrimitive(pe, p, re, ucg, flags); } @@ -2448,8 +2448,8 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const flags |= Style_Raised; pe = PE_SpinWidgetDown; - QRect re = sw->downRect(); - QColorGroup dcg = sw->isDownEnabled() ? cg : sw->palette().disabled(); + TQRect re = sw->downRect(); + TQColorGroup dcg = sw->isDownEnabled() ? cg : sw->palette().disabled(); p->fillRect(re, dcg.base()); drawPrimitive(pe, p, re, dcg, flags); } @@ -2458,19 +2458,19 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const // SLIDER - KDE code for double buffering // ------------------------------------------------------------------- case CC_Slider: { - const QSlider* slider = (const QSlider*)widget; - QRect groove = querySubControlMetrics(CC_Slider, widget, SC_SliderGroove, opt); - QRect handle = querySubControlMetrics(CC_Slider, widget, SC_SliderHandle, opt); + const TQSlider* slider = (const TQSlider*)widget; + TQRect groove = querySubControlMetrics(CC_Slider, widget, SC_SliderGroove, opt); + TQRect handle = querySubControlMetrics(CC_Slider, widget, SC_SliderHandle, opt); // Double-buffer slider for no flicker - QPixmap pix(widget->size()); - QPainter p2; + TQPixmap pix(widget->size()); + TQPainter p2; p2.begin(&pix); if ( slider->parentWidget() && (slider->parentWidget()->paletteBackgroundPixmap() && !slider->parentWidget()->paletteBackgroundPixmap()->isNull() )) { - QPixmap pixmap = *(slider->parentWidget()->backgroundPixmap()); - if (QWidget *topDaddy = slider->topLevelWidget()){ - QPoint zero = QPoint(0,0); + TQPixmap pixmap = *(slider->parentWidget()->backgroundPixmap()); + if (TQWidget *topDaddy = slider->topLevelWidget()){ + TQPoint zero = TQPoint(0,0); #if 0 zero = slider->mapTo(topDaddy, zero); int zxmpw = zero.x()%pixmap.width(); @@ -2520,7 +2520,7 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const // Draw the tickmarks if (controls & SC_SliderTickmarks) - QCommonStyle::drawComplexControl(control, &p2, widget, + TQCommonStyle::drawComplexControl(control, &p2, widget, r, cg, flags, SC_SliderTickmarks, active, opt); // Draw the slider handle @@ -2531,35 +2531,35 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const } p2.end(); - bitBlt((QWidget*)widget, r.x(), r.y(), &pix); + bitBlt((TQWidget*)widget, r.x(), r.y(), &pix); break; } #ifndef QT_NO_LISTVIEW case CC_ListView: { if ( controls & SC_ListView ) { - QCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); + TQCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); } if ( controls & ( SC_ListViewBranch | SC_ListViewExpand ) ) { if ( opt.isDefault() ) break; - QListViewItem *item = opt.listViewItem(); - QListViewItem *child = item->firstChild(); - QListView* v = item->listView(); + TQListViewItem *item = opt.listViewItem(); + TQListViewItem *child = item->firstChild(); + TQListView* v = item->listView(); bool drawDotlines = optionHandler->DrawDotlines(); - static QBitmap *verticalLine = 0, *horizontalLine = 0; - static QCleanupHandler qlv_cleanup_bitmap; + static TQBitmap *verticalLine = 0, *horizontalLine = 0; + static TQCleanupHandler qlv_cleanup_bitmap; int dotoffset = 0; if (drawDotlines && (optionHandler->DotlineStyle() == Dots)){ if ( !verticalLine ) { // make 128*1 and 1*128 bitmaps that can be used for // drawing the right sort of lines. - verticalLine = new QBitmap( 1, 128, TRUE ); - horizontalLine = new QBitmap( 128, 1, TRUE ); - QPointArray a( 64 ); - QPainter p; + verticalLine = new TQBitmap( 1, 128, TRUE ); + horizontalLine = new TQBitmap( 128, 1, TRUE ); + TQPointArray a( 64 ); + TQPainter p; p.begin( verticalLine ); int i; for( i=0; i<64; i++ ) @@ -2567,7 +2567,7 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const p.setPen( optionHandler->DotlineColor() ); p.drawPoints( a ); p.end(); - QApplication::flushX(); + TQApplication::flushX(); verticalLine->setMask( *verticalLine ); p.begin( horizontalLine ); for( i=0; i<64; i++ ) @@ -2575,7 +2575,7 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const p.setPen( optionHandler->DotlineColor() ); p.drawPoints( a ); p.end(); - QApplication::flushX(); + TQApplication::flushX(); horizontalLine->setMask( *horizontalLine ); qlv_cleanup_bitmap.add( &verticalLine ); qlv_cleanup_bitmap.add( &horizontalLine ); @@ -2585,12 +2585,12 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const int y = r.y(); int c; - QPointArray dotlines; + TQPointArray dotlines; if ( drawDotlines && active == SC_All && controls == SC_ListViewExpand ) { c = 2; dotlines.resize( 2 ); - dotlines[ 0 ] = QPoint( r.right(), r.top() ); - dotlines[ 1 ] = QPoint( r.right(), r.bottom() ); + dotlines[ 0 ] = TQPoint( r.right(), r.top() ); + dotlines[ 1 ] = TQPoint( r.right(), r.bottom() ); } else { int linetop = 0, linebot = 0; @@ -2614,7 +2614,7 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const lh = child ? child->height() : 0; else lh = p->fontMetrics().height() + 2 * v->itemMargin(); - lh = QMAX( lh, QApplication::globalStrut().height() ); + lh = TQMAX( lh, TQApplication::globalStrut().height() ); if ( lh % 2 > 0 ) lh++; linebot = y + lh / 2; @@ -2629,7 +2629,7 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const if ( !child->isOpen() ) p->drawLine( bx, linebot - 2, bx, linebot + 2 ); } else { // ultracool triangles ;-) - QPointArray a; + TQPointArray a; p->setPen( optionHandler->UseCustomExpanderColor() ? optionHandler->CustomExpanderColor() : cg.text() ); if ( child->isOpen() ) { a.setPoints( 3, bx - 4, linebot - 2, @@ -2648,17 +2648,17 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const } // dotlinery if ( drawDotlines ) { - dotlines[ c++ ] = QPoint( bx, linetop ); - dotlines[ c++ ] = QPoint( bx, linebot - (/* optionHandler->plusMinus() ? 4 : */5 ) ); - dotlines[ c++ ] = QPoint( bx + 5, linebot ); - dotlines[ c++ ] = QPoint( r.width(), linebot ); + dotlines[ c++ ] = TQPoint( bx, linetop ); + dotlines[ c++ ] = TQPoint( bx, linebot - (/* optionHandler->plusMinus() ? 4 : */5 ) ); + dotlines[ c++ ] = TQPoint( bx + 5, linebot ); + dotlines[ c++ ] = TQPoint( r.width(), linebot ); linetop = linebot + 5; } } else { // just dotlinery if ( drawDotlines ) { - dotlines[ c++ ] = QPoint( bx + 2, linebot ); - dotlines[ c++ ] = QPoint( r.width(), linebot ); + dotlines[ c++ ] = TQPoint( bx + 2, linebot ); + dotlines[ c++ ] = TQPoint( r.width(), linebot ); } } @@ -2674,8 +2674,8 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const if ( drawDotlines ) { if ( linetop < linebot ) { - dotlines[ c++ ] = QPoint( bx, linetop ); - dotlines[ c++ ] = QPoint( bx, linebot ); + dotlines[ c++ ] = TQPoint( bx, linetop ); + dotlines[ c++ ] = TQPoint( bx, linebot ); } } } @@ -2761,14 +2761,14 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const } if ( controls & SC_TitleBarLabel ) { - QRect ir = visualRect( querySubControlMetrics( CC_TitleBar, widget, SC_TitleBarLabel ), widget ); + TQRect ir = visualRect( querySubControlMetrics( CC_TitleBar, widget, SC_TitleBarLabel ), widget ); p->setPen( cg.text() ); p->drawText(ir.x()+2, ir.y(), ir.width()-2, ir.height(), AlignCenter | AlignVCenter | SingleLine, widget->caption() ); } - QRect ir; + TQRect ir; bool down = FALSE; - QPixmap pm; + TQPixmap pm; if ( controls & SC_TitleBarCloseButton ) { @@ -2848,16 +2848,16 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const } } -int LiquidStyle::styleHint(StyleHint sh, const QWidget * w, const QStyleOption & opt, QStyleHintReturn * shr) const +int LiquidStyle::styleHint(StyleHint sh, const TQWidget * w, const TQStyleOption & opt, TQStyleHintReturn * shr) const { switch (sh) { - case QStyle::SH_GUIStyle: - // if (w && ::qt_cast(w)) + case TQStyle::SH_GUIStyle: + // if (w && ::tqt_cast(w)) // return WindowsStyle; return MacStyle; - case QStyle::SH_TabBar_Alignment: - if (optionHandler->CenterTabs() && !QApplication::reverseLayout()) + case TQStyle::SH_TabBar_Alignment: + if (optionHandler->CenterTabs() && !TQApplication::reverseLayout()) return AlignHCenter; else return KStyle::styleHint(sh, w, opt, shr); @@ -2866,14 +2866,14 @@ int LiquidStyle::styleHint(StyleHint sh, const QWidget * w, const QStyleOption & } } -QRect LiquidStyle::subRect( SubRect r, const QWidget *widget ) const { +TQRect LiquidStyle::subRect( SubRect r, const TQWidget *widget ) const { if (r == SR_ComboBoxFocusRect){ return querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxEditField ); } return ( KStyle::subRect( r, widget ) ); } -int LiquidStyle::pixelMetric( PixelMetric m, const QWidget *widget ) const +int LiquidStyle::pixelMetric( PixelMetric m, const TQWidget *widget ) const { switch ( m ) { @@ -2906,49 +2906,49 @@ int LiquidStyle::pixelMetric( PixelMetric m, const QWidget *widget ) const case PM_DefaultFrameWidth: { /* - if (widget && ::qt_cast(widget) && ((QFrame*)widget)->frameShape() == QFrame::LineEditPanel) + if (widget && ::tqt_cast(widget) && ((TQFrame*)widget)->frameShape() == TQFrame::LineEditPanel) return 6;*/ - if (widget && widget->parentWidget() && ::qt_cast(widget->parentWidget()) && widget->parentWidget()->parentWidget() && (widget->parentWidget()->parentWidget()->inherits("KonqMainWindow") || widget->parentWidget()->parentWidget()->inherits("KonqFrameContainer"))) //for the konqueror statusbar offset, thanks konqueror team... ... ... f***f***f***!!! + if (widget && widget->parentWidget() && ::tqt_cast(widget->parentWidget()) && widget->parentWidget()->parentWidget() && (widget->parentWidget()->parentWidget()->inherits("KonqMainWindow") || widget->parentWidget()->parentWidget()->inherits("KonqFrameContainer"))) //for the konqueror statusbar offset, thanks konqueror team... ... ... f***f***f***!!! return 0; return 2; } case PM_TabBarBaseOverlap: case PM_TabBarBaseHeight: { - if (!widget || !::qt_cast(widget) || !widget->children()) + if (!widget || !::tqt_cast(widget) || !widget->children()) return 0; - QObjectListIt it( *widget->children() ); // iterate over the buttons - QObject *obj; - QTabBar *tabBar = 0L; + TQObjectListIt it( *widget->children() ); // iterate over the buttons + TQObject *obj; + TQTabBar *tabBar = 0L; while ( (obj = it.current()) != 0 ) { ++it; - if (::qt_cast(obj)) + if (::tqt_cast(obj)) { - tabBar = (QTabBar*)obj; + tabBar = (TQTabBar*)obj; break; } } if (!tabBar || !tabBar->isVisible()) return 0; - if (optionHandler->TabStyle() == Chooser || (optionHandler->TabStyle() == Clever && widget && widget->topLevelWidget()->inherits("QDialog"))) + if (optionHandler->TabStyle() == Chooser || (optionHandler->TabStyle() == Clever && widget && widget->topLevelWidget()->inherits("TQDialog"))) return 12; if (m == PM_TabBarBaseOverlap) return 2; return 7; } case PM_TabBarTabHSpace: - if (optionHandler->TabStyle() == Chooser || (optionHandler->TabStyle() == Clever && widget && widget->topLevelWidget()->inherits("QDialog"))) return 18; + if (optionHandler->TabStyle() == Chooser || (optionHandler->TabStyle() == Clever && widget && widget->topLevelWidget()->inherits("TQDialog"))) return 18; return 24; case PM_TabBarTabVSpace: { - if (optionHandler->TabStyle() == Chooser || (optionHandler->TabStyle() == Clever && widget && widget->topLevelWidget()->inherits("QDialog"))) return 6; + if (optionHandler->TabStyle() == Chooser || (optionHandler->TabStyle() == Clever && widget && widget->topLevelWidget()->inherits("TQDialog"))) return 6; return 10; } case PM_TabBarTabShiftHorizontal: return 0; case PM_TabBarTabShiftVertical: - if (optionHandler->TabStyle() == Chooser || (optionHandler->TabStyle() == Clever && widget && widget->topLevelWidget()->inherits("QDialog"))) return 0; + if (optionHandler->TabStyle() == Chooser || (optionHandler->TabStyle() == Clever && widget && widget->topLevelWidget()->inherits("TQDialog"))) return 0; return 2; case PM_ButtonShiftHorizontal: return 0; @@ -2959,61 +2959,61 @@ int LiquidStyle::pixelMetric( PixelMetric m, const QWidget *widget ) const } } -QSize LiquidStyle::sizeFromContents( ContentsType contents, - const QWidget *widget, - const QSize &contentSize, - const QStyleOption& opt ) const { +TQSize LiquidStyle::sizeFromContents( ContentsType contents, + const TQWidget *widget, + const TQSize &contentSize, + const TQStyleOption& opt ) const { switch ( contents ) { case CT_PushButton: { // this is a little funky - we give values not based on pixelMetric // because we want a custom width/height and we can only give one // value in pixelMetric (used in sizeHint). Odd but works well - const QPushButton * button = ( const QPushButton* ) widget; + const TQPushButton * button = ( const TQPushButton* ) widget; int w = contentSize.width() + 26 > 80 ? contentSize.width() + 26 : 80; int h = contentSize.height() > 24 ? contentSize.height() : 25; if ( button->text().isEmpty() ) - return ( QSize( contentSize.width() + 2 * pixelMetric( PM_ButtonMargin, widget ), h ) ); + return ( TQSize( contentSize.width() + 2 * pixelMetric( PM_ButtonMargin, widget ), h ) ); - return ( QSize( w, h ) ); + return ( TQSize( w, h ) ); } case CT_ToolButton: { - if (widget->parentWidget() && ::qt_cast(widget->parentWidget())){ - return QSize(contentSize.width() + 6, contentSize.height() + 5); + if (widget->parentWidget() && ::tqt_cast(widget->parentWidget())){ + return TQSize(contentSize.width() + 6, contentSize.height() + 5); } else{ int w = contentSize.width() + 6; int sh = contentSize.height() + 5; int sw = (int)(1.3*sh); if (w < sw) - return QSize(sw, sh); + return TQSize(sw, sh); else - return QSize(w, sh); + return TQSize(w, sh); } } case CT_Slider: { int h = contentSize.height() > 24 ? contentSize.height() : 24; - return ( QSize( contentSize.width(), h ) ); + return ( TQSize( contentSize.width(), h ) ); } case CT_ComboBox: { - // QSize sz = KStyle::sizeFromContents( contents, widget, contentSize, opt ); - // return ( QSize( sz.width()+3, sz.height() > 25 ? sz.height() : 25 ) ); - if ( ::qt_cast(widget) && ((const QComboBox *)widget)->editable()) - return ( QSize( contentSize.width()+27, contentSize.height() + 4 > 22 ? contentSize.height() + 4 : 26 ) ); + // TQSize sz = KStyle::sizeFromContents( contents, widget, contentSize, opt ); + // return ( TQSize( sz.width()+3, sz.height() > 25 ? sz.height() : 25 ) ); + if ( ::tqt_cast(widget) && ((const TQComboBox *)widget)->editable()) + return ( TQSize( contentSize.width()+27, contentSize.height() + 4 > 22 ? contentSize.height() + 4 : 26 ) ); else - return ( QSize( contentSize.width()+27, contentSize.height() + 2 > 24 ? contentSize.height() + 2 : 24 ) ); + return ( TQSize( contentSize.width()+27, contentSize.height() + 2 > 24 ? contentSize.height() + 2 : 24 ) ); } case CT_PopupMenuItem: { if ( ! widget || opt.isDefault() ) break; - const QPopupMenu *popup = ( const QPopupMenu * ) widget; + const TQPopupMenu *popup = ( const TQPopupMenu * ) widget; bool checkable = popup->isCheckable(); - QMenuItem *mi = opt.menuItem(); + TQMenuItem *mi = opt.menuItem(); int maxpmw = opt.maxIconWidth(); int w = contentSize.width(); int h = contentSize.height(); @@ -3029,13 +3029,13 @@ QSize LiquidStyle::sizeFromContents( ContentsType contents, h = windowsSepHeight; } else { if ( mi->pixmap() ) - h = QMAX( h, mi->pixmap() ->height() + 2 * windowsItemFrame ); + h = TQMAX( h, mi->pixmap() ->height() + 2 * windowsItemFrame ); else if ( ! mi->text().isNull() ) - h = QMAX( h, popup->fontMetrics().height() + 2 * windowsItemVMargin + + h = TQMAX( h, popup->fontMetrics().height() + 2 * windowsItemVMargin + 2 * windowsItemFrame ); if ( mi->iconSet() != 0 ) - h = QMAX( h, mi->iconSet() ->pixmap( QIconSet::Small, - QIconSet::Normal ).height() + + h = TQMAX( h, mi->iconSet() ->pixmap( TQIconSet::Small, + TQIconSet::Normal ).height() + 2 * windowsItemFrame ); } if ( !mi->text().isNull() && mi->text().find( '\t' ) >= 0 ) @@ -3049,7 +3049,7 @@ QSize LiquidStyle::sizeFromContents( ContentsType contents, if ( checkable || maxpmw > 0 ) w += windowsCheckMarkHMargin; w += 20; - return ( QSize( w, h ) ); + return ( TQSize( w, h ) ); } default: break; @@ -3058,38 +3058,38 @@ QSize LiquidStyle::sizeFromContents( ContentsType contents, } -QPixmap LiquidStyle::stylePixmap( StylePixmap stylepixmap, - const QWidget* widget, - const QStyleOption& opt ) const { +TQPixmap LiquidStyle::stylePixmap( StylePixmap stylepixmap, + const TQWidget* widget, + const TQStyleOption& opt ) const { return KStyle::stylePixmap( stylepixmap, widget, opt ); } #include "eventfilter.cpp" -QRect LiquidStyle::querySubControlMetrics( ComplexControl control, const QWidget *widget, SubControl subcontrol, const QStyleOption &opt ) const +TQRect LiquidStyle::querySubControlMetrics( ComplexControl control, const TQWidget *widget, SubControl subcontrol, const TQStyleOption &opt ) const { if ( control == CC_ComboBox && subcontrol == SC_ComboBoxEditField ) - return QRect( 8, 3, widget->width() - 32, widget->height() - 7 ); + return TQRect( 8, 3, widget->width() - 32, widget->height() - 7 ); if (control == CC_TitleBar) { switch (subcontrol) { case SC_TitleBarSysMenu: - return QRect( widget->width() - 24, 1, 16, 16 ); + return TQRect( widget->width() - 24, 1, 16, 16 ); case SC_TitleBarMinButton: - return QRect( 26, 1, 16, 16 ); + return TQRect( 26, 1, 16, 16 ); case SC_TitleBarMaxButton: - return QRect( 47, 1, 16, 16 ); + return TQRect( 47, 1, 16, 16 ); case SC_TitleBarCloseButton: - return QRect( 5, 1, 16, 16 ); + return TQRect( 5, 1, 16, 16 ); case SC_TitleBarLabel: - return QRect( 68, 1, widget->width() - 107, 16 ); + return TQRect( 68, 1, widget->width() - 107, 16 ); case SC_TitleBarNormalButton: - return QRect( 26, 1, 16, 16 ); + return TQRect( 26, 1, 16, 16 ); case SC_TitleBarShadeButton: - return QRect( widget->width() - 29, 1, 24, 16 ); + return TQRect( widget->width() - 29, 1, 24, 16 ); case SC_TitleBarUnshadeButton: - return QRect( widget->width() - 29, 1, 24, 16 ); + return TQRect( widget->width() - 29, 1, 24, 16 ); default: return ( KStyle::querySubControlMetrics( control, widget, subcontrol, opt ) ); } @@ -3098,18 +3098,18 @@ QRect LiquidStyle::querySubControlMetrics( ComplexControl control, const QWidget return ( KStyle::querySubControlMetrics( control, widget, subcontrol, opt ) ); } -QImage LiquidStyle::fetchImage( const char *name ){ +TQImage LiquidStyle::fetchImage( const char *name ){ return uic_findImage( name ); } -QColor LiquidStyle::mapFadeColor(QColor &color, int index) const +TQColor LiquidStyle::mapFadeColor(TQColor &color, int index) const { - QRgb **rgb = fadeColorMap.find(color.rgb()); + TQRgb **rgb = fadeColorMap.find(color.rgb()); if (rgb) - return QColor((*rgb)[index]); + return TQColor((*rgb)[index]); // no color map found, create one and return the queried value - rgb = new QRgb*; - *rgb = new QRgb[10]; + rgb = new TQRgb*; + *rgb = new TQRgb[10]; int iRed = optionHandler->InactiveButtonColor().red(); int iGreen = optionHandler->InactiveButtonColor().green(); int iBlue = optionHandler->InactiveButtonColor().blue(); @@ -3118,37 +3118,37 @@ QColor LiquidStyle::mapFadeColor(QColor &color, int index) const int cBlue = color.blue(); for (int i = 10; i < 20; i++) { - (*rgb)[i-10] = qRgb( iRed + (cRed-iRed)*(i)/20, iGreen + (cGreen-iGreen)*(i)/20, iBlue + (cBlue-iBlue)*(i)/20); + (*rgb)[i-10] = tqRgb( iRed + (cRed-iRed)*(i)/20, iGreen + (cGreen-iGreen)*(i)/20, iBlue + (cBlue-iBlue)*(i)/20); } LiquidStyle *ptr = const_cast( this ); ptr->fadeColorMap.insert(color.rgb(), rgb); - return QColor((*rgb)[index]); + return TQColor((*rgb)[index]); } -QPixmap* LiquidStyle::processEmbedded( const char *label, const QColor &c, bool blend, const QColor *bg ) const { - QImage img( uic_findImage( label ) ); +TQPixmap* LiquidStyle::processEmbedded( const char *label, const TQColor &c, bool blend, const TQColor *bg ) const { + TQImage img( uic_findImage( label ) ); img.detach(); if ( img.isNull() ) { // shouldn't happen, been tested - qWarning( "Invalid embedded label %s", label ); + tqWarning( "Invalid embedded label %s", label ); return ( NULL ); } return ( adjustHSV( img, c, bg ) ); } -QPixmap* LiquidStyle::getPixmap( BitmapData item ) const +TQPixmap* LiquidStyle::getPixmap( BitmapData item ) const { if ( pixmaps[ item ] ) return ( pixmaps[ item ] ); - QColor bgColor( optionHandler->InactiveButtonColor() ); - QColor btnColor( isOOO ? optionHandler->CustomButtonColor() : qApp->palette().active().button() ); - QColor btnHoverColor( isOOO ? optionHandler->CustomButtonColor().light(120) : btnColor.light( 120 ) ); - QColor sbGrooveColor( optionHandler->useCustomColors() ? + TQColor bgColor( optionHandler->InactiveButtonColor() ); + TQColor btnColor( isOOO ? optionHandler->CustomButtonColor() : tqApp->palette().active().button() ); + TQColor btnHoverColor( isOOO ? optionHandler->CustomButtonColor().light(120) : btnColor.light( 120 ) ); + TQColor sbGrooveColor( optionHandler->useCustomColors() ? optionHandler->customColor( CustomSBGroove ) : bgColor ); - QColor sbSliderColor( optionHandler->useCustomColors() ? + TQColor sbSliderColor( optionHandler->useCustomColors() ? optionHandler->customColor( CustomSBSlider ) : bgColor ); - QColor sbSliderHoverColor( optionHandler->useCustomColors() ? + TQColor sbSliderHoverColor( optionHandler->useCustomColors() ? optionHandler->customColor( CustomSBSliderHover ) : isOOO?optionHandler->CustomButtonColor():btnColor ); - QColor sbSliderPressedColor( optionHandler->useCustomColors() ? + TQColor sbSliderPressedColor( optionHandler->useCustomColors() ? optionHandler->customColor( CustomSBSliderPressed ) : btnColor.dark(110) ); LiquidStyle *ptr = const_cast( this ); switch ( item ) @@ -3352,11 +3352,11 @@ QPixmap* LiquidStyle::getPixmap( BitmapData item ) const { if (optionHandler->style() == Jaguar) { - ptr->pixmaps[ TitleBar ] = new QPixmap(32,22); + ptr->pixmaps[ TitleBar ] = new TQPixmap(32,22); ptr->pixmaps[ TitleBar ]->fill( optionHandler->titleColor(0) ); - QPainter p; + TQPainter p; p.begin( ptr->pixmaps[ TitleBar ] ); - p.setPen( QColor( + p.setPen( TQColor( (optionHandler->titleColor(0).red()+optionHandler->titleColor(1).red())/2, (optionHandler->titleColor(0).green()+optionHandler->titleColor(1).green())/2, (optionHandler->titleColor(0).blue()+optionHandler->titleColor(1).blue())/2 )); @@ -3371,7 +3371,7 @@ QPixmap* LiquidStyle::getPixmap( BitmapData item ) const p.end(); } else - ptr->pixmaps[ TitleBar ] = &KPixmapEffect::gradient (*((KPixmap*)(new QPixmap(32,22))), optionHandler->titleColor(0), optionHandler->titleColor(1), KPixmapEffect::VerticalGradient, 22); + ptr->pixmaps[ TitleBar ] = &KPixmapEffect::gradient (*((KPixmap*)(new TQPixmap(32,22))), optionHandler->titleColor(0), optionHandler->titleColor(1), KPixmapEffect::VerticalGradient, 22); break; } default: diff --git a/style/baghira.h b/style/baghira.h index 1336ac2..adbe60d 100644 --- a/style/baghira.h +++ b/style/baghira.h @@ -1,32 +1,32 @@ #ifndef __LIQUID_STYLE_H #define __LIQUID_STYLE_H -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include -#include +#include #include // #define BITMAP_ITEMS 75 // Don't worry, they're demand loaded ;-) #define LIQUID_MENU_CHANGE 667 #define MOSFET_BUTTON_CHANGE 661 -class QColor; -class QHeader; -class QImage; -class QMenuBar; -class QPalette; -class QPoint; -class QPushButton; -class QRect; -class QScrollBar; -class QSize; -class QString; -class QTabBar; +class TQColor; +class TQHeader; +class TQImage; +class TQMenuBar; +class TQPalette; +class TQPoint; +class TQPushButton; +class TQRect; +class TQScrollBar; +class TQSize; +class TQString; +class TQTabBar; class LiquidStyle; enum BitmapData{RadioOn = 0, RadioOff, RadioOnHover, RadioOffHover, RadioOnPressed, RadioOffPressed, @@ -80,32 +80,32 @@ class ButtonTile for ( int i = 0;i < 9;++i ) if ( pixmaps[ i ] ) delete pixmaps[ i ]; } - QPixmap* pixmap( Tile pos ) + TQPixmap* pixmap( Tile pos ) { return ( pixmaps[ ( int ) pos ] ); } - void setPixmap( Tile pos, QPixmap *pix ) + void setPixmap( Tile pos, TQPixmap *pix ) { pixmaps[ ( int ) pos ] = pix; } protected: - QPixmap *pixmaps[ 9 ]; + TQPixmap *pixmaps[ 9 ]; }; -class OptionHandler : public QObject +class OptionHandler : public TQObject { Q_OBJECT public: - OptionHandler( QObject *parent ); + OptionHandler( TQObject *parent ); void reloadSettings(); inline static bool useShadowText() { return ( shadowText ); } - const QColor& textColor(); - const QColor& bgColor(); - const QColor& buttonColor(); + const TQColor& textColor(); + const TQColor& bgColor(); + const TQColor& buttonColor(); static int custCols[8]; inline void reset() @@ -123,17 +123,17 @@ public: return (drawMenuStripe_); } - inline static QColor menuStripeColor() + inline static TQColor menuStripeColor() { return menuStripeColor_; } - inline static QColor textColorHigh() + inline static TQColor textColorHigh() { return fgColorHigh; } - inline static QColor menuColorHigh() + inline static TQColor menuColorHigh() { return colorHigh; } @@ -167,7 +167,7 @@ public: { return ( customWidgetColor ); } - inline static const QColor& customColor( int idx ) + inline static const TQColor& customColor( int idx ) { return ( customColors[ idx ] ); } @@ -224,19 +224,19 @@ public: { return (useCustomExpanderColor); } - inline static QColor CustomExpanderColor() + inline static TQColor CustomExpanderColor() { return (expanderColor); } - inline static QColor DotlineColor() + inline static TQColor DotlineColor() { return (dotlineColor); } - inline QColor InactiveButtonColor() + inline TQColor InactiveButtonColor() { switch (inactiveButtonColor) { - case 0 : return (QColor(232,232,232)); + case 0 : return (TQColor(232,232,232)); case 1 : return (bgColor()); case 2 : return (buttonColor()); case 3 : return (customInactiveButtonColor); @@ -310,12 +310,12 @@ public: return scrollerActive; } - inline static QColor Color() + inline static TQColor Color() { return color; } - inline static QColor Color2() + inline static TQColor Color2() { return color2; } @@ -330,7 +330,7 @@ public: return tabStyle_; } - inline static QColor & BrushTint() + inline static TQColor & BrushTint() { return brushTint; } @@ -348,7 +348,7 @@ public: { return animateProgress; } - inline static QColor CustomButtonColor() + inline static TQColor CustomButtonColor() { return customButtonColor; } @@ -358,28 +358,28 @@ public: return animateButton; } - inline static QColor aDecoColor1() + inline static TQColor aDecoColor1() { return aDecoColor1_; } - inline static QColor aDecoColor2() + inline static TQColor aDecoColor2() { return aDecoColor2_; } - inline static QColor titleColor( int i ) + inline static TQColor titleColor( int i ) { return titleColor_[i]; } - inline static QColor titleButtonColor( int i ) + inline static TQColor titleButtonColor( int i ) { return titleButtonColor_[i]; } - QMenuBar *currentMenu; - QPixmap *indicatedMenuItemPix; - QRect *indicatedMenuItemRect; - QPixmap *lastIndicatedMenuItemPix; - QRect *lastIndicatedMenuItemRect; + TQMenuBar *currentMenu; + TQPixmap *indicatedMenuItemPix; + TQRect *indicatedMenuItemRect; + TQPixmap *lastIndicatedMenuItemPix; + TQRect *lastIndicatedMenuItemRect; bool mouseOverMenu; WId lastIndicatedMenuItemID; static unsigned long wmDesign; @@ -388,12 +388,12 @@ public: public slots: inline void warningSlot() { - qWarning("widget destroyed"); + tqWarning("widget destroyed"); } protected: - static QColor titleColor_[2]; - static QColor titleButtonColor_[3]; + static TQColor titleColor_[2]; + static TQColor titleButtonColor_[3]; // menu static int menuBackground; @@ -402,19 +402,19 @@ protected: static bool animateButton; static bool shadowText; static bool drawMenuStripe_; - static QColor menuStripeColor_; + static TQColor menuStripeColor_; static bool glossyMenus_; //color - static QColor customButtonColor; + static TQColor customButtonColor; //widgets static bool customWidgetColor; - static QColor customColors[ 10 ]; + static TQColor customColors[ 10 ]; //menu static bool useCustomMenuColor; - static QColor color, color2, colorHigh, fgColor, fgColorHigh; + static TQColor color, color2, colorHigh, fgColor, fgColorHigh; //incativeButton static int inactiveButtonColor; - static QColor customInactiveButtonColor; + static TQColor customInactiveButtonColor; //Design //stipples @@ -427,7 +427,7 @@ protected: //istviews; static bool drawDotlines, useCustomExpanderColor; static int expanderStyle; - static QColor expanderColor, dotlineColor; + static TQColor expanderColor, dotlineColor; static int dotlineStyle; //slider static bool squeezesbslider; @@ -450,31 +450,31 @@ protected: static bool drawProgressLabel; static tabStyle tabStyle_; - QString colorStr, fgColorStr/*, panelColorStr*/; - static QColor brushTint; - static QColor aDecoColor1_; - static QColor aDecoColor2_; + TQString colorStr, fgColorStr/*, panelColorStr*/; + static TQColor brushTint; + static TQColor aDecoColor1_; + static TQColor aDecoColor2_; static bool tintBrush; static bool animateSlider; static bool animateProgress; }; -class EventKiller : public QObject +class EventKiller : public TQObject { Q_OBJECT public: - bool eventFilter( QObject *, QEvent *) + bool eventFilter( TQObject *, TQEvent *) { return TRUE; } }; -class BMShower : public QObject +class BMShower : public TQObject { Q_OBJECT public: - BMShower(QObject *parent); - bool eventFilter( QObject *object, QEvent *event ); + BMShower(TQObject *parent); + bool eventFilter( TQObject *object, TQEvent *event ); }; class ButtonFadeInfo @@ -499,96 +499,96 @@ public: virtual ~LiquidStyle(); bool isPlain() const; - virtual void polish( QWidget *w ); -// virtual void polishPopupMenu( QPopupMenu *w ); - virtual void unPolish( QWidget *w ); - virtual void polish( QPalette &p ); - virtual void unPolish( QApplication *a ); - int styleHint(StyleHint sh, const QWidget * w, const QStyleOption & opt, QStyleHintReturn * shr) const; - void drawKStylePrimitive( KStylePrimitive kpe, QPainter* p, const QWidget* widget, const QRect &r, const QColorGroup &cg, SFlags flags = Style_Default, const QStyleOption& = QStyleOption::Default ) const; - void drawPrimitive( PrimitiveElement pe, QPainter* p, const QRect &r, const QColorGroup &cg, SFlags flags = Style_Default, const QStyleOption& = QStyleOption::Default ) const; - void drawControl( ControlElement element, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags flags = Style_Default, const QStyleOption& = QStyleOption::Default ) const; -// void drawControlMask( ControlElement element, QPainter *p, const QWidget *widget, const QRect &r, const QStyleOption& = QStyleOption::Default ) const; - void drawComplexControl( ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags flags = Style_Default, SCFlags controls = SC_All, SCFlags active = SC_None, const QStyleOption& = QStyleOption::Default ) const; -// void drawComplexControlMask( ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r, const QStyleOption& = QStyleOption::Default ) const; - - int pixelMetric( PixelMetric m, const QWidget *widget = 0 ) const; - - QSize sizeFromContents( ContentsType contents, const QWidget *widget, const QSize &contentSize, const QStyleOption& opt ) const; - QRect subRect( SubRect r, const QWidget *widget ) const; - QRect querySubControlMetrics( ComplexControl control, const QWidget *widget, SubControl subcontrol, const QStyleOption &opt = QStyleOption::Default ) const; - // Fix Qt3's wacky image positions - QPixmap stylePixmap( StylePixmap stylepixmap, const QWidget *widget = 0, const QStyleOption& = QStyleOption::Default ) const; - bool eventFilter( QObject *object, QEvent *event ); + virtual void polish( TQWidget *w ); +// virtual void polishPopupMenu( TQPopupMenu *w ); + virtual void unPolish( TQWidget *w ); + virtual void polish( TQPalette &p ); + virtual void unPolish( TQApplication *a ); + int styleHint(StyleHint sh, const TQWidget * w, const TQStyleOption & opt, TQStyleHintReturn * shr) const; + void drawKStylePrimitive( KStylePrimitive kpe, TQPainter* p, const TQWidget* widget, const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; + void drawPrimitive( PrimitiveElement pe, TQPainter* p, const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; + void drawControl( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; +// void drawControlMask( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& = TQStyleOption::Default ) const; + void drawComplexControl( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, SCFlags controls = SC_All, SCFlags active = SC_None, const TQStyleOption& = TQStyleOption::Default ) const; +// void drawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& = TQStyleOption::Default ) const; + + int pixelMetric( PixelMetric m, const TQWidget *widget = 0 ) const; + + TQSize sizeFromContents( ContentsType contents, const TQWidget *widget, const TQSize &contentSize, const TQStyleOption& opt ) const; + TQRect subRect( SubRect r, const TQWidget *widget ) const; + TQRect querySubControlMetrics( ComplexControl control, const TQWidget *widget, SubControl subcontrol, const TQStyleOption &opt = TQStyleOption::Default ) const; + // Fix TQt3's wacky image positions + TQPixmap stylePixmap( StylePixmap stylepixmap, const TQWidget *widget = 0, const TQStyleOption& = TQStyleOption::Default ) const; + bool eventFilter( TQObject *object, TQEvent *event ); private slots: void updateProgressPos(); void updateSliderPos(); - void progressBarDestroyed(QObject*); + void progressBarDestroyed(TQObject*); void fakeMouse(); protected: - void clearImage( QImage &img ) const; - ButtonTile* createButtonTile( const QColor &c, const QColor &bgColor, QImage *buttonImage, QImage *shadowImage, QImage *glowImage, QIntDict *buttonDict, QIntDict*shadowDict, QIntDict*glowDict, int w, int h, int xOff, int yOff, int centerW, int centerH, int shadowH, int glowWH, bool sunken) const; - ButtonTile* createRoundFrameTile(QImage &img, const QColor &color, const QColor *bg, const QColor &baseColor ) const; - QPixmap* createSliderEnd( const QColor &c, const QColor &bgColor, bool top/*, bool vertical*/ ) const; - ButtonTile* separateTiles( QPixmap *pix, int xO, int yO, int w, int h, int sh, bool sunken) const; + void clearImage( TQImage &img ) const; + ButtonTile* createButtonTile( const TQColor &c, const TQColor &bgColor, TQImage *buttonImage, TQImage *shadowImage, TQImage *glowImage, TQIntDict *buttonDict, TQIntDict*shadowDict, TQIntDict*glowDict, int w, int h, int xOff, int yOff, int centerW, int centerH, int shadowH, int glowWH, bool sunken) const; + ButtonTile* createRoundFrameTile(TQImage &img, const TQColor &color, const TQColor *bg, const TQColor &baseColor ) const; + TQPixmap* createSliderEnd( const TQColor &c, const TQColor &bgColor, bool top/*, bool vertical*/ ) const; + ButtonTile* separateTiles( TQPixmap *pix, int xO, int yO, int w, int h, int sh, bool sunken) const; - QPixmap* getPixmap( BitmapData item ) const; - QPixmap* adjustHSV( QImage &img, const QColor &c, const QColor *bg = NULL ) const; - QImage* adjustHSVImage( QImage &img, const QColor &c, const QColor *bg = NULL ) const; - void adjustHSV( QPixmap &pix, const QColor &c ) const; - QImage* tintBrush( const QImage &img, const QColor &c ) const; - QPixmap* processEmbedded( const char *label, const QColor &c, bool blend = false, const QColor *bg = NULL ) const; - void drawRoundButton( QPainter *p, const QColorGroup &cg, const QColor &c, /*const QColor &bg,*/ int x, int y, int w, int h, bool pushedDown = false, bool hover = false, int bgX = -1, int bgY = -1) const; - void drawRectangularButton( QPainter *p, const QColorGroup &cg, const QColor &c, int x, int y, int w, int h, bool sunken = false, bool hover = false, bool isCombo = false, int position = full, bool isHtml = false) const; - void drawCombo( QPainter *painter, const QColorGroup &cg, const QColor &c, int x, int y, int w, int h, bool sunken, bool hover, bool isCombo, int position = full, bool isHTML = false ) const; - void drawEditFrame( QPainter *p, const QRect &r, const QColorGroup &cg, bool isHTML = false, bool focused = false, bool inverse = false/*, bool round = false*/ ) const; - void drawRoundFrame( QPainter *p, const QRect &r, const QColorGroup &cg, bool focused, QPoint offset ) const; - void drawHTMLCBBorder( const QPixmap &pix, const QColor &c ) const; - bool isHTMLWidget( const QWidget *w ) const; + TQPixmap* getPixmap( BitmapData item ) const; + TQPixmap* adjustHSV( TQImage &img, const TQColor &c, const TQColor *bg = NULL ) const; + TQImage* adjustHSVImage( TQImage &img, const TQColor &c, const TQColor *bg = NULL ) const; + void adjustHSV( TQPixmap &pix, const TQColor &c ) const; + TQImage* tintBrush( const TQImage &img, const TQColor &c ) const; + TQPixmap* processEmbedded( const char *label, const TQColor &c, bool blend = false, const TQColor *bg = NULL ) const; + void drawRoundButton( TQPainter *p, const TQColorGroup &cg, const TQColor &c, /*const TQColor &bg,*/ int x, int y, int w, int h, bool pushedDown = false, bool hover = false, int bgX = -1, int bgY = -1) const; + void drawRectangularButton( TQPainter *p, const TQColorGroup &cg, const TQColor &c, int x, int y, int w, int h, bool sunken = false, bool hover = false, bool isCombo = false, int position = full, bool isHtml = false) const; + void drawCombo( TQPainter *painter, const TQColorGroup &cg, const TQColor &c, int x, int y, int w, int h, bool sunken, bool hover, bool isCombo, int position = full, bool isHTML = false ) const; + void drawEditFrame( TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool isHTML = false, bool focused = false, bool inverse = false/*, bool round = false*/ ) const; + void drawRoundFrame( TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool focused, TQPoint offset ) const; + void drawHTMLCBBorder( const TQPixmap &pix, const TQColor &c ) const; + bool isHTMLWidget( const TQWidget *w ) const; private: LiquidStyle( const LiquidStyle & ); LiquidStyle& operator=( const LiquidStyle & ); int getBrightness(unsigned int rgb) const; - QImage fetchImage( const char *name ); - QColor mapFadeColor(QColor &color, int index) const; - void fadeIn(QPushButton *button); - void fadeOut(QPushButton *button); - QColor brushedMetalColor(QColor &c) const; - QColor originalBgColor; + TQImage fetchImage( const char *name ); + TQColor mapFadeColor(TQColor &color, int index) const; + void fadeIn(TQPushButton *button); + void fadeOut(TQPushButton *button); + TQColor brushedMetalColor(TQColor &c) const; + TQColor originalBgColor; - QBitmap *sbLeft, *sbRight, *sbUp, *sbDown, *checkmark; - QImage *btnBorderImg, *btnShadowImg, *slider_top, *slider_btm, *slider_top_shd, *slider_btm_shd, *rectbutton, *combo, *comboShadow, *buttonGlow, *roundFrame; - QPixmap *btnBlendPix, *menuPix, *groupShadow ; - QPixmap plainBrush, gradBrush; - QBrush pagerBrush, pagerHoverBrush; - - QPixmap *pixmaps[ BITMAP_ITEMS ]; - QPixmap sbBuffer; - QScrollBar *currentScrollBar; - QWMatrix lMatrix; - QWMatrix rMatrix; - QWMatrix iMatrix; - QWMatrix mMatrix; - QWMatrix m2Matrix; + TQBitmap *sbLeft, *sbRight, *sbUp, *sbDown, *checkmark; + TQImage *btnBorderImg, *btnShadowImg, *slider_top, *slider_btm, *slider_top_shd, *slider_btm_shd, *rectbutton, *combo, *comboShadow, *buttonGlow, *roundFrame; + TQPixmap *btnBlendPix, *menuPix, *groupShadow ; + TQPixmap plainBrush, gradBrush; + TQBrush pagerBrush, pagerHoverBrush; + + TQPixmap *pixmaps[ BITMAP_ITEMS ]; + TQPixmap sbBuffer; + TQScrollBar *currentScrollBar; + TQWMatrix lMatrix; + TQWMatrix rMatrix; + TQWMatrix iMatrix; + TQWMatrix mMatrix; + TQWMatrix m2Matrix; bool isKicker, isOOO, isHTMLButton, initialPaletteLoaded, inExitPolish; - QHeader *currentHeader; - QTabBar *currentTabBar; + TQHeader *currentHeader; + TQTabBar *currentTabBar; int headerHoverID; int headerSortID; - QPoint btnOffset; - QPoint cursorPos_; - QWidget *currentTaskContainer; + TQPoint btnOffset; + TQPoint cursorPos_; + TQWidget *currentTaskContainer; KPixmap activeToolbarPix; bool isTaskContainer, taskContainerHover; - QPalette polishedPalette, tooltipPalette; + TQPalette polishedPalette, tooltipPalette; unsigned int qtrcModificationTime; int progAnimShift; @@ -599,29 +599,29 @@ private: OptionHandler *optionHandler; - QIntDictbtnDict; - QIntDictbfi; - QIntDictfadeColorMap; - QIntDictbtnShadowedDict; - QIntDictbuttonGlowDict; - QIntDictcomboDict; - QIntDictcomboShadowedDict; - QIntDicttabDict; - QIntDictinverseTabDict; - QIntDictrectBtnDict; - QIntDictprogress2Dict; - QMap progAnimWidgets; - - QPixmap *tmpBtnPix; + TQIntDictbtnDict; + TQIntDictbfi; + TQIntDictfadeColorMap; + TQIntDictbtnShadowedDict; + TQIntDictbuttonGlowDict; + TQIntDictcomboDict; + TQIntDictcomboShadowedDict; + TQIntDicttabDict; + TQIntDictinverseTabDict; + TQIntDictrectBtnDict; + TQIntDictprogress2Dict; + TQMap progAnimWidgets; + + TQPixmap *tmpBtnPix; ButtonTile *inactiveRoundFrame; ButtonTile *activeRoundFrame; - QWidget *highlightWidget; - QScrollBar *activeScroller; + TQWidget *highlightWidget; + TQScrollBar *activeScroller; EventKiller *eventKiller; BMShower *bmShower; - static QPixmap popupBack; - QWidget *paintWidget; + static TQPixmap popupBack; + TQWidget *paintWidget; }; #endif diff --git a/style/eventfilter.cpp b/style/eventfilter.cpp index ada0475..ba09ff6 100644 --- a/style/eventfilter.cpp +++ b/style/eventfilter.cpp @@ -1,45 +1,45 @@ -#include +#include #include #include #include #include -bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) +bool LiquidStyle::eventFilter( TQObject *obj, TQEvent *ev ) { -// qWarning("%s, %s <- %s, %s: %d", obj->className(), obj->name(), obj->parent() ? obj->parent()->className() : "none", obj->parent()?obj->parent()->name():"none",ev->type()); +// tqWarning("%s, %s <- %s, %s: %d", obj->className(), obj->name(), obj->parent() ? obj->parent()->className() : "none", obj->parent()?obj->parent()->name():"none",ev->type()); switch (ev->type()) { - case QEvent::None: - case QEvent::Timer: + case TQEvent::None: + case TQEvent::Timer: { // first check if this is one of our fading pushbuttons - return elsewise - if (!(optionHandler->AnimateButton() && ::qt_cast(obj))) + if (!(optionHandler->AnimateButton() && ::tqt_cast(obj))) return false; - ButtonFadeInfo *bfi_ = bfi[((QPushButton*)obj)->winId()]; - if (!bfi_ || ((QTimerEvent*)ev)->timerId() != bfi_->timerId) + ButtonFadeInfo *bfi_ = bfi[((TQPushButton*)obj)->winId()]; + if (!bfi_ || ((TQTimerEvent*)ev)->timerId() != bfi_->timerId) return false; // ok, this is one of our fading buttons asking for repaint - ((QPushButton*)obj)->repaint(false); + ((TQPushButton*)obj)->repaint(false); int index = bfi_->fadeIn?bfi_->index + 1:bfi_->index - 1; // handle border cases if (index < 0) // fade-out run has finished, either stop fading stuff, or start fade-in { bfi_->fadeIn=true; - if (((QPushButton*)obj)->isDefault()) + if (((TQPushButton*)obj)->isDefault()) { bfi_->index=0; } else { obj->killTimer(bfi_->timerId); - // qWarning("%u: stopped (%d)", ((QPushButton*)obj)->winId(), bfi_->timerId); + // tqWarning("%u: stopped (%d)", ((TQPushButton*)obj)->winId(), bfi_->timerId); bfi_->timerId=0; - ((QPushButton*)obj)->repaint(false); // must be to clean out button + ((TQPushButton*)obj)->repaint(false); // must be to clean out button } } else if (index > 9) // fade-in run has finished, either stop fading stuff, or start fade-out { - if (((QPushButton*)obj)->isDefault()) + if (((TQPushButton*)obj)->isDefault()) { bfi_->fadeIn=false; bfi_->index=9; @@ -47,20 +47,20 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) else { obj->killTimer(bfi_->timerId); - // qWarning("%u: stopped (%d)", ((QPushButton*)obj)->winId(), bfi_->timerId); + // tqWarning("%u: stopped (%d)", ((TQPushButton*)obj)->winId(), bfi_->timerId); bfi_->timerId=0; } } else bfi_->index = index; } - case QEvent::MouseMove: - if (::qt_cast(obj)) + case TQEvent::MouseMove: + if (::tqt_cast(obj)) { - QTabBar *tb = (QTabBar*)obj; - QRect tmpRect; + TQTabBar *tb = (TQTabBar*)obj; + TQRect tmpRect; bool done = false; - QMouseEvent *me = ( QMouseEvent*)ev; + TQMouseEvent *me = ( TQMouseEvent*)ev; int oldTab = hoveredTabIndex; if (hoveredTabIndex == -1) { @@ -107,12 +107,12 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) } return false; } - else if ( ::qt_cast(obj) ) + else if ( ::tqt_cast(obj) ) { - QHeader *hw = (QHeader*)obj; - QMouseEvent * me = ( QMouseEvent * ) ev; + TQHeader *hw = (TQHeader*)obj; + TQMouseEvent * me = ( TQMouseEvent * ) ev; int oldHeader = headerHoverID; - headerHoverID = hw->orientation() == Qt::Horizontal ? hw->sectionAt( me->x() + hw->offset() ) : hw->sectionAt( me->y() + hw->offset() ); + headerHoverID = hw->orientation() == TQt::Horizontal ? hw->sectionAt( me->x() + hw->offset() ) : hw->sectionAt( me->y() + hw->offset() ); if ( oldHeader != headerHoverID ) { // reset old header @@ -126,14 +126,14 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) return false; } return false; - case QEvent::Paint: - if ( ::qt_cast(obj) ) + case TQEvent::Paint: + if ( ::tqt_cast(obj) ) { - QToolButton * btn = ( QToolButton * ) obj; + TQToolButton * btn = ( TQToolButton * ) obj; if (!obj->inherits( "TaskContainer" )) { - if (btn->backgroundOrigin() != QWidget::WindowOrigin) - btn->setBackgroundOrigin( QWidget::WindowOrigin ); + if (btn->backgroundOrigin() != TQWidget::WindowOrigin) + btn->setBackgroundOrigin( TQWidget::WindowOrigin ); } else { @@ -145,48 +145,48 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) } return false; } - else if (::qt_cast(obj)) + else if (::tqt_cast(obj)) { - QWidget *w = (QWidget *)obj; - if(w->backgroundMode() != Qt::PaletteBackground) + TQWidget *w = (TQWidget *)obj; + if(w->backgroundMode() != TQt::PaletteBackground) { w->setBackgroundMode(PaletteBackground); - w->setBackgroundOrigin(QWidget::WindowOrigin); + w->setBackgroundOrigin(TQWidget::WindowOrigin); } return false; } - else if ( ::qt_cast(obj) ) + else if ( ::tqt_cast(obj) ) { - QHeader *hw = (QHeader*)obj; - if (hw->parentWidget() && ::qt_cast(hw->parentWidget())) - headerSortID = ((QListView*)hw->parentWidget())->sortColumn(); + TQHeader *hw = (TQHeader*)obj; + if (hw->parentWidget() && ::tqt_cast(hw->parentWidget())) + headerSortID = ((TQListView*)hw->parentWidget())->sortColumn(); return false; } - else if ( obj->inherits( "QDockWindow" ) ) + else if ( obj->inherits( "TQDockWindow" ) ) { if (KStyle::eventFilter( obj, ev )) return true; - QWidget * w = ( QWidget * ) obj; - if ( w->backgroundMode() != Qt::PaletteBackground ) + TQWidget * w = ( TQWidget * ) obj; + if ( w->backgroundMode() != TQt::PaletteBackground ) { - w->setBackgroundMode( Qt::PaletteBackground ); - w->setBackgroundOrigin( QWidget::WindowOrigin ); + w->setBackgroundMode( TQt::PaletteBackground ); + w->setBackgroundOrigin( TQWidget::WindowOrigin ); } return false; } - else if ( obj->inherits( "QRadioButton" ) || obj->inherits( "QCheckBox" ) ) + else if ( obj->inherits( "TQRadioButton" ) || obj->inherits( "TQCheckBox" ) ) { - QButton * btn = ( QButton * ) obj; - bool isStatusChild = btn->parent() && ( btn->parent() ->inherits( "QStatusBar" ) || btn->parent() ->inherits( "KonqFrameStatusBar" ) ); - bool isRadio = obj->inherits( "QRadioButton" ); + TQButton * btn = ( TQButton * ) obj; + bool isStatusChild = btn->parent() && ( btn->parent() ->inherits( "TQStatusBar" ) || btn->parent() ->inherits( "KonqFrameStatusBar" ) ); + bool isRadio = obj->inherits( "TQRadioButton" ); btn->erase(); - QPainter p; + TQPainter p; p.begin( btn ); - QFontMetrics fm = btn->fontMetrics(); - QSize lsz = fm.size( ShowPrefix, btn->text() ); - QSize sz = isRadio ? - QSize( pixelMetric( PM_ExclusiveIndicatorWidth ), pixelMetric( PM_ExclusiveIndicatorHeight ) ) : - QSize( pixelMetric( PM_IndicatorWidth ), pixelMetric( PM_IndicatorHeight ) ); + TQFontMetrics fm = btn->fontMetrics(); + TQSize lsz = fm.size( ShowPrefix, btn->text() ); + TQSize sz = isRadio ? + TQSize( pixelMetric( PM_ExclusiveIndicatorWidth ), pixelMetric( PM_ExclusiveIndicatorHeight ) ) : + TQSize( pixelMetric( PM_IndicatorWidth ), pixelMetric( PM_IndicatorHeight ) ); int x = 0; int y = isStatusChild ? 0 : ( btn->height() - lsz.height() + fm.height() - sz.height() ) / 2; SFlags flags = Style_Default; @@ -198,44 +198,44 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) flags |= Style_Down; if ( highlightWidget == btn ) flags |= Style_MouseOver; - if ( btn->state() == QButton::On ) + if ( btn->state() == TQButton::On ) flags |= Style_On; - else if ( btn->state() == QButton::Off ) + else if ( btn->state() == TQButton::Off ) flags |= Style_Off; if ( isRadio ) - drawControl( CE_RadioButton, &p, btn, QRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); + drawControl( CE_RadioButton, &p, btn, TQRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); else - drawControl( CE_CheckBox, &p, btn, QRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); + drawControl( CE_CheckBox, &p, btn, TQRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); x = sz.width() + 6; y = 0; if ( btn->hasFocus() ) { - QColor tmp( btn->colorGroup().background().dark( 130 ) ); - drawItem( &p, QRect( sz.width() + 6 + 2, 1, btn->width() - ( sz.width() + 6 + 1 ), btn->height() ), AlignLeft | AlignVCenter | ShowPrefix, btn->colorGroup(), btn->isEnabled(), btn->pixmap(), btn->text(), -1, &tmp ); - drawItem( &p, QRect( sz.width() + 6 + 3, 2, btn->width() - ( sz.width() + 6 + 1 ), btn->height() ), AlignLeft | AlignVCenter | ShowPrefix, btn->colorGroup(), btn->isEnabled(), btn->pixmap(), btn->text(), -1, &tmp ); + TQColor tmp( btn->colorGroup().background().dark( 130 ) ); + drawItem( &p, TQRect( sz.width() + 6 + 2, 1, btn->width() - ( sz.width() + 6 + 1 ), btn->height() ), AlignLeft | AlignVCenter | ShowPrefix, btn->colorGroup(), btn->isEnabled(), btn->pixmap(), btn->text(), -1, &tmp ); + drawItem( &p, TQRect( sz.width() + 6 + 3, 2, btn->width() - ( sz.width() + 6 + 1 ), btn->height() ), AlignLeft | AlignVCenter | ShowPrefix, btn->colorGroup(), btn->isEnabled(), btn->pixmap(), btn->text(), -1, &tmp ); } - drawItem( &p, QRect( sz.width() + 6 + 1, 0, btn->width() - ( sz.width() + 6 + 1 ), btn->height() ), AlignLeft | AlignVCenter | ShowPrefix, btn->colorGroup(), btn->isEnabled(), btn->pixmap(), btn->text() ); + drawItem( &p, TQRect( sz.width() + 6 + 1, 0, btn->width() - ( sz.width() + 6 + 1 ), btn->height() ), AlignLeft | AlignVCenter | ShowPrefix, btn->colorGroup(), btn->isEnabled(), btn->pixmap(), btn->text() ); p.end(); return true; } - else if (obj->inherits("KColorGrid") && !(((QWidget*)obj)->width() && ((QWidget*)obj)->height())) + else if (obj->inherits("KColorGrid") && !(((TQWidget*)obj)->width() && ((TQWidget*)obj)->height())) return true; return false; - case QEvent::KeyPress: - case QEvent::KeyRelease: + case TQEvent::KeyPress: + case TQEvent::KeyRelease: return false; - case QEvent::Wheel: - if ( ::qt_cast(obj) ) + case TQEvent::Wheel: + if ( ::tqt_cast(obj) ) { optionHandler->setScrollerActive(); return false; } return false; - case QEvent::Enter: - if ( ::qt_cast(obj) ) + case TQEvent::Enter: + if ( ::tqt_cast(obj) ) { bool isTask = obj->inherits( "TaskContainer" ); - QToolButton * btn = ( QToolButton * ) obj; + TQToolButton * btn = ( TQToolButton * ) obj; if (isTask) { currentTaskContainer = btn; @@ -249,28 +249,28 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) return false; } } - else if ( ::qt_cast(obj) || ::qt_cast(obj) || obj->inherits( "QSplitterHandle" ) || obj->inherits( "AppletHandleDrag" ) ) + else if ( ::tqt_cast(obj) || ::tqt_cast(obj) || obj->inherits( "TQSplitterHandle" ) || obj->inherits( "AppletHandleDrag" ) ) { - QWidget * btn = ( QWidget * ) obj; + TQWidget * btn = ( TQWidget * ) obj; if ( btn->isEnabled() ) { highlightWidget = btn; btn->repaint( false ); - if (optionHandler->AnimateButton() && ::qt_cast(obj)) - fadeIn((QPushButton*)obj); + if (optionHandler->AnimateButton() && ::tqt_cast(obj)) + fadeIn((TQPushButton*)obj); } return false; } - else if (::qt_cast(obj)) + else if (::tqt_cast(obj)) { - QObjectList *handlerList = obj->queryList( "QDockWindowHandle" ); + TQObjectList *handlerList = obj->queryList( "TQDockWindowHandle" ); for (uint i= 0; i < handlerList->count(); i++) - ((QWidget*)(handlerList->at(i)))->repaint(false); + ((TQWidget*)(handlerList->at(i)))->repaint(false); return false; } - if ( ::qt_cast(obj) ) + if ( ::tqt_cast(obj) ) { - QScrollBar * sb = ( QScrollBar * ) obj; + TQScrollBar * sb = ( TQScrollBar * ) obj; if ( !sb->draggingSlider() ) { if ( sb->isEnabled() ) @@ -282,10 +282,10 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) } return false; } - else if ( ::qt_cast(obj) ) + else if ( ::tqt_cast(obj) ) { - QScrollView *sv = ( QScrollView * ) obj; - if (sv->vScrollBarMode() == QScrollView::AlwaysOff && sv->hScrollBarMode() == QScrollView::AlwaysOff) + TQScrollView *sv = ( TQScrollView * ) obj; + if (sv->vScrollBarMode() == TQScrollView::AlwaysOff && sv->hScrollBarMode() == TQScrollView::AlwaysOff) return false; optionHandler->setScrollerActive(); if (!(highlightWidget == sv->verticalScrollBar())) @@ -294,38 +294,38 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) sv->horizontalScrollBar()->repaint(false); return false; } - else if ( ::qt_cast(obj) ) + else if ( ::tqt_cast(obj) ) { - currentHeader = (QHeader*)obj; + currentHeader = (TQHeader*)obj; headerHoverID = -1; return false; } - else if (::qt_cast(obj)) + else if (::tqt_cast(obj)) { - currentTabBar = (QTabBar*)obj; + currentTabBar = (TQTabBar*)obj; hoveredTabIndex = -1; return false; } else if ( obj->inherits( "KateView" ) || obj->inherits( "TEWidget") || obj->inherits("CHexViewWidget")) { - QObjectList *scrollerList = obj->queryList( "QScrollBar" ); + TQObjectList *scrollerList = obj->queryList( "TQScrollBar" ); optionHandler->setScrollerActive(); for (uint i= 0; i < scrollerList->count(); i++) - ((QWidget*)(scrollerList->at(i)))->repaint(false); + ((TQWidget*)(scrollerList->at(i)))->repaint(false); return false; } else if (obj->inherits("KDockWidgetAbstractHeaderDrag")) { - ((QWidget *)obj)->repaint(); + ((TQWidget *)obj)->repaint(); return false; } else if (obj->inherits( "KAnimWidget" )) { return true; } - else if ( obj->inherits( "QLineEdit" ) && obj->parent() && ::qt_cast(obj->parent())) + else if ( obj->inherits( "TQLineEdit" ) && obj->parent() && ::tqt_cast(obj->parent())) { - QWidget * btn = ( QWidget * ) obj->parent(); + TQWidget * btn = ( TQWidget * ) obj->parent(); if ( btn->isEnabled() ) { highlightWidget = btn; @@ -333,22 +333,22 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) } return false; } - else if ( obj->inherits( "QRadioButton" ) || obj->inherits( "QCheckBox" ) ) + else if ( obj->inherits( "TQRadioButton" ) || obj->inherits( "TQCheckBox" ) ) { - QButton * btn = ( QButton * ) obj; + TQButton * btn = ( TQButton * ) obj; if (btn->isEnabled()) { - bool isStatusChild = btn->parent() && ( btn->parent() ->inherits( "QStatusBar" ) || btn->parent() ->inherits( "KonqFrameStatusBar" ) ); - bool isRadio = obj->inherits( "QRadioButton" ); + bool isStatusChild = btn->parent() && ( btn->parent() ->inherits( "TQStatusBar" ) || btn->parent() ->inherits( "KonqFrameStatusBar" ) ); + bool isRadio = obj->inherits( "TQRadioButton" ); highlightWidget = btn; - QFontMetrics fm = btn->fontMetrics(); - QSize lsz = fm.size( ShowPrefix, btn->text() ); - QSize sz = isRadio ? - QSize( pixelMetric( PM_ExclusiveIndicatorWidth ), pixelMetric( PM_ExclusiveIndicatorHeight ) ) : - QSize( pixelMetric( PM_IndicatorWidth ), pixelMetric( PM_IndicatorHeight ) ); + TQFontMetrics fm = btn->fontMetrics(); + TQSize lsz = fm.size( ShowPrefix, btn->text() ); + TQSize sz = isRadio ? + TQSize( pixelMetric( PM_ExclusiveIndicatorWidth ), pixelMetric( PM_ExclusiveIndicatorHeight ) ) : + TQSize( pixelMetric( PM_IndicatorWidth ), pixelMetric( PM_IndicatorHeight ) ); int x = 0; int y = isStatusChild ? 0 : ( btn->height() - lsz.height() + fm.height() - sz.height() ) / 2; - QPainter p; + TQPainter p; p.begin( btn ); SFlags flags = Style_Default; if ( btn->isEnabled() ) @@ -359,23 +359,23 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) flags |= Style_Down; if ( highlightWidget == btn ) flags |= Style_MouseOver; - if ( btn->state() == QButton::On ) + if ( btn->state() == TQButton::On ) flags |= Style_On; - else if ( btn->state() == QButton::Off ) + else if ( btn->state() == TQButton::Off ) flags |= Style_Off; if ( isRadio ) - drawControl( CE_RadioButton, &p, btn, QRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); + drawControl( CE_RadioButton, &p, btn, TQRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); else - drawControl( CE_CheckBox, &p, btn, QRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); + drawControl( CE_CheckBox, &p, btn, TQRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); p.end(); } return false; } return false; - case QEvent::Leave: - if ( ::qt_cast(obj) ) + case TQEvent::Leave: + if ( ::tqt_cast(obj) ) { - QToolButton * btn = ( QToolButton * ) obj; + TQToolButton * btn = ( TQToolButton * ) obj; if (obj->inherits( "TaskContainer" )) { currentTaskContainer = NULL; @@ -389,29 +389,29 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) return false; } } - else if ( ::qt_cast(obj) || ::qt_cast(obj) || obj->inherits( "QSplitterHandle" ) || obj->inherits( "AppletHandleDrag" ) ) + else if ( ::tqt_cast(obj) || ::tqt_cast(obj) || obj->inherits( "TQSplitterHandle" ) || obj->inherits( "AppletHandleDrag" ) ) { - QWidget * btn = ( QWidget * ) obj; + TQWidget * btn = ( TQWidget * ) obj; if ( btn == highlightWidget ) { highlightWidget = NULL; - if (optionHandler->AnimateButton() && ::qt_cast(obj)) - fadeOut((QPushButton*)obj); + if (optionHandler->AnimateButton() && ::tqt_cast(obj)) + fadeOut((TQPushButton*)obj); else btn->repaint( false ); } return false; } - else if (::qt_cast(obj)) + else if (::tqt_cast(obj)) { - QObjectList *handlerList = obj->queryList( "QDockWindowHandle" ); + TQObjectList *handlerList = obj->queryList( "TQDockWindowHandle" ); for (uint i= 0; i < handlerList->count(); i++) - ((QWidget*)(handlerList->at(i)))->repaint(false); + ((TQWidget*)(handlerList->at(i)))->repaint(false); return false; } - if ( ::qt_cast(obj) ) + if ( ::tqt_cast(obj) ) { - QScrollBar * sb = ( QScrollBar * ) obj; + TQScrollBar * sb = ( TQScrollBar * ) obj; if ( sb == highlightWidget && !sb->draggingSlider() ) { activeScroller = NULL; @@ -420,12 +420,12 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) } return false; } - else if ( ::qt_cast(obj) ) + else if ( ::tqt_cast(obj) ) { - QScrollView *sv = (QScrollView*)obj; -// if (sv->clipRegion().boundingRect().contains(sv->mapFromGlobal(QCursor::pos()))) + TQScrollView *sv = (TQScrollView*)obj; +// if (sv->clipRegion().boundingRect().contains(sv->mapFromGlobal(TQCursor::pos()))) // return false; // mouse is still in the scrollview - if (sv->vScrollBarMode() == QScrollView::AlwaysOff && sv->hScrollBarMode() == QScrollView::AlwaysOff) + if (sv->vScrollBarMode() == TQScrollView::AlwaysOff && sv->hScrollBarMode() == TQScrollView::AlwaysOff) return false; // no sliders available - don't mess up things optionHandler->setScrollerInactive(); if (!(highlightWidget == sv->verticalScrollBar())) @@ -434,22 +434,22 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) sv->horizontalScrollBar()->repaint(false); return false; } - else if ( ::qt_cast(obj) ) + else if ( ::tqt_cast(obj) ) { - QHeader *hw = (QHeader*)obj; + TQHeader *hw = (TQHeader*)obj; currentHeader = NULL; if ( headerHoverID != -1 ) hw->repaint( hw->sectionPos( headerHoverID )-hw->offset(), 0, hw->sectionSize( headerHoverID ), hw->height(), false ); headerHoverID = -1; return false; } - else if (::qt_cast(obj)) + else if (::tqt_cast(obj)) { - QTabBar *tb = (QTabBar*)obj; + TQTabBar *tb = (TQTabBar*)obj; currentTabBar = NULL; if ( hoveredTabIndex != -1 ) { - QTab *tmpTab = tb->tabAt(hoveredTabIndex); + TQTab *tmpTab = tb->tabAt(hoveredTabIndex); if (tmpTab) tb->repaint( tmpTab->rect(), false ); } hoveredTabIndex = -1; @@ -457,43 +457,43 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) } else if ( obj->inherits( "KateView" ) || obj->inherits( "TEWidget") || obj->inherits("CHexViewWidget")) { - QObjectList *scrollerList = obj->queryList( "QScrollBar" ); + TQObjectList *scrollerList = obj->queryList( "TQScrollBar" ); optionHandler->setScrollerInactive(); for (uint i= 0; i < scrollerList->count(); i++) - ((QWidget*)(scrollerList->at(i)))->repaint(false); + ((TQWidget*)(scrollerList->at(i)))->repaint(false); return false; } else if (obj->inherits("KDockWidgetAbstractHeaderDrag")) { - ((QWidget *)obj)->repaint(); + ((TQWidget *)obj)->repaint(); return false; } else if (obj->inherits( "KAnimWidget" )){ return true; } - else if ( obj->inherits( "QLineEdit" ) && obj->parent() && ::qt_cast(obj->parent())) { - QWidget *btn = (QWidget*)obj->parent(); + else if ( obj->inherits( "TQLineEdit" ) && obj->parent() && ::tqt_cast(obj->parent())) { + TQWidget *btn = (TQWidget*)obj->parent(); if ( btn == highlightWidget ) highlightWidget = NULL; btn->repaint( false ); return false; } - else if ( obj->inherits( "QRadioButton" ) || obj->inherits( "QCheckBox" ) ) + else if ( obj->inherits( "TQRadioButton" ) || obj->inherits( "TQCheckBox" ) ) { - QButton * btn = ( QButton * ) obj; + TQButton * btn = ( TQButton * ) obj; if (btn == highlightWidget) { - bool isRadio = obj->inherits( "QRadioButton" ); - bool isStatusChild = btn->parent() && ( btn->parent() ->inherits( "QStatusBar" ) || btn->parent() ->inherits( "KonqFrameStatusBar" ) ); + bool isRadio = obj->inherits( "TQRadioButton" ); + bool isStatusChild = btn->parent() && ( btn->parent() ->inherits( "TQStatusBar" ) || btn->parent() ->inherits( "KonqFrameStatusBar" ) ); highlightWidget = NULL; - QFontMetrics fm = btn->fontMetrics(); - QSize lsz = fm.size( ShowPrefix, btn->text() ); - QSize sz = isRadio ? - QSize( pixelMetric( PM_ExclusiveIndicatorWidth ), pixelMetric( PM_ExclusiveIndicatorHeight ) ) : - QSize( pixelMetric( PM_IndicatorWidth ), pixelMetric( PM_IndicatorHeight ) ); + TQFontMetrics fm = btn->fontMetrics(); + TQSize lsz = fm.size( ShowPrefix, btn->text() ); + TQSize sz = isRadio ? + TQSize( pixelMetric( PM_ExclusiveIndicatorWidth ), pixelMetric( PM_ExclusiveIndicatorHeight ) ) : + TQSize( pixelMetric( PM_IndicatorWidth ), pixelMetric( PM_IndicatorHeight ) ); int x = 0; int y = isStatusChild ? 0 : ( btn->height() - lsz.height() + fm.height() - sz.height() ) / 2; - QPainter p; + TQPainter p; p.begin( btn ); SFlags flags = Style_Default; if ( btn->isEnabled() ) @@ -504,53 +504,53 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) flags |= Style_Down; if ( highlightWidget == btn ) flags |= Style_MouseOver; - if ( btn->state() == QButton::On ) + if ( btn->state() == TQButton::On ) flags |= Style_On; - else if ( btn->state() == QButton::Off ) + else if ( btn->state() == TQButton::Off ) flags |= Style_Off; if ( isRadio ) - drawControl( CE_RadioButton, &p, btn, QRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); + drawControl( CE_RadioButton, &p, btn, TQRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); else - drawControl( CE_CheckBox, &p, btn, QRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); + drawControl( CE_CheckBox, &p, btn, TQRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); p.end(); } return false; } return false; - case QEvent::MouseButtonPress: -// qWarning("class: %s, name: %s",obj->className(), obj->name()); - if ( optionHandler->style() > Panther && ::qt_cast(obj)) + case TQEvent::MouseButtonPress: +// tqWarning("class: %s, name: %s",obj->className(), obj->name()); + if ( optionHandler->style() > Panther && ::tqt_cast(obj)) { - QMouseEvent *mev = (QMouseEvent *) ev; - if (mev->button() != Qt::LeftButton) + TQMouseEvent *mev = (TQMouseEvent *) ev; + if (mev->button() != TQt::LeftButton) return false; mouseButtonPressed_ = true; cursorPos_ = mev->globalPos(); - QTimer::singleShot(50,this,SLOT(fakeMouse())); + TQTimer::singleShot(50,this,SLOT(fakeMouse())); return true; // fire this event } - if ( ::qt_cast(obj) && ((QMouseEvent*)ev)->button() != Qt::RightButton) + if ( ::tqt_cast(obj) && ((TQMouseEvent*)ev)->button() != TQt::RightButton) { - QScrollBar * sb = ( QScrollBar * ) obj; + TQScrollBar * sb = ( TQScrollBar * ) obj; activeScroller = NULL; sb->repaint( false ); return false; } else if (obj->inherits( "KAnimWidget" )) { - ((QFrame *)obj)->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); + ((TQFrame *)obj)->setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken); return false; } return false; - case QEvent::MouseButtonRelease: + case TQEvent::MouseButtonRelease: if ( mouseButtonPressed_ ) { mouseButtonPressed_= false; } - if ( ::qt_cast(obj) ) + if ( ::tqt_cast(obj) ) { - QScrollBar * sb = ( QScrollBar * ) obj; - QMouseEvent * me = ( QMouseEvent * ) ev; + TQScrollBar * sb = ( TQScrollBar * ) obj; + TQMouseEvent * me = ( TQMouseEvent * ) ev; if ( sb == highlightWidget) { if ( sb->rect().contains( me->pos() ) ) @@ -570,61 +570,61 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) } return false; } - else if ( ::qt_cast(obj) && obj->parent() && ::qt_cast(obj->parent())) + else if ( ::tqt_cast(obj) && obj->parent() && ::tqt_cast(obj->parent())) { - QMouseEvent * me = ( QMouseEvent * ) ev; - headerSortID = ((QHeader*)obj)->sectionAt( me->x() + ((QHeader*)obj)->offset()); + TQMouseEvent * me = ( TQMouseEvent * ) ev; + headerSortID = ((TQHeader*)obj)->sectionAt( me->x() + ((TQHeader*)obj)->offset()); return false; } else if (obj->inherits( "KAnimWidget" )){ - ((QFrame *)obj)->setFrameShape(QFrame::NoFrame); + ((TQFrame *)obj)->setFrameShape(TQFrame::NoFrame); return false; } return false; - case QEvent::FocusIn: - if (optionHandler->AnimateButton() && ::qt_cast(obj)) + case TQEvent::FocusIn: + if (optionHandler->AnimateButton() && ::tqt_cast(obj)) { - fadeIn((QPushButton*)obj); + fadeIn((TQPushButton*)obj); return false; } - if ( obj->inherits( "QLineEdit" ) ) + if ( obj->inherits( "TQLineEdit" ) ) { - QObject *daddy = obj->parent(); - if ( daddy && daddy->inherits( "QSpinWidget" )) - ((QWidget*)daddy)->repaint(false); + TQObject *daddy = obj->parent(); + if ( daddy && daddy->inherits( "TQSpinWidget" )) + ((TQWidget*)daddy)->repaint(false); else - ((QWidget*)obj)->repaint(false); + ((TQWidget*)obj)->repaint(false); return false; } return false; - case QEvent::FocusOut: - if (optionHandler->AnimateButton() && ::qt_cast(obj)) + case TQEvent::FocusOut: + if (optionHandler->AnimateButton() && ::tqt_cast(obj)) { - fadeOut((QPushButton*)obj); + fadeOut((TQPushButton*)obj); return false; } - if ( obj->inherits( "QLineEdit" ) ) + if ( obj->inherits( "TQLineEdit" ) ) { - if ( obj->parent() && obj->parent()->inherits( "QSpinWidget" )) - ((QWidget*)obj->parent())->repaint(false); + if ( obj->parent() && obj->parent()->inherits( "TQSpinWidget" )) + ((TQWidget*)obj->parent())->repaint(false); else - ((QWidget*)obj)->repaint(false); + ((TQWidget*)obj)->repaint(false); return false; } return false; - case QEvent::Move: - if ( !(::qt_cast(obj) || obj->inherits( "KActiveLabel" ))) + case TQEvent::Move: + if ( !(::tqt_cast(obj) || obj->inherits( "KActiveLabel" ))) return false; - case QEvent::Show: - if (optionHandler->style() == Tiger && ::qt_cast(obj)) + case TQEvent::Show: + if (optionHandler->style() == Tiger && ::tqt_cast(obj)) { - QToolBar *tb = (QToolBar*)obj; - QPoint pt = tb->mapTo(tb->topLevelWidget(), QPoint(0,0)); + TQToolBar *tb = (TQToolBar*)obj; + TQPoint pt = tb->mapTo(tb->topLevelWidget(), TQPoint(0,0)); if (pt.y() == 0) { - activeToolbarPix = QPixmap(32,tb->height()); + activeToolbarPix = TQPixmap(32,tb->height()); KPixmapEffect::gradient(activeToolbarPix, optionHandler->aDecoColor1(), optionHandler->aDecoColor2(), KPixmapEffect::VerticalGradient, 0); - QPainter painter(&activeToolbarPix); + TQPainter painter(&activeToolbarPix); painter.setPen( optionHandler->aDecoColor2().dark(130) ); painter.drawLine ( 0, tb->height()-1, 31, tb->height()-1 ); painter.end(); @@ -636,64 +636,64 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) } else { - QPalette pal( tb->palette() ); - pal.setColor( QColorGroup::Background, qApp->palette().color(QPalette::Active, QColorGroup::Background) ); - pal.setBrush ( QColorGroup::Background, qApp->palette().brush(QPalette::Active, QColorGroup::Background) ); + TQPalette pal( tb->palette() ); + pal.setColor( TQColorGroup::Background, tqApp->palette().color(TQPalette::Active, TQColorGroup::Background) ); + pal.setBrush ( TQColorGroup::Background, tqApp->palette().brush(TQPalette::Active, TQColorGroup::Background) ); tb->setPalette( pal ); } tb->removeEventFilter(eventKiller); } else { - QPalette pal( tb->palette() ); - pal.setBrush ( QColorGroup::Background, qApp->palette().brush(QPalette::Active, QColorGroup::Background) ); + TQPalette pal( tb->palette() ); + pal.setBrush ( TQColorGroup::Background, tqApp->palette().brush(TQPalette::Active, TQColorGroup::Background) ); tb->installEventFilter(eventKiller); tb->setPalette( pal ); tb->removeEventFilter(eventKiller); } } - if (optionHandler->AnimateButton() && ::qt_cast(obj)) + if (optionHandler->AnimateButton() && ::tqt_cast(obj)) { - ButtonFadeInfo *bfi_ = bfi[((QPushButton*)obj)->winId()]; + ButtonFadeInfo *bfi_ = bfi[((TQPushButton*)obj)->winId()]; if (bfi_) return false; bfi_ = new ButtonFadeInfo(); - bfi.insert(((QPushButton*)obj)->winId(),bfi_); - if (((QPushButton*)obj)->isDefault()) - fadeIn((QPushButton*)obj); + bfi.insert(((TQPushButton*)obj)->winId(),bfi_); + if (((TQPushButton*)obj)->isDefault()) + fadeIn((TQPushButton*)obj); return false; } - if (::qt_cast(obj)) + if (::tqt_cast(obj)) { - progAnimWidgets[(QWidget*)obj] = 0; + progAnimWidgets[(TQWidget*)obj] = 0; return false; } if ( !qstrcmp(obj->name(), "kde toolbar widget") ) { - QWidget* lb = static_cast(obj); - if (lb->backgroundMode() == Qt::PaletteButton) - lb->setBackgroundMode(Qt::PaletteBackground); + TQWidget* lb = static_cast(obj); + if (lb->backgroundMode() == TQt::PaletteButton) + lb->setBackgroundMode(TQt::PaletteBackground); lb->removeEventFilter(this); return false; } else if ( !obj->inherits( "KActiveLabel" )) return false; - case QEvent::Resize:{ - QResizeEvent* rev = (QResizeEvent*) ev; - if (::qt_cast(obj) && optionHandler->MenuBackground() == Gradient) + case TQEvent::Resize:{ + TQResizeEvent* rev = (TQResizeEvent*) ev; + if (::tqt_cast(obj) && optionHandler->MenuBackground() == Gradient) { - KPixmap tmpPix = QPixmap(rev->size().width(),32); - ((QWidget *)obj)->setPaletteBackgroundPixmap(KPixmapEffect::unbalancedGradient(tmpPix, optionHandler->Color(), optionHandler->Color2(), KPixmapEffect::HorizontalGradient, 100, 100)); + KPixmap tmpPix = TQPixmap(rev->size().width(),32); + ((TQWidget *)obj)->setPaletteBackgroundPixmap(KPixmapEffect::unbalancedGradient(tmpPix, optionHandler->Color(), optionHandler->Color2(), KPixmapEffect::HorizontalGradient, 100, 100)); } - else if (optionHandler->style() == Tiger && ::qt_cast(obj) && rev->size().height() != rev->oldSize().height()) + else if (optionHandler->style() == Tiger && ::tqt_cast(obj) && rev->size().height() != rev->oldSize().height()) { - QToolBar *tb = (QToolBar*)obj; - QPoint pt = tb->mapTo(tb->topLevelWidget(), QPoint(0,0)); + TQToolBar *tb = (TQToolBar*)obj; + TQPoint pt = tb->mapTo(tb->topLevelWidget(), TQPoint(0,0)); if (pt.y() == 0) { - activeToolbarPix = QPixmap(32,rev->size().height()); + activeToolbarPix = TQPixmap(32,rev->size().height()); KPixmapEffect::gradient(activeToolbarPix, optionHandler->aDecoColor1(), optionHandler->aDecoColor2(), KPixmapEffect::VerticalGradient, 0); - QPainter painter(&activeToolbarPix); + TQPainter painter(&activeToolbarPix); painter.setPen( optionHandler->aDecoColor2().dark(130) ); painter.drawLine ( 0, rev->size().height()-1, 31, rev->size().height()-1 ); painter.end(); @@ -705,54 +705,54 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) } else { - QPalette pal( tb->palette() ); - pal.setColor( QColorGroup::Background, qApp->palette().color(QPalette::Active, QColorGroup::Background) ); - pal.setBrush ( QColorGroup::Background, qApp->palette().brush(QPalette::Active, QColorGroup::Background) ); + TQPalette pal( tb->palette() ); + pal.setColor( TQColorGroup::Background, tqApp->palette().color(TQPalette::Active, TQColorGroup::Background) ); + pal.setBrush ( TQColorGroup::Background, tqApp->palette().brush(TQPalette::Active, TQColorGroup::Background) ); tb->setPalette( pal ); } tb->removeEventFilter(eventKiller); } else { - QPalette pal( tb->palette() ); - pal.setBrush ( QColorGroup::Background, qApp->palette().brush(QPalette::Active, QColorGroup::Background) ); + TQPalette pal( tb->palette() ); + pal.setBrush ( TQColorGroup::Background, tqApp->palette().brush(TQPalette::Active, TQColorGroup::Background) ); tb->installEventFilter(eventKiller); tb->setPalette( pal ); tb->removeEventFilter(eventKiller); } } /*hmhmhmm... this may break qgroupbox children?!?*/ - else if (::qt_cast(obj)) + else if (::tqt_cast(obj)) { - QGroupBox* gb = (QGroupBox*)(obj); + TQGroupBox* gb = (TQGroupBox*)(obj); if(gb->title().isEmpty()) return false; - QResizeEvent * e = (QResizeEvent*)ev; + TQResizeEvent * e = (TQResizeEvent*)ev; int fm = gb->fontMetrics().height()+(gb->isCheckable()?4:1); - gb->setFrameRect(QRect(gb->rect().x(), gb->rect().y()+fm, e->size().width(), e->size().height()-fm/*-gb->frameWidth()*/)); + gb->setFrameRect(TQRect(gb->rect().x(), gb->rect().y()+fm, e->size().width(), e->size().height()-fm/*-gb->frameWidth()*/)); if(gb->layout()) - gb->layout()->setGeometry(QRect(gb->rect().x(), gb->rect().y(), e->size().width(), e->size().height())); + gb->layout()->setGeometry(TQRect(gb->rect().x(), gb->rect().y(), e->size().width(), e->size().height())); return true; } else if ( obj->inherits( "KActiveLabel" )) { - QWidget * w = ( QWidget * ) obj; - QPalette pal( w->palette() ); - QPixmap *tile = pal.brush( QPalette::Active, QColorGroup::Background ).pixmap(); + TQWidget * w = ( TQWidget * ) obj; + TQPalette pal( w->palette() ); + TQPixmap *tile = pal.brush( TQPalette::Active, TQColorGroup::Background ).pixmap(); if ( tile ) { - QSize sz( ev->type() == QEvent::Resize ? rev->size() : w->size() ); - QPixmap pix( sz.width(), sz.height() ); - QPainter p; + TQSize sz( ev->type() == TQEvent::Resize ? rev->size() : w->size() ); + TQPixmap pix( sz.width(), sz.height() ); + TQPainter p; if (optionHandler->style() == Brushed) { p.begin( &pix ); // calc brush offsets - QWidget *window = w->topLevelWidget(); + TQWidget *window = w->topLevelWidget(); int leftWidth; int rightWidth; if (window) { - QPoint zero = w->mapTo(window, QPoint(0,0)); + TQPoint zero = w->mapTo(window, TQPoint(0,0)); leftWidth = (window->width()-1024)/2 - zero.x(); rightWidth = pix.width() - (1024 + leftWidth); if (leftWidth > 0) @@ -774,27 +774,27 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) else p.drawTiledPixmap(0, 0, pix.width(), sz.height(), gradBrush, (1024-pix.width())/2, 0); p.end(); - QBrush brush( pal.active().background(), pix ); - pal.setBrush( QColorGroup::Base, brush ); + TQBrush brush( pal.active().background(), pix ); + pal.setBrush( TQColorGroup::Base, brush ); w->setPalette( pal ); } else { p.begin(w); - p.drawTiledPixmap(QRect(0,0,sz.width(),sz.height()), *tile, w->backgroundOffset()); + p.drawTiledPixmap(TQRect(0,0,sz.width(),sz.height()), *tile, w->backgroundOffset()); } } return false; } - else if ((optionHandler->style() == Brushed) && obj->isWidgetType() && ((QWidget*)obj)->isTopLevel() && - !(::qt_cast(obj) || ::qt_cast(obj) || ((QWidget*)obj)->isDesktop () || ::qt_cast(obj) || - obj->inherits("QTipLabel") || obj->inherits("AlphaWidget") || obj->inherits("ScrollWidget") ) && (ev->type() == QEvent::Show || + else if ((optionHandler->style() == Brushed) && obj->isWidgetType() && ((TQWidget*)obj)->isTopLevel() && + !(::tqt_cast(obj) || ::tqt_cast(obj) || ((TQWidget*)obj)->isDesktop () || ::tqt_cast(obj) || + obj->inherits("TQTipLabel") || obj->inherits("AlphaWidget") || obj->inherits("ScrollWidget") ) && (ev->type() == TQEvent::Show || rev->size().width() != rev->oldSize().width())) { - QWidget* widget = (QWidget*)obj; + TQWidget* widget = (TQWidget*)obj; // create new brushpix - QPixmap tmpBrushPix(ev->type() == QEvent::Show?widget->width():rev->size().width(), plainBrush.height()); - QPainter lightMe(&tmpBrushPix); + TQPixmap tmpBrushPix(ev->type() == TQEvent::Show?widget->width():rev->size().width(), plainBrush.height()); + TQPainter lightMe(&tmpBrushPix); // calc brush offsets int tmpWidth; if ((tmpWidth = tmpBrushPix.width()) > 1024) @@ -809,30 +809,30 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) lightMe.drawPixmap(0, 0, gradBrush, (1024-tmpWidth)/2, 0, tmpWidth); lightMe.end(); //update palette - QPalette pal( qApp->palette()); - QBrush brush( pal.active().background(), tmpBrushPix ); - pal.setBrush ( QColorGroup::Background, brush ); + TQPalette pal( tqApp->palette()); + TQBrush brush( pal.active().background(), tmpBrushPix ); + pal.setBrush ( TQColorGroup::Background, brush ); //reset apps palette - qApp->installEventFilter(eventKiller); // pssst... don't let anyone know... - qApp->setPalette(pal); - pal = QPalette(widget->palette()); - pal.setBrush ( QColorGroup::Background, brush ); + tqApp->installEventFilter(eventKiller); // pssst... don't let anyone know... + tqApp->setPalette(pal); + pal = TQPalette(widget->palette()); + pal.setBrush ( TQColorGroup::Background, brush ); widget->installEventFilter(eventKiller); // pssst... don't let anyone know... widget->setPalette(pal); widget->removeEventFilter(eventKiller); // ...that we just replaced the palette - QObjectList *kids = widget->queryList("QWidget"); //TODO: implement a faster version, depending on ::qt_cast() + TQObjectList *kids = widget->queryList("TQWidget"); //TODO: implement a faster version, depending on ::tqt_cast() for (uint i= 0; i < kids->count(); i++) { - QWidget *kid = (QWidget*)kids->at(i); + TQWidget *kid = (TQWidget*)kids->at(i); if (kid && kid->paletteBackgroundPixmap() && !(kid->isTopLevel() || kid->inherits( "KonqIconViewWidget" ) || kid->inherits( "khtml") || kid->inherits( "KActiveLabel") || qstrcmp( kid->name(), "_B_ALI_HEADER" ) == 0 || (kid->parentWidget() && kid->parentWidget()->inherits("Thumbnail") || kid->parentWidget()->inherits("MarkListItem")) )) { //we can loose those kids anytime - especially if the user plays on konqueror... - if (::qt_cast(kid)) + if (::tqt_cast(kid)) kid->setErasePixmap(tmpBrushPix); else { - pal = QPalette(kid->palette()); - pal.setBrush ( QColorGroup::Background, brush ); + pal = TQPalette(kid->palette()); + pal.setBrush ( TQColorGroup::Background, brush ); kid->installEventFilter(eventKiller); // pssst... don't let anyone know... kid->setPalette(pal); kid->removeEventFilter(eventKiller); // ...that we just replaced the palette @@ -840,60 +840,60 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) } } delete kids; - qApp->removeEventFilter(eventKiller); // ...that we just replaced the palette + tqApp->removeEventFilter(eventKiller); // ...that we just replaced the palette return false; } return false; } - case QEvent::Hide: - if (optionHandler->AnimateButton() && ::qt_cast(obj)) + case TQEvent::Hide: + if (optionHandler->AnimateButton() && ::tqt_cast(obj)) { - ButtonFadeInfo *bfi_ = bfi[((QPushButton*)obj)->winId()]; + ButtonFadeInfo *bfi_ = bfi[((TQPushButton*)obj)->winId()]; if (bfi_) { obj->killTimer(bfi_->timerId); - // qWarning("%u: stopped (%d)", ((QPushButton*)obj)->winId(), bfi_->timerId); + // tqWarning("%u: stopped (%d)", ((TQPushButton*)obj)->winId(), bfi_->timerId); bfi_->index=0; bfi_->timerId=0; } } - case QEvent::ApplicationPaletteChange: - if ( obj->inherits( "QTipLabel" ) ) + case TQEvent::ApplicationPaletteChange: + if ( obj->inherits( "TQTipLabel" ) ) { - ( ( QWidget* ) obj ) ->setPalette( tooltipPalette ); + ( ( TQWidget* ) obj ) ->setPalette( tooltipPalette ); return true; } return false; - case QEvent::PaletteChange: - if (obj->inherits("QStatusBar")) + case TQEvent::PaletteChange: + if (obj->inherits("TQStatusBar")) { obj->installEventFilter(eventKiller); - ((QWidget*)obj)->setPalette(qApp->palette()); + ((TQWidget*)obj)->setPalette(tqApp->palette()); obj->removeEventFilter(eventKiller); return true; } - if ( obj->inherits( "QTipLabel" ) ) + if ( obj->inherits( "TQTipLabel" ) ) { - ( ( QWidget* ) obj ) ->setPalette( tooltipPalette ); + ( ( TQWidget* ) obj ) ->setPalette( tooltipPalette ); return true; } if (obj->inherits("KCalcButton")) { - QWidget *w = (QWidget*)obj; - QPalette pal( w->palette() ); - pal.setBrush( QColorGroup::Background, qApp->palette().brush(QPalette::Active, QColorGroup::Background)); + TQWidget *w = (TQWidget*)obj; + TQPalette pal( w->palette() ); + pal.setBrush( TQColorGroup::Background, tqApp->palette().brush(TQPalette::Active, TQColorGroup::Background)); w->installEventFilter(eventKiller); w->setPalette( pal ); w->removeEventFilter(eventKiller); - w->setBackgroundOrigin( QWidget::WindowOrigin ); + w->setBackgroundOrigin( TQWidget::WindowOrigin ); return true; } return false; - case QEvent::WindowActivate: - if (optionHandler->style() == Tiger && ::qt_cast(obj)) + case TQEvent::WindowActivate: + if (optionHandler->style() == Tiger && ::tqt_cast(obj)) { - QToolBar *tb = (QToolBar*)obj; - QPoint pt = tb->mapTo(tb->topLevelWidget(), QPoint(0,0)); + TQToolBar *tb = (TQToolBar*)obj; + TQPoint pt = tb->mapTo(tb->topLevelWidget(), TQPoint(0,0)); if (pt.y() == 0) { tb->installEventFilter(eventKiller); @@ -903,16 +903,16 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) } } return false; - case QEvent::WindowDeactivate: - if (optionHandler->style() == Tiger && ::qt_cast(obj)) + case TQEvent::WindowDeactivate: + if (optionHandler->style() == Tiger && ::tqt_cast(obj)) { - QToolBar *tb = (QToolBar*)obj; - QPoint pt = tb->mapTo(tb->topLevelWidget(), QPoint(0,0)); + TQToolBar *tb = (TQToolBar*)obj; + TQPoint pt = tb->mapTo(tb->topLevelWidget(), TQPoint(0,0)); if (pt.y() == 0) { - QPalette pal( tb->palette() ); - pal.setColor( QColorGroup::Background, qApp->palette().color(QPalette::Active, QColorGroup::Background) ); - pal.setBrush ( QColorGroup::Background, qApp->palette().brush(QPalette::Active, QColorGroup::Background) ); + TQPalette pal( tb->palette() ); + pal.setColor( TQColorGroup::Background, tqApp->palette().color(TQPalette::Active, TQColorGroup::Background) ); + pal.setBrush ( TQColorGroup::Background, tqApp->palette().brush(TQPalette::Active, TQColorGroup::Background) ); tb->installEventFilter(eventKiller); tb->setPalette( pal ); obj->removeEventFilter(eventKiller); @@ -928,16 +928,16 @@ void LiquidStyle::fakeMouse() { if (mouseButtonPressed_) // delayed mousepress for move event { - QCursor::setPos ( cursorPos_ ); - XTestFakeButtonEvent(qt_xdisplay(),1, false, 0); - XTestFakeKeyEvent(qt_xdisplay(),XKeysymToKeycode(qt_xdisplay(), XK_Alt_L), true, 0); - XTestFakeButtonEvent(qt_xdisplay(),1, true, 0); - XTestFakeKeyEvent(qt_xdisplay(),XKeysymToKeycode(qt_xdisplay(), XK_Alt_L), false, 0); - XFlush(qt_xdisplay()); + TQCursor::setPos ( cursorPos_ ); + XTestFakeButtonEvent(tqt_xdisplay(),1, false, 0); + XTestFakeKeyEvent(tqt_xdisplay(),XKeysymToKeycode(tqt_xdisplay(), XK_Alt_L), true, 0); + XTestFakeButtonEvent(tqt_xdisplay(),1, true, 0); + XTestFakeKeyEvent(tqt_xdisplay(),XKeysymToKeycode(tqt_xdisplay(), XK_Alt_L), false, 0); + XFlush(tqt_xdisplay()); } } -void LiquidStyle::fadeIn(QPushButton *button) +void LiquidStyle::fadeIn(TQPushButton *button) { ButtonFadeInfo *bfi_ = bfi[button->winId()]; if (!bfi_) @@ -950,11 +950,11 @@ void LiquidStyle::fadeIn(QPushButton *button) { bfi_->index = 0; bfi_->timerId = button->startTimer(button->isDefault()?100:50); - // qWarning("%u: started (%d)", button->winId(), bfi_->timerId); + // tqWarning("%u: started (%d)", button->winId(), bfi_->timerId); } } -void LiquidStyle::fadeOut(QPushButton *button) +void LiquidStyle::fadeOut(TQPushButton *button) { ButtonFadeInfo *bfi_ = bfi[button->winId()]; if (!bfi_) @@ -967,21 +967,21 @@ void LiquidStyle::fadeOut(QPushButton *button) { bfi_->index = 9; bfi_->timerId = button->startTimer(50); - // qWarning("%u: started (%d)", button->winId(), bfi_->timerId); + // tqWarning("%u: started (%d)", button->winId(), bfi_->timerId); } } -BMShower::BMShower(QObject *parent) : QObject(parent) +BMShower::BMShower(TQObject *parent) : TQObject(parent) { } -bool BMShower::eventFilter( QObject *obj, QEvent *ev ) +bool BMShower::eventFilter( TQObject *obj, TQEvent *ev ) { - if (ev->type() == QEvent::Show && (obj->isWidgetType() && ((QWidget*)obj)->isTopLevel() && - !(::qt_cast(obj) || ::qt_cast(obj) || ((QWidget*)obj)->isDesktop () || ::qt_cast(obj) || - obj->inherits("QTipLabel") || obj->inherits("AlphaWidget") || obj->inherits("ScrollWidget") ))) + if (ev->type() == TQEvent::Show && (obj->isWidgetType() && ((TQWidget*)obj)->isTopLevel() && + !(::tqt_cast(obj) || ::tqt_cast(obj) || ((TQWidget*)obj)->isDesktop () || ::tqt_cast(obj) || + obj->inherits("TQTipLabel") || obj->inherits("AlphaWidget") || obj->inherits("ScrollWidget") ))) { - QResizeEvent* rev = new QResizeEvent(((QWidget*)obj)->size(), QSize(0,0)); + TQResizeEvent* rev = new TQResizeEvent(((TQWidget*)obj)->size(), TQSize(0,0)); parent()->eventFilter( obj, rev ); obj->removeEventFilter(this); delete rev; diff --git a/style/optionHandler.cpp b/style/optionHandler.cpp index d96b700..2ab110a 100644 --- a/style/optionHandler.cpp +++ b/style/optionHandler.cpp @@ -1,17 +1,17 @@ #include "baghira.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // #include #include #include @@ -24,42 +24,42 @@ x > u ? u :\ x -OptionHandler::OptionHandler( QObject *parent ) : QObject( parent ) { +OptionHandler::OptionHandler( TQObject *parent ) : TQObject( parent ) { scrollerActive = false; groupShadowButton = false; reloadSettings(); } -const QColor& OptionHandler::textColor() { - return ( useCustomMenuColor ? fgColor : qApp->palette().active().text() ); +const TQColor& OptionHandler::textColor() { + return ( useCustomMenuColor ? fgColor : tqApp->palette().active().text() ); } -const QColor& OptionHandler::bgColor() { - return qApp->palette().active().background(); +const TQColor& OptionHandler::bgColor() { + return tqApp->palette().active().background(); } -const QColor& OptionHandler::buttonColor() { +const TQColor& OptionHandler::buttonColor() { LiquidStyle * style = ( LiquidStyle* ) parent(); /*if (style->isKicker) return style->origPanelBrush.color(); else */if (style->isOOO) return CustomButtonColor(); - else return qApp->palette().active().button(); + else return tqApp->palette().active().button(); } void OptionHandler::reloadSettings() { // gather options... - QSettings config; + TQSettings config; config.beginGroup("/baghira/Style"); //we need that first to make sure we use some proper settings ;) - customButtonColor = QColor(config.readNumEntry("Design_ButtonColor",(int)qApp->palette().active().button().rgb())); + customButtonColor = TQColor(config.readNumEntry("Design_ButtonColor",(int)tqApp->palette().active().button().rgb())); // design handling: // first try file: - QString tmpString; + TQString tmpString; FILE *file = NULL; wmDesign = 5; for (int i = 0; i < 8; i++) custCols[i] = -1; - if (qstrcmp( qApp->argv() [ 0 ], "ksplash" ) == 0) + if (qstrcmp( tqApp->argv() [ 0 ], "ksplash" ) == 0) { style_ = Panther; _toolbuttonStyle = Panther; @@ -72,17 +72,17 @@ void OptionHandler::reloadSettings() { { // first try for a tmp file from bab starter int tmpFile = 0; - tmpString = QDir::homeDirPath() + "/.baghira/.bab/" + qApp->argv() [ 0 ]; + tmpString = TQDir::homeDirPath() + "/.baghira/.bab/" + tqApp->argv() [ 0 ]; file = fopen(tmpString.latin1(), "r"); if( file == NULL ) { tmpFile = 1; - tmpString = QDir::homeDirPath() + "/.baghira/" + qApp->argv() [ 0 ]; + tmpString = TQDir::homeDirPath() + "/.baghira/" + tqApp->argv() [ 0 ]; file = fopen(tmpString.latin1(), "r"); if( file == NULL ) { tmpFile = 2; - tmpString = QDir::homeDirPath() + "/.baghira/.bab/.style"; + tmpString = TQDir::homeDirPath() + "/.baghira/.bab/.style"; file = fopen(tmpString.latin1(), "r"); } } @@ -110,7 +110,7 @@ void OptionHandler::reloadSettings() { remove(tmpString.latin1()); // remove TEMPORARY file else if (tmpFile == 2) { - tmpString = QDir::homeDirPath() + "/.baghira/.bab/.deco"; + tmpString = TQDir::homeDirPath() + "/.baghira/.bab/.deco"; if ((file = fopen(tmpString.latin1(), "r")) != NULL) { fscanf(file,"%u\n%u\n",&i3, &wmDesign); @@ -148,23 +148,23 @@ void OptionHandler::reloadSettings() { useCustomMenuColor = (menuColorStyle == 2); shadowText = config.readBoolEntry( "Menu_ShadowText", false); if (useCustomMenuColor){ - color = QColor( config.readNumEntry( "Menu_Color1", 0 ) ); - color2 = QColor( config.readNumEntry( "Menu_Color2", 0 ) ); - colorHigh = QColor( config.readNumEntry( "Menu_ColorHighlight", 0 ) ); - fgColor = QColor( config.readNumEntry( "Menu_TextColor", 0 ) ); - fgColorHigh = QColor( config.readNumEntry( "Menu_TextColorHighlight", 0 ) ); + color = TQColor( config.readNumEntry( "Menu_Color1", 0 ) ); + color2 = TQColor( config.readNumEntry( "Menu_Color2", 0 ) ); + colorHigh = TQColor( config.readNumEntry( "Menu_ColorHighlight", 0 ) ); + fgColor = TQColor( config.readNumEntry( "Menu_TextColor", 0 ) ); + fgColorHigh = TQColor( config.readNumEntry( "Menu_TextColorHighlight", 0 ) ); } else if (menuColorButton){ color = customButtonColor; color2 = customButtonColor.dark(130); } else { - color = qApp->palette().active().background(); - color2 = qApp->palette().active().background().dark(130); + color = tqApp->palette().active().background(); + color2 = tqApp->palette().active().background().dark(130); } drawMenuStripe_ = config.readBoolEntry("Menu_DrawMenuStripe", false); if (drawMenuStripe_) - menuStripeColor_ = QColor(config.readNumEntry("Menu_StripeColor"),(int)Qt::white.rgb()); + menuStripeColor_ = TQColor(config.readNumEntry("Menu_StripeColor"),(int)TQt::white.rgb()); // color stuff // widgets customWidgetColor = config.readBoolEntry( "Colors_UseCustomColors", false); @@ -181,7 +181,7 @@ void OptionHandler::reloadSettings() { customColors[ CustomSBGroove ].setRgb( config.readNumEntry( "Colors_SliderGroove", ( int ) bgColor().rgb() ) ); } if (inactiveButtonColor == Custom) - customInactiveButtonColor = QColor( config.readNumEntry( "Design_InactiveButtonColor", (int) bgColor().rgb())); + customInactiveButtonColor = TQColor( config.readNumEntry( "Design_InactiveButtonColor", (int) bgColor().rgb())); contrast += config.readNumEntry( "Design_StippleContrast", 3); bevelHighlights_ = config.readBoolEntry( "Design_BevelAsHighlight", true); //shadows @@ -191,11 +191,11 @@ groupboxshadow = (style_ == Brushed) ? false : config.readBoolEntry( "Design_Sha expanderStyle = config.readNumEntry( "Special_ExpanderStyle", Apple); useCustomExpanderColor = config.readBoolEntry( "Special_CustomExpanderColor", false); if (useCustomExpanderColor) - expanderColor = QColor( config.readNumEntry( "Special_ExpanderColor", (int) qApp->palette().active().text().rgb())); + expanderColor = TQColor( config.readNumEntry( "Special_ExpanderColor", (int) tqApp->palette().active().text().rgb())); drawDotlines = config.readBoolEntry( "Special_DrawTreeLines", true); if (drawDotlines){ dotlineStyle = config.readNumEntry( "Special_TreelineStyle", Line); - dotlineColor = QColor( config.readNumEntry( "Special_TreelineColor", (int) qApp->palette().active().mid().rgb())); + dotlineColor = TQColor( config.readNumEntry( "Special_TreelineColor", (int) tqApp->palette().active().mid().rgb())); } //slider squeezesbslider = config.readBoolEntry( "Special_SqueezeSlider", false ); @@ -218,24 +218,24 @@ groupboxshadow = (style_ == Brushed) ? false : config.readBoolEntry( "Design_Sha config.endGroup(); config.beginGroup("/baghira/Deco"); - titleButtonColor_[0] = QColor((unsigned int)config.readNumEntry( "CloseButtonColor", QColor(200,85,70).rgb())); - titleButtonColor_[1] = QColor((unsigned int)config.readNumEntry( "MinButtonColor", QColor(230,155,40).rgb())); - titleButtonColor_[2] = QColor((unsigned int)config.readNumEntry( "MaxButtonColor", QColor(121,180,54).rgb())); + titleButtonColor_[0] = TQColor((unsigned int)config.readNumEntry( "CloseButtonColor", TQColor(200,85,70).rgb())); + titleButtonColor_[1] = TQColor((unsigned int)config.readNumEntry( "MinButtonColor", TQColor(230,155,40).rgb())); + titleButtonColor_[2] = TQColor((unsigned int)config.readNumEntry( "MaxButtonColor", TQColor(121,180,54).rgb())); if (style_ == Jaguar) { - titleColor_[0] = QColor((unsigned int)config.readNumEntry( "inactiveColor1_1", QColor(204,214,230).rgb())); - titleColor_[1] = QColor((unsigned int)config.readNumEntry( "inactiveColor2_1", QColor(194,196,211).rgb())); + titleColor_[0] = TQColor((unsigned int)config.readNumEntry( "inactiveColor1_1", TQColor(204,214,230).rgb())); + titleColor_[1] = TQColor((unsigned int)config.readNumEntry( "inactiveColor2_1", TQColor(194,196,211).rgb())); } else if (style_ != Brushed) { - titleColor_[0] = QColor((unsigned int)config.readNumEntry( "activeColor1_2", QColor(238,238,238).rgb())); - titleColor_[1] = QColor((unsigned int)config.readNumEntry( "activeColor2_2", QColor(205,202,205).rgb())); + titleColor_[0] = TQColor((unsigned int)config.readNumEntry( "activeColor1_2", TQColor(238,238,238).rgb())); + titleColor_[1] = TQColor((unsigned int)config.readNumEntry( "activeColor2_2", TQColor(205,202,205).rgb())); } if (style_ == Tiger) { int r,g,b; - aDecoColor1_ = QColor((unsigned int)config.readNumEntry( "activeColor2_4", (unsigned int) QColor(205,202,205).rgb())); - aDecoColor2_ = QColor((unsigned int)config.readNumEntry( "activeColor1_4", (unsigned int) QColor(238,238,238).rgb())); + aDecoColor1_ = TQColor((unsigned int)config.readNumEntry( "activeColor2_4", (unsigned int) TQColor(205,202,205).rgb())); + aDecoColor2_ = TQColor((unsigned int)config.readNumEntry( "activeColor1_4", (unsigned int) TQColor(238,238,238).rgb())); r = (int)CLAMP(aDecoColor1_.red() * pow((double)aDecoColor1_.red() / (double)aDecoColor2_.red(),2.0),0,255); g = (int)CLAMP(aDecoColor1_.green() * pow((double)aDecoColor1_.green() / (double)aDecoColor2_.green(),2.0),0,255); b = (int)CLAMP(aDecoColor1_.blue() * pow((double)aDecoColor1_.blue() / (double)aDecoColor2_.blue(),2.0),0,255); @@ -243,8 +243,8 @@ groupboxshadow = (style_ == Brushed) ? false : config.readBoolEntry( "Design_Sha } else { - aDecoColor1_ = Qt::black; - aDecoColor2_ = Qt::black; + aDecoColor1_ = TQt::black; + aDecoColor2_ = TQt::black; } config.endGroup(); // Option gathered diff --git a/style/polish.cpp b/style/polish.cpp index f845d2b..2f4bbeb 100644 --- a/style/polish.cpp +++ b/style/polish.cpp @@ -1,35 +1,35 @@ -//#include +//#include #include "baghira.h" #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -//#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//#include +#include +#include +#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -49,7 +49,7 @@ x #endif -void LiquidStyle::polish( QPalette &pal ) +void LiquidStyle::polish( TQPalette &pal ) { if ( inExitPolish ) return ; @@ -67,12 +67,12 @@ void LiquidStyle::polish( QPalette &pal ) btnDict.clear(); btnShadowedDict.clear(); // reset brushes - pagerHoverBrush = QBrush(); - pagerBrush = QBrush(); + pagerHoverBrush = TQBrush(); + pagerBrush = TQBrush(); bool newPalette = false; struct stat buffer; - if ( stat( QFile::encodeName( QDir::homeDirPath() + "/.qt/qtrc" ), &buffer ) == 0 ) + if ( stat( TQFile::encodeName( TQDir::homeDirPath() + "/.qt/qtrc" ), &buffer ) == 0 ) { unsigned int lastModTime = ( unsigned int ) buffer.st_mtime; if ( lastModTime > qtrcModificationTime ) @@ -91,57 +91,57 @@ void LiquidStyle::polish( QPalette &pal ) return ; } - originalBgColor = pal.color(QPalette::Active, QColorGroup::Background); + originalBgColor = pal.color(TQPalette::Active, TQColorGroup::Background); if (optionHandler->style() == Brushed) - pal.setColor(QColorGroup::Background, brushedMetalColor(optionHandler->BrushTint())); + pal.setColor(TQColorGroup::Background, brushedMetalColor(optionHandler->BrushTint())); if (isOOO) - pal.setColor( QColorGroup::Button, pal.active().background() ); + pal.setColor( TQColorGroup::Button, pal.active().background() ); else if (optionHandler->custCols[0] != -1) { - pal.setColor(QColorGroup::Background, QColor(optionHandler->custCols[0])); - pal.setColor(QColorGroup::Button, QColor(optionHandler->custCols[1])); - pal.setColor(QColorGroup::Base, QColor(optionHandler->custCols[2])); - pal.setColor(QPalette::Active, QColorGroup::Text, QColor(optionHandler->custCols[3])); - pal.setColor(QPalette::Active, QColorGroup::Foreground, QColor(optionHandler->custCols[3])); - pal.setColor(QColorGroup::Highlight, QColor(optionHandler->custCols[4])); - pal.setColor(QPalette::Active, QColorGroup::HighlightedText, QColor(optionHandler->custCols[5])); - pal.setColor(QPalette::Active, QColorGroup::ButtonText, QColor(optionHandler->custCols[6])); - pal.setColor(QColorGroup::Mid, QColor((qRed(optionHandler->custCols[2])+qRed(optionHandler->custCols[3]))/2,(qGreen(optionHandler->custCols[2])+qGreen(optionHandler->custCols[3]))/2,(qBlue(optionHandler->custCols[2])+qBlue(optionHandler->custCols[3]))/2)); + pal.setColor(TQColorGroup::Background, TQColor(optionHandler->custCols[0])); + pal.setColor(TQColorGroup::Button, TQColor(optionHandler->custCols[1])); + pal.setColor(TQColorGroup::Base, TQColor(optionHandler->custCols[2])); + pal.setColor(TQPalette::Active, TQColorGroup::Text, TQColor(optionHandler->custCols[3])); + pal.setColor(TQPalette::Active, TQColorGroup::Foreground, TQColor(optionHandler->custCols[3])); + pal.setColor(TQColorGroup::Highlight, TQColor(optionHandler->custCols[4])); + pal.setColor(TQPalette::Active, TQColorGroup::HighlightedText, TQColor(optionHandler->custCols[5])); + pal.setColor(TQPalette::Active, TQColorGroup::ButtonText, TQColor(optionHandler->custCols[6])); + pal.setColor(TQColorGroup::Mid, TQColor((tqRed(optionHandler->custCols[2])+tqRed(optionHandler->custCols[3]))/2,(tqGreen(optionHandler->custCols[2])+tqGreen(optionHandler->custCols[3]))/2,(tqBlue(optionHandler->custCols[2])+tqBlue(optionHandler->custCols[3]))/2)); - pal.setColor(QPalette::Inactive, QColorGroup::Text, QColor(optionHandler->custCols[3])); - pal.setColor(QPalette::Inactive, QColorGroup::HighlightedText, QColor(optionHandler->custCols[5])); - pal.setColor(QPalette::Inactive, QColorGroup::ButtonText, QColor(optionHandler->custCols[6])); + pal.setColor(TQPalette::Inactive, TQColorGroup::Text, TQColor(optionHandler->custCols[3])); + pal.setColor(TQPalette::Inactive, TQColorGroup::HighlightedText, TQColor(optionHandler->custCols[5])); + pal.setColor(TQPalette::Inactive, TQColorGroup::ButtonText, TQColor(optionHandler->custCols[6])); } else - pal.setColor( QColorGroup::Button, optionHandler->CustomButtonColor() ); + pal.setColor( TQColorGroup::Button, optionHandler->CustomButtonColor() ); #if 0 if ( isKicker ) { - origPanelBrush = pal.brush( QPalette::Active, QColorGroup::Background ); + origPanelBrush = pal.brush( TQPalette::Active, TQColorGroup::Background ); origPanelPalette = pal; - QColor c( pal.active().background() ); + TQColor c( pal.active().background() ); if ( optionHandler->usePanelCustomColor() && optionHandler->panelCustomColor().isValid() ) c = optionHandler->panelCustomColor(); kickerColor = c; - pal.setColor( QColorGroup::Mid, optionHandler->CustomButtonColor().dark( 110 ) ); - pal.setColor( QColorGroup::Dark, optionHandler->CustomButtonColor().dark( 130 ) ); - pal.setColor( QColorGroup::Midlight, optionHandler->CustomButtonColor().light( 110 ) ); - pal.setColor( QColorGroup::Light, optionHandler->CustomButtonColor().light( 115 ) ); - pal.setColor( QColorGroup::Button, optionHandler->CustomButtonColor()); + pal.setColor( TQColorGroup::Mid, optionHandler->CustomButtonColor().dark( 110 ) ); + pal.setColor( TQColorGroup::Dark, optionHandler->CustomButtonColor().dark( 130 ) ); + pal.setColor( TQColorGroup::Midlight, optionHandler->CustomButtonColor().light( 110 ) ); + pal.setColor( TQColorGroup::Light, optionHandler->CustomButtonColor().light( 115 ) ); + pal.setColor( TQColorGroup::Button, optionHandler->CustomButtonColor()); if (optionHandler->style() == Brushed) { - QBrush brush( c, gradBrush ); - pal.setBrush( QColorGroup::Background, brush ); + TQBrush brush( c, gradBrush ); + pal.setBrush( TQColorGroup::Background, brush ); } else if ( optionHandler->usePanelStipple() ) { - QPixmap stipple( 64, 64 ); + TQPixmap stipple( 64, 64 ); stipple.fill( c.rgb() ); - QPainter p( &stipple ); + TQPainter p( &stipple ); p.setPen( c.dark( 100 + (int)(optionHandler->stippleContrast()/4) ) ); for ( int i = 1; i < 64; i += 4 ) { @@ -152,25 +152,25 @@ void LiquidStyle::polish( QPalette &pal ) for ( int i = 2; i < 63; i += 4 ) p.drawLine( 0, i, 63, i ); p.end(); - QBrush brush( c, stipple ); - pal.setBrush( QColorGroup::Background, brush ); + TQBrush brush( c, stipple ); + pal.setBrush( TQColorGroup::Background, brush ); } else - pal.setBrush( QColorGroup::Background, c ); + pal.setBrush( TQColorGroup::Background, c ); } #endif /*else*/ if (optionHandler->style() == Brushed) { - QColor c( pal.active().background() ); - QBrush brush( c, gradBrush ); - pal.setBrush( QColorGroup::Background, brush ); + TQColor c( pal.active().background() ); + TQBrush brush( c, gradBrush ); + pal.setBrush( TQColorGroup::Background, brush ); } else if ( !isPlain() ) { - QColor c( pal.active().background() ); - QPixmap stipple( 64, 64 ); + TQColor c( pal.active().background() ); + TQPixmap stipple( 64, 64 ); stipple.fill( c.rgb() ); - QPainter p; + TQPainter p; p.begin( &stipple ); p.setPen( c.dark( 100 + (int)(optionHandler->stippleContrast()/2) ) ); for ( i = 1; i < 64; i += 4 ) @@ -182,41 +182,41 @@ void LiquidStyle::polish( QPalette &pal ) for ( i = 2; i < 63; i += 4 ) p.drawLine( 0, i, 63, i ); p.end(); - QBrush brush( c, stipple ); - pal.setBrush( QColorGroup::Background, brush ); + TQBrush brush( c, stipple ); + pal.setBrush( TQColorGroup::Background, brush ); } if (optionHandler->bevelHighlights()) { - QColor c(pal.active().highlight()); - QColor c2(c.light(140)); - QPixmap pix2 = QPixmap(48,48); - QPainter coolPainter(&pix2); - KPixmap pix = QPixmap(48,24); + TQColor c(pal.active().highlight()); + TQColor c2(c.light(140)); + TQPixmap pix2 = TQPixmap(48,48); + TQPainter coolPainter(&pix2); + KPixmap pix = TQPixmap(48,24); KPixmapEffect::gradient(pix,c,c2,KPixmapEffect::VerticalGradient,0); coolPainter.drawPixmap(0,0,pix); KPixmapEffect::gradient(pix,c2,c,KPixmapEffect::VerticalGradient,0); coolPainter.drawPixmap(0,24,pix); - QBrush brush(c, pix2); - pal.setBrush(QColorGroup::Highlight, brush); + TQBrush brush(c, pix2); + pal.setBrush(TQColorGroup::Highlight, brush); } polishedPalette = pal; optionHandler->reset(); } -void LiquidStyle::unPolish( QApplication *app ) +void LiquidStyle::unPolish( TQApplication *app ) { popupBack.resize(0,0); - QPalette pal( app->palette() ); + TQPalette pal( app->palette() ); inExitPolish = true; if ( !isPlain() ) { // reset any stipples - if ( pal.brush( QPalette::Active, QColorGroup::Background ).pixmap() ) - pal.setBrush( QColorGroup::Background, pal.active().background() ); - if ( pal.brush( QPalette::Active, QColorGroup::Button ).pixmap() ) - pal.setBrush( QColorGroup::Button, pal.active().button() ); + if ( pal.brush( TQPalette::Active, TQColorGroup::Background ).pixmap() ) + pal.setBrush( TQColorGroup::Background, pal.active().background() ); + if ( pal.brush( TQPalette::Active, TQColorGroup::Button ).pixmap() ) + pal.setBrush( TQColorGroup::Button, pal.active().button() ); // app->blockSignals( TRUE ); app->setPalette( pal ); // app->blockSignals( FALSE ); @@ -225,14 +225,14 @@ void LiquidStyle::unPolish( QApplication *app ) inExitPolish = false; } -Atom baghira_deco_design = XInternAtom(qt_xdisplay(), "BAGHIRA_DECO_DESIGN", False); +Atom baghira_deco_design = XInternAtom(tqt_xdisplay(), "BAGHIRA_DECO_DESIGN", False); -void LiquidStyle::polish( QWidget *w ) +void LiquidStyle::polish( TQWidget *w ) { // bool testWidget = w->inherits("Splash"); // int testInt = 0; -// if (w->sizePolicy().horData() == QSizePolicy::Minimum || w->sizePolicy().horData() == QSizePolicy::MinimumExpanding) -// qWarning("%s, \"%s\"",w->className(), w->name()); +// if (w->sizePolicy().horData() == TQSizePolicy::Minimum || w->sizePolicy().horData() == TQSizePolicy::MinimumExpanding) +// tqWarning("%s, \"%s\"",w->className(), w->name()); // w->installEventFilter(this); bool tmpBool = false; @@ -244,12 +244,12 @@ void LiquidStyle::polish( QWidget *w ) if (w->isTopLevel()) { - if ( ::qt_cast(w)) // popup menu designs + if ( ::tqt_cast(w)) // popup menu designs { switch (optionHandler->MenuBackground()) { case Plain: - w->setBackgroundMode( QWidget::PaletteBackground ); + w->setBackgroundMode( TQWidget::PaletteBackground ); if (optionHandler->UseCustomMenuColor()) w->setPaletteBackgroundColor(optionHandler->Color()); else if (optionHandler->MenuColorButton()) @@ -259,24 +259,24 @@ void LiquidStyle::polish( QWidget *w ) break; case Stipples: { - QColor c; + TQColor c; if (optionHandler->UseCustomMenuColor()) - c = QColor( optionHandler->Color() ); + c = TQColor( optionHandler->Color() ); else if (optionHandler->MenuColorButton()) - c = QColor( optionHandler->buttonColor() ); + c = TQColor( optionHandler->buttonColor() ); else - c = QColor( originalBgColor ); + c = TQColor( originalBgColor ); if (popupBack.isNull()) { - popupBack = QPixmap(64,64); - QPixmap *stipple = &popupBack; + popupBack = TQPixmap(64,64); + TQPixmap *stipple = &popupBack; stipple->fill( c.rgb() ); - QPainter p; + TQPainter p; p.begin( stipple ); if (optionHandler->UseCustomMenuColor()) { - QColor c2 = QColor( optionHandler->Color2() ); - p.setPen(QColor((3*c.red()+c2.red())/4, + TQColor c2 = TQColor( optionHandler->Color2() ); + p.setPen(TQColor((3*c.red()+c2.red())/4, (3*c.green()+c2.green())/4, (3*c.blue()+c2.blue())/4)); for ( int i = 1; i < 64; i += 4 ) @@ -306,24 +306,24 @@ void LiquidStyle::polish( QWidget *w ) } p.end(); } - w->setBackgroundMode( QWidget::NoBackground ); + w->setBackgroundMode( TQWidget::NoBackground ); break; } case Gradient: { - w->setBackgroundMode( QWidget::PaletteBackground ); - KPixmap tmpPix = QPixmap(w->width(), 32); + w->setBackgroundMode( TQWidget::PaletteBackground ); + KPixmap tmpPix = TQPixmap(w->width(), 32); w->setPaletteBackgroundPixmap(KPixmapEffect::unbalancedGradient(tmpPix, optionHandler->Color(), optionHandler->Color2(),KPixmapEffect::HorizontalGradient, 100, 100, 16)); w->installEventFilter( this ); break; } default: - w->setBackgroundMode( QWidget::PaletteBackground ); + w->setBackgroundMode( TQWidget::PaletteBackground ); break; } //set popup menu opacity for them as they bypass the windowmanager unsigned long opacity = optionHandler->MenuOpacity()/100.0*OPAQUE; - XChangeProperty(qt_xdisplay(), w->winId(), XInternAtom(qt_xdisplay(), OPACITY, False), XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &opacity, 1L); + XChangeProperty(tqt_xdisplay(), w->winId(), XInternAtom(tqt_xdisplay(), OPACITY, False), XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &opacity, 1L); goto kstpolish; } else @@ -334,14 +334,14 @@ void LiquidStyle::polish( QWidget *w ) Atom actual; int format, result; unsigned long n, left; - result = XGetWindowProperty(qt_xdisplay(), w->winId(), baghira_deco_design, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, &data); + result = XGetWindowProperty(tqt_xdisplay(), w->winId(), baghira_deco_design, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, &data); if (result != Success || data == None) // not found set design { int tmp = optionHandler->wmDesign != Tiger ? optionHandler->wmDesign : Panther; - XChangeProperty(qt_xdisplay(), w->winId(), baghira_deco_design, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &(tmp), 1L); + XChangeProperty(tqt_xdisplay(), w->winId(), baghira_deco_design, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &(tmp), 1L); } } - if ((optionHandler->style() == Brushed) && !( ::qt_cast(w) || ::qt_cast(w) || w->isDesktop() || ::qt_cast(w) || w->inherits("QTipLabel") || w->inherits("AlphaWidget") || w->inherits("ScrollWidget") || w->inherits("PlayerWidget"))) + if ((optionHandler->style() == Brushed) && !( ::tqt_cast(w) || ::tqt_cast(w) || w->isDesktop() || ::tqt_cast(w) || w->inherits("TQTipLabel") || w->inherits("AlphaWidget") || w->inherits("ScrollWidget") || w->inherits("PlayerWidget"))) // install resize event filter, allowing us to update the b/m gradient on horizontal resizes. some widgets must be excluded though { if (!isKicker) @@ -353,8 +353,8 @@ void LiquidStyle::polish( QWidget *w ) if (w->inherits("KURLBar")/*ListBox*/) { - w->setPaletteBackgroundColor(qApp->palette().color(QPalette::Active, QColorGroup::Base)); -// ((QListBox*)w)->viewport()->setPaletteBackgroundColor(qApp->palette().color(QPalette::Active, QColorGroup::Base)); + w->setPaletteBackgroundColor(tqApp->palette().color(TQPalette::Active, TQColorGroup::Base)); +// ((TQListBox*)w)->viewport()->setPaletteBackgroundColor(tqApp->palette().color(TQPalette::Active, TQColorGroup::Base)); goto kstpolish; } @@ -379,138 +379,138 @@ void LiquidStyle::polish( QWidget *w ) if (qstrcmp( w->name(), "kde toolbar widget" ) == 0 ) w->installEventFilter( this ); - if (::qt_cast(w)) + if (::tqt_cast(w)) { - w->setBackgroundOrigin(QWidget::WindowOrigin); - if (::qt_cast(w)) + w->setBackgroundOrigin(TQWidget::WindowOrigin); + if (::tqt_cast(w)) { if (w->inherits("KKeyButton")) { - w->setBackgroundMode( QWidget::PaletteBackground); - QPalette pal( w->palette() ); - pal.setBrush( QColorGroup::Background, qApp->palette().active().background() ); + w->setBackgroundMode( TQWidget::PaletteBackground); + TQPalette pal( w->palette() ); + pal.setBrush( TQColorGroup::Background, tqApp->palette().active().background() ); w->setPalette( pal ); } else if (w->inherits("KCalcButton")) { - w->setBackgroundMode( QWidget::PaletteBackground); - QPalette pal( w->palette() ); - pal.setBrush( QColorGroup::Background, qApp->palette().brush(QPalette::Active, QColorGroup::Background)); + w->setBackgroundMode( TQWidget::PaletteBackground); + TQPalette pal( w->palette() ); + pal.setBrush( TQColorGroup::Background, tqApp->palette().brush(TQPalette::Active, TQColorGroup::Background)); w->setPalette( pal ); } else #if !KDE_IS_VERSION(3,4,3) if (!(w->parent() && w->parent()->inherits("MiniBar"))) #endif - w->setBackgroundMode( QWidget::NoBackground); + w->setBackgroundMode( TQWidget::NoBackground); w->installEventFilter( this ); goto kstpolish; } - else if (w->inherits( "QRadioButton" ) || w->inherits( "QCheckBox" )) + else if (w->inherits( "TQRadioButton" ) || w->inherits( "TQCheckBox" )) { - w->setBackgroundOrigin(QWidget::WindowOrigin); + w->setBackgroundOrigin(TQWidget::WindowOrigin); w->installEventFilter( this ); goto kstpolish; } } - if ( ::qt_cast(w)) + if ( ::tqt_cast(w)) { if (optionHandler->useToolButtonFrame() && w->inherits("KToolBar")) - ((QToolBar*)w)->boxLayout()->setSpacing( 0 ); - ((QToolBar*)w)->setMargin( 4 ); + ((TQToolBar*)w)->boxLayout()->setSpacing( 0 ); + ((TQToolBar*)w)->setMargin( 4 ); w->setBackgroundMode(PaletteBackground); - w->setBackgroundOrigin(QWidget::WindowOrigin); + w->setBackgroundOrigin(TQWidget::WindowOrigin); if (optionHandler->style() > Panther) { w->installEventFilter( this ); if (optionHandler->wmDesign == Tiger) { - XChangeProperty(qt_xdisplay(), w->topLevelWidget()->winId(), baghira_deco_design, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &(optionHandler->wmDesign), 1L); + XChangeProperty(tqt_xdisplay(), w->topLevelWidget()->winId(), baghira_deco_design, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &(optionHandler->wmDesign), 1L); } } goto kstpolish ; } - //if (testWidget) qWarning("testwidget stage %d",testInt++); + //if (testWidget) tqWarning("testwidget stage %d",testInt++); - if (tmpBool = ::qt_cast(w) || w->inherits( "QToolBarSeparator" ) || w->inherits( "KToolBarSeparator" ) ) + if (tmpBool = ::tqt_cast(w) || w->inherits( "TQToolBarSeparator" ) || w->inherits( "KToolBarSeparator" ) ) { - if (tmpBool && w->parentWidget() && ::qt_cast(w->parentWidget()) ) + if (tmpBool && w->parentWidget() && ::tqt_cast(w->parentWidget()) ) { - w->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + w->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); } - w->setBackgroundMode( QWidget::PaletteBackground ); - w->setBackgroundOrigin(QWidget::WindowOrigin); + w->setBackgroundMode( TQWidget::PaletteBackground ); + w->setBackgroundOrigin(TQWidget::WindowOrigin); w->installEventFilter( this ); goto kstpolish; } - if (::qt_cast(w)) + if (::tqt_cast(w)) { w->setBackgroundMode(NoBackground); w->installEventFilter( this ); - w->setBackgroundOrigin(QWidget::WindowOrigin); + w->setBackgroundOrigin(TQWidget::WindowOrigin); goto kstpolish; } if (w->inherits("TaskBar")) { - w->setBackgroundOrigin(QWidget::WidgetOrigin); + w->setBackgroundOrigin(TQWidget::WidgetOrigin); goto kstpolish; } - if (w->inherits("QSpinWidget") || w->inherits("KDockWidgetAbstractHeaderDrag")){ + if (w->inherits("TQSpinWidget") || w->inherits("KDockWidgetAbstractHeaderDrag")){ w->installEventFilter( this ); goto kstpolish; } - if ( !isPlain () && (w->inherits( "KonqIconViewWidget" ) || w->inherits( "khtml")/* || w->inherits( "QtVisionView")*/)) + if ( !isPlain () && (w->inherits( "KonqIconViewWidget" ) || w->inherits( "khtml")/* || w->inherits( "TQtVisionView")*/)) { // if you want custom backgrounds in konqueror, you have to reset pixmap, since Konq animation can't handle it // original liquid did this on khtml, too (at speed loss) so we'll see, if we get errors from this... - QPalette pal( w->palette() ); - pal.setBrush( QColorGroup::Background, pal.active().background() ); + TQPalette pal( w->palette() ); + pal.setBrush( TQColorGroup::Background, pal.active().background() ); w->setPalette( pal ); } - if (::qt_cast(w)) + if (::tqt_cast(w)) { //avoid flicker - w->setBackgroundMode( QWidget::NoBackground ); + w->setBackgroundMode( TQWidget::NoBackground ); goto kstpolish; } - if ((::qt_cast(w) || w->inherits("KateView") || w->inherits("TEWidget") || w->inherits("CHexViewWidget")) && !(w->isA("KOAgenda"))) + if ((::tqt_cast(w) || w->inherits("KateView") || w->inherits("TEWidget") || w->inherits("CHexViewWidget")) && !(w->isA("KOAgenda"))) { - if (::qt_cast(w) && optionHandler->custCols[7] != -1 && ((KListView*)w)->alternateBackground() == KGlobalSettings::alternateBackgroundColor()) + if (::tqt_cast(w) && optionHandler->custCols[7] != -1 && ((KListView*)w)->alternateBackground() == KGlobalSettings::alternateBackgroundColor()) { - ((KListView*)w)->setAlternateBackground(QColor(optionHandler->custCols[7])); + ((KListView*)w)->setAlternateBackground(TQColor(optionHandler->custCols[7])); } #if _FORCE_SCROLLBARS_ - if (::qt_cast(w) && !w->inherits( "KActiveLabel" )) + if (::tqt_cast(w) && !w->inherits( "KActiveLabel" )) { - ((QScrollView*)w)->setVScrollBarMode(QScrollView::AlwaysOn); + ((TQScrollView*)w)->setVScrollBarMode(TQScrollView::AlwaysOn); } #endif - if (::qt_cast(w) && w->isTopLevel()) + if (::tqt_cast(w) && w->isTopLevel()) //set opacity for them as they bypass the windowmanager { uint opacity = 0.8*OPAQUE; - XChangeProperty(qt_xdisplay(), w->winId(), XInternAtom(qt_xdisplay(), OPACITY, False), XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &opacity, 1L); + XChangeProperty(tqt_xdisplay(), w->winId(), XInternAtom(tqt_xdisplay(), OPACITY, False), XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &opacity, 1L); } #if 0 // doesn't work properly - best would be to have the items drawn via style() - int height = ((QListBox*)w)->itemHeight(); + int height = ((TQListBox*)w)->itemHeight(); if (height > 0) { - QPalette pal = w->palette(); - QColor c(pal.active().highlight()); - QColor c2(c.light(140)); - KPixmap pix = QPixmap(48,height); + TQPalette pal = w->palette(); + TQColor c(pal.active().highlight()); + TQColor c2(c.light(140)); + KPixmap pix = TQPixmap(48,height); KPixmapEffect::gradient(pix,c2,c,KPixmapEffect::VerticalGradient,0); - QBrush brush(c, pix); - pal.setBrush(QColorGroup::Highlight, brush); + TQBrush brush(c, pix); + pal.setBrush(TQColorGroup::Highlight, brush); w->setPalette(pal); } #endif @@ -520,20 +520,20 @@ void LiquidStyle::polish( QWidget *w ) goto kstpolish; } - if (w->inherits("QStatusBar")) + if (w->inherits("TQStatusBar")) { - w->setBackgroundOrigin(QWidget::WindowOrigin); + w->setBackgroundOrigin(TQWidget::WindowOrigin); if ( qstrcmp( w->name(), "KonquerorFrameStatusBar" ) == 0 ) - // konqueror resets the statusbars background to Qt::White as soon as you open a new tab - our eventfilter will block this + // konqueror resets the statusbars background to TQt::White as soon as you open a new tab - our eventfilter will block this { w->installEventFilter( this ); } goto kstpolish; } - if (w->inherits( "QLineEdit" ) || w->inherits("QSplitterHandle") || w->isA( "AppletHandleDrag" ) || w->inherits( "KMiniPagerButton" )) + if (w->inherits( "TQLineEdit" ) || w->inherits("TQSplitterHandle") || w->isA( "AppletHandleDrag" ) || w->inherits( "KMiniPagerButton" )) { - w->setBackgroundOrigin(QWidget::WindowOrigin); + w->setBackgroundOrigin(TQWidget::WindowOrigin); w->installEventFilter( this ); goto kstpolish; } @@ -545,10 +545,10 @@ void LiquidStyle::polish( QWidget *w ) } if (w->inherits( "KickerTip" )) - // kickers new tooltip uses backgroundColor() instead of paletteBackgroundColor() - causing Qt::black + // kickers new tooltip uses backgroundColor() instead of paletteBackgroundColor() - causing TQt::black { - w->setPaletteBackgroundColor(qApp->palette().color(QPalette::Active, QColorGroup::Button)); - w->setBackgroundMode( QWidget::NoBackground ); + w->setPaletteBackgroundColor(tqApp->palette().color(TQPalette::Active, TQColorGroup::Button)); + w->setBackgroundMode( TQWidget::NoBackground ); goto kstpolish; } @@ -556,7 +556,7 @@ void LiquidStyle::polish( QWidget *w ) { if ( !isViewport && w->parent() && qstrcmp( w->parent() ->name(), "proxyview" ) == 0 ) { - w->setBackgroundOrigin( QWidget::WindowOrigin ); + w->setBackgroundOrigin( TQWidget::WindowOrigin ); goto kstpolish ; } @@ -564,22 +564,22 @@ void LiquidStyle::polish( QWidget *w ) goto kstpolish ; if ( !isKicker&& !isViewport && !isViewportChild && !w->testWFlags( WType_Popup ) && !w->inherits( "KDesktop" ) && !w->inherits( "PasswordDlg" )) { - if ( w->backgroundMode() == QWidget::PaletteBackground || w->backgroundMode() == QWidget::PaletteButton ) + if ( w->backgroundMode() == TQWidget::PaletteBackground || w->backgroundMode() == TQWidget::PaletteButton ) { - w->setBackgroundOrigin( QWidget::WindowOrigin ); + w->setBackgroundOrigin( TQWidget::WindowOrigin ); } } } - if ( ::qt_cast(w) || ::qt_cast(w)) goto kstpolish; - if ( ::qt_cast(w)) + if ( ::tqt_cast(w) || ::tqt_cast(w)) goto kstpolish; + if ( ::tqt_cast(w)) { // if (optionHandler->SupportAppleBar() && w->isTopLevel()){ -// // QPalette pal(w->palette()); -// qWarning("resetting erase pixmap"); -// QColor c( w->palette().active().background() ); -// QPixmap stipple( 64, 64 ); +// // TQPalette pal(w->palette()); +// tqWarning("resetting erase pixmap"); +// TQColor c( w->palette().active().background() ); +// TQPixmap stipple( 64, 64 ); // stipple.fill( c.rgb() ); -// QPainter p; +// TQPainter p; // p.begin( &stipple ); // p.setPen( c.dark( 100 + (int)(optionHandler->stippleContrast()/2) ) ); // for (int i = 1; i < 64; i += 4 ) { @@ -591,23 +591,23 @@ void LiquidStyle::polish( QWidget *w ) // p.drawLine( 0, i, 63, i ); // } // p.end(); -// // QBrush brush( c, stipple ); -// // pal.setBrush( QColorGroup::Background, brush ); +// // TQBrush brush( c, stipple ); +// // pal.setBrush( TQColorGroup::Background, brush ); // // w->setPalette( pal ); // w->setErasePixmap(stipple); // } - w->setBackgroundMode( QWidget::PaletteBackground ); + w->setBackgroundMode( TQWidget::PaletteBackground ); if (optionHandler->UseCustomMenuColor()) { - QPalette pal( w->palette() ); - pal.setBrush( QColorGroup::Highlight, optionHandler->menuColorHigh() ); - pal.setBrush( QColorGroup::HighlightedText, optionHandler->textColorHigh() ); + TQPalette pal( w->palette() ); + pal.setBrush( TQColorGroup::Highlight, optionHandler->menuColorHigh() ); + pal.setBrush( TQColorGroup::HighlightedText, optionHandler->textColorHigh() ); w->setPalette( pal ); } - w->setBackgroundOrigin(QWidget::WindowOrigin); + w->setBackgroundOrigin(TQWidget::WindowOrigin); w->installEventFilter( this ); #if 0 - if (!::qt_cast(w)) + if (!::tqt_cast(w)) { bool bold = w->font().bold(); bool italic = w->font().italic(); @@ -615,142 +615,142 @@ void LiquidStyle::polish( QWidget *w ) bool overline = w->font().overline(); w->setFont(KGlobalSettings::menuFont()); if (bold) - (const_cast(&w->font()))->setBold(true); + (const_cast(&w->font()))->setBold(true); if (italic) - (const_cast(&w->font()))->setItalic(true); + (const_cast(&w->font()))->setItalic(true); if (underline) - (const_cast(&w->font()))->setUnderline(true); + (const_cast(&w->font()))->setUnderline(true); if (overline) - (const_cast(&w->font()))->setOverline(true); + (const_cast(&w->font()))->setOverline(true); } #endif goto kstpolish ; } - if (::qt_cast(w)) + if (::tqt_cast(w)) { - w->setBackgroundOrigin(QWidget::WindowOrigin); - if ( ::qt_cast(w)) + w->setBackgroundOrigin(TQWidget::WindowOrigin); + if ( ::tqt_cast(w)) { if (w->parentWidget() && w->parentWidget()->inherits("Kontact::Splash")) goto kstpolish; - else if ( !isPlain() && !(w->inherits( "QTipLabel" ) || w->inherits( "KSystemTray" ))) + else if ( !isPlain() && !(w->inherits( "TQTipLabel" ) || w->inherits( "KSystemTray" ))) { - w->setBackgroundMode( QWidget::PaletteBackground ); + w->setBackgroundMode( TQWidget::PaletteBackground ); } - else if ( w->inherits( "QTipLabel" ) ) + else if ( w->inherits( "TQTipLabel" ) ) { w->setPalette( tooltipPalette ); - w->setBackgroundOrigin(QWidget::WidgetOrigin); + w->setBackgroundOrigin(TQWidget::WidgetOrigin); w->installEventFilter( this ); } } if (qstrcmp( w->name(), "backdrop" ) == 0) //kscd { - ((QFrame *)w)->setFrameShape(QFrame::LineEditPanel); - ((QFrame *)w)->setFrameShadow(QFrame::Sunken); + ((TQFrame *)w)->setFrameShape(TQFrame::LineEditPanel); + ((TQFrame *)w)->setFrameShadow(TQFrame::Sunken); goto kstpolish; } if (w->inherits( "KWinInternal::TabBox" )) { uint opacity = 0.8*OPAQUE; - XChangeProperty(qt_xdisplay(), w->winId(), XInternAtom(qt_xdisplay(), OPACITY, False), XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &opacity, 1L); + XChangeProperty(tqt_xdisplay(), w->winId(), XInternAtom(tqt_xdisplay(), OPACITY, False), XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &opacity, 1L); goto kstpolish; } else if (w->inherits( "KAnimWidget" )) { - ((QFrame *)w)->setFrameShape(QFrame::NoFrame); + ((TQFrame *)w)->setFrameShape(TQFrame::NoFrame); w->installEventFilter( this ); // the widget resets it's frameshape on mouseevents - looks crap! goto kstpolish ; } - else if (((QFrame *)w)->frameShape() >= QFrame::Box && ((QFrame *)w)->frameShape() <= QFrame::WinPanel){ - ((QFrame *)w)->setFrameShape(QFrame::StyledPanel); + else if (((TQFrame *)w)->frameShape() >= TQFrame::Box && ((TQFrame *)w)->frameShape() <= TQFrame::WinPanel){ + ((TQFrame *)w)->setFrameShape(TQFrame::StyledPanel); goto kstpolish ; } } - //if (testWidget) qWarning("testwidget stage %d",testInt++); + //if (testWidget) tqWarning("testwidget stage %d",testInt++); - if ( w->parentWidget() && ( ( ::qt_cast(w) && ::qt_cast(w->parentWidget())) || w->inherits( "KCompletionBox" ) ) ) { - QListBox* listbox = (QListBox*) w; + if ( w->parentWidget() && ( ( ::tqt_cast(w) && ::tqt_cast(w->parentWidget())) || w->inherits( "KCompletionBox" ) ) ) { + TQListBox* listbox = (TQListBox*) w; listbox->setBackgroundMode( NoBackground ); w->installEventFilter( this ); goto kstpolish; } - //if (testWidget) qWarning("testwidget stage %d",testInt++); + //if (testWidget) tqWarning("testwidget stage %d",testInt++); - if (::qt_cast(w)){ -// if (::qt_cast(w->parentWidget())) -// headerSortID = ((QListView*)w->parentWidget())->sortColumn(); -// if (w->parentWidget()) qWarning(w->parentWidget()->className()); + if (::tqt_cast(w)){ +// if (::tqt_cast(w->parentWidget())) +// headerSortID = ((TQListView*)w->parentWidget())->sortColumn(); +// if (w->parentWidget()) tqWarning(w->parentWidget()->className()); w->setBackgroundMode( NoBackground ); w->installEventFilter( this ); goto kstpolish; } - //if (testWidget) qWarning("testwidget stage %d",testInt++); + //if (testWidget) tqWarning("testwidget stage %d",testInt++); - if (::qt_cast(w)){ -// qWarning("installing tab event"); + if (::tqt_cast(w)){ +// tqWarning("installing tab event"); w->setMouseTracking( true ); w->installEventFilter( this ); - w->setBackgroundOrigin(QWidget::WindowOrigin); + w->setBackgroundOrigin(TQWidget::WindowOrigin); goto kstpolish; } - if (::qt_cast(w) && ((QGroupBox*)w)->frameShape() == QFrame::GroupBoxPanel && !((QGroupBox*)w)->isFlat()) + if (::tqt_cast(w) && ((TQGroupBox*)w)->frameShape() == TQFrame::GroupBoxPanel && !((TQGroupBox*)w)->isFlat()) { if ( optionHandler->drawGroupBoxShadow() ) { w->setPaletteBackgroundPixmap ( *groupShadow ); - if (((QGroupBox*)w)->isCheckable()) + if (((TQGroupBox*)w)->isCheckable()) { - QWidget *cb = (QWidget*)w->child("qt_groupbox_checkbox",0,false); - cb->setPalette(w->parentWidget() ? w->parentWidget()->palette() : qApp->palette()); - QFont font( cb->font() ); + TQWidget *cb = (TQWidget*)w->child("qt_groupbox_checkbox",0,false); + cb->setPalette(w->parentWidget() ? w->parentWidget()->palette() : tqApp->palette()); + TQFont font( cb->font() ); font.setBold( true ); cb->setFont( font ); } } - w->setBackgroundOrigin(QWidget::WindowOrigin); + w->setBackgroundOrigin(TQWidget::WindowOrigin); w->installEventFilter(this); } - //if (testWidget) qWarning("testwidget stage %d",testInt++); + //if (testWidget) tqWarning("testwidget stage %d",testInt++); - if (w->inherits("QProgressBar")) + if (w->inherits("TQProgressBar")) { w->setBackgroundMode( NoBackground ); w->installEventFilter(this); - connect(w, SIGNAL(destroyed(QObject*)), this, SLOT(progressBarDestroyed(QObject*))); + connect(w, SIGNAL(destroyed(TQObject*)), this, SLOT(progressBarDestroyed(TQObject*))); goto kstpolish; } - if ( w->inherits( "QDockWindow" ) ) { - w->setBackgroundMode( QWidget::PaletteBackground ); - w->setBackgroundOrigin(QWidget::WindowOrigin); + if ( w->inherits( "TQDockWindow" ) ) { + w->setBackgroundMode( TQWidget::PaletteBackground ); + w->setBackgroundOrigin(TQWidget::WindowOrigin); w->installEventFilter( this ); goto kstpolish ; } - if ( ::qt_cast(w)) { - QCursor tmpCursor(Qt::PointingHandCursor); + if ( ::tqt_cast(w)) { + TQCursor tmpCursor(TQt::PointingHandCursor); w->setCursor(tmpCursor); w->installEventFilter( this ); - w->setBackgroundMode( QWidget::NoBackground ); + w->setBackgroundMode( TQWidget::NoBackground ); goto kstpolish ; } if ( w->inherits( "KdetvView")) { - w->setBackgroundMode( QWidget::NoBackground ); + w->setBackgroundMode( TQWidget::NoBackground ); } - //if (testWidget) qWarning("testwidget stage %d",testInt++); + //if (testWidget) tqWarning("testwidget stage %d",testInt++); kstpolish: KStyle::polish( w ); // nothing of all above? do default kde stuff } -void LiquidStyle::unPolish( QWidget *w ) { +void LiquidStyle::unPolish( TQWidget *w ) { bool isViewport; bool isViewportChild; @@ -763,20 +763,20 @@ void LiquidStyle::unPolish( QWidget *w ) { goto kstunpolish; } - if ( w->inherits("QToolBar") || qstrcmp( w->name(), "kde toolbar widget" ) == 0 ) { - w->setBackgroundOrigin( QWidget::WidgetOrigin ); + if ( w->inherits("TQToolBar") || qstrcmp( w->name(), "kde toolbar widget" ) == 0 ) { + w->setBackgroundOrigin( TQWidget::WidgetOrigin ); // w->unsetPalette(); goto kstunpolish; } - if ( w->inherits( "QPopupMenu" ) ) { + if ( w->inherits( "TQPopupMenu" ) ) { w->unsetPalette(); - w->setBackgroundMode( QWidget::PaletteButton ); + w->setBackgroundMode( TQWidget::PaletteButton ); w->removeEventFilter( this ); - XDeleteProperty (qt_xdisplay(), w->winId(), XInternAtom(qt_xdisplay(), OPACITY, False)); + XDeleteProperty (tqt_xdisplay(), w->winId(), XInternAtom(tqt_xdisplay(), OPACITY, False)); goto kstunpolish; } - if (::qt_cast(w) && w->isTopLevel()){ - XDeleteProperty (qt_xdisplay(), w->winId(), XInternAtom(qt_xdisplay(), OPACITY, False)); + if (::tqt_cast(w) && w->isTopLevel()){ + XDeleteProperty (tqt_xdisplay(), w->winId(), XInternAtom(tqt_xdisplay(), OPACITY, False)); goto kstunpolish; } if ( !isPlain () && w->inherits( "KonqIconViewWidget" ) || @@ -789,11 +789,11 @@ void LiquidStyle::unPolish( QWidget *w ) { goto kstunpolish; } - if (w->isA( "QViewportWidget" ) || w->inherits( "QClipperWidget" ) ) + if (w->isA( "TQViewportWidget" ) || w->inherits( "TQClipperWidget" ) ) goto kstunpolish; if ( !isPlain() ) { - if ( w->inherits( "KActiveLabel" ) || w->inherits( "QTipLabel" ) ) { + if ( w->inherits( "KActiveLabel" ) || w->inherits( "TQTipLabel" ) ) { w->unsetPalette(); goto kstunpolish; } @@ -803,18 +803,18 @@ void LiquidStyle::unPolish( QWidget *w ) { return; }*/ } - else if ( w->inherits( "QMenuBar" ) ) { - w->setBackgroundMode( QWidget::PaletteButton ); + else if ( w->inherits( "TQMenuBar" ) ) { + w->setBackgroundMode( TQWidget::PaletteButton ); if ( !isPlain() ) - w->setBackgroundOrigin( QWidget::WidgetOrigin ); + w->setBackgroundOrigin( TQWidget::WidgetOrigin ); goto kstunpolish; - }else if ( w->inherits( "QDockWindow" ) ) { - w->setBackgroundMode( QWidget::PaletteButton ); + }else if ( w->inherits( "TQDockWindow" ) ) { + w->setBackgroundMode( TQWidget::PaletteButton ); if ( !isPlain() ) - w->setBackgroundOrigin( QWidget::WidgetOrigin ); + w->setBackgroundOrigin( TQWidget::WidgetOrigin ); goto kstunpolish; - } else if ( w->inherits( "QComboBox" ) || w->inherits( "QPushButton" ) ) { - if (w->inherits( "QPushButton" )) + } else if ( w->inherits( "TQComboBox" ) || w->inherits( "TQPushButton" ) ) { + if (w->inherits( "TQPushButton" )) { ButtonFadeInfo *bfi_ = bfi[w->winId()]; if (bfi_){ @@ -824,20 +824,20 @@ void LiquidStyle::unPolish( QWidget *w ) { bfi.remove(w->winId()); } } - w->setBackgroundMode( QWidget::PaletteButton ); - } else if ( w->inherits( "QScrollBar" ) ) { + w->setBackgroundMode( TQWidget::PaletteButton ); + } else if ( w->inherits( "TQScrollBar" ) ) { // if (!w->isEnabled()) w->setEnabled(true); - w->setBackgroundMode( QWidget::PaletteBackground ); + w->setBackgroundMode( TQWidget::PaletteBackground ); goto kstunpolish; - } else if ( w->inherits( "QHeader" ) ) { + } else if ( w->inherits( "TQHeader" ) ) { w->setMouseTracking( false ); } - if ( w->inherits( "QToolButton" ) ) { + if ( w->inherits( "TQToolButton" ) ) { // w->unsetPalette(); - w->setBackgroundMode( QWidget::PaletteButton ); + w->setBackgroundMode( TQWidget::PaletteButton ); if ( !isPlain() ) - w->setBackgroundOrigin( QWidget::WidgetOrigin ); + w->setBackgroundOrigin( TQWidget::WidgetOrigin ); goto kstunpolish; } @@ -848,9 +848,9 @@ void LiquidStyle::unPolish( QWidget *w ) { ( qstrcmp( w->parent() ->name(), "qt_clipped_viewport" ) == 0 ) ); if ( isViewportChild ) { - if ( w->inherits( "QRadioButton" ) || w->inherits( "QComboBox" ) || w->inherits( "QPushButton" ) ) { + if ( w->inherits( "TQRadioButton" ) || w->inherits( "TQComboBox" ) || w->inherits( "TQPushButton" ) ) { if ( isHTMLWidget( w ) ) { - w->setBackgroundMode( QWidget::PaletteBackground ); + w->setBackgroundMode( TQWidget::PaletteBackground ); goto kstunpolish; } } @@ -858,10 +858,10 @@ void LiquidStyle::unPolish( QWidget *w ) { if ( !isPlain() ) { if ( !isViewport && w->parent() && qstrcmp( w->parent() ->name(), "proxyview" ) == 0 ) { - w->setBackgroundOrigin( QWidget::WidgetOrigin ); + w->setBackgroundOrigin( TQWidget::WidgetOrigin ); goto kstunpolish; } - if ( w->ownPalette() && !w->inherits( "QButton" ) && !w->inherits( "QComboBox" ) ) + if ( w->ownPalette() && !w->inherits( "TQButton" ) && !w->inherits( "TQComboBox" ) ) goto kstunpolish; if ( w->inherits( "PanelButtonBase" ) ) goto kstunpolish; @@ -869,8 +869,8 @@ void LiquidStyle::unPolish( QWidget *w ) { if ( !isViewport && !isViewportChild && !w->testWFlags( WType_Popup ) && !w->inherits( "KDesktop" ) && !w->inherits( "PasswordDlg" ) ) { - if ( w->backgroundOrigin() == QWidget::WindowOrigin ) - w->setBackgroundOrigin( QWidget::WidgetOrigin ); + if ( w->backgroundOrigin() == TQWidget::WindowOrigin ) + w->setBackgroundOrigin( TQWidget::WidgetOrigin ); goto kstunpolish; } } diff --git a/style/utils.cpp b/style/utils.cpp index dd24986..31ef75a 100644 --- a/style/utils.cpp +++ b/style/utils.cpp @@ -1,14 +1,14 @@ #include "baghira.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include //#include @@ -33,7 +33,7 @@ A1 = CLAMP(A1 + A2,0,255); #define DELTA_COLOR(D,R,G,B) \ - delta = (255 - qRed(D))/2; \ + delta = (255 - tqRed(D))/2; \ destR = R - delta; \ destG = G - delta; \ destB = B - delta; @@ -83,42 +83,42 @@ if ( B < 0 ) B = 0; else if ( B > 255 ) B = 255; #ifndef PRINTDEVICE -#define PRINTDEVICE(_p_) qWarning("device is %s", (_p_->device()->devType() == QInternal::Widget) ?\ -"Widget": (_p_->device()->devType() == QInternal::Pixmap) ?\ -"Pixmap": (_p_->device()->devType() == QInternal::Printer) ?\ -"Printer": (_p_->device()->devType() == QInternal::Picture) ?\ -"Picture": (_p_->device()->devType() == QInternal::UndefinedDevice) ?\ +#define PRINTDEVICE(_p_) tqWarning("device is %s", (_p_->device()->devType() == TQInternal::Widget) ?\ +"Widget": (_p_->device()->devType() == TQInternal::Pixmap) ?\ +"Pixmap": (_p_->device()->devType() == TQInternal::Printer) ?\ +"Printer": (_p_->device()->devType() == TQInternal::Picture) ?\ +"Picture": (_p_->device()->devType() == TQInternal::UndefinedDevice) ?\ "UndefinedDevice": "fuckdevice!" ); #endif int LiquidStyle::getBrightness(unsigned int rgb) const { - int red = qRed( rgb ); - int green = qGreen( rgb ); - int blue = qBlue( rgb ); + int red = tqRed( rgb ); + int green = tqGreen( rgb ); + int blue = tqBlue( rgb ); int V = red; if (green > V) V = green; if (blue > V) V = blue; return V; } -QPixmap* LiquidStyle::adjustHSV( QImage &img, const QColor &c, const QColor *bg ) const +TQPixmap* LiquidStyle::adjustHSV( TQImage &img, const TQColor &c, const TQColor *bg ) const { - QImage * tmp = adjustHSVImage( img, c, bg ); + TQImage * tmp = adjustHSVImage( img, c, bg ); - QPixmap *pix = new QPixmap; + TQPixmap *pix = new TQPixmap; pix->convertFromImage( *tmp ); delete tmp; return ( pix ); } -ButtonTile* LiquidStyle::createRoundFrameTile(QImage &img, const QColor &color, const QColor *bg, const QColor &baseColor ) const +ButtonTile* LiquidStyle::createRoundFrameTile(TQImage &img, const TQColor &color, const TQColor *bg, const TQColor &baseColor ) const { - QColor bgColor( bg ? *bg : qApp->palette().active().background() ); + TQColor bgColor( bg ? *bg : tqApp->palette().active().background() ); if ( img.depth() != 32 ) img = img.convertDepth( 32 ); - QImage *dest = new QImage( img.width(), img.height(), 32, 0 ); + TQImage *dest = new TQImage( img.width(), img.height(), 32, 0 ); dest->setAlphaBuffer( true ); unsigned int *data = ( unsigned int * ) img.bits(); unsigned int *destData = ( unsigned int* ) dest->bits(); @@ -143,14 +143,14 @@ ButtonTile* LiquidStyle::createRoundFrameTile(QImage &img, const QColor &color, for ( current = 0 ; current < total ; ++current ) { - alpha = qAlpha( data[ current ] ); + alpha = tqAlpha( data[ current ] ); if (alpha) { if (optionHandler->IcyButtons()) { - red = qRed( data[ current ] ); - green = qGreen( data[ current ] ); - blue = qBlue( data[ current ] ); + red = tqRed( data[ current ] ); + green = tqGreen( data[ current ] ); + blue = tqBlue( data[ current ] ); SATURATION_COLOR(red, green, blue); } else @@ -177,22 +177,22 @@ ButtonTile* LiquidStyle::createRoundFrameTile(QImage &img, const QColor &color, #endif // force back to valid colorspace ! COLOR_SPACE(destR, destG, destB); - destData[ current ] = qRgba( destR, destG, destB, alpha ); + destData[ current ] = tqRgba( destR, destG, destB, alpha ); } - QPixmap destPix; + TQPixmap destPix; destPix = *dest; ButtonTile *ret = separateTiles( &destPix, 11, 10, 6, 1, 0, false); delete dest; return ret; } -QImage* LiquidStyle::adjustHSVImage( QImage &img, const QColor &c, const QColor *bg ) const +TQImage* LiquidStyle::adjustHSVImage( TQImage &img, const TQColor &c, const TQColor *bg ) const { - QColor bgColor( bg ? *bg : qApp->palette().active().background() ); + TQColor bgColor( bg ? *bg : tqApp->palette().active().background() ); if ( img.depth() != 32 ) img = img.convertDepth( 32 ); - QImage *dest = new QImage( img.width(), img.height(), 32, 0 ); + TQImage *dest = new TQImage( img.width(), img.height(), 32, 0 ); dest->setAlphaBuffer( true ); unsigned int *data = ( unsigned int * ) img.bits(); unsigned int *destData = ( unsigned int* ) dest->bits(); @@ -222,12 +222,12 @@ QImage* LiquidStyle::adjustHSVImage( QImage &img, const QColor &c, const QColor // float srcPercent, destPercent; for ( current = 0 ; current < total ; ++current ) { - alpha = qAlpha( data[ current ] ); + alpha = tqAlpha( data[ current ] ); if (optionHandler->IcyButtons()) { - red = qRed( data[ current ] ); - green = qGreen( data[ current ] ); - blue = qBlue( data[ current ] ); + red = tqRed( data[ current ] ); + green = tqGreen( data[ current ] ); + blue = tqBlue( data[ current ] ); SATURATION_COLOR2(sq, red, green, blue); } else @@ -237,16 +237,16 @@ QImage* LiquidStyle::adjustHSVImage( QImage &img, const QColor &c, const QColor } // force back to valid colorspace ! COLOR_SPACE(destR, destG, destB); - destData[ current ] = qRgba( destR, destG, destB, alpha ); + destData[ current ] = tqRgba( destR, destG, destB, alpha ); } return ( dest ); } -QImage* LiquidStyle::tintBrush( const QImage &img, const QColor &c ) const +TQImage* LiquidStyle::tintBrush( const TQImage &img, const TQColor &c ) const { // if ( img.depth() != 32 ) // img = img.convertDepth( 32 ); - QImage *dest = new QImage( img.width(), img.height(), 32, 0 ); + TQImage *dest = new TQImage( img.width(), img.height(), 32, 0 ); unsigned int *data = ( unsigned int * ) img.bits(); unsigned int *destData = ( unsigned int* ) dest->bits(); int total = img.width() * img.height(); @@ -262,19 +262,19 @@ QImage* LiquidStyle::tintBrush( const QImage &img, const QColor &c ) const // float srcPercent, destPercent; for ( current = 0 ; current < total ; ++current ) { - alpha = qAlpha( data[ current ] ); - blue = qBlue( data[ current ] ); - red = qRed( data[ current ] ); - green = qGreen( data[ current ] ); + alpha = tqAlpha( data[ current ] ); + blue = tqBlue( data[ current ] ); + red = tqRed( data[ current ] ); + green = tqGreen( data[ current ] ); SATURATION_COLOR(red, green, blue); // force back to valid colorspace ! COLOR_SPACE(destR, destG, destB); - destData[ current ] = qRgba( destR, destG, destB, alpha ); + destData[ current ] = tqRgba( destR, destG, destB, alpha ); } return ( dest ); } -QColor LiquidStyle::brushedMetalColor(QColor &c) const +TQColor LiquidStyle::brushedMetalColor(TQColor &c) const { if (optionHandler->TintBrush()) { @@ -284,21 +284,21 @@ QColor LiquidStyle::brushedMetalColor(QColor &c) const int destR, destG, destB, grey, iGrey, delta; SATURATION_COLOR(180, 180, 180); COLOR_SPACE(destR, destG, destB); - return QColor(destR, destG, destB); + return TQColor(destR, destG, destB); } else - return QColor (180,180,180); + return TQColor (180,180,180); } -void LiquidStyle::clearImage( QImage &img ) const +void LiquidStyle::clearImage( TQImage &img ) const { int x, y; int w = img.width(); int h = img.height(); - unsigned int pixel = qRgba( 0, 0, 0, 0 ); + unsigned int pixel = tqRgba( 0, 0, 0, 0 ); unsigned int *data; for ( y = 0 ; y < h ; ++y ) @@ -306,10 +306,10 @@ void LiquidStyle::clearImage( QImage &img ) const // img.fill( pixel ); } -void LiquidStyle::adjustHSV( QPixmap &pix, const QColor &c ) const +void LiquidStyle::adjustHSV( TQPixmap &pix, const TQColor &c ) const { - QImage img = pix.convertToImage(); - QPixmap *result = adjustHSV( img, c); + TQImage img = pix.convertToImage(); + TQPixmap *result = adjustHSV( img, c); pix = *result; delete result; } @@ -320,17 +320,17 @@ w, h are width and height of the whole button. xOff (yOff) is the distance of the central fraction from left (upper) button side. centerW (centerH) is the width (height) of the central button fraction. shadowH is the height of the buttons shadow*/ -ButtonTile* LiquidStyle::createButtonTile( const QColor &c, - const QColor &bgColor, - QImage *buttonImage, - QImage *shadowImage, - QImage *glowImage, - QIntDict*buttonDict, - QIntDict*shadowDict, - QIntDict*glowDict, - int w, int h, int xOff, int yOff, - int centerW, int centerH, - int shadowH, int glowWH, +ButtonTile* LiquidStyle::createButtonTile( const TQColor &c, + const TQColor &bgColor, + TQImage *buttonImage, + TQImage *shadowImage, + TQImage *glowImage, + TQIntDict*buttonDict, + TQIntDict*shadowDict, + TQIntDict*glowDict, + int w, int h, int xOff, int yOff, + int centerW, int centerH, + int shadowH, int glowWH, bool sunken) const { int x, y, delta; @@ -360,7 +360,7 @@ ButtonTile* LiquidStyle::createButtonTile( const QColor &c, int shadowOverhead; shadowH > glowWH ? shadowOverhead = shadowH - glowWH : shadowOverhead = 0; - QImage img( w + 2*glowWH, h + 2*glowWH + shadowOverhead, 32, 0 ); + TQImage img( w + 2*glowWH, h + 2*glowWH + shadowOverhead, 32, 0 ); img.setAlphaBuffer( !isPlain() || optionHandler->drawGroupBoxShadow() ? true : false); clearImage( img ); @@ -388,15 +388,15 @@ ButtonTile* LiquidStyle::createButtonTile( const QColor &c, if (optionHandler->buttonStyle() == Jaguar) // has brighter shadows... { for ( x = 0 ; x < w ; ++x ) - if ((alpha = qAlpha( data[ x ] ))) + if ((alpha = tqAlpha( data[ x ] ))) { - destData[ x + glowWH ] = qRgba( qRed(data[ x ]), qGreen(data[ x ]), qBlue(data[ x ]), alpha >> 1 ); + destData[ x + glowWH ] = tqRgba( tqRed(data[ x ]), tqGreen(data[ x ]), tqBlue(data[ x ]), alpha >> 1 ); } } else { for ( x = 0 ; x < w ; ++x ) - if ((alpha = qAlpha( data[ x ] ))) + if ((alpha = tqAlpha( data[ x ] ))) { destData[ x + glowWH ] = data[x]; } @@ -409,11 +409,11 @@ ButtonTile* LiquidStyle::createButtonTile( const QColor &c, data = ( unsigned int * ) glowImage->scanLine( y ); destData = ( unsigned int * ) img.scanLine( y ); for ( x = 0 ; x < w + 2*glowWH ; ++x ) - if ((alpha = qAlpha( data[ x ] ))) + if ((alpha = tqAlpha( data[ x ] ))) { DELTA_COLOR(data[ x ], srcR, srcG, srcB); COLOR_SPACE(destR, destG, destB); - destData[ x ] = qRgba( destR, destG, destB, alpha ); + destData[ x ] = tqRgba( destR, destG, destB, alpha ); } } @@ -423,15 +423,15 @@ ButtonTile* LiquidStyle::createButtonTile( const QColor &c, data = ( unsigned int * ) buttonImage->scanLine( y ); destData = ( unsigned int * ) img.scanLine( y + glowWH ); for ( x = 0 ; x < w ; ++x ) - if ((alpha = qAlpha( data[ x ] ))) + if ((alpha = tqAlpha( data[ x ] ))) { if (!rect || (y > 1 && y < h-2 && x > 0 && x < w-1) ) { if (optionHandler->IcyButtons()) { - red = qRed( data[ x ] ); - green = qGreen( data[ x ] ); - blue = qBlue( data[ x ] ); + red = tqRed( data[ x ] ); + green = tqGreen( data[ x ] ); + blue = tqBlue( data[ x ] ); SATURATION_COLOR2(sq, red, green, blue); } else @@ -441,24 +441,24 @@ ButtonTile* LiquidStyle::createButtonTile( const QColor &c, } else { - red = qRed( data[ x ] ); - green = qGreen( data[ x ] ); - blue = qBlue( data[ x ] ); + red = tqRed( data[ x ] ); + green = tqGreen( data[ x ] ); + blue = tqBlue( data[ x ] ); TINT_WHITE(55, red, green, blue); } if (alpha != 255) { - if ( qAlpha( destData[ x + glowWH ] ) ) + if ( tqAlpha( destData[ x + glowWH ] ) ) { - ALPHA_COLOR2(alpha, qAlpha( destData[ x + glowWH ] ), qRed( destData[ x + glowWH ]), qGreen( destData[ x + glowWH ]), qBlue( destData[ x + glowWH ])); + ALPHA_COLOR2(alpha, tqAlpha( destData[ x + glowWH ] ), tqRed( destData[ x + glowWH ]), tqGreen( destData[ x + glowWH ]), tqBlue( destData[ x + glowWH ])); } } COLOR_SPACE(destR, destG, destB); - destData[ x + glowWH ] = qRgba( destR, destG, destB, alpha ); + destData[ x + glowWH ] = tqRgba( destR, destG, destB, alpha ); } } - QPixmap *pix = new QPixmap; + TQPixmap *pix = new TQPixmap; pix->convertFromImage( img ); tile = separateTiles( pix, xOff+glowWH, yOff+glowWH, centerW, centerH, shadowH, sunken); @@ -473,7 +473,7 @@ ButtonTile* LiquidStyle::createButtonTile( const QColor &c, return ( tile ); } -QPixmap* LiquidStyle::createSliderEnd( const QColor &c, const QColor &bgColor, bool top) const +TQPixmap* LiquidStyle::createSliderEnd( const TQColor &c, const TQColor &bgColor, bool top) const { int x, y, delta; @@ -490,7 +490,7 @@ QPixmap* LiquidStyle::createSliderEnd( const QColor &c, const QColor &bgColor, b unsigned int *data, *destData; - QImage img( 13, 9, 32, 0 ); + TQImage img( 13, 9, 32, 0 ); img.setAlphaBuffer( true ); // we need this always, as the slider groove is nevernever plain! clearImage( img ); @@ -500,10 +500,10 @@ QPixmap* LiquidStyle::createSliderEnd( const QColor &c, const QColor &bgColor, b top ? data = ( unsigned int * ) slider_top_shd->scanLine( y ) : data = ( unsigned int * ) slider_btm_shd->scanLine( y ); destData = ( unsigned int * ) img.scanLine( y ); for ( x = 0; x < 13; ++x ) - if ((alpha = qAlpha( data[ x ] ))) { + if ((alpha = tqAlpha( data[ x ] ))) { DELTA_COLOR(data[ x ], bgColor.red(), bgColor.green(), bgColor.blue()); COLOR_SPACE(destR, destG, destB); - destData[ x ] = qRgba( destR, destG, destB, alpha ); + destData[ x ] = tqRgba( destR, destG, destB, alpha ); } } // then the button and overlay @@ -524,26 +524,26 @@ QPixmap* LiquidStyle::createSliderEnd( const QColor &c, const QColor &bgColor, b top ? data = ( unsigned int * ) slider_top->scanLine( y ) : data = ( unsigned int * ) slider_btm->scanLine( y ); destData = ( unsigned int * ) img.scanLine( top ? y + 2 : y ); for ( x = 0 ; x < 13 ; ++x ) - if ((alpha = qAlpha( data[ x ] ))) { + if ((alpha = tqAlpha( data[ x ] ))) { if (optionHandler->IcyButtons()) { - red = qRed( data[ x ] ); - green = qGreen( data[ x] ); - blue = qBlue( data[ x] ); + red = tqRed( data[ x ] ); + green = tqGreen( data[ x] ); + blue = tqBlue( data[ x] ); SATURATION_COLOR2(sq, red, green, blue); } else { - DELTA_COLOR(data[ x ], srcR, srcG, srcB); + DELTA_COLOR(data[ x ], srcR, srcG, srcB); } if (alpha != 255) { - if ( qAlpha( destData[ x ] ) ) { - ALPHA_COLOR2(alpha, qAlpha( destData[ x ]), qRed( destData[ x ]), qGreen( destData[ x ]), qBlue( destData[ x ])); + if ( tqAlpha( destData[ x ] ) ) { + ALPHA_COLOR2(alpha, tqAlpha( destData[ x ]), tqRed( destData[ x ]), tqGreen( destData[ x ]), tqBlue( destData[ x ])); } } COLOR_SPACE(destR, destG, destB); - destData[ x ] = qRgba( destR, destG, destB, alpha ); + destData[ x ] = tqRgba( destR, destG, destB, alpha ); } } - QPixmap *pix = new QPixmap; + TQPixmap *pix = new TQPixmap; pix->convertFromImage( img ); return ( pix ); } @@ -560,12 +560,12 @@ QPixmap* LiquidStyle::createSliderEnd( const QColor &c, const QColor &bgColor, b // ------------------------------------- // Overload of mosfet's original function, takes 6 more parameters to use the funktion on variable bitmaps (mosfet's function does only work for very special bitmaps) // by giving position and dimension of the central tile + the shadow height (panther doesn't seem to have a right shadow-offset) -ButtonTile* LiquidStyle::separateTiles( QPixmap *pix, - int xO, int yO, int w, int h, +ButtonTile* LiquidStyle::separateTiles( TQPixmap *pix, + int xO, int yO, int w, int h, int, bool sunken) const { ButtonTile * tile = new ButtonTile(); - QPixmap *tmp; + TQPixmap *tmp; int w1 = xO; int w2 = w; @@ -583,72 +583,72 @@ ButtonTile* LiquidStyle::separateTiles( QPixmap *pix, if ( !sunken ) { // Top tiles - tmp = new QPixmap( w1, h1 ); + tmp = new TQPixmap( w1, h1 ); // bitBlt(...,x,y,width,height) copyBlt( tmp, 0, 0, pix, xO1, yO1, w1, h1 ); tile->setPixmap( TileTopLeft, tmp ); - tmp = new QPixmap( w2, h1 ); + tmp = new TQPixmap( w2, h1 ); copyBlt( tmp, 0, 0, pix, xO2, yO1, w2, h1 ); tile->setPixmap( TileTop, tmp ); - tmp = new QPixmap( w3, h1 ); + tmp = new TQPixmap( w3, h1 ); copyBlt( tmp, 0, 0, pix, xO3, yO1, w3, h1 ); tile->setPixmap( TileTopRight, tmp ); // Middle tiles - tmp = new QPixmap( w1, h2 ); + tmp = new TQPixmap( w1, h2 ); copyBlt( tmp, 0, 0, pix, xO1, yO2, w1, h2 ); tile->setPixmap( TileLeft, tmp ); - tmp = new QPixmap( w2, h2 ); + tmp = new TQPixmap( w2, h2 ); copyBlt( tmp, 0, 0, pix, xO2, yO2, w2, h2 ); tile->setPixmap( TileMiddle, tmp ); - tmp = new QPixmap( w3, h2 ); + tmp = new TQPixmap( w3, h2 ); copyBlt( tmp, 0, 0, pix, xO3, yO2, w3, h2 ); tile->setPixmap( TileRight, tmp ); // Bottom tiles - tmp = new QPixmap( w1, h3 ); + tmp = new TQPixmap( w1, h3 ); copyBlt( tmp, 0, 0, pix, xO1, yO3, w1, h3 ); tile->setPixmap( TileBtmLeft, tmp ); - tmp = new QPixmap( w2, h3 ); + tmp = new TQPixmap( w2, h3 ); copyBlt( tmp, 0, 0, pix, xO2, yO3, w2, h3 ); tile->setPixmap( TileBtm, tmp ); - tmp = new QPixmap( w3, h3 ); + tmp = new TQPixmap( w3, h3 ); copyBlt( tmp, 0, 0, pix, xO3, yO3, w3, h3 ); tile->setPixmap( TileBtmRight, tmp ); } else { // Top tiles - tmp = new QPixmap( w1, h3 ); + tmp = new TQPixmap( w1, h3 ); // bitBlt(...,x,y,width,height) copyBlt( tmp, 0, 0, pix, xO1, yO1, w1, h3 ); tile->setPixmap( TileTopLeft, tmp ); - tmp = new QPixmap( w2, h3 ); + tmp = new TQPixmap( w2, h3 ); copyBlt( tmp, 0, 0, pix, xO2, yO1, w2, h3 ); tile->setPixmap( TileTop, tmp ); - tmp = new QPixmap( w3, h3 ); + tmp = new TQPixmap( w3, h3 ); copyBlt( tmp, 0, 0, pix, xO3, yO1, w3, h3 ); tile->setPixmap( TileTopRight, tmp ); // Middle tiles - tmp = new QPixmap( w1, h2 ); + tmp = new TQPixmap( w1, h2 ); copyBlt( tmp, 0, 0, pix, xO1, yO2 + h3 - h1, w1, h2 ); tile->setPixmap( TileLeft, tmp ); - tmp = new QPixmap( w2, h2 ); + tmp = new TQPixmap( w2, h2 ); copyBlt( tmp, 0, 0, pix, xO2, yO2 + h3 - h1, w2, h2 ); tile->setPixmap( TileMiddle, tmp ); - tmp = new QPixmap( w3, h2 ); + tmp = new TQPixmap( w3, h2 ); copyBlt( tmp, 0, 0, pix, xO3, yO2 + h3 - h1, w3, h2 ); tile->setPixmap( TileRight, tmp ); // Bottom tiles - tmp = new QPixmap( w1, h1 ); + tmp = new TQPixmap( w1, h1 ); copyBlt( tmp, 0, 0, pix, xO1, yO3 + h3 - h1, w1, h1 ); tile->setPixmap( TileBtmLeft, tmp ); - tmp = new QPixmap( w2, h1 ); + tmp = new TQPixmap( w2, h1 ); copyBlt( tmp, 0, 0, pix, xO2, yO3 + h3 - h1, w2, h1 ); tile->setPixmap( TileBtm, tmp ); - tmp = new QPixmap( w3, h1 ); + tmp = new TQPixmap( w3, h1 ); copyBlt( tmp, 0, 0, pix, xO3, yO3 + h3 - h1, w3, h1 ); tile->setPixmap( TileBtmRight, tmp ); } @@ -664,64 +664,64 @@ ButtonTile* LiquidStyle::separateTiles( QPixmap *pix, #define _LRWIDTH_ (_LOFF_ + _ROFF_) #define _TBHEIGHT_ (_TOFF_ + _BOFF_) -void LiquidStyle::drawRoundButton( QPainter *painter, const QColorGroup &cg, const QColor &c, int x, int y, int w, int h, bool pushedDown, bool hover, int bgX, int bgY ) const +void LiquidStyle::drawRoundButton( TQPainter *painter, const TQColorGroup &cg, const TQColor &c, int x, int y, int w, int h, bool pushedDown, bool hover, int bgX, int bgY ) const { - QColor myC =(isOOO && (hover || pushedDown))?optionHandler->CustomButtonColor():c; + TQColor myC =(isOOO && (hover || pushedDown))?optionHandler->CustomButtonColor():c; LiquidStyle *ptr = const_cast( this ); ButtonTile *tile = pushedDown ? btnDict.find( myC.rgb() ) : btnShadowedDict.find( myC.rgb() ); if ( !tile ) { - tile = createButtonTile( myC, qApp->palette().color(QPalette::Active, QColorGroup::Background), ptr->btnBorderImg, ptr->btnShadowImg, ptr->buttonGlow, &(ptr->btnDict), &(ptr->btnShadowedDict), &(ptr->buttonGlowDict), 37, 21, 10, 11, 17, 1, 2, 2, pushedDown); + tile = createButtonTile( myC, tqApp->palette().color(TQPalette::Active, TQColorGroup::Background), ptr->btnBorderImg, ptr->btnShadowImg, ptr->buttonGlow, &(ptr->btnDict), &(ptr->btnShadowedDict), &(ptr->buttonGlowDict), 37, 21, 10, 11, 17, 1, 2, 2, pushedDown); } if ( !tile ) { - qWarning( "Button tile is NULL!" ); + tqWarning( "Button tile is NULL!" ); return ; } - QPainter *p; - QPen oldPen = painter->pen(); + TQPainter *p; + TQPen oldPen = painter->pen(); if (!isHTMLButton) { if ( !tmpBtnPix ) - ptr->tmpBtnPix = new QPixmap( w, h ); + ptr->tmpBtnPix = new TQPixmap( w, h ); else if ( w > tmpBtnPix->width() || h > tmpBtnPix->height() ) { // make temp pixmap size == largest button ptr->tmpBtnPix->resize(w,h); } - p = new QPainter(tmpBtnPix); + p = new TQPainter(tmpBtnPix); if (!isPlain()) { - QPixmap *stipple; + TQPixmap *stipple; if (paintWidget && paintWidget->parentWidget()) { - stipple = const_cast(paintWidget->parentWidget()->palette().brush(QPalette::Active, QColorGroup::Background).pixmap()); + stipple = const_cast(paintWidget->parentWidget()->palette().brush(TQPalette::Active, TQColorGroup::Background).pixmap()); if (!stipple || stipple->isNull()) - p->fillRect(0,0,w,h, paintWidget->parentWidget()->palette().brush(QPalette::Active, QColorGroup::Background) ); + p->fillRect(0,0,w,h, paintWidget->parentWidget()->palette().brush(TQPalette::Active, TQColorGroup::Background) ); else p->drawTiledPixmap( 0, 0, w, h, *stipple, bgX, bgY ); } else { - stipple = cg.brush( QColorGroup::Background ).pixmap(); + stipple = cg.brush( TQColorGroup::Background ).pixmap(); stipple ? p->drawTiledPixmap( 0, 0, w, h, *stipple, bgX, bgY ) : - p->fillRect(0,0,w,h, cg.brush( QColorGroup::Background )); + p->fillRect(0,0,w,h, cg.brush( TQColorGroup::Background )); } } else - p->fillRect(0,0,w,h, cg.brush( QColorGroup::Background )); + p->fillRect(0,0,w,h, cg.brush( TQColorGroup::Background )); } else { p = painter; } -// QPainter p(tmpBtnPix); +// TQPainter p(tmpBtnPix); // tiled fills if ( w > _LRWIDTH_ ) @@ -753,16 +753,16 @@ void LiquidStyle::drawRoundButton( QPainter *painter, const QColorGroup &cg, con } -void LiquidStyle::drawRectangularButton( QPainter *painter, - const QColorGroup &cg, const QColor &c, - int x, int y, int w, int h, +void LiquidStyle::drawRectangularButton( TQPainter *painter, + const TQColorGroup &cg, const TQColor &c, + int x, int y, int w, int h, bool sunken, bool hover, bool isCombo, int position, bool isHTML) const { #define _HEIGHT_ ptr->rectbutton->height() #define _WIDTH_ ptr->rectbutton->width() LiquidStyle *ptr = const_cast( this ); - QColor tmpColor; + TQColor tmpColor; tmpColor = isCombo && !(hover || sunken) ? optionHandler->InactiveButtonColor() : c; int xOffset, width; @@ -770,11 +770,11 @@ void LiquidStyle::drawRectangularButton( QPainter *painter, ButtonTile *tile = rectBtnDict.find( tmpColor.rgb() ); if ( !tile ) - tile = createButtonTile( tmpColor, cg.background(), ptr->rectbutton, ((QImage*)0L), ((QImage*)0L), &(ptr->rectBtnDict), (QIntDict*)0L, (QIntDict*)0L, 33, 25, 10, 5, 13, 15, 0, 0, sunken); + tile = createButtonTile( tmpColor, cg.background(), ptr->rectbutton, ((TQImage*)0L), ((TQImage*)0L), &(ptr->rectBtnDict), (TQIntDict*)0L, (TQIntDict*)0L, 33, 25, 10, 5, 13, 15, 0, 0, sunken); if ( !tile ) { - qWarning( "Button tile is NULL!" ); + tqWarning( "Button tile is NULL!" ); return ; } @@ -802,23 +802,23 @@ void LiquidStyle::drawRectangularButton( QPainter *painter, break; } - QPainter *p; - QPen oldPen = painter->pen(); + TQPainter *p; + TQPen oldPen = painter->pen(); if (!isHTML) { if ( !tmpBtnPix ) - ptr->tmpBtnPix = new QPixmap( w, h ); + ptr->tmpBtnPix = new TQPixmap( w, h ); else if ( w > tmpBtnPix->width() || h > tmpBtnPix->height() ) { // make temp pixmap size == largest button ptr->tmpBtnPix->resize(w,h); } - p = new QPainter(tmpBtnPix); + p = new TQPainter(tmpBtnPix); if (position != center && paintWidget && paintWidget->parentWidget()) { if (this->paintWidget->parentWidget()->paletteBackgroundPixmap ()) - p->drawTiledPixmap(QRect(0, 0, w, h), *this->paintWidget->parentWidget()->paletteBackgroundPixmap(), ((QWidget *)this->paintWidget)->backgroundOffset()); + p->drawTiledPixmap(TQRect(0, 0, w, h), *this->paintWidget->parentWidget()->paletteBackgroundPixmap(), ((TQWidget *)this->paintWidget)->backgroundOffset()); else p->fillRect( 0, 0, w, h, this->paintWidget->parentWidget()->paletteBackgroundColor()); } @@ -831,7 +831,7 @@ void LiquidStyle::drawRectangularButton( QPainter *painter, } int tileH = 0; - QPixmap tmpPix(_LOFF_, 1); + TQPixmap tmpPix(_LOFF_, 1); if (position == left || position == full) { @@ -946,10 +946,10 @@ void LiquidStyle::drawRectangularButton( QPainter *painter, // second part of combos if needed tile = rectBtnDict.find( c.rgb() ); if ( !tile ) - tile = createButtonTile( c, cg.background(), ptr->rectbutton, ((QImage*)0L), ((QImage*)0L), &(ptr->rectBtnDict), (QIntDict*)0L, (QIntDict*)0L, 33, 25, 10, 5, 13, 15, 0, 0, sunken); + tile = createButtonTile( c, cg.background(), ptr->rectbutton, ((TQImage*)0L), ((TQImage*)0L), &(ptr->rectBtnDict), (TQIntDict*)0L, (TQIntDict*)0L, 33, 25, 10, 5, 13, 15, 0, 0, sunken); if ( !tile ) { - qWarning( "Button tile is NULL!" ); + tqWarning( "Button tile is NULL!" ); return ; } @@ -1038,31 +1038,31 @@ void LiquidStyle::drawRectangularButton( QPainter *painter, } -void LiquidStyle::drawCombo( QPainter *painter, - const QColorGroup &cg, - const QColor &c, - int x, int y, int w, int h, - bool sunken, bool hover, bool isCombo, +void LiquidStyle::drawCombo( TQPainter *painter, + const TQColorGroup &cg, + const TQColor &c, + int x, int y, int w, int h, + bool sunken, bool hover, bool isCombo, int position, bool isHTML ) const { LiquidStyle *ptr = const_cast( this ); - QColor myC =(isOOO && isCombo)?optionHandler->CustomButtonColor():c; - QColor tmpColor = isCombo && !(hover || sunken) ? optionHandler->InactiveButtonColor() : myC; + TQColor myC =(isOOO && isCombo)?optionHandler->CustomButtonColor():c; + TQColor tmpColor = isCombo && !(hover || sunken) ? optionHandler->InactiveButtonColor() : myC; ButtonTile *tile = sunken ? comboDict.find( tmpColor.rgb() ) : comboShadowedDict.find( tmpColor.rgb() ); if ( !tile ) { if (optionHandler->buttonStyle() == Milk && sunken) - tile = createButtonTile( tmpColor, cg.background(), ptr->btnBorderImg, ptr->comboShadow, ((QImage*)0L), &(ptr->comboDict), &(ptr->comboShadowedDict), (QIntDict*)0L, 44, 21, 7, 9, 30, 1, 2, 0, true); + tile = createButtonTile( tmpColor, cg.background(), ptr->btnBorderImg, ptr->comboShadow, ((TQImage*)0L), &(ptr->comboDict), &(ptr->comboShadowedDict), (TQIntDict*)0L, 44, 21, 7, 9, 30, 1, 2, 0, true); else - tile = createButtonTile( tmpColor, cg.background(), ptr->combo, ptr->comboShadow, ((QImage*)0L), &(ptr->comboDict), &(ptr->comboShadowedDict), (QIntDict*)0L, 44, 21, 7, 9, 30, 1, 2, 0, sunken); + tile = createButtonTile( tmpColor, cg.background(), ptr->combo, ptr->comboShadow, ((TQImage*)0L), &(ptr->comboDict), &(ptr->comboShadowedDict), (TQIntDict*)0L, 44, 21, 7, 9, 30, 1, 2, 0, sunken); } if ( !tile ) { - qWarning( "Button tile is NULL!" ); + tqWarning( "Button tile is NULL!" ); return ; } @@ -1092,23 +1092,23 @@ void LiquidStyle::drawCombo( QPainter *painter, break; } - QPainter *p; - QPen oldPen = painter->pen(); + TQPainter *p; + TQPen oldPen = painter->pen(); if (!isHTML) { if ( !tmpBtnPix ) - ptr->tmpBtnPix = new QPixmap( w, h ); + ptr->tmpBtnPix = new TQPixmap( w, h ); else if ( w > tmpBtnPix->width() || h > tmpBtnPix->height() ) { // make temp pixmap size == largest button ptr->tmpBtnPix->resize(w,h); } - p = new QPainter(tmpBtnPix); + p = new TQPainter(tmpBtnPix); #if 0 - QPixmap *stipple = cg.brush( QColorGroup::Background ).pixmap(); + TQPixmap *stipple = cg.brush( TQColorGroup::Background ).pixmap(); if ( !stipple ) // button may have custom colorgroup - stipple = qApp->palette().active().brush( QColorGroup::Background ).pixmap(); + stipple = tqApp->palette().active().brush( TQColorGroup::Background ).pixmap(); if ( stipple ) p->drawTiledPixmap( 0, 0, w, h, *stipple); else @@ -1117,7 +1117,7 @@ void LiquidStyle::drawCombo( QPainter *painter, if (position != center && paintWidget && paintWidget->parentWidget()) { if (this->paintWidget->parentWidget()->paletteBackgroundPixmap ()) - p->drawTiledPixmap(QRect(0, 0, w, h), *this->paintWidget->parentWidget()->paletteBackgroundPixmap(), ((QWidget *)this->paintWidget)->backgroundOffset()); + p->drawTiledPixmap(TQRect(0, 0, w, h), *this->paintWidget->parentWidget()->paletteBackgroundPixmap(), ((TQWidget *)this->paintWidget)->backgroundOffset()); else p->fillRect( 0, 0, w, h, this->paintWidget->parentWidget()->paletteBackgroundColor()); } @@ -1173,11 +1173,11 @@ void LiquidStyle::drawCombo( QPainter *painter, tile = comboShadowedDict.find( myC.rgb() ); if ( !tile ) { - tile = createButtonTile( myC, cg.background(), ptr->combo, ptr->comboShadow, ((QImage*)0L), &(ptr->comboDict), &(ptr->comboShadowedDict), (QIntDict*)0L, 44, 21, 7, 9, 30, 1, 2, 0, sunken); + tile = createButtonTile( myC, cg.background(), ptr->combo, ptr->comboShadow, ((TQImage*)0L), &(ptr->comboDict), &(ptr->comboShadowedDict), (TQIntDict*)0L, 44, 21, 7, 9, 30, 1, 2, 0, sunken); } if ( !tile ) { - qWarning( "Button tile is NULL!" ); + tqWarning( "Button tile is NULL!" ); return ; } if ( w > _LRWIDTH_ ) @@ -1242,15 +1242,15 @@ void LiquidStyle::drawCombo( QPainter *painter, p->setPen(oldPen); } -void LiquidStyle::drawRoundFrame( QPainter *p, const QRect &r, - const QColorGroup &cg, bool focused, QPoint offset ) const +void LiquidStyle::drawRoundFrame( TQPainter *p, const TQRect &r, + const TQColorGroup &cg, bool focused, TQPoint offset ) const { ButtonTile *tile = focused ? activeRoundFrame : inactiveRoundFrame; if (!tile) tile = createRoundFrameTile(*roundFrame, focused ? cg.button() : optionHandler->InactiveButtonColor(), &cg.background(), cg.base() ); // first: fill background (tiled) // outer - QPixmap *stipple = cg.brush( QColorGroup::Background ).pixmap(); + TQPixmap *stipple = cg.brush( TQColorGroup::Background ).pixmap(); if (stipple) { p->drawTiledPixmap( r.x(),r.y(), 7, 8, *stipple, offset.x(), offset.y()); @@ -1290,17 +1290,17 @@ void LiquidStyle::drawRoundFrame( QPainter *p, const QRect &r, } } -void LiquidStyle::drawEditFrame( QPainter *p, const QRect &r, - const QColorGroup &cg, bool isHTML, bool focused, bool inverse ) const +void LiquidStyle::drawEditFrame( TQPainter *p, const TQRect &r, + const TQColorGroup &cg, bool isHTML, bool focused, bool inverse ) const { - QColor fill( cg.background().dark( 105 ) ); - QColor tmp(0,0,0); - QColor light1( 0, 0, 0 ); - QColor light2( 0, 0, 0 ); + TQColor fill( cg.background().dark( 105 ) ); + TQColor tmp(0,0,0); + TQColor light1( 0, 0, 0 ); + TQColor light2( 0, 0, 0 ); - QColor dark1( 0, 0, 0 ); - QColor dark2( 0, 0, 0 ); - QColor dark3( 0, 0, 0 ); + TQColor dark1( 0, 0, 0 ); + TQColor dark2( 0, 0, 0 ); + TQColor dark3( 0, 0, 0 ); if ( !focused ) { @@ -1390,12 +1390,12 @@ void LiquidStyle::drawEditFrame( QPainter *p, const QRect &r, p->drawLine( right - 1, y + 2, right - 1, bottom - 2 ); } -bool LiquidStyle::isHTMLWidget( const QWidget *widget ) const +bool LiquidStyle::isHTMLWidget( const TQWidget *widget ) const { - const QObject * w = widget->parent(); + const TQObject * w = widget->parent(); if ( w ) { - if ( !w->inherits( "QClipperWidget" ) ) + if ( !w->inherits( "TQClipperWidget" ) ) return ( false ); w = w->parent(); if ( w ) @@ -1408,9 +1408,9 @@ bool LiquidStyle::isHTMLWidget( const QWidget *widget ) const return ( false ); } -void LiquidStyle::drawHTMLCBBorder( const QPixmap &pix, const QColor &c ) const +void LiquidStyle::drawHTMLCBBorder( const TQPixmap &pix, const TQColor &c ) const { - QPainter p; + TQPainter p; p.begin( &pix ); p.setPen( c.dark( 200 ) ); p.drawRect( 0, 0, 16, 16 );