Initial TQt conversion

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 8 years ago
parent cfa36e1a95
commit 2ee99ab520

@ -22,7 +22,7 @@ will fix the horizontal slider problem, rotating pixmaps in general
0.8 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. there won't be Baghira for Qt4, don't ask.
- several bugfixes, minor changes, whatever. - several bugfixes, minor changes, whatever.

@ -26,9 +26,9 @@
#endif #endif
//#include <dcopclient.h> //#include <dcopclient.h>
#include "bab_iface.h" #include "bab_iface.h"
#include <qwidget.h> #include <tqwidget.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <qsettings.h> #include <tqsettings.h>
#include <kmainwindow.h> #include <kmainwindow.h>
#include <ksystemtray.h> #include <ksystemtray.h>
@ -44,32 +44,32 @@ public:
~BabSwitcher(); ~BabSwitcher();
void toggle(); void toggle();
void setStyle(QString); void setStyle(TQString);
QString style(); TQString style();
void setDeco(QString); void setDeco(TQString);
QString deco(); TQString deco();
void start(QString name, QString settings); void start(TQString name, TQString settings);
void emitStyleChanged(); void emitStyleChanged();
static QPoint *globalPos; static TQPoint *globalPos;
protected: protected:
void mousePressEvent(QMouseEvent *e); void mousePressEvent(TQMouseEvent *e);
void paintEvent(QPaintEvent *ev); void paintEvent(TQPaintEvent *ev);
private: private:
int state_; int state_;
int decoState_; int decoState_;
QPixmap JaguarIcon; TQPixmap JaguarIcon;
QPixmap PantherIcon; TQPixmap PantherIcon;
QPixmap iTunesIcon; TQPixmap iTunesIcon;
QPixmap TigerIcon; TQPixmap TigerIcon;
QPixmap MilkIcon; TQPixmap MilkIcon;
}; };
class QComboBox; class TQComboBox;
class QCheckBox; class TQCheckBox;
/** /**
* @short Application Main Window * @short Application Main Window
* @author Thomas Lübking <baghira-style@gmx.net> * @author Thomas Lübking <baghira-style@gmx.net>
@ -82,12 +82,12 @@ public:
enum TabState {Tab = 0, Clever, Chooser}; enum TabState {Tab = 0, Clever, Chooser};
bab(); bab();
void showEvent(QShowEvent *e); void showEvent(TQShowEvent *e);
QCheckBox *cornerCheck; TQCheckBox *cornerCheck;
virtual ~bab(); virtual ~bab();
private: private:
BabSwitcher* bSwitcher; BabSwitcher* bSwitcher;
QComboBox *DefStyle; TQComboBox *DefStyle;
private slots: private slots:
void saveSettings(); void saveSettings();
@ -95,7 +95,7 @@ private slots:
}; };
class Corner : public QWidget class Corner : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:

@ -29,11 +29,11 @@ class babInterface : virtual public DCOPObject
k_dcop: k_dcop:
virtual void toggle() = 0; virtual void toggle() = 0;
virtual QString style() = 0; virtual TQString style() = 0;
virtual void setStyle(QString state) = 0; virtual void setStyle(TQString state) = 0;
virtual QString deco() = 0; virtual TQString deco() = 0;
virtual void setDeco(QString state) = 0; virtual void setDeco(TQString state) = 0;
virtual void start(QString name, QString settings) = 0; virtual void start(TQString name, TQString settings) = 0;
virtual void emitStyleChanged() = 0; virtual void emitStyleChanged() = 0;
}; };

@ -19,17 +19,17 @@
***************************************************************************/ ***************************************************************************/
#include "bab.h" #include "bab.h"
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include <qdir.h> #include <tqdir.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qsettings.h> #include <tqsettings.h>
#include <qtabwidget.h> #include <tqtabwidget.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <qtimer.h> #include <tqtimer.h>
#include <qvbox.h> #include <tqvbox.h>
#include <qpainter.h> #include <tqpainter.h>
#include <dcopclient.h> #include <dcopclient.h>
#include <kapplication.h> #include <kapplication.h>
// #include <kconfig.h> // #include <kconfig.h>
@ -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"); bSwitcher = new BabSwitcher(this,"switcher");
QToolTip::add(bSwitcher, i18n("leftclick toggles state<br>rightclick toggles setupmenu")); TQToolTip::add(bSwitcher, i18n("leftclick toggles state<br>rightclick toggles setupmenu"));
bSwitcher->show(); bSwitcher->show();
QDir d( QDir::homeDirPath() + "/.baghira"); TQDir d( TQDir::homeDirPath() + "/.baghira");
if (!d.exists()) if (!d.exists())
d.mkdir(QDir::homeDirPath() + "/.baghira"); d.mkdir(TQDir::homeDirPath() + "/.baghira");
d = QDir( QDir::homeDirPath() + "/.baghira/.bab"); d = TQDir( TQDir::homeDirPath() + "/.baghira/.bab");
if (!d.exists()) if (!d.exists())
d.mkdir(QDir::homeDirPath() + "/.baghira/.bab"); d.mkdir(TQDir::homeDirPath() + "/.baghira/.bab");
FILE *file = NULL; FILE *file = NULL;
QString tmpString = QDir::homeDirPath() + "/.baghira/Jaguar"; TQString tmpString = TQDir::homeDirPath() + "/.baghira/Jaguar";
if (!QFile::exists(tmpString)) if (!TQFile::exists(tmpString))
{ {
if( (file = fopen(tmpString.latin1(), "w")) != NULL ) if( (file = fopen(tmpString.latin1(), "w")) != NULL )
{ {
@ -115,8 +115,8 @@ bab::bab() : KMainWindow(0,"bab",Qt::WStyle_StaysOnTop | Qt::WX11BypassWM ){
fclose(file); fclose(file);
} }
} }
tmpString = QDir::homeDirPath() + "/.baghira/Panther"; tmpString = TQDir::homeDirPath() + "/.baghira/Panther";
if (!QFile::exists(tmpString)) if (!TQFile::exists(tmpString))
{ {
if( (file = fopen(tmpString.latin1(), "w")) != NULL ) if( (file = fopen(tmpString.latin1(), "w")) != NULL )
{ {
@ -124,8 +124,8 @@ bab::bab() : KMainWindow(0,"bab",Qt::WStyle_StaysOnTop | Qt::WX11BypassWM ){
fclose(file); fclose(file);
} }
} }
tmpString = QDir::homeDirPath() + "/.baghira/Brushed"; tmpString = TQDir::homeDirPath() + "/.baghira/Brushed";
if (!QFile::exists(tmpString)) if (!TQFile::exists(tmpString))
{ {
if( (file = fopen(tmpString.latin1(), "w")) != NULL ) if( (file = fopen(tmpString.latin1(), "w")) != NULL )
{ {
@ -133,8 +133,8 @@ bab::bab() : KMainWindow(0,"bab",Qt::WStyle_StaysOnTop | Qt::WX11BypassWM ){
fclose(file); fclose(file);
} }
} }
tmpString = QDir::homeDirPath() + "/.baghira/Tiger"; tmpString = TQDir::homeDirPath() + "/.baghira/Tiger";
if (!QFile::exists(tmpString)) if (!TQFile::exists(tmpString))
{ {
if( (file = fopen(tmpString.latin1(), "w")) != NULL ) if( (file = fopen(tmpString.latin1(), "w")) != NULL )
{ {
@ -142,8 +142,8 @@ bab::bab() : KMainWindow(0,"bab",Qt::WStyle_StaysOnTop | Qt::WX11BypassWM ){
fclose(file); fclose(file);
} }
} }
tmpString = QDir::homeDirPath() + "/.baghira/Milk"; tmpString = TQDir::homeDirPath() + "/.baghira/Milk";
if (!QFile::exists(tmpString)) if (!TQFile::exists(tmpString))
{ {
if( (file = fopen(tmpString.latin1(), "w")) != NULL ) 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->setLineWidth(2);
vb->setMargin(2); vb->setMargin(2);
// vb->setFrameStyle(QFrame::Panel | QFrame::Plain ); // vb->setFrameStyle(TQFrame::Panel | TQFrame::Plain );
QLabel *DefStyleLabel = new QLabel("Default Style is", vb); TQLabel *DefStyleLabel = new TQLabel("Default Style is", vb);
DefStyle = new QComboBox(vb); DefStyle = new TQComboBox(vb);
DefStyle->insertItem ( "Jaguar" ); DefStyle->insertItem ( "Jaguar" );
DefStyle->insertItem ( "Panther" ); DefStyle->insertItem ( "Panther" );
DefStyle->insertItem ( "Brushed" ); DefStyle->insertItem ( "Brushed" );
DefStyle->insertItem ( "Tiger" ); DefStyle->insertItem ( "Tiger" );
DefStyle->insertItem ( "Milk" ); DefStyle->insertItem ( "Milk" );
cornerCheck = new QCheckBox("Round upper screen corners", vb); cornerCheck = new TQCheckBox("Round upper screen corners", vb);
QSettings config; TQSettings config;
config.beginGroup("/baghira/BAB"); config.beginGroup("/baghira/BAB");
DefStyle->setCurrentItem(config.readNumEntry("defaultState", BabSwitcher::Panther )); DefStyle->setCurrentItem(config.readNumEntry("defaultState", BabSwitcher::Panther ));
cornerCheck->setChecked( config.readBoolEntry("roundCorners", true ) ); cornerCheck->setChecked( config.readBoolEntry("roundCorners", true ) );
config.endGroup(); config.endGroup();
QPushButton *configBaghira = new QPushButton("Configure Baghira", vb); TQPushButton *configBaghira = new TQPushButton("Configure Baghira", vb);
QPushButton *Quit = new QPushButton("Quit BAB", vb); TQPushButton *Quit = new TQPushButton("Quit BAB", vb);
QPushButton *Close = new QPushButton("Close Menu", vb); TQPushButton *Close = new TQPushButton("Close Menu", vb);
vb->adjustSize(); vb->adjustSize();
bSwitcher->setStyle(DefStyle->currentText()); bSwitcher->setStyle(DefStyle->currentText());
bSwitcher->setDeco(DefStyle->currentText()); bSwitcher->setDeco(DefStyle->currentText());
@ -204,10 +204,10 @@ void bab::configureBaghira()
// any errors that arise // any errors that arise
KLibLoader* loader = KLibLoader::self(); KLibLoader* loader = KLibLoader::self();
KLibrary* library = loader->library( QFile::encodeName("kstyle_baghira_config") ); KLibrary* library = loader->library( TQFile::encodeName("kstyle_baghira_config") );
if (!library) 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; return;
} }
@ -215,7 +215,7 @@ void bab::configureBaghira()
if (!allocPtr) 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; return;
} }
@ -223,42 +223,42 @@ void bab::configureBaghira()
StyleConfigDialog* dial = new StyleConfigDialog(this, "Baghira Configuration"); StyleConfigDialog* dial = new StyleConfigDialog(this, "Baghira Configuration");
dial->enableButtonSeparator(true); dial->enableButtonSeparator(true);
typedef QWidget*(* factoryRoutine)( QWidget* parent ); typedef TQWidget*(* factoryRoutine)( TQWidget* parent );
//Get the factory, and make the widget. //Get the factory, and make the widget.
factoryRoutine factory = (factoryRoutine)(allocPtr); 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; TQWidget* decoConfig = 0;
QObject *decoObject = 0; TQObject *decoObject = 0;
if (tw) if (tw)
{ {
KLibrary* library2 = loader->library( QFile::encodeName("kwin_baghira_config") ); KLibrary* library2 = loader->library( TQFile::encodeName("kwin_baghira_config") );
if (!library2) 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; return;
} }
void* allocPtr2 = library2->symbol("allocate_config"); void* allocPtr2 = library2->symbol("allocate_config");
if (!allocPtr2) 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; return;
} }
typedef QObject*(* factoryRoutine2)( KConfig* conf, QWidget* parent ); typedef TQObject*(* factoryRoutine2)( KConfig* conf, TQWidget* parent );
factoryRoutine2 factory2 = (factoryRoutine2)(allocPtr2); factoryRoutine2 factory2 = (factoryRoutine2)(allocPtr2);
decoObject = factory2( 0, tw ); decoObject = factory2( 0, tw );
decoConfig = (QWidget*)tw->child("ConfigDialog"); decoConfig = (TQWidget*)tw->child("ConfigDialog");
tw->addTab(decoConfig, "Decoration"); tw->addTab(decoConfig, "Decoration");
} }
//Insert it in... //Insert it in...
dial->setMainWidget( styleConfig ); dial->setMainWidget( styleConfig );
QWidget *desktop = QApplication::desktop(); TQWidget *desktop = TQApplication::desktop();
QPoint nPos((desktop->width() - dial->width())/2, (desktop->height() - dial->height() - 100)/2); TQPoint nPos((desktop->width() - dial->width())/2, (desktop->height() - dial->height() - 100)/2);
dial->move(nPos); dial->move(nPos);
//..and connect it to the wrapper //..and connect it to the wrapper
connect(styleConfig, SIGNAL(changed(bool)), dial, SLOT(setStyleDirty(bool))); 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(defaults()), decoObject, SLOT(defaults()));
connect(dial, SIGNAL(save(KConfig*)), decoObject, SLOT(save(KConfig*))); 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 //For now, ask all KDE apps to recreate their styles to apply the setitngs
if (dial->isStyleDirty()) if (dial->isStyleDirty())
@ -277,21 +277,21 @@ void bab::configureBaghira()
KIPC::sendMessageAll(KIPC::ToolbarStyleChanged); KIPC::sendMessageAll(KIPC::ToolbarStyleChanged);
} }
if (dial->isDecoDirty()) if (dial->isDecoDirty())
kapp->dcopClient()->send("kwin", "KWinInterface", "reconfigure()", QByteArray()); kapp->dcopClient()->send("kwin", "KWinInterface", "reconfigure()", TQByteArray());
} }
tw->removeChild( decoObject ); tw->removeChild( decoObject );
dial->insertChild( decoObject ); dial->insertChild( decoObject );
decoConfig->reparent(dial, QPoint(0,0)); decoConfig->reparent(dial, TQPoint(0,0));
delete dial; delete dial;
} }
/* overwrite the show event for repositioning the window on top /* overwrite the show event for repositioning the window on top
of the icon, adapted from kkeyled */ of the icon, adapted from kkeyled */
void bab::showEvent(QShowEvent *e){ void bab::showEvent(TQShowEvent *e){
if ( bSwitcher->globalPos->x() >= 0) { if ( bSwitcher->globalPos->x() >= 0) {
QWidget *desktop = QApplication::desktop(); TQWidget *desktop = TQApplication::desktop();
int w = desktop->width(); int w = desktop->width();
QPoint nPos; TQPoint nPos;
if (bSwitcher->globalPos->y() - height() >= 0 ) if (bSwitcher->globalPos->y() - height() >= 0 )
{ // it's not on top { // it's not on top
nPos.setY(bSwitcher->globalPos->y() -height()); 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 // If it was set by the normal sessionmanagement it needs
// to set the Flags again // to set the Flags again
setWFlags(Qt::WStyle_StaysOnTop | Qt::WX11BypassWM); setWFlags(TQt::WStyle_StaysOnTop | TQt::WX11BypassWM);
QWidget::showEvent(e); // execute the normal showevent TQWidget::showEvent(e); // execute the normal showevent
raise(); raise();
} }
void bab::saveSettings(){ void bab::saveSettings(){
QSettings *config = new QSettings(); TQSettings *config = new TQSettings();
// KConfig *config = new KConfig("baghirarc"); // KConfig *config = new KConfig("baghirarc");
config->beginGroup("/baghira/BAB"); config->beginGroup("/baghira/BAB");
config->writeEntry("defaultState", DefStyle->currentItem()); config->writeEntry("defaultState", DefStyle->currentItem());
@ -330,7 +330,7 @@ void bab::saveSettings(){
delete config; delete config;
} }
QPoint *BabSwitcher::globalPos = new QPoint(0,0); TQPoint *BabSwitcher::globalPos = new TQPoint(0,0);
BabSwitcher::BabSwitcher(bab *parent, const char *name) BabSwitcher::BabSwitcher(bab *parent, const char *name)
: KSystemTray(parent,name), DCOPObject("babInterface") { : KSystemTray(parent,name), DCOPObject("babInterface") {
@ -353,7 +353,7 @@ void BabSwitcher::toggle()
else else
state_ = Jaguar; state_ = Jaguar;
decoState_ = state_; decoState_ = state_;
QString nameString; TQString nameString;
switch (state_) switch (state_)
{ {
case Jaguar: case Jaguar:
@ -371,17 +371,17 @@ void BabSwitcher::toggle()
case Milk: case Milk:
nameString = "Milk"; nameString = "Milk";
} }
QString tmpString = QDir::homeDirPath() + "/.baghira/" + nameString; TQString tmpString = TQDir::homeDirPath() + "/.baghira/" + nameString;
QString tmpString2 = QDir::homeDirPath() + "/.baghira/.bab/.style"; TQString tmpString2 = TQDir::homeDirPath() + "/.baghira/.bab/.style";
remove(tmpString2.latin1()); remove(tmpString2.latin1());
symlink (tmpString.latin1(), tmpString2.latin1()); symlink (tmpString.latin1(), tmpString2.latin1());
tmpString2 = QDir::homeDirPath() + "/.baghira/.bab/.deco"; tmpString2 = TQDir::homeDirPath() + "/.baghira/.bab/.deco";
remove(tmpString2.latin1()); remove(tmpString2.latin1());
symlink (tmpString.latin1(), tmpString2.latin1()); symlink (tmpString.latin1(), tmpString2.latin1());
repaint(); repaint();
} }
void BabSwitcher::setStyle(QString style) void BabSwitcher::setStyle(TQString style)
{ {
if (style == "Jaguar") if (style == "Jaguar")
state_ = Jaguar; state_ = Jaguar;
@ -397,14 +397,14 @@ void BabSwitcher::setStyle(QString style)
style = "Panther"; style = "Panther";
state_ = Panther; state_ = Panther;
} }
QString tmpString = QDir::homeDirPath() + "/.baghira/" + style; TQString tmpString = TQDir::homeDirPath() + "/.baghira/" + style;
QString tmpString2 = QDir::homeDirPath() + "/.baghira/.bab/.style"; TQString tmpString2 = TQDir::homeDirPath() + "/.baghira/.bab/.style";
remove(tmpString2.latin1()); remove(tmpString2.latin1());
symlink (tmpString.latin1(), tmpString2.latin1()); symlink (tmpString.latin1(), tmpString2.latin1());
repaint(); repaint();
} }
void BabSwitcher::setDeco(QString deco) void BabSwitcher::setDeco(TQString deco)
{ {
if (deco == "Jaguar") if (deco == "Jaguar")
decoState_ = Jaguar; decoState_ = Jaguar;
@ -420,13 +420,13 @@ void BabSwitcher::setDeco(QString deco)
deco = "Panther"; deco = "Panther";
decoState_ = Panther; decoState_ = Panther;
} }
QString tmpString = QDir::homeDirPath() + "/.baghira/" + deco; TQString tmpString = TQDir::homeDirPath() + "/.baghira/" + deco;
QString tmpString2 = QDir::homeDirPath() + "/.baghira/.bab/.deco"; TQString tmpString2 = TQDir::homeDirPath() + "/.baghira/.bab/.deco";
remove(tmpString2.latin1()); remove(tmpString2.latin1());
symlink (tmpString.latin1(), tmpString2.latin1()); symlink (tmpString.latin1(), tmpString2.latin1());
} }
QString BabSwitcher::style() TQString BabSwitcher::style()
{ {
switch (state_) switch (state_)
{ {
@ -443,7 +443,7 @@ QString BabSwitcher::style()
} }
} }
QString BabSwitcher::deco() TQString BabSwitcher::deco()
{ {
switch (decoState_) 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; KProcess proc;
QString section; int i = 0; bool done = false; TQString section; int i = 0; bool done = false;
if (name.contains(' ')) if (name.contains(' '))
{ {
while (!done) while (!done)
@ -471,8 +471,8 @@ void BabSwitcher::start(QString name, QString settings)
section = name.section(' ',i,i); section = name.section(' ',i,i);
if (i == 0) if (i == 0)
{ {
QString tmpString = QDir::homeDirPath() + "/.baghira/" + settings; TQString tmpString = TQDir::homeDirPath() + "/.baghira/" + settings;
QString tmpString2 = QDir::homeDirPath() + "/.baghira/.bab/" + section; TQString tmpString2 = TQDir::homeDirPath() + "/.baghira/.bab/" + section;
remove(tmpString2.latin1()); remove(tmpString2.latin1());
symlink (tmpString.latin1(), tmpString2.latin1()); symlink (tmpString.latin1(), tmpString2.latin1());
} }
@ -485,8 +485,8 @@ void BabSwitcher::start(QString name, QString settings)
} }
else else
{ {
QString tmpString = QDir::homeDirPath() + "/.baghira/" + settings; TQString tmpString = TQDir::homeDirPath() + "/.baghira/" + settings;
QString tmpString2 = QDir::homeDirPath() + "/.baghira/.bab/" + name; TQString tmpString2 = TQDir::homeDirPath() + "/.baghira/.bab/" + name;
remove(tmpString2.latin1()); remove(tmpString2.latin1());
symlink (tmpString.latin1(), tmpString2.latin1()); symlink (tmpString.latin1(), tmpString2.latin1());
proc << name; proc << name;
@ -501,9 +501,9 @@ void BabSwitcher::emitStyleChanged()
KIPC::sendMessageAll(KIPC::ToolbarStyleChanged); 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->setX(e->globalX() - e->x());
globalPos->setY(e->globalY() - e->y()); 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); KSystemTray::paintEvent(ev);
QPainter icyApainter(this); TQPainter icyApainter(this);
switch (state_) switch (state_)
{ {
case Jaguar: 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; break;
case Panther: 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; break;
case iTunes: 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; break;
case Tiger: 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; break;
case Milk: 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: default:
break; break;
} }
icyApainter.end(); 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) { if (side == left) {
setFixedSize(5,4); setFixedSize(5,4);
move(0,0); move(0,0);
show(); show();
setPaletteBackgroundColor(Qt::black); setPaletteBackgroundColor(TQt::black);
XRectangle* xrects = new XRectangle[4]; XRectangle* xrects = new XRectangle[4];
xrects[ 0 ].x = 0; xrects[ 0 ].x = 0;
xrects[ 0 ].y = 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 ].y = 3;
xrects[ 3 ].width = 1; xrects[ 3 ].width = 1;
xrects[ 3 ].height = 2; xrects[ 3 ].height = 2;
XShapeCombineRectangles( qt_xdisplay(), winId(), ShapeBounding, 0, 0, XShapeCombineRectangles( tqt_xdisplay(), winId(), ShapeBounding, 0, 0,
xrects, 4, ShapeSet, 0 ); xrects, 4, ShapeSet, 0 );
delete[] xrects; delete[] xrects;
} }
else { else {
setFixedSize(5,4); setFixedSize(5,4);
move(QApplication::desktop()->width()-5,0); move(TQApplication::desktop()->width()-5,0);
show(); show();
setPaletteBackgroundColor(Qt::black); setPaletteBackgroundColor(TQt::black);
XRectangle* xrects = new XRectangle[4]; XRectangle* xrects = new XRectangle[4];
xrects[ 0 ].x = 0; xrects[ 0 ].x = 0;
xrects[ 0 ].y = 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 ].y = 3;
xrects[ 3 ].width = 1; xrects[ 3 ].width = 1;
xrects[ 3 ].height = 2; xrects[ 3 ].height = 2;
XShapeCombineRectangles( qt_xdisplay(), winId(), ShapeBounding, 0, 0, XShapeCombineRectangles( tqt_xdisplay(), winId(), ShapeBounding, 0, 0,
xrects, 4, ShapeSet, 0 ); xrects, 4, ShapeSet, 0 );
delete[] xrects; delete[] xrects;
} }

@ -21,7 +21,7 @@
#include "styleconfdialog.h" #include "styleconfdialog.h"
#include <klocale.h> #include <klocale.h>
StyleConfigDialog::StyleConfigDialog(QWidget* parent, QString styleName): StyleConfigDialog::StyleConfigDialog(TQWidget* parent, TQString styleName):
KDialogBase(parent, "StyleConfigDialog", KDialogBase(parent, "StyleConfigDialog",
true, /*modal*/ true, /*modal*/
styleName, styleName,

@ -28,7 +28,7 @@ class StyleConfigDialog: public KDialogBase
{ {
Q_OBJECT Q_OBJECT
public: public:
StyleConfigDialog(QWidget* parent, QString styleName); StyleConfigDialog(TQWidget* parent, TQString styleName);
bool isStyleDirty() const; bool isStyleDirty() const;
bool isDecoDirty() const; bool isDecoDirty() const;

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>About</class> <class>About</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>About</cstring> <cstring>About</cstring>
</property> </property>
@ -48,7 +48,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget" row="0" column="0" rowspan="1" colspan="3"> <widget class="TQLayoutWidget" row="0" column="0" rowspan="1" colspan="3">
<property name="name"> <property name="name">
<cstring>layout4</cstring> <cstring>layout4</cstring>
</property> </property>
@ -75,7 +75,7 @@
</spacer> </spacer>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget" row="12" column="0" rowspan="1" colspan="3"> <widget class="TQLayoutWidget" row="12" column="0" rowspan="1" colspan="3">
<property name="name"> <property name="name">
<cstring>layout11</cstring> <cstring>layout11</cstring>
</property> </property>
@ -83,7 +83,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>crLabel</cstring> <cstring>crLabel</cstring>
</property> </property>
@ -120,7 +120,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLayoutWidget" row="10" column="0" rowspan="1" colspan="3"> <widget class="TQLayoutWidget" row="10" column="0" rowspan="1" colspan="3">
<property name="name"> <property name="name">
<cstring>layout6</cstring> <cstring>layout6</cstring>
</property> </property>
@ -145,7 +145,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonInfo</cstring> <cstring>buttonInfo</cstring>
</property> </property>
@ -178,7 +178,7 @@
</spacer> </spacer>
</hbox> </hbox>
</widget> </widget>
<widget class="QLabel" row="1" column="1"> <widget class="TQLabel" row="1" column="1">
<property name="name"> <property name="name">
<cstring>textLabel2_2</cstring> <cstring>textLabel2_2</cstring>
</property> </property>
@ -240,7 +240,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLayoutWidget" row="8" column="0" rowspan="1" colspan="3"> <widget class="TQLayoutWidget" row="8" column="0" rowspan="1" colspan="3">
<property name="name"> <property name="name">
<cstring>layout11</cstring> <cstring>layout11</cstring>
</property> </property>
@ -248,7 +248,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="4" column="3"> <widget class="TQLabel" row="4" column="3">
<property name="name"> <property name="name">
<cstring>cpuLabel</cstring> <cstring>cpuLabel</cstring>
</property> </property>
@ -259,7 +259,7 @@
<set>AlignVCenter|AlignLeft</set> <set>AlignVCenter|AlignLeft</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="3"> <widget class="TQLabel" row="0" column="3">
<property name="name"> <property name="name">
<cstring>kdeLabel</cstring> <cstring>kdeLabel</cstring>
</property> </property>
@ -338,7 +338,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel" row="2" column="1"> <widget class="TQLabel" row="2" column="1">
<property name="name"> <property name="name">
<cstring>textLabel5</cstring> <cstring>textLabel5</cstring>
</property> </property>
@ -354,7 +354,7 @@
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="3"> <widget class="TQLabel" row="2" column="3">
<property name="name"> <property name="name">
<cstring>systemLabel</cstring> <cstring>systemLabel</cstring>
</property> </property>
@ -416,7 +416,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel" row="4" column="1"> <widget class="TQLabel" row="4" column="1">
<property name="name"> <property name="name">
<cstring>textLabel1_2</cstring> <cstring>textLabel1_2</cstring>
</property> </property>
@ -500,7 +500,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel" row="0" column="1"> <widget class="TQLabel" row="0" column="1">
<property name="name"> <property name="name">
<cstring>textLabel3</cstring> <cstring>textLabel3</cstring>
</property> </property>
@ -535,7 +535,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLayoutWidget" row="6" column="0" rowspan="1" colspan="3"> <widget class="TQLayoutWidget" row="6" column="0" rowspan="1" colspan="3">
<property name="name"> <property name="name">
<cstring>layout5</cstring> <cstring>layout5</cstring>
</property> </property>
@ -560,7 +560,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonDownload</cstring> <cstring>buttonDownload</cstring>
</property> </property>
@ -601,7 +601,7 @@
</spacer> </spacer>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget" row="4" column="0" rowspan="1" colspan="3"> <widget class="TQLayoutWidget" row="4" column="0" rowspan="1" colspan="3">
<property name="name"> <property name="name">
<cstring>layout8</cstring> <cstring>layout8</cstring>
</property> </property>
@ -609,7 +609,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
@ -620,7 +620,7 @@
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>versionLabel</cstring> <cstring>versionLabel</cstring>
</property> </property>
@ -633,7 +633,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget" row="3" column="0" rowspan="1" colspan="3"> <widget class="TQLayoutWidget" row="3" column="0" rowspan="1" colspan="3">
<property name="name"> <property name="name">
<cstring>layout10</cstring> <cstring>layout10</cstring>
</property> </property>
@ -641,7 +641,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>

@ -1,12 +1,12 @@
#include "colordialog.h" #include "colordialog.h"
#include <qlabel.h> #include <tqlabel.h>
#include <qdir.h> #include <tqdir.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qpainter.h> #include <tqpainter.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qstyle.h> #include <tqstyle.h>
#include <kglobal.h> #include <kglobal.h>
#include <kglobalsettings.h> #include <kglobalsettings.h>
#include <kcolordialog.h> #include <kcolordialog.h>
@ -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 ( G < 0 ) G = 0; else if ( G > 255 ) G = 255; \
if ( B < 0 ) B = 0; else if ( B > 255 ) B = 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); TQVBoxLayout *vertical = new TQVBoxLayout(this);
QHBoxLayout *top = new QHBoxLayout(vertical); TQHBoxLayout *top = new TQHBoxLayout(vertical);
demo = new DemoWindow(this); demo = new DemoWindow(this);
top->addWidget(demo); top->addWidget(demo);
QVBoxLayout *topRight = new QVBoxLayout(top); TQVBoxLayout *topRight = new TQVBoxLayout(top);
QLabel *info = new QLabel("<qt>Select custom colors or grab directly from screen.<br>Click image left to switch between items.</qt>",this); TQLabel *info = new TQLabel("<qt>Select custom colors or grab directly from screen.<br>Click image left to switch between items.</qt>",this);
topRight->addWidget(info); topRight->addWidget(info);
QIconSet icon = KGlobal::iconLoader()->loadIconSet("colorpicker", KIcon::Small); TQIconSet icon = KGlobal::iconLoader()->loadIconSet("colorpicker", KIcon::Small);
buttonCP = new QPushButton(icon, QString::null, this); buttonCP = new TQPushButton(icon, TQString::null, this);
topRight->addWidget(buttonCP); topRight->addWidget(buttonCP);
QLabel *lb = new QLabel("From other app:",this); TQLabel *lb = new TQLabel("From other app:",this);
topRight->addWidget(lb); topRight->addWidget(lb);
other = new QComboBox(this); other = new TQComboBox(this);
topRight->addWidget(other); topRight->addWidget(other);
topRight->addStretch(); topRight->addStretch();
buttonOk = new QPushButton("&Ok", this); buttonOk = new TQPushButton("&Ok", this);
topRight->addWidget(buttonOk); topRight->addWidget(buttonOk);
buttonCancel = new QPushButton("&Cancel", this); buttonCancel = new TQPushButton("&Cancel", this);
topRight->addWidget(buttonCancel); topRight->addWidget(buttonCancel);
const char *title[NUMCOLORS] = {"Background", "Button", "Base", "Text", "Highlight", "Highlighted Text", "Button Text", "Alternate Background"}; const char *title[NUMCOLORS] = {"Background", "Button", "Base", "Text", "Highlight", "Highlighted Text", "Button Text", "Alternate Background"};
for (int i = 0; i < NUMCOLORS; i++) for (int i = 0; i < NUMCOLORS; i++)
{ {
picker[i] = new ColorPicker(this, title[i]); picker[i] = new ColorPicker(this, title[i]);
vertical->addWidget(picker[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(); picker[i]->hide();
} }
for (int i = 0; i < NUMCOLORS; i++) 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 (buttonOk, SIGNAL(clicked()), this, SLOT(close()));
connect (buttonCP, SIGNAL(clicked()), this, SLOT(grabColor())); connect (buttonCP, SIGNAL(clicked()), this, SLOT(grabColor()));
connect (buttonCancel, SIGNAL(clicked()), this, SLOT(close())); 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() ColorDialog::~ColorDialog()
@ -93,21 +93,21 @@ ColorDialog::~ColorDialog()
void ColorDialog::show() void ColorDialog::show()
{ {
other->clear(); 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()) if (d.exists())
{ {
for ( uint i = 0; i < d.count(); i++ ) for ( uint i = 0; i < d.count(); i++ )
other->insertItem(d[i]); other->insertItem(d[i]);
} }
QDialog::show(); TQDialog::show();
demo->show(); demo->show();
// demo->repaint(false); // demo->repaint(false);
} }
void ColorDialog::getFromOther( const QString & string ) void ColorDialog::getFromOther( const TQString & string )
{ {
FILE *file = NULL; FILE *file = NULL;
QString tmpString = QDir::homeDirPath() + "/.baghira/" + string; TQString tmpString = TQDir::homeDirPath() + "/.baghira/" + string;
if( (file = fopen(tmpString.latin1(), "r")) != NULL ) if( (file = fopen(tmpString.latin1(), "r")) != NULL )
{ {
uint k; uint k;
@ -119,7 +119,7 @@ void ColorDialog::getFromOther( const QString & string )
for (int i = 0; i < NUMCOLORS; i++) for (int i = 0; i < NUMCOLORS; i++)
{ {
picker[i]->blockSignals(true); 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); picker[i]->blockSignals(false);
} }
demo->repaint(false); demo->repaint(false);
@ -133,7 +133,7 @@ void ColorDialog::grabColor()
grabKeyboard(); grabKeyboard();
} }
void ColorDialog::mouseReleaseEvent(QMouseEvent* me) void ColorDialog::mouseReleaseEvent(TQMouseEvent* me)
{ {
if (gettingColorFromScreen) if (gettingColorFromScreen)
{ {
@ -150,38 +150,38 @@ void ColorDialog::mouseReleaseEvent(QMouseEvent* me)
} }
} }
else 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 qInitImages_baghira();
//extern void qCleanupImages_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; colorDialog_ = parent;
setFixedSize(320,120); setFixedSize(320,120);
pm = new QPixmap(320,120); pm = new TQPixmap(320,120);
pp = new QPainter(); pp = new TQPainter();
p = new QPainter(); p = new TQPainter();
(const_cast<QFont*>(&p->font()))->setPixelSize(16); (const_cast<TQFont*>(&p->font()))->setPixelSize(16);
baseRect = QRect(20, 10, 200, 100); baseRect = TQRect(20, 10, 200, 100);
buttonRect = QRect(230, 90, 37, 21); buttonRect = TQRect(230, 90, 37, 21);
buttonTextRect = QRect(236, 91, 20, 18); buttonTextRect = TQRect(236, 91, 20, 18);
highlightRect = QRect(21, 42, 198, 22); highlightRect = TQRect(21, 42, 198, 22);
textRect = QRect(25, 21, 100, 18); textRect = TQRect(25, 21, 100, 18);
highTextRect = QRect(25, 42, 120, 22); highTextRect = TQRect(25, 42, 120, 22);
alternateRect = QRect(21, 86, 198, 22); alternateRect = TQRect(21, 86, 198, 22);
baseImage = uic_findImage("button-base"); baseImage = uic_findImage("button-base");
dest = QImage( baseImage.width(), baseImage.height(), 32 ); dest = TQImage( baseImage.width(), baseImage.height(), 32 );
dest.setAlphaBuffer( true ); dest.setAlphaBuffer( true );
} }
DemoWindow::~DemoWindow(){} DemoWindow::~DemoWindow(){}
void DemoWindow::mousePressEvent ( QMouseEvent * me ) void DemoWindow::mousePressEvent ( TQMouseEvent * me )
{ {
for (int i = 0; i < NUMCOLORS; i++) for (int i = 0; i < NUMCOLORS; i++)
colorDialog_->picker[i]->hide(); colorDialog_->picker[i]->hide();
@ -204,23 +204,23 @@ void DemoWindow::mousePressEvent ( QMouseEvent * me )
colorDialog_->picker[Back]->show(); colorDialog_->picker[Back]->show();
} }
void DemoWindow::paintEvent ( QPaintEvent * ) void DemoWindow::paintEvent ( TQPaintEvent * )
{ {
pp->begin(pm); pp->begin(pm);
pp->fillRect(0,0,pm->width(),pm->height(), colorDialog_->picker[Back]->color()); 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(baseRect, colorDialog_->picker[Base]->color());
pp->fillRect(highlightRect, colorDialog_->picker[High]->color()); pp->fillRect(highlightRect, colorDialog_->picker[High]->color());
pp->fillRect(alternateRect, colorDialog_->picker[Alternate]->color()); pp->fillRect(alternateRect, colorDialog_->picker[Alternate]->color());
pp->setPen ( colorDialog_->picker[Text]->color() ); pp->setPen ( colorDialog_->picker[Text]->color() );
pp->drawText ( textRect, Qt::AlignAuto | Qt::AlignVCenter, "Common Text"); pp->drawText ( textRect, TQt::AlignAuto | TQt::AlignVCenter, "Common Text");
pp->drawText ( alternateRect, Qt::AlignAuto | Qt::AlignVCenter, "Alt. Background"); pp->drawText ( alternateRect, TQt::AlignAuto | TQt::AlignVCenter, "Alt. Background");
pp->setPen ( colorDialog_->picker[HighText]->color() ); 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->drawPixmap(buttonRect, tintButton(baseImage, colorDialog_->picker[Button]->color()));
pp->setPen ( colorDialog_->picker[ButText]->color() ); pp->setPen ( colorDialog_->picker[ButText]->color() );
pp->drawText ( buttonTextRect, Qt::AlignCenter, "B"); pp->drawText ( buttonTextRect, TQt::AlignCenter, "B");
style().drawPrimitive( QStyle::PE_PanelLineEdit, pp, baseRect, colorGroup()); style().drawPrimitive( TQStyle::PE_PanelLineEdit, pp, baseRect, colorGroup());
pp->end(); pp->end();
p->begin(this); p->begin(this);
p->drawPixmap(0,0, *pm); p->drawPixmap(0,0, *pm);
@ -231,49 +231,49 @@ void DemoWindow::smartRepaint()
{ {
if (colorDialog_->picker[Back]->isShown()) if (colorDialog_->picker[Back]->isShown())
{ {
QWidget::repaint(false); TQWidget::repaint(false);
return; return;
} }
if (colorDialog_->picker[Button]->isShown()) if (colorDialog_->picker[Button]->isShown())
{ {
QWidget::repaint(buttonRect, false); TQWidget::repaint(buttonRect, false);
return; return;
} }
if (colorDialog_->picker[Base]->isShown()) if (colorDialog_->picker[Base]->isShown())
{ {
QWidget::repaint(false); TQWidget::repaint(false);
return; return;
} }
if (colorDialog_->picker[Text]->isShown()) if (colorDialog_->picker[Text]->isShown())
{ {
QWidget::repaint(textRect, false); TQWidget::repaint(textRect, false);
return; return;
} }
if (colorDialog_->picker[High]->isShown()) if (colorDialog_->picker[High]->isShown())
{ {
QWidget::repaint(highlightRect, false); TQWidget::repaint(highlightRect, false);
return; return;
} }
if (colorDialog_->picker[HighText]->isShown()) if (colorDialog_->picker[HighText]->isShown())
{ {
QWidget::repaint(highTextRect, false); TQWidget::repaint(highTextRect, false);
return; return;
} }
if (colorDialog_->picker[Alternate]->isShown()) if (colorDialog_->picker[Alternate]->isShown())
{ {
QWidget::repaint(alternateRect, false); TQWidget::repaint(alternateRect, false);
return; return;
} }
if (colorDialog_->picker[ButText]->isShown()) if (colorDialog_->picker[ButText]->isShown())
{ {
QWidget::repaint(buttonTextRect, false); TQWidget::repaint(buttonTextRect, false);
return; 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 *data = ( unsigned int * ) src.bits();
unsigned int *destData = ( unsigned int* ) dest.bits(); unsigned int *destData = ( unsigned int* ) dest.bits();
int total = src.width() * src.height(); 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); int sq = CLAMP((int)((45.0/128.0)*s+55),0,100);
// float srcPercent, destPercent; // float srcPercent, destPercent;
for ( int current = 0 ; current < total ; ++current ) { for ( int current = 0 ; current < total ; ++current ) {
alpha = qAlpha( data[ current ] ); alpha = tqAlpha( data[ current ] );
blue = qBlue( data[ current ] ); blue = tqBlue( data[ current ] );
red = qRed( data[ current ] ); red = tqRed( data[ current ] );
green = qGreen( data[ current ] ); green = tqGreen( data[ current ] );
SATURATION_COLOR2(sq, red, green, blue); SATURATION_COLOR2(sq, red, green, blue);
// force back to valid colorspace ! // force back to valid colorspace !
COLOR_SPACE(destR, destG, destB); COLOR_SPACE(destR, destG, destB);
destData[ current ] = qRgba( destR, destG, destB, alpha ); destData[ current ] = tqRgba( destR, destG, destB, alpha );
} }
return ( dest ); return ( dest );
} }

@ -1,21 +1,21 @@
#ifndef COLORDIALOG_H #ifndef COLORDIALOG_H
#define COLORDIALOG_H #define COLORDIALOG_H
#include <qdialog.h> #include <tqdialog.h>
#include <qrect.h> #include <tqrect.h>
#include <qimage.h> #include <tqimage.h>
class QPushButton; class TQPushButton;
class QComboBox; class TQComboBox;
class QGroupBox; class TQGroupBox;
class QPainter; class TQPainter;
class ColorDialog; class ColorDialog;
class QImage; class TQImage;
class QPixmap; class TQPixmap;
enum Colors { Back = 0, Button, Base, Text, High, HighText, ButText, Alternate, NUMCOLORS }; enum Colors { Back = 0, Button, Base, Text, High, HighText, ButText, Alternate, NUMCOLORS };
class DemoWindow : public QWidget class DemoWindow : public TQWidget
{ {
Q_OBJECT Q_OBJECT
@ -27,26 +27,26 @@ private slots:
void smartRepaint(); void smartRepaint();
protected: protected:
void mousePressEvent ( QMouseEvent * e ); void mousePressEvent ( TQMouseEvent * e );
void paintEvent ( QPaintEvent * ); void paintEvent ( TQPaintEvent * );
private: private:
QPainter *p; TQPainter *p;
QPainter *pp; TQPainter *pp;
QPixmap *pm; TQPixmap *pm;
ColorDialog* colorDialog_; ColorDialog* colorDialog_;
QRect baseRect; TQRect baseRect;
QRect buttonRect; TQRect buttonRect;
QRect buttonTextRect; TQRect buttonTextRect;
QRect highlightRect; TQRect highlightRect;
QRect textRect; TQRect textRect;
QRect highTextRect; TQRect highTextRect;
QRect alternateRect; TQRect alternateRect;
QImage baseImage; TQImage baseImage;
QImage dest; TQImage dest;
private: private:
QImage & tintButton(QImage &src, QColor & c); TQImage & tintButton(TQImage &src, TQColor & c);
signals: signals:
void selected(Colors c); void selected(Colors c);
@ -55,35 +55,35 @@ signals:
class ColorPicker; class ColorPicker;
class ColorDialog : public QDialog class ColorDialog : public TQDialog
{ {
friend class DemoWindow; friend class DemoWindow;
friend class AppSetter; friend class AppSetter;
Q_OBJECT Q_OBJECT
public: public:
ColorDialog( QWidget* parent = 0, const char* name = 0); ColorDialog( TQWidget* parent = 0, const char* name = 0);
~ColorDialog(); ~ColorDialog();
QPushButton *buttonOk; TQPushButton *buttonOk;
QPushButton *buttonCancel; TQPushButton *buttonCancel;
void show(); void show();
protected: protected:
ColorPicker *picker[NUMCOLORS]; ColorPicker *picker[NUMCOLORS];
void mouseReleaseEvent(QMouseEvent* me); void mouseReleaseEvent(TQMouseEvent* me);
DemoWindow *demo; DemoWindow *demo;
private: private:
QPushButton *buttonCP; TQPushButton *buttonCP;
bool gettingColorFromScreen; bool gettingColorFromScreen;
QComboBox *other; TQComboBox *other;
private slots: private slots:
void grabColor(); void grabColor();
void getFromOther( const QString & string ); void getFromOther( const TQString & string );
signals: signals:
void colorChanged(QColor color); void colorChanged(TQColor color);
}; };

@ -1,16 +1,16 @@
#include "colorpicker.h" #include "colorpicker.h"
#include <qcolor.h> #include <tqcolor.h>
#include <qlayout.h> #include <tqlayout.h>
#include <knuminput.h> #include <knuminput.h>
ColorPicker::ColorPicker(QWidget* parent, const char* name) : QGroupBox( parent, name) ColorPicker::ColorPicker(TQWidget* parent, const char* name) : TQGroupBox( parent, name)
{ {
setTitle(name); setTitle(name);
setColumnLayout(0, Qt::Vertical ); setColumnLayout(0, TQt::Vertical );
layout()->setSpacing( 6 ); layout()->setSpacing( 6 );
layout()->setMargin( 11 ); layout()->setMargin( 11 );
QVBoxLayout *vLayout = new QVBoxLayout(layout()); TQVBoxLayout *vLayout = new TQVBoxLayout(layout());
red = new KIntNumInput(this, "red"); red = new KIntNumInput(this, "red");
red->setRange(0, 255, 1, true); red->setRange(0, 255, 1, true);
@ -35,10 +35,10 @@ ColorPicker::~ColorPicker()
void ColorPicker::emitChange() 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() ); red->setValue( color.red() );
green->setValue( color.green() ); green->setValue( color.green() );
@ -49,24 +49,24 @@ void ColorPicker::setColor(const QColor & color)
void ColorPicker::setRed(int r) void ColorPicker::setRed(int r)
{ {
red->setValue( 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) void ColorPicker::setGreen(int g)
{ {
green->setValue( 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) void ColorPicker::setBlue(int b)
{ {
blue->setValue( 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__; return color__;
} }

@ -1,22 +1,22 @@
#ifndef COLORPICKER_H #ifndef COLORPICKER_H
#define COLORPICKER_H #define COLORPICKER_H
#include <qgroupbox.h> #include <tqgroupbox.h>
class KIntNumInput; class KIntNumInput;
class QColor; class TQColor;
class ColorPicker : public QGroupBox class ColorPicker : public TQGroupBox
{ {
Q_OBJECT Q_OBJECT
public: public:
ColorPicker( QWidget* parent = 0, const char* name = 0); ColorPicker( TQWidget* parent = 0, const char* name = 0);
~ColorPicker(); ~ColorPicker();
QColor & color(); TQColor & color();
public slots: public slots:
void setColor(const QColor & color); void setColor(const TQColor & color);
void setRed(int red); void setRed(int red);
void emitChange(); void emitChange();
void setGreen(int green); void setGreen(int green);
@ -28,11 +28,11 @@ protected:
KIntNumInput *red; KIntNumInput *red;
KIntNumInput *green; KIntNumInput *green;
KIntNumInput *blue; KIntNumInput *blue;
QColor color_; TQColor color_;
QColor color__; TQColor color__;
signals: signals:
void colorChanged(QColor color); void colorChanged(TQColor color);
}; };

File diff suppressed because it is too large Load Diff

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>Help</class> <class>Help</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>Help</cstring> <cstring>Help</cstring>
</property> </property>
@ -36,7 +36,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget" row="1" column="0"> <widget class="TQLayoutWidget" row="1" column="0">
<property name="name"> <property name="name">
<cstring>layout2</cstring> <cstring>layout2</cstring>
</property> </property>
@ -61,7 +61,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>closeButton</cstring> <cstring>closeButton</cstring>
</property> </property>
@ -71,11 +71,11 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QTabWidget" row="0" column="0"> <widget class="TQTabWidget" row="0" column="0">
<property name="name"> <property name="name">
<cstring>tabWidget2</cstring> <cstring>tabWidget2</cstring>
</property> </property>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>tab</cstring> <cstring>tab</cstring>
</property> </property>
@ -86,7 +86,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget" row="1" column="0"> <widget class="TQLayoutWidget" row="1" column="0">
<property name="name"> <property name="name">
<cstring>layout3</cstring> <cstring>layout3</cstring>
</property> </property>
@ -111,7 +111,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>startBAB</cstring> <cstring>startBAB</cstring>
</property> </property>
@ -171,7 +171,7 @@ c) BAB is also a DCOP interface to the Baghira Style and Windeco</string>
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>tab</cstring> <cstring>tab</cstring>
</property> </property>
@ -194,7 +194,7 @@ To see, which functions are provided by bab (the list will probably grow), open
&lt;i&gt;&lt;b&gt;dcop bab default&lt;/b&gt;&lt;/i&gt;&lt;br&gt; &lt;i&gt;&lt;b&gt;dcop bab default&lt;/b&gt;&lt;/i&gt;&lt;br&gt;
&lt;br&gt; &lt;br&gt;
The most interesting function is&lt;br&gt;&lt;br&gt; The most interesting function is&lt;br&gt;&lt;br&gt;
&lt;i&gt;&lt;b&gt;start(QString name,QString settings)&lt;/b&gt;&lt;/i&gt;&lt;br&gt; &lt;i&gt;&lt;b&gt;start(TQString name,TQString settings)&lt;/b&gt;&lt;/i&gt;&lt;br&gt;
&lt;br&gt; &lt;br&gt;
use it like:&lt;br&gt;&lt;br&gt; use it like:&lt;br&gt;&lt;br&gt;
&lt;i&gt;&lt;b&gt;start &amp;lt;appName&amp;gt; &amp;lt;design&amp;gt;&lt;/b&gt;&lt;/i&gt;&lt;br&gt;&lt;br&gt; &lt;i&gt;&lt;b&gt;start &amp;lt;appName&amp;gt; &amp;lt;design&amp;gt;&lt;/b&gt;&lt;/i&gt;&lt;br&gt;&lt;br&gt;
@ -203,7 +203,7 @@ where &lt;i&gt;&lt;b&gt;&amp;lt;appName&amp;gt;&lt;/b&gt;&lt;/i&gt; is the (KDE)
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>tab</cstring> <cstring>tab</cstring>
</property> </property>
@ -233,7 +233,7 @@ where &lt;i&gt;&lt;b&gt;&amp;lt;appName&amp;gt;&lt;/b&gt;&lt;/i&gt; is the (KDE)
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>tab</cstring> <cstring>tab</cstring>
</property> </property>
@ -267,7 +267,7 @@ and&lt;br&gt;
for hosting the Project</string> for hosting the Project</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>

@ -18,28 +18,28 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/ ***************************************************************************/
#include <qdesktopwidget.h> #include <tqdesktopwidget.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qdir.h> #include <tqdir.h>
#include <qfile.h> #include <tqfile.h>
#include <qfileinfo.h> #include <tqfileinfo.h>
#include <qgroupbox.h> #include <tqgroupbox.h>
#include <kfiledialog.h> #include <kfiledialog.h>
#include <qpainter.h> #include <tqpainter.h>
//#include <qpalette.h> //#include <tqpalette.h>
// #include <qsettings.h> // #include <tqsettings.h>
#include <qslider.h> #include <tqslider.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qlineedit.h> #include <tqlineedit.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <klistview.h> #include <klistview.h>
#include <qtabwidget.h> #include <tqtabwidget.h>
#include <qtimer.h> #include <tqtimer.h>
#include <dcopclient.h> #include <dcopclient.h>
#include <kapplication.h> #include <kapplication.h>
#include <kcolorbutton.h> #include <kcolorbutton.h>
@ -69,8 +69,8 @@
#ifndef KDE_VERSION_STRING #ifndef KDE_VERSION_STRING
#define KDE_VERSION_STRING "error" #define KDE_VERSION_STRING "error"
#endif #endif
#ifndef QT_BUILD_KEY #ifndef TQT_BUILD_KEY
#define QT_BUILD_KEY "error error error error" #define TQT_BUILD_KEY "error error error error"
#endif #endif
#define CLAMP(x,l,u) x < l ? l :\ #define CLAMP(x,l,u) x < l ? l :\
@ -103,14 +103,14 @@
void kstyle_baghira_config::openHtml1() void kstyle_baghira_config::openHtml1()
{ {
QStringList args; TQStringList args;
args << "exec" << "http://baghira.sf.net/"; args << "exec" << "http://baghira.sf.net/";
kapp->kdeinitExec("kfmclient", args); kapp->kdeinitExec("kfmclient", args);
} }
void kstyle_baghira_config::openHtml2() void kstyle_baghira_config::openHtml2()
{ {
QStringList args; TQStringList args;
args << "exec" << "http://www.sf.net/projects/baghira/files/"; args << "exec" << "http://www.sf.net/projects/baghira/files/";
kapp->kdeinitExec("kfmclient", args); kapp->kdeinitExec("kfmclient", args);
} }
@ -125,9 +125,9 @@ void kstyle_baghira_config::startKRuler()
kapp->kdeinitExec("kruler"); 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 ); dest->setAlphaBuffer( true );
unsigned int *data = ( unsigned int * ) src.bits(); unsigned int *data = ( unsigned int * ) src.bits();
unsigned int *destData = ( unsigned int* ) dest->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); int sq = CLAMP((int)((45.0/128.0)*s+55),0,100);
// float srcPercent, destPercent; // float srcPercent, destPercent;
for ( int current = 0 ; current < total ; ++current ) { for ( int current = 0 ; current < total ; ++current ) {
alpha = qAlpha( data[ current ] ); alpha = tqAlpha( data[ current ] );
blue = qBlue( data[ current ] ); blue = tqBlue( data[ current ] );
red = qRed( data[ current ] ); red = tqRed( data[ current ] );
green = qGreen( data[ current ] ); green = tqGreen( data[ current ] );
SATURATION_COLOR2(sq, red, green, blue); SATURATION_COLOR2(sq, red, green, blue);
// force back to valid colorspace ! // force back to valid colorspace !
COLOR_SPACE(destR, destG, destB); COLOR_SPACE(destR, destG, destB);
destData[ current ] = qRgba( destR, destG, destB, alpha ); destData[ current ] = tqRgba( destR, destG, destB, alpha );
} }
return ( dest ); 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 *data = ( unsigned int * ) img.bits();
unsigned int *destData = ( unsigned int* ) dest->bits(); unsigned int *destData = ( unsigned int* ) dest->bits();
int total = img.width() * img.height(); int total = img.width() * img.height();
@ -172,14 +172,14 @@ QImage* kstyle_baghira_config::tintBrush( QImage &img, QColor c)
// float srcPercent, destPercent; // float srcPercent, destPercent;
for ( current = 0 ; current < total ; ++current ) { for ( current = 0 ; current < total ; ++current ) {
alpha = qAlpha( data[ current ] ); alpha = tqAlpha( data[ current ] );
blue = qBlue( data[ current ] ); blue = tqBlue( data[ current ] );
red = qRed( data[ current ] ); red = tqRed( data[ current ] );
green = qGreen( data[ current ] ); green = tqGreen( data[ current ] );
SATURATION_COLOR(red, green, blue); SATURATION_COLOR(red, green, blue);
// force back to valid colorspace ! // force back to valid colorspace !
COLOR_SPACE(destR, destG, destB); COLOR_SPACE(destR, destG, destB);
destData[ current ] = qRgba( destR, destG, destB, alpha ); destData[ current ] = tqRgba( destR, destG, destB, alpha );
} }
return ( dest ); return ( dest );
} }
@ -188,7 +188,7 @@ void kstyle_baghira_config::sliderButtonRedChanged(int value)
{ {
sliderButtonRedValue = value; sliderButtonRedValue = value;
dialog_->valueButtonRed->setNum(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); dialog_->pixmapButtonPreview->repaint(false);
configChanged(); configChanged();
} }
@ -197,7 +197,7 @@ void kstyle_baghira_config::sliderButtonGreenChanged(int value)
{ {
sliderButtonGreenValue = value; sliderButtonGreenValue = value;
dialog_->valueButtonGreen->setNum(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); dialog_->pixmapButtonPreview->repaint(false);
configChanged(); configChanged();
} }
@ -206,7 +206,7 @@ void kstyle_baghira_config::sliderButtonBlueChanged(int value)
{ {
sliderButtonBlueValue = value; sliderButtonBlueValue = value;
dialog_->valueButtonBlue->setNum(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); dialog_->pixmapButtonPreview->repaint(false);
configChanged(); configChanged();
} }
@ -214,7 +214,7 @@ void kstyle_baghira_config::sliderButtonBlueChanged(int value)
void kstyle_baghira_config::sliderBrushRedChanged(int value) void kstyle_baghira_config::sliderBrushRedChanged(int value)
{ {
sliderBrushRedValue = 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); dialog_->pixmapBrushPreview->repaint(false);
configChanged(); configChanged();
} }
@ -222,7 +222,7 @@ void kstyle_baghira_config::sliderBrushRedChanged(int value)
void kstyle_baghira_config::sliderBrushGreenChanged(int value) void kstyle_baghira_config::sliderBrushGreenChanged(int value)
{ {
sliderBrushGreenValue = 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); dialog_->pixmapBrushPreview->repaint(false);
configChanged(); configChanged();
} }
@ -230,7 +230,7 @@ void kstyle_baghira_config::sliderBrushGreenChanged(int value)
void kstyle_baghira_config::sliderBrushBlueChanged(int value) void kstyle_baghira_config::sliderBrushBlueChanged(int value)
{ {
sliderBrushBlueValue = 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); dialog_->pixmapBrushPreview->repaint(false);
configChanged(); configChanged();
} }
@ -238,7 +238,7 @@ void kstyle_baghira_config::sliderBrushBlueChanged(int value)
// void kstyle_baghira_config::sliderBrushSaturationChanged(int value) // void kstyle_baghira_config::sliderBrushSaturationChanged(int value)
// { // {
// sliderBrushSaturationValue = 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); // dialog_->pixmapBrushPreview->repaint(false);
// emit changed(true); // emit changed(true);
// } // }
@ -255,10 +255,10 @@ int presetColor[NUMBEROFCOLORS][3] = {{84,144,218},{130,170,190},{103,118,134},{
// -------------------------------- // --------------------------------
typedef KGenericFactory<kstyle_baghira_config, QWidget> kstyle_baghira_configFactory; typedef KGenericFactory<kstyle_baghira_config, TQWidget> kstyle_baghira_configFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kstyle_baghira_config, kstyle_baghira_configFactory("kcmkstyle_baghira_config")) 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 qInitImages_baghira();
//extern void qCleanupImages_baghira(); //extern void qCleanupImages_baghira();
@ -284,35 +284,35 @@ void kstyle_baghira_config::showAbout()
about_->exec(); 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; loadDone = false;
if (parent) parent->setCaption("Configure Your Cat"); if (parent) parent->setCaption("Configure Your Cat");
QVBoxLayout *layout = new QVBoxLayout(this); TQVBoxLayout *layout = new TQVBoxLayout(this);
dialog_ = new Config(this); dialog_ = new Config(this);
for (int i = 0; i < NUMBEROFCOLORS; i++) for (int i = 0; i < NUMBEROFCOLORS; i++)
dialog_->colorPresets->insertItem ( presetColorName[i], i ); dialog_->colorPresets->insertItem ( presetColorName[i], i );
QWidget *rulesWidget = new QWidget(dialog_->tabWidget); TQWidget *rulesWidget = new TQWidget(dialog_->tabWidget);
QHBoxLayout *rwlh = new QHBoxLayout(rulesWidget); TQHBoxLayout *rwlh = new TQHBoxLayout(rulesWidget);
applist = new KListView(rulesWidget); applist = new KListView(rulesWidget);
applist->setFullWidth(true); applist->setFullWidth(true);
#if KDE_IS_VERSION(3,3,91) #if KDE_IS_VERSION(3,3,91)
applist->setShadeSortColumn(false); applist->setShadeSortColumn(false);
#endif #endif
applist->setAllColumnsShowFocus( true ); applist->setAllColumnsShowFocus( true );
applist->setSelectionMode(QListView::Single); applist->setSelectionMode(TQListView::Single);
applist->addColumn ( i18n("Name") ); applist->addColumn ( i18n("Name") );
applist->addColumn ( i18n("Links to") ); 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()) if (!d.exists())
d.mkdir(QDir::homeDirPath() + "/.baghira"); d.mkdir(TQDir::homeDirPath() + "/.baghira");
else else
{ {
for ( uint i = 0; i < d.count(); i++ ) for ( uint i = 0; i < d.count(); i++ )
{ {
QFileInfo FI = QFileInfo(d, d[i]); TQFileInfo FI = TQFileInfo(d, d[i]);
if (FI.isSymLink()) if (FI.isSymLink())
applist->insertItem(new KListViewItem(applist, d[i], FI.readLink().section('/',-1,-1))); applist->insertItem(new KListViewItem(applist, d[i], FI.readLink().section('/',-1,-1)));
else else
@ -321,27 +321,27 @@ kstyle_baghira_config::kstyle_baghira_config(QWidget *parent, const char *name,
} }
rwlh->addWidget(applist); rwlh->addWidget(applist);
// rwlh->addLayout(rwlv); // rwlh->addLayout(rwlv);
QVBoxLayout *rwlv = new QVBoxLayout(rwlh); TQVBoxLayout *rwlv = new TQVBoxLayout(rwlh);
rwlv->addStretch(); rwlv->addStretch();
QPushButton *btnNew = new QPushButton("New...", rulesWidget); TQPushButton *btnNew = new TQPushButton("New...", rulesWidget);
QPushButton *btnEdit = new QPushButton("Edit...", rulesWidget); TQPushButton *btnEdit = new TQPushButton("Edit...", rulesWidget);
QPushButton *btnDel = new QPushButton("Remove", rulesWidget); TQPushButton *btnDel = new TQPushButton("Remove", rulesWidget);
QPushButton *btnDet = new QPushButton("Detect", rulesWidget); TQPushButton *btnDet = new TQPushButton("Detect", rulesWidget);
rwlv->addWidget(btnNew); rwlv->addWidget(btnNew);
rwlv->addWidget(btnEdit); rwlv->addWidget(btnEdit);
rwlv->addWidget(btnDel); rwlv->addWidget(btnDel);
rwlv->addSpacing( 5 ); rwlv->addSpacing( 5 );
rwlv->addWidget(btnDet); rwlv->addWidget(btnDet);
rwlv->addStretch(); rwlv->addStretch();
dialog_->tabWidget->addTab( rulesWidget, QString("Rules") ); dialog_->tabWidget->addTab( rulesWidget, TQString("Rules") );
appsetter = new AppSetter(this); appsetter = new AppSetter(this);
connect(btnNew, SIGNAL(clicked()), appsetter, SLOT(show())); connect(btnNew, SIGNAL(clicked()), appsetter, SLOT(show()));
connect(btnEdit, SIGNAL(clicked()), this, SLOT(editApp())); 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(btnDel, SIGNAL(clicked()), this, SLOT(removeApp()));
connect(btnDet, SIGNAL(clicked()), this, SLOT(selectWindow())); connect(btnDet, SIGNAL(clicked()), this, SLOT(selectWindow()));
connect(appsetter, SIGNAL(addApp(QString, QString)), this, SLOT(addApp(QString, QString))); connect(appsetter, SIGNAL(addApp(TQString, TQString)), this, SLOT(addApp(TQString, TQString)));
connect(appsetter, SIGNAL(removeApp(QString)), this, SLOT(removeApp(QString))); connect(appsetter, SIGNAL(removeApp(TQString)), this, SLOT(removeApp(TQString)));
// preview stuff // preview stuff
baseImage = uic_findImage("button-base"); baseImage = uic_findImage("button-base");
@ -356,9 +356,9 @@ kstyle_baghira_config::kstyle_baghira_config(QWidget *parent, const char *name,
crNotes[0] = "<qt>© 2003-2005 by Thomas Lübking<br>http://baghira.SourceForge.net</qt>"; crNotes[0] = "<qt>© 2003-2005 by Thomas Lübking<br>http://baghira.SourceForge.net</qt>";
crNotes[1] = "<qt>© \"Design\" 2001-2005 by Apple inc.<br>http://www.apple.com"; crNotes[1] = "<qt>© \"Design\" 2001-2005 by Apple inc.<br>http://www.apple.com";
crNotes[2] = "<qt>© \"Milk\" 2002-2005 by Max Rudberg<br>http://www.maxthemes.com</qt>"; crNotes[2] = "<qt>© \"Milk\" 2002-2005 by Max Rudberg<br>http://www.maxthemes.com</qt>";
timer = new QTimer(); timer = new TQTimer();
connect( timer, SIGNAL(timeout()), this, SLOT(updateCR()) ); 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_->systemLabel->setText(tmpString.section(' ',1,1));
about_->cpuLabel->setText(tmpString.section(' ',0,0)); about_->cpuLabel->setText(tmpString.section(' ',0,0));
about_->setFixedSize (380, 430); 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_->drawMenuStripe, SIGNAL(stateChanged(int)), this, SLOT(configChanged()));
connect(dialog_->glossyMenus, 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_->customInactiveColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged()));
connect(dialog_->toolbuttonHighColor, SIGNAL(changed(const QColor &)), this, SLOT(changeTooluttonHighlightColor(const QColor &))); connect(dialog_->toolbuttonHighColor, SIGNAL(changed(const TQColor &)), this, SLOT(changeTooluttonHighlightColor(const TQColor &)));
connect(dialog_->treeLineColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); connect(dialog_->treeLineColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged()));
connect(dialog_->customExpanderColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); connect(dialog_->customExpanderColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged()));
connect(dialog_->menuTextColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); connect(dialog_->menuTextColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged()));
connect(dialog_->menuTextColorHigh, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); connect(dialog_->menuTextColorHigh, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged()));
connect(dialog_->menuColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); connect(dialog_->menuColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged()));
connect(dialog_->menuColorHigh, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); connect(dialog_->menuColorHigh, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged()));
connect(dialog_->menuColor2, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); connect(dialog_->menuColor2, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged()));
connect(dialog_->radioOffColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); connect(dialog_->radioOffColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged()));
connect(dialog_->radioOnColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); connect(dialog_->radioOnColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged()));
connect(dialog_->checkOffColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); connect(dialog_->checkOffColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged()));
connect(dialog_->checkOnColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); connect(dialog_->checkOnColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged()));
connect(dialog_->sliderColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); connect(dialog_->sliderColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged()));
connect(dialog_->hoverSliderColorColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); connect(dialog_->hoverSliderColorColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged()));
connect(dialog_->pressedSliderColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); connect(dialog_->pressedSliderColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged()));
connect(dialog_->inactiveTabColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); connect(dialog_->inactiveTabColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged()));
connect(dialog_->activeTabColor, SIGNAL(changed(const QColor &)), this, SLOT(configChanged())); connect(dialog_->activeTabColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged()));
connect(dialog_->menuStripeColor, SIGNAL(changed(const QColor &)), 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_->sliderButtonRed, SIGNAL(valueChanged (int)), this, SLOT(sliderButtonRedChanged(int)));
connect(dialog_->sliderButtonGreen, SIGNAL(valueChanged (int)), this, SLOT(sliderButtonGreenChanged(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(); load();
loadDone = true; 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() void kstyle_baghira_config::load()
{ {
QString tmpString = QDir::homeDirPath() + "/.qt/baghirarc"; TQString tmpString = TQDir::homeDirPath() + "/.qt/baghirarc";
load (tmpString); load (tmpString);
} }
void kstyle_baghira_config::load(QString &fileName) void kstyle_baghira_config::load(TQString &fileName)
{ {
KConfig *config = new KConfig(fileName); KConfig *config = new KConfig(fileName);
// QSettings config; // TQSettings config;
config->setGroup("BAB"); config->setGroup("BAB");
// general Design // general Design
dialog_->defaultStyle->setCurrentItem(config->readNumEntry("defaultState", 0 )); 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_->bevelHighlights->setChecked( config->readBoolEntry( "Design_BevelAsHighlight", true));
dialog_->colorMode->setCurrentItem(config->readNumEntry("Design_ButtonStyle", 0)); dialog_->colorMode->setCurrentItem(config->readNumEntry("Design_ButtonStyle", 0));
dialog_->inactiveColorType->setCurrentItem(config->readNumEntry( "Design_InactiveButtonStyle", 1)); 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)); dialog_->centerTabs->setChecked( config->readBoolEntry( "Design_CenterTabs", true));
// button color stuff // 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_->sliderButtonRed->setValue(sliderButtonRedValue = tmpColor.red());
dialog_->sliderButtonGreen->setValue(sliderButtonGreenValue = tmpColor.green()); dialog_->sliderButtonGreen->setValue(sliderButtonGreenValue = tmpColor.green());
dialog_->sliderButtonBlue->setValue(sliderButtonBlueValue = tmpColor.blue()); 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_->useRectLVH->setChecked( config->readBoolEntry( "Special_UseFlatLVH", false));
dialog_->drawTreeLines->setChecked( config->readBoolEntry( "Special_DrawTreeLines", false)); dialog_->drawTreeLines->setChecked( config->readBoolEntry( "Special_DrawTreeLines", false));
dialog_->treeLineMode->setCurrentItem(config->readNumEntry( "Special_TreelineStyle", 0)); 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_->expanderMode->setCurrentItem(config->readNumEntry( "Special_ExpanderStyle", 0));
dialog_->useCustomExpanderColor->setChecked( config->readBoolEntry( "Special_CustomExpanderColor", false)); 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 //Kicker
dialog_->removeKickerBevel->setChecked( config->readBoolEntry( "Special_RemoveKickerBevel", true)); dialog_->removeKickerBevel->setChecked( config->readBoolEntry( "Special_RemoveKickerBevel", true));
dialog_->roundTasks->setChecked( config->readBoolEntry( "Special_RoundTaskbuttons", false)); 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() ); dialog_->replaceMenubar->setChecked( menuReplaced = file.exists() );
//Scrollbars //Scrollbars
dialog_->animateSlider->setChecked( config->readBoolEntry( "Special_AnimateSlider", true)); dialog_->animateSlider->setChecked( config->readBoolEntry( "Special_AnimateSlider", true));
@ -542,29 +542,29 @@ void kstyle_baghira_config::load(QString &fileName)
//Look //Look
dialog_->shadowMenuText->setChecked( config->readBoolEntry( "Menu_ShadowText", true)); dialog_->shadowMenuText->setChecked( config->readBoolEntry( "Menu_ShadowText", true));
dialog_->menuColorMode->setCurrentItem(config->readNumEntry("Menu_ColorStyle")); dialog_->menuColorMode->setCurrentItem(config->readNumEntry("Menu_ColorStyle"));
dialog_->menuTextColor->setColor( QColor( config->readNumEntry( "Menu_TextColor", (int) colorGroup().text().rgb()))); dialog_->menuTextColor->setColor( TQColor( config->readNumEntry( "Menu_TextColor", (int) colorGroup().text().rgb())));
dialog_->menuTextColorHigh->setColor( QColor( config->readNumEntry( "Menu_TextColorHighlight", (int) colorGroup().highlightedText().rgb()))); dialog_->menuTextColorHigh->setColor( TQColor( config->readNumEntry( "Menu_TextColorHighlight", (int) colorGroup().highlightedText().rgb())));
dialog_->menuColor->setColor( QColor( config->readNumEntry( "Menu_Color1", (int) colorGroup().background().rgb()))); dialog_->menuColor->setColor( TQColor( config->readNumEntry( "Menu_Color1", (int) colorGroup().background().rgb())));
dialog_->menuColor2->setColor( QColor( config->readNumEntry( "Menu_Color2", (int) colorGroup().background().dark(130).rgb()))); dialog_->menuColor2->setColor( TQColor( config->readNumEntry( "Menu_Color2", (int) colorGroup().background().dark(130).rgb())));
dialog_->menuColorHigh->setColor( QColor( config->readNumEntry( "Menu_ColorHighlight", (int) colorGroup().highlight().rgb()))); dialog_->menuColorHigh->setColor( TQColor( config->readNumEntry( "Menu_ColorHighlight", (int) colorGroup().highlight().rgb())));
dialog_->drawMenuStripe->setChecked(config->readBoolEntry( "Menu_DrawMenuStripe", false)); dialog_->drawMenuStripe->setChecked(config->readBoolEntry( "Menu_DrawMenuStripe", false));
dialog_->glossyMenus->setChecked(config->readBoolEntry( "Menu_Glossy", true)); 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 // custom colors
dialog_->useCustomColors->setChecked( config->readBoolEntry( "Colors_UseCustomColors", false)); dialog_->useCustomColors->setChecked( config->readBoolEntry( "Colors_UseCustomColors", false));
dialog_->radioOffColor->setColor( QColor( config->readNumEntry( "Colors_RadioOff", ( int ) colorGroup().background().rgb()))); dialog_->radioOffColor->setColor( TQColor( config->readNumEntry( "Colors_RadioOff", ( int ) colorGroup().background().rgb())));
dialog_->radioOnColor->setColor( QColor( config->readNumEntry( "Colors_RadioOn", ( int ) colorGroup().button().rgb()))); dialog_->radioOnColor->setColor( TQColor( config->readNumEntry( "Colors_RadioOn", ( int ) colorGroup().button().rgb())));
dialog_->checkOffColor->setColor( QColor( config->readNumEntry( "Colors_CheckOff", ( int ) colorGroup().background().rgb()))); dialog_->checkOffColor->setColor( TQColor( config->readNumEntry( "Colors_CheckOff", ( int ) colorGroup().background().rgb())));
dialog_->checkOnColor->setColor( QColor( config->readNumEntry( "Colors_CheckOn", ( int ) colorGroup().button().rgb()))); dialog_->checkOnColor->setColor( TQColor( config->readNumEntry( "Colors_CheckOn", ( int ) colorGroup().button().rgb())));
dialog_->sliderColor->setColor( QColor( config->readNumEntry( "Colors_Slider", ( int ) colorGroup().button().rgb()))); dialog_->sliderColor->setColor( TQColor( config->readNumEntry( "Colors_Slider", ( int ) colorGroup().button().rgb())));
dialog_->hoverSliderColorColor->setColor(QColor(config->readNumEntry("Colors_SliderHovered",(int)colorGroup().button().rgb()))); dialog_->hoverSliderColorColor->setColor(TQColor(config->readNumEntry("Colors_SliderHovered",(int)colorGroup().button().rgb())));
dialog_->pressedSliderColor->setColor(QColor(config->readNumEntry("Colors_SliderPressed",(int) colorGroup().button().dark(110).rgb()))); dialog_->pressedSliderColor->setColor(TQColor(config->readNumEntry("Colors_SliderPressed",(int) colorGroup().button().dark(110).rgb())));
dialog_->sliderGrooveColor->setColor(QColor(config->readNumEntry("Colors_SliderGroove",(int)colorGroup().background().rgb()))); dialog_->sliderGrooveColor->setColor(TQColor(config->readNumEntry("Colors_SliderGroove",(int)colorGroup().background().rgb())));
dialog_->inactiveTabColor->setColor(QColor(config->readNumEntry("Colors_TabInactive",(int) colorGroup().background().rgb()))); dialog_->inactiveTabColor->setColor(TQColor(config->readNumEntry("Colors_TabInactive",(int) colorGroup().background().rgb())));
dialog_->activeTabColor->setColor(QColor(config->readNumEntry("Colors_TabActive",(int)colorGroup().button().rgb()))); dialog_->activeTabColor->setColor(TQColor(config->readNumEntry("Colors_TabActive",(int)colorGroup().button().rgb())));
dialog_->tintBrush->setChecked( config->readBoolEntry( "Colors_TintBrushedMetal", false)); 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)); // dialog_->brushTintSaturaion->setValue(settings.readNumEntry( "/qt/Baghira/brushTintSaturation", 3));
baseImage2 = uic_findImage("brush-me"); baseImage2 = uic_findImage("brush-me");
dialog_->pixmapBrushPreview->setPixmap(*tintBrush(baseImage2, brushTint)); dialog_->pixmapBrushPreview->setPixmap(*tintBrush(baseImage2, brushTint));
@ -572,13 +572,13 @@ void kstyle_baghira_config::load(QString &fileName)
dialog_->sliderBrushGreen->setValue(sliderBrushGreenValue = brushTint.green()); dialog_->sliderBrushGreen->setValue(sliderBrushGreenValue = brushTint.green());
dialog_->sliderBrushBlue->setValue(sliderBrushBlueValue = brushTint.blue()); dialog_->sliderBrushBlue->setValue(sliderBrushBlueValue = brushTint.blue());
config->setGroup("Menubar"); config->setGroup("Menubar");
dialog_->menuMaxWidth->setValue(config->readNumEntry("Width", QDesktopWidget().availableGeometry().width())); dialog_->menuMaxWidth->setValue(config->readNumEntry("Width", TQDesktopWidget().availableGeometry().width()));
config->setGroup("Sidebar"); config->setGroup("Sidebar");
delete config; delete config;
config = new KConfig("kdeglobals"); config = new KConfig("kdeglobals");
config->setGroup( "Toolbar style" ); 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; delete config;
} }
@ -611,7 +611,7 @@ void kstyle_baghira_config::defaults()
dialog_->shadowSlider->setChecked( false); dialog_->shadowSlider->setChecked( false);
dialog_->squeezeSlider->setChecked( false); dialog_->squeezeSlider->setChecked( false);
dialog_->unhoveredToolButtons->setCurrentItem(2); dialog_->unhoveredToolButtons->setCurrentItem(2);
dialog_->toolbuttonHighColor->setColor( QColor(103,141,178) ); dialog_->toolbuttonHighColor->setColor( TQColor(103,141,178) );
dialog_->drawTreeLines->setChecked( false); dialog_->drawTreeLines->setChecked( false);
dialog_->useCustomExpanderColor->setChecked( false); dialog_->useCustomExpanderColor->setChecked( false);
dialog_->treeLineMode->setCurrentItem(0); dialog_->treeLineMode->setCurrentItem(0);
@ -639,7 +639,7 @@ void kstyle_baghira_config::defaults()
dialog_->menuColorHigh->setColor( colorGroup().highlight().rgb()); dialog_->menuColorHigh->setColor( colorGroup().highlight().rgb());
dialog_->drawMenuStripe->setChecked(false); dialog_->drawMenuStripe->setChecked(false);
dialog_->glossyMenus->setChecked(true); dialog_->glossyMenus->setChecked(true);
dialog_->menuStripeColor->setColor( Qt::white.rgb()); dialog_->menuStripeColor->setColor( TQt::white.rgb());
// custom colors // custom colors
dialog_->useCustomColors->setChecked( false); dialog_->useCustomColors->setChecked( false);
@ -659,12 +659,12 @@ void kstyle_baghira_config::defaults()
void kstyle_baghira_config::save() void kstyle_baghira_config::save()
{ {
QString tmpString = QDir::homeDirPath() + "/.qt/baghirarc"; TQString tmpString = TQDir::homeDirPath() + "/.qt/baghirarc";
save(tmpString); save(tmpString);
// emit changed(true); // emit changed(true);
} }
void kstyle_baghira_config::changeTooluttonHighlightColor(const QColor & color) void kstyle_baghira_config::changeTooluttonHighlightColor(const TQColor & color)
{ {
KConfig *config = new KConfig("kdeglobals"); KConfig *config = new KConfig("kdeglobals");
config->setGroup( "Toolbar style" ); config->setGroup( "Toolbar style" );
@ -681,9 +681,9 @@ void kstyle_baghira_config::handleButtonStyles(int i)
configChanged(); 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); KConfig *config = new KConfig(fileName);
config->setGroup("BAB"); config->setGroup("BAB");
//General Design //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_InactiveButtonColor", (int)dialog_->customInactiveColor->color().rgb());
config->writeEntry("Design_CenterTabs", dialog_->centerTabs->isOn()); config->writeEntry("Design_CenterTabs", dialog_->centerTabs->isOn());
//button color stuff //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 // special Widgets
//listviews //listviews
@ -719,17 +719,17 @@ void kstyle_baghira_config::save(QString &fileName)
//Kicker //Kicker
config->writeEntry("Special_RemoveKickerBevel", dialog_->removeKickerBevel->isOn()); config->writeEntry("Special_RemoveKickerBevel", dialog_->removeKickerBevel->isOn());
config->writeEntry("Special_RoundTaskbuttons", dialog_->roundTasks->isOn()); config->writeEntry("Special_RoundTaskbuttons", dialog_->roundTasks->isOn());
QDir tmpDir(QDir::homeDirPath() + "/.kde"); TQDir tmpDir(TQDir::homeDirPath() + "/.kde");
if (!tmpDir.exists()) tmpDir.mkdir(QDir::homeDirPath() + "/.kde"); if (!tmpDir.exists()) tmpDir.mkdir(TQDir::homeDirPath() + "/.kde");
tmpDir.setPath(QDir::homeDirPath() + "/.kde/share"); tmpDir.setPath(TQDir::homeDirPath() + "/.kde/share");
if (!tmpDir.exists()) tmpDir.mkdir(QDir::homeDirPath() + "/.kde/share"); if (!tmpDir.exists()) tmpDir.mkdir(TQDir::homeDirPath() + "/.kde/share");
tmpDir.setPath(QDir::homeDirPath() + "/.kde/share/apps"); tmpDir.setPath(TQDir::homeDirPath() + "/.kde/share/apps");
if (!tmpDir.exists()) tmpDir.mkdir(QDir::homeDirPath() + "/.kde/share/apps"); if (!tmpDir.exists()) tmpDir.mkdir(TQDir::homeDirPath() + "/.kde/share/apps");
tmpDir.setPath(QDir::homeDirPath() + "/.kde/share/apps/kicker"); tmpDir.setPath(TQDir::homeDirPath() + "/.kde/share/apps/kicker");
if (!tmpDir.exists()) tmpDir.mkdir(QDir::homeDirPath() + "/.kde/share/apps/kicker"); if (!tmpDir.exists()) tmpDir.mkdir(TQDir::homeDirPath() + "/.kde/share/apps/kicker");
tmpDir.setPath(QDir::homeDirPath() + "/.kde/share/apps/kicker/applets"); tmpDir.setPath(TQDir::homeDirPath() + "/.kde/share/apps/kicker/applets");
if (!tmpDir.exists()) tmpDir.mkdir(QDir::homeDirPath() + "/.kde/share/apps/kicker/applets"); if (!tmpDir.exists()) tmpDir.mkdir(TQDir::homeDirPath() + "/.kde/share/apps/kicker/applets");
QFile file(QDir::homeDirPath() + "/.kde/share/apps/kicker/applets/menuapplet.desktop"); TQFile file(TQDir::homeDirPath() + "/.kde/share/apps/kicker/applets/menuapplet.desktop");
if (dialog_->replaceMenubar->isOn()) if (dialog_->replaceMenubar->isOn())
{ {
file.open(IO_WriteOnly); file.open(IO_WriteOnly);
@ -741,7 +741,7 @@ Encoding=UTF-8\n\
Name=BaghiraMenu\n\ Name=BaghiraMenu\n\
X-KDE-Library=b_menu_panelapplet\n\ X-KDE-Library=b_menu_panelapplet\n\
X-KDE-UniqueApplet=true\n"; X-KDE-UniqueApplet=true\n";
file.writeBlock( msg, qstrlen(msg) ); file.writeBlock( msg, tqstrlen(msg) );
file.close(); file.close();
} }
else else
@ -788,7 +788,7 @@ X-KDE-UniqueApplet=true\n";
config->writeEntry("Colors_TabInactive",(int) dialog_->inactiveTabColor->color().rgb()); config->writeEntry("Colors_TabInactive",(int) dialog_->inactiveTabColor->color().rgb());
config->writeEntry("Colors_TabActive", (int)dialog_->activeTabColor->color().rgb()); config->writeEntry("Colors_TabActive", (int)dialog_->activeTabColor->color().rgb());
config->writeEntry("Colors_TintBrushedMetal", dialog_->tintBrush->isOn()); 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->setGroup("Menubar");
config->writeEntry("Width", dialog_->menuMaxWidth->value()); config->writeEntry("Width", dialog_->menuMaxWidth->value());
config->sync(); 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"); return i18n("Configure Your Cat");
} }
@ -836,14 +836,14 @@ void kstyle_baghira_config::enableMenuColorStuff(int d)
void kstyle_baghira_config::buttonLoadAction() 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()) if (!tmpString.isEmpty())
load(tmpString); load(tmpString);
} }
void kstyle_baghira_config::buttonSaveAsAction() 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); save(tmpString);
} }
@ -854,19 +854,19 @@ void kstyle_baghira_config::editApp()
void kstyle_baghira_config::removeApp() void kstyle_baghira_config::removeApp()
{ {
QString string = QDir::homeDirPath() + "/.baghira/" + applist->currentItem()->text(0); TQString string = TQDir::homeDirPath() + "/.baghira/" + applist->currentItem()->text(0);
QFile::remove(string); TQFile::remove(string);
applist->takeItem(applist->currentItem()); applist->takeItem(applist->currentItem());
} }
void kstyle_baghira_config::removeApp(QString name) void kstyle_baghira_config::removeApp(TQString name)
{ {
QString string = QDir::homeDirPath() + "/.baghira/" + name; TQString string = TQDir::homeDirPath() + "/.baghira/" + name;
QFile::remove(string); TQFile::remove(string);
applist->takeItem(applist->findItem(name, 0, Qt::ExactMatch)); 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->insertItem(new KListViewItem(applist, string, linkString));
applist->sort(); applist->sort();
@ -878,34 +878,34 @@ void kstyle_baghira_config::selectWindow()
// use a dialog, so that all user input is blocked // use a dialog, so that all user input is blocked
// use WX11BypassWM and moving away so that it's not actually visible // 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 // 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->move( -1000, -1000 );
grabber->show(); grabber->show();
grabber->grabMouse( crossCursor ); grabber->grabMouse( crossCursor );
grabber->installEventFilter( this ); grabber->installEventFilter( this );
} }
Atom wm_state = XInternAtom( qt_xdisplay(), "WM_STATE", False ); Atom wm_state = XInternAtom( tqt_xdisplay(), "WM_STATE", False );
// Atom wm_state = XInternAtom( qt_xdisplay(), "WM_COMMAND", 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 ;) // adapted from kcmkwin... again ;)
{ {
if( o != grabber ) if( o != grabber )
return false; return false;
if( e->type() != QEvent::MouseButtonRelease ) if( e->type() != TQEvent::MouseButtonRelease )
return false; return false;
delete grabber; delete grabber;
grabber = NULL; grabber = NULL;
if( static_cast< QMouseEvent* >( e )->button() != LeftButton ) if( static_cast< TQMouseEvent* >( e )->button() != LeftButton )
return true; return true;
WId winId = findWindow(); WId winId = findWindow();
XClassHint classHint; XClassHint classHint;
if (XGetClassHint(qt_xdisplay(), winId, &classHint)) if (XGetClassHint(tqt_xdisplay(), winId, &classHint))
{ {
QString tmpString = QString( classHint.res_class ).lower() + " (uncertain)"; TQString tmpString = TQString( classHint.res_class ).lower() + " (uncertain)";
appsetter->show(tmpString, QString()); appsetter->show(tmpString, TQString());
// qWarning("class: %s",QString( classHint.res_class ).lower().ascii()); // tqWarning("class: %s",TQString( classHint.res_class ).lower().ascii());
XFree( classHint.res_name ); XFree( classHint.res_name );
XFree( classHint.res_class ); XFree( classHint.res_class );
} }
@ -919,13 +919,13 @@ WId kstyle_baghira_config::findWindow()
Window child; Window child;
uint mask; uint mask;
int rootX, rootY, x, y; int rootX, rootY, x, y;
Window parent = qt_xrootwin(); Window parent = tqt_xrootwin();
// Atom wm_state = XInternAtom( qt_xdisplay(), "WM_STATE", False ); // Atom wm_state = XInternAtom( tqt_xdisplay(), "WM_STATE", False );
for( int i = 0; for( int i = 0;
i < 10; i < 10;
++i ) ++i )
{ {
XQueryPointer( qt_xdisplay(), parent, &root, &child, XQueryPointer( tqt_xdisplay(), parent, &root, &child,
&rootX, &rootY, &x, &y, &mask ); &rootX, &rootY, &x, &y, &mask );
if( child == None ) if( child == None )
return 0; return 0;
@ -933,7 +933,7 @@ WId kstyle_baghira_config::findWindow()
int format; int format;
unsigned long nitems, after; unsigned long nitems, after;
unsigned char* prop; 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 ) if( prop != NULL )
XFree( prop ); XFree( prop );
@ -968,28 +968,28 @@ void kstyle_baghira_config::menuToggled(bool active)
extern "C" extern "C"
{ {
QWidget* allocate_kstyle_config(QWidget* parent){ TQWidget* allocate_kstyle_config(TQWidget* parent){
return(new kstyle_baghira_config(parent, "BaghiraConfig")); 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; isEdit = FALSE;
QLabel *label1 = new QLabel(i18n("<qt><b>Application Name</b></qt>"), this); TQLabel *label1 = new TQLabel(i18n("<qt><b>Application Name</b></qt>"), this);
command = new QLineEdit(this); command = new TQLineEdit(this);
QLabel *linkTo = new QLabel(i18n("<qt><b>Just like</b></qt>"),this); TQLabel *linkTo = new TQLabel(i18n("<qt><b>Just like</b></qt>"),this);
link = new QComboBox(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 ); box->setCheckable( true );
new QLabel(i18n("<qt><b>Style</b></qt>"), box); new TQLabel(i18n("<qt><b>Style</b></qt>"), box);
new QLabel("<qt><b>Deco</b></qt>", box); new TQLabel("<qt><b>Deco</b></qt>", box);
style = new QComboBox(box); style = new TQComboBox(box);
style->insertItem(i18n("Don't set")); style->insertItem(i18n("Don't set"));
style->insertItem("Jaguar"); style->insertItem("Jaguar");
style->insertItem("Panther"); style->insertItem("Panther");
@ -997,7 +997,7 @@ AppSetter::AppSetter(QWidget *parent, const char *name) : QWidget(parent, name,
style->insertItem("Tiger"); style->insertItem("Tiger");
style->insertItem("Milk"); style->insertItem("Milk");
deco = new QComboBox(box); deco = new TQComboBox(box);
deco->insertItem(i18n("Don't set")); deco->insertItem(i18n("Don't set"));
deco->insertItem("Jaguar"); deco->insertItem("Jaguar");
deco->insertItem("Panther"); deco->insertItem("Panther");
@ -1005,10 +1005,10 @@ AppSetter::AppSetter(QWidget *parent, const char *name) : QWidget(parent, name,
deco->insertItem("Tiger"); deco->insertItem("Tiger");
deco->insertItem("Milk"); deco->insertItem("Milk");
new QLabel(i18n("<qt><b>Buttons</b></qt>"), box); new TQLabel(i18n("<qt><b>Buttons</b></qt>"), box);
new QLabel(i18n("<qt><b>Toolbuttons</b></qt>"), box); new TQLabel(i18n("<qt><b>Toolbuttons</b></qt>"), box);
buttons = new QComboBox(box); buttons = new TQComboBox(box);
buttons->insertItem("Jaguar"); buttons->insertItem("Jaguar");
buttons->insertItem("Panther"); buttons->insertItem("Panther");
buttons->insertItem("iTunes"); buttons->insertItem("iTunes");
@ -1016,48 +1016,48 @@ AppSetter::AppSetter(QWidget *parent, const char *name) : QWidget(parent, name,
buttons->insertItem("Milk"); buttons->insertItem("Milk");
toolButtons = new QComboBox(box); toolButtons = new TQComboBox(box);
toolButtons->insertItem("Jaguar"); toolButtons->insertItem("Jaguar");
toolButtons->insertItem("Panther"); toolButtons->insertItem("Panther");
toolButtons->insertItem("iTunes"); toolButtons->insertItem("iTunes");
toolButtons->insertItem("Tiger"); toolButtons->insertItem("Tiger");
toolButtons->insertItem("Milk"); toolButtons->insertItem("Milk");
new QLabel(i18n("<qt><b>Tab vs. Chooser</b></qt>"), box); new TQLabel(i18n("<qt><b>Tab vs. Chooser</b></qt>"), box);
new QLabel(i18n("<qt>Inactive Button</qt>"), box); new TQLabel(i18n("<qt>Inactive Button</qt>"), box);
tabs = new QComboBox(box); tabs = new TQComboBox(box);
tabs->insertItem(i18n("Don't set")); tabs->insertItem(i18n("Don't set"));
tabs->insertItem("Tabs"); tabs->insertItem("Tabs");
tabs->insertItem("Adaptive"); tabs->insertItem("Adaptive");
tabs->insertItem("Choosers"); tabs->insertItem("Choosers");
inbutton = new QComboBox(box); inbutton = new TQComboBox(box);
inbutton->insertItem("Fixed"); inbutton->insertItem("Fixed");
inbutton->insertItem("Background"); inbutton->insertItem("Background");
inbutton->insertItem("Active Button"); inbutton->insertItem("Active Button");
scanlines = new QCheckBox("Show scanlines", box); scanlines = new TQCheckBox("Show scanlines", box);
QWidget *dumb = new QWidget(box); TQWidget *dumb = new TQWidget(box);
customColors = new QCheckBox(dumb); customColors = new TQCheckBox(dumb);
buttonColors = new QPushButton("Custom Colors", dumb); buttonColors = new TQPushButton("Custom Colors", dumb);
QHBoxLayout *clh = new QHBoxLayout(dumb); TQHBoxLayout *clh = new TQHBoxLayout(dumb);
clh->addWidget(customColors); clh->addWidget(customColors);
clh->addWidget(buttonColors); clh->addWidget(buttonColors);
QVBoxLayout *lv = new QVBoxLayout(this,11,6); TQVBoxLayout *lv = new TQVBoxLayout(this,11,6);
lv->addWidget(label1); lv->addWidget(label1);
lv->addWidget(command); lv->addWidget(command);
QHBoxLayout *lh0 = new QHBoxLayout(lv); TQHBoxLayout *lh0 = new TQHBoxLayout(lv);
lh0->addWidget(linkTo); lh0->addWidget(linkTo);
lh0->addWidget(link); lh0->addWidget(link);
lv->addWidget(box); lv->addWidget(box);
QHBoxLayout *lh = new QHBoxLayout(lv); TQHBoxLayout *lh = new TQHBoxLayout(lv);
QPushButton *cancel = new QPushButton("Cancel",this); TQPushButton *cancel = new TQPushButton("Cancel",this);
lh->addWidget(cancel); lh->addWidget(cancel);
QPushButton *ok = new QPushButton("Ok",this); TQPushButton *ok = new TQPushButton("Ok",this);
lh->addWidget(ok); lh->addWidget(ok);
colorDialog = new ColorDialog(this); colorDialog = new ColorDialog(this);
@ -1102,20 +1102,20 @@ void AppSetter::updateColors()
void AppSetter::show() void AppSetter::show()
{ {
link->clear(); 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++ ) for ( uint i = 0; i < d.count(); i++ )
link->insertItem(d[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; isEdit = true;
oldName = appName; oldName = appName;
oldLink = linkString; oldLink = linkString;
command->setText(appName); command->setText(appName);
FILE *file = NULL; FILE *file = NULL;
QString tmpString = QDir::homeDirPath() + "/.baghira/" + appName; TQString tmpString = TQDir::homeDirPath() + "/.baghira/" + appName;
if( (file = fopen(tmpString.latin1(), "r")) != NULL ) if( (file = fopen(tmpString.latin1(), "r")) != NULL )
{ {
uint s, d, b, t, tc, sc, ib; uint s, d, b, t, tc, sc, ib;
@ -1163,10 +1163,10 @@ void AppSetter::resetColorPicker()
for (int i = 0; i < 8; i++) for (int i = 0; i < 8; i++)
{ {
colorDialog->picker[i]->blockSignals(true); colorDialog->picker[i]->blockSignals(true);
colorDialog->picker[i]->setColor(QColor(colors[i])); colorDialog->picker[i]->setColor(TQColor(colors[i]));
colorDialog->picker[i]->blockSignals(false); colorDialog->picker[i]->blockSignals(false);
} }
((QWidget*)colorDialog->demo)->repaint(false); ((TQWidget*)colorDialog->demo)->repaint(false);
} }
else else
{ {
@ -1182,7 +1182,7 @@ void AppSetter::resetColorPicker()
colorDialog->picker[Alternate]->setColor(KGlobalSettings::alternateBackgroundColor()); colorDialog->picker[Alternate]->setColor(KGlobalSettings::alternateBackgroundColor());
for (int i = 0; i < 8; i++) for (int i = 0; i < 8; i++)
colorDialog->picker[i]->blockSignals(false); 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 (command->text() != "" && (!box->isChecked() || (style->currentItem() != 0 && deco->currentItem() != 0)))
{ {
if (!isEdit) 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) else if (command->text() != oldName || link->currentText() != oldLink)
{ {
emit removeApp(oldName); emit removeApp(oldName);
emit addApp(command->text(), box->isChecked() ? QString() : link->currentText()); emit addApp(command->text(), box->isChecked() ? TQString() : link->currentText());
} }
if (!customColors->isChecked()) if (!customColors->isChecked())
{ {
@ -1203,7 +1203,7 @@ void AppSetter::save()
colors[i] = -1; colors[i] = -1;
} }
FILE *file = NULL; FILE *file = NULL;
QString tmpString = QDir::homeDirPath() + "/.baghira/" + command->text(); TQString tmpString = TQDir::homeDirPath() + "/.baghira/" + command->text();
if (box->isChecked()) // custom settings if (box->isChecked()) // custom settings
{ {
if( (file = fopen(tmpString.latin1(), "w")) != NULL ) if( (file = fopen(tmpString.latin1(), "w")) != NULL )
@ -1214,8 +1214,8 @@ void AppSetter::save()
} }
else // just link else // just link
{ {
QString tmpString2 = QDir::homeDirPath() + "/.baghira/" + link->currentText(); TQString tmpString2 = TQDir::homeDirPath() + "/.baghira/" + link->currentText();
QFile::remove(tmpString); // just to be sure ;) TQFile::remove(tmpString); // just to be sure ;)
symlink (tmpString2.latin1(), tmpString.latin1()); symlink (tmpString2.latin1(), tmpString.latin1());
} }
} }

@ -22,34 +22,34 @@
#define _KSTYLE_BAGHIRA_CONFIG_H_ #define _KSTYLE_BAGHIRA_CONFIG_H_
//#include <kcmodule.h> //#include <kcmodule.h>
#include <qcolor.h> #include <tqcolor.h>
#include <qimage.h> #include <tqimage.h>
#include <kaboutdata.h> #include <kaboutdata.h>
#include "configdialog.h" #include "configdialog.h"
#include "help.h" #include "help.h"
#include "about.h" #include "about.h"
class KListView; class KListView;
class QPushButton; class TQPushButton;
class AppSetter; class AppSetter;
class QTimer; class TQTimer;
class QCheckBox; class TQCheckBox;
class QComboBox; class TQComboBox;
class QGroupBox; class TQGroupBox;
class kstyle_baghira_config: public QWidget class kstyle_baghira_config: public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: 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(); ~kstyle_baghira_config();
virtual void load(); virtual void load();
void load(QString &fileName); void load(TQString &fileName);
void save(QString &fileName); void save(TQString &fileName);
// virtual int buttons(); // virtual int buttons();
virtual QString quickHelp() const; virtual TQString quickHelp() const;
virtual const KAboutData *aboutData()const virtual const KAboutData *aboutData()const
{ return myAboutData; }; { return myAboutData; };
@ -70,39 +70,39 @@ public slots:
signals: signals:
void changed(bool); void changed(bool);
void editApp(QString, QString); void editApp(TQString, TQString);
protected: protected:
bool eventFilter( QObject* o, QEvent* e ); bool eventFilter( TQObject* o, TQEvent* e );
private: private:
QString crNotes[3]; TQString crNotes[3];
AppSetter *appsetter; AppSetter *appsetter;
KListView *applist; KListView *applist;
QImage* tintButton(QImage &src, QColor c); TQImage* tintButton(TQImage &src, TQColor c);
QImage* tintBrush( QImage &img, QColor c/*, int saturation*/ ); TQImage* tintBrush( TQImage &img, TQColor c/*, int saturation*/ );
WId findWindow(); WId findWindow();
KAboutData *myAboutData; KAboutData *myAboutData;
Config *dialog_; Config *dialog_;
Help* help_; Help* help_;
About* about_; About* about_;
QImage baseImage, baseImage2; TQImage baseImage, baseImage2;
QDialog *grabber; TQDialog *grabber;
QColor buttonColor; TQColor buttonColor;
QColor brushTint; TQColor brushTint;
int sliderButtonRedValue, sliderButtonGreenValue, sliderButtonBlueValue; int sliderButtonRedValue, sliderButtonGreenValue, sliderButtonBlueValue;
int sliderBrushRedValue, sliderBrushGreenValue, sliderBrushBlueValue/*, sliderBrushSaturationValue*/; int sliderBrushRedValue, sliderBrushGreenValue, sliderBrushBlueValue/*, sliderBrushSaturationValue*/;
bool loadDone; bool loadDone;
bool menuReplaced; bool menuReplaced;
QTimer *timer; TQTimer *timer;
int crCurrent; int crCurrent;
private slots: private slots:
void updateCR(); void updateCR();
void showAbout(); void showAbout();
void editApp(); void editApp();
void addApp(QString, QString); void addApp(TQString, TQString);
void removeApp(); void removeApp();
void removeApp(QString); void removeApp(TQString);
void setDesign(int); void setDesign(int);
void menuToggled(bool); void menuToggled(bool);
void enableInButtonColor(int d); void enableInButtonColor(int d);
@ -111,45 +111,45 @@ private slots:
void buttonSaveAsAction(); void buttonSaveAsAction();
void setPresetColor(int i); void setPresetColor(int i);
void selectWindow(); void selectWindow();
void changeTooluttonHighlightColor(const QColor &); void changeTooluttonHighlightColor(const TQColor &);
void handleButtonStyles(int i); void handleButtonStyles(int i);
}; };
class ColorDialog; class ColorDialog;
class AppSetter : public QWidget class AppSetter : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
AppSetter(QWidget *parent=0, const char *name=0); AppSetter(TQWidget *parent=0, const char *name=0);
~AppSetter(); ~AppSetter();
public slots: public slots:
void show(); void show();
void show(QString appName, QString link); void show(TQString appName, TQString link);
private: private:
bool isEdit; bool isEdit;
int index_; int index_;
int colors[8]; int colors[8];
QString oldName; TQString oldName;
QString oldLink; TQString oldLink;
QLineEdit *command; TQLineEdit *command;
QComboBox *link; TQComboBox *link;
QGroupBox *box; TQGroupBox *box;
QComboBox *style; TQComboBox *style;
QComboBox *deco; TQComboBox *deco;
QComboBox *buttons; TQComboBox *buttons;
QComboBox *toolButtons; TQComboBox *toolButtons;
QComboBox *tabs; TQComboBox *tabs;
QComboBox *inbutton; TQComboBox *inbutton;
QCheckBox *scanlines; TQCheckBox *scanlines;
QCheckBox *customColors; TQCheckBox *customColors;
QPushButton *buttonColors; TQPushButton *buttonColors;
ColorDialog *colorDialog; ColorDialog *colorDialog;
signals: signals:
void addApp(QString, QString); void addApp(TQString, TQString);
void removeApp(QString); void removeApp(TQString);
private slots: private slots:
void save(); void save();

File diff suppressed because it is too large Load Diff

@ -27,8 +27,8 @@
#ifndef BAGHIRACLIENT_H #ifndef BAGHIRACLIENT_H
#define BAGHIRACLIENT_H #define BAGHIRACLIENT_H
#include <qcolor.h> #include <tqcolor.h>
#include <qbutton.h> #include <tqbutton.h>
#include <kdecoration.h> #include <kdecoration.h>
#include <kdecorationfactory.h> #include <kdecorationfactory.h>
#include <kpixmap.h> #include <kpixmap.h>
@ -40,9 +40,9 @@
#define TITLESIZESMALL 18; #define TITLESIZESMALL 18;
#define MARGIN 4;*/ #define MARGIN 4;*/
class QSpacerItem; class TQSpacerItem;
class QPoint; class TQPoint;
class QBitmap; class TQBitmap;
class KWinModule; class KWinModule;
namespace Baghira { namespace Baghira {
@ -106,7 +106,7 @@ enum TitlebarType{
class BaghiraClient; class BaghiraClient;
// #if KDE_IS_VERSION(3,3,91) // #if KDE_IS_VERSION(3,3,91)
class ResizeHandle : public QWidget class ResizeHandle : public TQWidget
{ {
//#if KDE_IS_VERSION(3,3,91) //#if KDE_IS_VERSION(3,3,91)
friend class BaghiraClient; friend class BaghiraClient;
@ -115,20 +115,20 @@ friend class BaghiraClient;
public: public:
ResizeHandle(BaghiraClient *parent); ResizeHandle(BaghiraClient *parent);
protected: protected:
virtual void mousePressEvent ( QMouseEvent * ); virtual void mousePressEvent ( TQMouseEvent * );
virtual void mouseReleaseEvent ( QMouseEvent * ); virtual void mouseReleaseEvent ( TQMouseEvent * );
virtual void paintEvent ( QPaintEvent * ); virtual void paintEvent ( TQPaintEvent * );
void updateLook(bool rp = FALSE); void updateLook(bool rp = FALSE);
private: private:
bool eventFilter(QObject *obj, QEvent *e); bool eventFilter(TQObject *obj, TQEvent *e);
void shape(); void shape();
BaghiraClient *client; BaghiraClient *client;
QPixmap pix; TQPixmap pix;
#endif #endif
}; };
// #endif // #endif
class DeMaximizer : public QWidget class DeMaximizer : public TQWidget
{ {
friend class BaghiraClient; friend class BaghiraClient;
friend class BaghiraFactory; friend class BaghiraFactory;
@ -137,14 +137,14 @@ public:
DeMaximizer(); DeMaximizer();
void setClient(BaghiraClient *); void setClient(BaghiraClient *);
protected: protected:
void mouseReleaseEvent( QMouseEvent * e ); void mouseReleaseEvent( TQMouseEvent * e );
void mousePressEvent ( QMouseEvent * e ); void mousePressEvent ( TQMouseEvent * e );
void enterEvent ( QEvent * e ); void enterEvent ( TQEvent * e );
void leaveEvent ( QEvent * e ); void leaveEvent ( TQEvent * e );
void setPixmap(int i, QImage &image); void setPixmap(int i, TQImage &image);
private: private:
BaghiraClient *client_; BaghiraClient *client_;
QPixmap pixmap[5]; TQPixmap pixmap[5];
void setState(int i); void setState(int i);
}; };
@ -157,22 +157,22 @@ public:
virtual ~BaghiraFactory(); virtual ~BaghiraFactory();
virtual KDecoration *createDecoration(KDecorationBridge *b); virtual KDecoration *createDecoration(KDecorationBridge *b);
virtual bool reset(unsigned long changed); virtual bool reset(unsigned long changed);
virtual QValueList<BorderSize> borderSizes() const; virtual TQValueList<BorderSize> borderSizes() const;
static QPixmap &ButtonPixmap(Baghira::WindowState wState, Baghira::ButtonType type, Baghira::ButtonState state, int current, bool small); static TQPixmap &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); 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, jaguarMenuMask, jaguarMask, milkMenuDownMask,
milkMenuMask, milkMask, pantherMenuMask, pantherMask, milkDownMask, arrowUp, arrowDown; milkMenuMask, milkMask, pantherMenuMask, pantherMask, milkDownMask, arrowUp, arrowDown;
static bool initialized(); static bool initialized();
static bool noModalDeco(); static bool noModalDeco();
static bool delAppname(); 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 KPixmap &pix(int current, PixmapType p, bool active=true, bool small=false);
static TitlebarType &effect(int current, bool active); static TitlebarType &effect(int current, bool active);
static ButtonStyle buttonStyle(int current); static ButtonStyle buttonStyle(int current);
static Qt::AlignmentFlags titleAlign(); static TQt::AlignmentFlags titleAlign();
static int borderSize(int current); static int borderSize(int current);
static int contrast(); static int contrast();
static int _3DImpact(int current); static int _3DImpact(int current);
@ -193,17 +193,17 @@ public:
TitlebarType titleEffect(); TitlebarType titleEffect();
static DeMaximizer &deMaximizer(); static DeMaximizer &deMaximizer();
static bool fullSpec(); static bool fullSpec();
static QColor &BrushedMetalColor(); static TQColor &BrushedMetalColor();
private: private:
// bool blend( const QImage & upper, const QImage & lower, QImage & output); // bool blend( const TQImage & upper, const TQImage & lower, TQImage & output);
unsigned long readConfig(); unsigned long readConfig();
void createPixmaps(); 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); void createOS8Buttons(int style);
QString indexedString(QString s, int index); TQString indexedString(TQString s, int index);
QImage* tintBrush( const QImage &img, const QColor &c ) const; TQImage* tintBrush( const TQImage &img, const TQColor &c ) const;
QImage* tintGlossy(const QImage &src, const QColor &c ) const; TQImage* tintGlossy(const TQImage &src, const TQColor &c ) const;
private: private:
@ -220,13 +220,13 @@ private:
static bool drawIcon_[5]; static bool drawIcon_[5];
static ButtonStyle buttonStyle_[5]; static ButtonStyle buttonStyle_[5];
static TitlebarType effect_[5][2]; static TitlebarType effect_[5][2];
static Qt::AlignmentFlags titlealign_; static TQt::AlignmentFlags titlealign_;
static QColor colors_[5][ColorTypeCount][2]; static TQColor colors_[5][ColorTypeCount][2];
static KPixmap pix_[5][PixmapTypeCount][2][2]; static KPixmap pix_[5][PixmapTypeCount][2][2];
static QPixmap ButtonPixmap_[5][WindowStateAmount][ButtonTypeAmount][ButtonStateAmount][2]; static TQPixmap ButtonPixmap_[5][WindowStateAmount][ButtonTypeAmount][ButtonStateAmount][2];
static QColor ButtonColor_[ButtonTypeAmount+1]; static TQColor ButtonColor_[ButtonTypeAmount+1];
static QColor brushedMetalColor; static TQColor brushedMetalColor;
static QPixmap nostalgia_[5][3][2]; static TQPixmap nostalgia_[5][3][2];
static int contrast_; static int contrast_;
static int bordersize_[5]; static int bordersize_[5];
@ -237,7 +237,7 @@ private:
static bool tintBrush_; static bool tintBrush_;
static bool showTitle_; static bool showTitle_;
static QColor brushTint; static TQColor brushTint;
static DeMaximizer deMaximizer_; static DeMaximizer deMaximizer_;
static bool fullSpec_; static bool fullSpec_;
@ -304,10 +304,10 @@ inline ButtonStyle BaghiraFactory::buttonStyle(int current)
inline bool BaghiraFactory::initialized() inline bool BaghiraFactory::initialized()
{ return initialized_; } { return initialized_; }
inline QColor &BaghiraFactory::BrushedMetalColor() inline TQColor &BaghiraFactory::BrushedMetalColor()
{ return 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]; } { return colors_[current][c][active]; }
inline KPixmap &BaghiraFactory::pix(int current, PixmapType p, bool active, bool small) 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) inline Baghira::TitlebarType &BaghiraFactory::effect(int current, bool active)
{ return effect_[current][active]; } { return effect_[current][active]; }
inline Qt::AlignmentFlags BaghiraFactory::titleAlign() inline TQt::AlignmentFlags BaghiraFactory::titleAlign()
{ return titlealign_; } { return titlealign_; }
inline int BaghiraFactory::borderSize(int current) inline int BaghiraFactory::borderSize(int current)
@ -324,29 +324,29 @@ inline int BaghiraFactory::borderSize(int current)
// BaghiraButton /////////////////////////////////////////////////////////////// // BaghiraButton ///////////////////////////////////////////////////////////////
class BaghiraButton : public QButton class BaghiraButton : public TQButton
{ {
Q_OBJECT Q_OBJECT
public: 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(); ~BaghiraButton();
QSize sizeHint() const; TQSize sizeHint() const;
int lastMousePress() const; int lastMousePress() const;
void reset(); void reset();
inline void setMasks(QBitmap *bitmask, QBitmap *bitmaskDown); inline void setMasks(TQBitmap *bitmask, TQBitmap *bitmaskDown);
Baghira::ButtonState state(); Baghira::ButtonState state();
inline void setType(Baghira::ButtonType type) inline void setType(Baghira::ButtonType type)
{type_ = type; } {type_ = type; }
QBitmap *mask; TQBitmap *mask;
QBitmap *maskDown; TQBitmap *maskDown;
private: private:
void enterEvent(QEvent *e); void enterEvent(TQEvent *e);
void leaveEvent(QEvent *e); void leaveEvent(TQEvent *e);
void mousePressEvent(QMouseEvent *e); void mousePressEvent(TQMouseEvent *e);
void mouseReleaseEvent(QMouseEvent *e); void mouseReleaseEvent(TQMouseEvent *e);
void drawButton(QPainter *painter); void drawButton(TQPainter *painter);
private slots: private slots:
void delayedEnterEvent(); void delayedEnterEvent();
@ -355,8 +355,8 @@ private:
bool _blocked; bool _blocked;
BaghiraClient *client_; BaghiraClient *client_;
ButtonType type_; ButtonType type_;
QBitmap *deco_; TQBitmap *deco_;
QPixmap *pixmap[2][5]; TQPixmap *pixmap[2][5];
KPixmap icon_; KPixmap icon_;
bool small_; bool small_;
int lastmouse_; int lastmouse_;
@ -382,7 +382,7 @@ public:
virtual ~BaghiraClient(); virtual ~BaghiraClient();
virtual void init(); virtual void init();
QString caption() const; TQString caption() const;
virtual void activeChange(); virtual void activeChange();
virtual void desktopChange(); virtual void desktopChange();
@ -393,9 +393,9 @@ public:
void demaxButtonPressed(); void demaxButtonPressed();
virtual void borders(int &l, int &r, int &t, int &b) const; virtual void borders(int &l, int &r, int &t, int &b) const;
virtual void resize(const QSize &size); virtual void resize(const TQSize &size);
virtual QSize minimumSize() const; virtual TQSize minimumSize() const;
virtual Position mousePosition(const QPoint &point) const; virtual Position mousePosition(const TQPoint &point) const;
uint currentStyle; uint currentStyle;
signals: signals:
@ -406,14 +406,14 @@ protected:
int titleheight_; int titleheight_;
private: private:
void addButtons(QBoxLayout* layout, const QString& buttons); void addButtons(TQBoxLayout* layout, const TQString& buttons);
bool eventFilter(QObject *obj, QEvent *e); bool eventFilter(TQObject *obj, TQEvent *e);
void mouseDoubleClickEvent(QMouseEvent *e); void mouseDoubleClickEvent(TQMouseEvent *e);
void wheelEvent(QWheelEvent *e); void wheelEvent(TQWheelEvent *e);
void paintEvent(QPaintEvent *); void paintEvent(TQPaintEvent *);
void resizeEvent(QResizeEvent *); void resizeEvent(TQResizeEvent *);
void showEvent(QShowEvent *); void showEvent(TQShowEvent *);
private slots: private slots:
void doShape(); void doShape();
@ -425,8 +425,8 @@ private slots:
private: private:
BaghiraButton *button[ButtonTypeAmount]; BaghiraButton *button[ButtonTypeAmount];
QSpacerItem *titlebar_; TQSpacerItem *titlebar_;
QPixmap HandlePix; TQPixmap HandlePix;
int excursion; // skewness because of unequality of left/right buttons - bad for center aligned titles... int excursion; // skewness because of unequality of left/right buttons - bad for center aligned titles...
int plusminus; int plusminus;
bool isFaded; bool isFaded;
@ -434,10 +434,10 @@ private:
bool rightClose; bool rightClose;
bool performEasyClose; bool performEasyClose;
bool noDeco_; bool noDeco_;
QHBoxLayout *windowlayout; TQHBoxLayout *windowlayout;
int ICONX, ICONY; int ICONX, ICONY;
ResizeHandle *grip; ResizeHandle *grip;
QString caption_; TQString caption_;
}; };
} // namespace Baghira } // namespace Baghira

@ -1,7 +1,7 @@
#include "aquariusbutton.h" #include "aquariusbutton.h"
#include <qcolor.h> #include <tqcolor.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <qpainter.h> #include <tqpainter.h>
#include <kimageeffect.h> #include <kimageeffect.h>
#include "config.h" #include "config.h"
@ -33,7 +33,7 @@
destG = (S*destG + (100-S)*G)/100; \ destG = (S*destG + (100-S)*G)/100; \
destB = (S*destB + (100-S)*B)/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... // adopted from kimageeffect::blend - what is not endian safe...
{ {
if if
@ -92,7 +92,7 @@ static bool blend( const QImage & upper, const QImage & lower, QImage & output)
return true; 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; pixmap = pixmap;
image = pixmap.convertToImage(); image = pixmap.convertToImage();
setFixedSize( pixmap.size() ); setFixedSize( pixmap.size() );
@ -101,18 +101,18 @@ AquariusButton::AquariusButton( QPixmap &pixmap, QWidget* parent, const char* na
AquariusButton::~AquariusButton(){ AquariusButton::~AquariusButton(){
} }
QColor AquariusButton::Color(){ TQColor AquariusButton::Color(){
return color; return color;
} }
void AquariusButton::setColor(QColor c){ void AquariusButton::setColor(TQColor c){
color = c; color = c;
tint(color); tint(color);
repaint(false); repaint(false);
} }
void AquariusButton::tint(QColor &c){ void AquariusButton::tint(TQColor &c){
QImage dest( image.width(), image.height(), 32, 0 ); TQImage dest( image.width(), image.height(), 32, 0 );
dest.setAlphaBuffer( true ); dest.setAlphaBuffer( true );
unsigned int *data = ( unsigned int * ) image.bits(); unsigned int *data = ( unsigned int * ) image.bits();
unsigned int *destData = ( unsigned int* ) dest.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); int sq = CLAMP((int)((45.0/128.0)*s+55),0,100);
// float srcPercent, destPercent; // float srcPercent, destPercent;
for ( int current = 0 ; current < total ; ++current ) { for ( int current = 0 ; current < total ; ++current ) {
alpha = qAlpha( data[ current ] ); alpha = tqAlpha( data[ current ] );
if (alpha < 230){ if (alpha < 230){
destData[ current ] = data[ current ]; destData[ current ] = data[ current ];
continue; //do not handle translucent parts to not affect blending continue; //do not handle translucent parts to not affect blending
} }
red = qRed( data[ current ] ); red = tqRed( data[ current ] );
green = qGreen( data[ current ] ); green = tqGreen( data[ current ] );
blue = qBlue( data[ current ] ); blue = tqBlue( data[ current ] );
SATURATION_COLOR2(sq, red, green, blue); SATURATION_COLOR2(sq, red, green, blue);
// force back to valid colorspace ! // force back to valid colorspace !
COLOR_SPACE(destR, destG, destB); COLOR_SPACE(destR, destG, destB);
destData[ current ] = qRgba( destR, destG, destB, alpha ); destData[ current ] = tqRgba( destR, destG, destB, alpha );
} }
QPixmap backPix = QPixmap(dest.size()); TQPixmap backPix = TQPixmap(dest.size());
QPainter tmpPainter(&backPix); TQPainter tmpPainter(&backPix);
tmpPainter.fillRect(0, 0, dest.width(),dest.height(), backgroundBrush()); tmpPainter.fillRect(0, 0, dest.width(),dest.height(), backgroundBrush());
tmpPainter.end(); tmpPainter.end();
QImage back = backPix.convertToImage(); TQImage back = backPix.convertToImage();
blend(dest,back,back); blend(dest,back,back);
pixmap = QPixmap(back); pixmap = TQPixmap(back);
} }
void AquariusButton::mousePressEvent( QMouseEvent *e ){ void AquariusButton::mousePressEvent( TQMouseEvent *e ){
emit clicked(); emit clicked();
} }
void AquariusButton::paintEvent( QPaintEvent *e){ void AquariusButton::paintEvent( TQPaintEvent *e){
QPainter tmpPainter(this); TQPainter tmpPainter(this);
tmpPainter.drawPixmap(0,0, pixmap); tmpPainter.drawPixmap(0,0, pixmap);
} }

@ -1,32 +1,32 @@
#ifndef AQUARIUSBUTTON_H #ifndef AQUARIUSBUTTON_H
#define AQUARIUSBUTTON_H #define AQUARIUSBUTTON_H
//#include <qvariant.h> //#include <tqvariant.h>
#include <qwidget.h> #include <tqwidget.h>
#include <qimage.h> #include <tqimage.h>
class QPixmap; class TQPixmap;
class QColor; class TQColor;
class AquariusButton : public QWidget class AquariusButton : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
AquariusButton( QPixmap &pixmap, QWidget* parent = 0, const char* name = 0); AquariusButton( TQPixmap &pixmap, TQWidget* parent = 0, const char* name = 0);
~AquariusButton(); ~AquariusButton();
QColor Color(); TQColor Color();
public slots: public slots:
void setColor(QColor c); void setColor(TQColor c);
protected: protected:
QPixmap pixmap; TQPixmap pixmap;
QImage image; TQImage image;
QColor color; TQColor color;
void tint(QColor &c); void tint(TQColor &c);
void mousePressEvent( QMouseEvent *e ); void mousePressEvent( TQMouseEvent *e );
void paintEvent( QPaintEvent *e); void paintEvent( TQPaintEvent *e);
signals: signals:

@ -11,19 +11,19 @@
#include <klocale.h> #include <klocale.h>
#include <kglobal.h> #include <kglobal.h>
#include <kcolorbutton.h> #include <kcolorbutton.h>
#include <qbutton.h> #include <tqbutton.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qfont.h> #include <tqfont.h>
#include <qgroupbox.h> #include <tqgroupbox.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qradiobutton.h> #include <tqradiobutton.h>
#include <qsettings.h> #include <tqsettings.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <qwhatsthis.h> #include <tqwhatsthis.h>
#include "baghiraconfig.h" #include "baghiraconfig.h"
#include "configdialog.h" #include "configdialog.h"
@ -38,11 +38,11 @@
// ------------- // -------------
// Constructor // Constructor
BaghiraConfig::BaghiraConfig(KConfig*, QWidget* parent) BaghiraConfig::BaghiraConfig(KConfig*, TQWidget* parent)
: QObject(parent), /*config_(0),*/ dialog_(0) : TQObject(parent), /*config_(0),*/ dialog_(0)
{ {
// config_ = new KConfig("baghirarc"); // config_ = new KConfig("baghirarc");
// config_ = new QSettings; // config_ = new TQSettings;
// config_->beginGroup("/baghira/Deco"); // config_->beginGroup("/baghira/Deco");
KGlobal::locale()->insertCatalogue("kwin_baghira_config"); KGlobal::locale()->insertCatalogue("kwin_baghira_config");
@ -164,11 +164,11 @@ BaghiraConfig::~BaghiraConfig()
void BaghiraConfig::load(KConfig*) void BaghiraConfig::load(KConfig*)
{ {
QSettings *config_ = new QSettings; TQSettings *config_ = new TQSettings;
config_->beginGroup("/baghira/Deco"); config_->beginGroup("/baghira/Deco");
QString value = config_->readEntry("TitleAlignment", "AlignHCenter"); TQString value = config_->readEntry("TitleAlignment", "AlignHCenter");
QRadioButton *button = (QRadioButton*)dialog_->titlealign-> TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->
child((const char *)value.latin1()); child((const char *)value.latin1());
if (button) button->setChecked(true); if (button) button->setChecked(true);
@ -183,10 +183,10 @@ void BaghiraConfig::load(KConfig*)
dialog_->noModalDeco->setChecked(config_->readBoolEntry("NoModalDeco",false)); dialog_->noModalDeco->setChecked(config_->readBoolEntry("NoModalDeco",false));
dialog_->delAppname->setChecked(config_->readBoolEntry("RemoveAppname",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_->activeColor1_J->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor1_1",TQColor(255,255,255).rgb())));
dialog_->inactiveColor1_J->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_1",QColor(204,214,230).rgb()))); dialog_->inactiveColor1_J->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor1_1",TQColor(204,214,230).rgb())));
dialog_->activeColor2_J->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_1",QColor(238,234,238).rgb()))); dialog_->activeColor2_J->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor2_1",TQColor(238,234,238).rgb())));
dialog_->inactiveColor2_J->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_1",QColor(194,196,211).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_->buttonStyle_J->setCurrentItem(config_->readNumEntry("ButtonStyle_1",1));
dialog_->titleeffect_J->setCurrentItem(config_->readNumEntry("TitleEffect_1", 1)); dialog_->titleeffect_J->setCurrentItem(config_->readNumEntry("TitleEffect_1", 1));
dialog_->i_titleeffect_J->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_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_->LineImpact_J->setValue(config_->readNumEntry("LineImpact_1",40));
dialog_->borderSize_J->setValue(config_->readNumEntry("BorderSize_1",0)); 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_->activeColor1_P->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor1_2",TQColor(238,238,238).rgb())));
dialog_->inactiveColor1_P->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_2",QColor(246,242,246).rgb()))); dialog_->inactiveColor1_P->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor1_2",TQColor(246,242,246).rgb())));
dialog_->activeColor2_P->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_2",QColor(205,202,205).rgb()))); dialog_->activeColor2_P->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor2_2",TQColor(205,202,205).rgb())));
dialog_->inactiveColor2_P->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_2",QColor(238,238,238).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_->buttonStyle_P->setCurrentItem(config_->readNumEntry("ButtonStyle_2",0));
dialog_->titleeffect_P->setCurrentItem(config_->readNumEntry("TitleEffect_2", 0)); dialog_->titleeffect_P->setCurrentItem(config_->readNumEntry("TitleEffect_2", 0));
dialog_->i_titleeffect_P->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_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_->LineImpact_P->setValue(config_->readNumEntry("LineImpact_2",40));
dialog_->borderSize_P->setValue(config_->readNumEntry("BorderSize_2",0)); 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_->activeColor1_B->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor1_3",TQColor(202,202,202).rgb())));
dialog_->inactiveColor1_B->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_3",QColor(200,200,200).rgb()))); dialog_->inactiveColor1_B->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor1_3",TQColor(200,200,200).rgb())));
dialog_->activeColor2_B->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_3",QColor(150,150,150).rgb()))); dialog_->activeColor2_B->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor2_3",TQColor(150,150,150).rgb())));
dialog_->inactiveColor2_B->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_3",QColor(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_->buttonStyle_B->setCurrentItem(config_->readNumEntry("ButtonStyle_3",0));
dialog_->titleeffect_B->setCurrentItem(config_->readNumEntry("TitleEffect_3", 4)); dialog_->titleeffect_B->setCurrentItem(config_->readNumEntry("TitleEffect_3", 4));
dialog_->i_titleeffect_B->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_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_->LineImpact_B->setValue(config_->readNumEntry("LineImpact_3",0));
dialog_->borderSize_B->setValue(config_->readNumEntry("BorderSize_3",6)); 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_->activeColor1_T->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor1_4",TQColor(238,238,238).rgb())));
dialog_->activeColor2_T->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_4",QColor(205,202,205).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_->buttonStyle_T->setCurrentItem(config_->readNumEntry("ButtonStyle_4",0));
dialog_->shapeUL_T->setChecked(config_->readBoolEntry("ShapeUL_4",true)); dialog_->shapeUL_T->setChecked(config_->readBoolEntry("ShapeUL_4",true));
dialog_->shapeUR_T->setChecked(config_->readBoolEntry("ShapeUR_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_->_3DImpact_T->setValue(config_->readNumEntry("3DImpact_4",20));
dialog_->borderSize_T->setValue(config_->readNumEntry("BorderSize_4",0)); 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_->activeColor1_S->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor1_5",TQColor(250,250,250).rgb())));
dialog_->inactiveColor1_S->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_5",QColor(230,230,230).rgb()))); dialog_->inactiveColor1_S->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor1_5",TQColor(230,230,230).rgb())));
dialog_->activeColor2_S->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_5",QColor(230,230,230).rgb()))); dialog_->activeColor2_S->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor2_5",TQColor(230,230,230).rgb())));
dialog_->inactiveColor2_S->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_5",QColor(250,250,250).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_->buttonStyle_S->setCurrentItem(config_->readNumEntry("ButtonStyle_5",0));
dialog_->titleeffect_S->setCurrentItem(config_->readNumEntry("TitleEffect_5", 0)); dialog_->titleeffect_S->setCurrentItem(config_->readNumEntry("TitleEffect_5", 0));
dialog_->i_titleeffect_S->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_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_->LineImpact_S->setValue(config_->readNumEntry("LineImpact_5",30));
dialog_->borderSize_S->setValue(config_->readNumEntry("BorderSize_5",0)); dialog_->borderSize_S->setValue(config_->readNumEntry("BorderSize_5",0));
buttonDialog_->inactiveColor->setColor(QColor((unsigned int)config_->readNumEntry("InactiveButtonColor", QColor(255,255,255).rgb()))); buttonDialog_->inactiveColor->setColor(TQColor((unsigned int)config_->readNumEntry("InactiveButtonColor", TQColor(255,255,255).rgb())));
buttonDialog_->closeColor->setColor(QColor((unsigned int)config_->readNumEntry("CloseButtonColor", QColor(200,85,70).rgb()))); buttonDialog_->closeColor->setColor(TQColor((unsigned int)config_->readNumEntry("CloseButtonColor", TQColor(200,85,70).rgb())));
buttonDialog_->minColor->setColor(QColor((unsigned int)config_->readNumEntry("MinButtonColor", QColor(230,155,40).rgb()))); buttonDialog_->minColor->setColor(TQColor((unsigned int)config_->readNumEntry("MinButtonColor", TQColor(230,155,40).rgb())));
buttonDialog_-> maxColor->setColor(QColor((unsigned int)config_->readNumEntry("MaxButtonColor", QColor(121,180,54).rgb()))); buttonDialog_-> maxColor->setColor(TQColor((unsigned int)config_->readNumEntry("MaxButtonColor", TQColor(121,180,54).rgb())));
buttonDialog_->menuColor->setColor(QColor((unsigned int)config_->readNumEntry("MenuButtonColor", QColor(74,140,242).rgb()))); buttonDialog_->menuColor->setColor(TQColor((unsigned int)config_->readNumEntry("MenuButtonColor", TQColor(74,140,242).rgb())));
buttonDialog_->helpColor->setColor(QColor((unsigned int)config_->readNumEntry("HelpButtonColor", QColor(0,0,0).rgb()))); buttonDialog_->helpColor->setColor(TQColor((unsigned int)config_->readNumEntry("HelpButtonColor", TQColor(0,0,0).rgb())));
buttonDialog_->stickyColor->setColor(QColor((unsigned int)config_->readNumEntry("StickyButtonColor", QColor(74,140,242).rgb()))); buttonDialog_->stickyColor->setColor(TQColor((unsigned int)config_->readNumEntry("StickyButtonColor", TQColor(74,140,242).rgb())));
buttonDialog_->aboveColor->setColor(QColor((unsigned int)config_->readNumEntry("AboveButtonColor", QColor(74,140,242).rgb()))); buttonDialog_->aboveColor->setColor(TQColor((unsigned int)config_->readNumEntry("AboveButtonColor", TQColor(74,140,242).rgb())));
buttonDialog_->behindColor->setColor(QColor((unsigned int)config_->readNumEntry("BehindButtonColor", QColor(74,140,242).rgb()))); buttonDialog_->behindColor->setColor(TQColor((unsigned int)config_->readNumEntry("BehindButtonColor", TQColor(74,140,242).rgb())));
buttonDialog_->shadeColor->setColor(QColor((unsigned int)config_->readNumEntry("ShadeButtonColor", QColor(74,140,242).rgb()))); buttonDialog_->shadeColor->setColor(TQColor((unsigned int)config_->readNumEntry("ShadeButtonColor", TQColor(74,140,242).rgb())));
buttonDialog_->init(); buttonDialog_->init();
config_->endGroup(); config_->endGroup();
delete config_; delete config_;
@ -281,11 +281,11 @@ void BaghiraConfig::load(KConfig*)
void BaghiraConfig::save(KConfig*) void BaghiraConfig::save(KConfig*)
{ {
QSettings *config_ = new QSettings; TQSettings *config_ = new TQSettings;
config_->beginGroup("/baghira/Deco"); config_->beginGroup("/baghira/Deco");
QRadioButton *button = (QRadioButton*)dialog_->titlealign->selected(); TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->selected();
if (button) config_->writeEntry("TitleAlignment", QString(button->name())); if (button) config_->writeEntry("TitleAlignment", TQString(button->name()));
config_->writeEntry("DrawComicFrame", dialog_->drawComicFrame->isChecked()); config_->writeEntry("DrawComicFrame", dialog_->drawComicFrame->isChecked());
config_->writeEntry("AddAutoSpacing", dialog_->addAutoSpacing->isChecked()); config_->writeEntry("AddAutoSpacing", dialog_->addAutoSpacing->isChecked());
config_->writeEntry("ResizeGrip", dialog_->ResizeGrip->isChecked()); config_->writeEntry("ResizeGrip", dialog_->ResizeGrip->isChecked());
@ -397,7 +397,7 @@ void BaghiraConfig::save(KConfig*)
void BaghiraConfig::defaults() void BaghiraConfig::defaults()
{ {
QRadioButton *button = (QRadioButton*)dialog_->titlealign->child("AlignHCenter"); TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->child("AlignHCenter");
if (button) button->setChecked(true); if (button) button->setChecked(true);
dialog_->allowEasyClosing->setChecked(false); dialog_->allowEasyClosing->setChecked(false);
dialog_->minTH->setValue(22); dialog_->minTH->setValue(22);
@ -410,10 +410,10 @@ void BaghiraConfig::defaults()
dialog_->noModalDeco->setChecked(false); dialog_->noModalDeco->setChecked(false);
dialog_->delAppname->setChecked(false); dialog_->delAppname->setChecked(false);
dialog_->activeColor1_J->setColor(QColor(255,255,255)); dialog_->activeColor1_J->setColor(TQColor(255,255,255));
dialog_->inactiveColor1_J->setColor(QColor(204,214,230)); dialog_->inactiveColor1_J->setColor(TQColor(204,214,230));
dialog_->activeColor2_J->setColor(QColor(238,234,238)); dialog_->activeColor2_J->setColor(TQColor(238,234,238));
dialog_->inactiveColor2_J->setColor(QColor(194,196,211)); dialog_->inactiveColor2_J->setColor(TQColor(194,196,211));
dialog_->buttonStyle_J->setCurrentItem(1); dialog_->buttonStyle_J->setCurrentItem(1);
dialog_->titleeffect_J->setCurrentItem(1); dialog_->titleeffect_J->setCurrentItem(1);
dialog_->i_titleeffect_J->setCurrentItem(1); dialog_->i_titleeffect_J->setCurrentItem(1);
@ -426,10 +426,10 @@ void BaghiraConfig::defaults()
dialog_->LineImpact_J->setValue(40); dialog_->LineImpact_J->setValue(40);
dialog_->borderSize_J->setValue(0); dialog_->borderSize_J->setValue(0);
dialog_->activeColor1_P->setColor(QColor(238,238,238)); dialog_->activeColor1_P->setColor(TQColor(238,238,238));
dialog_->inactiveColor1_P->setColor(QColor(246,242,246)); dialog_->inactiveColor1_P->setColor(TQColor(246,242,246));
dialog_->activeColor2_P->setColor(QColor(205,202,205)); dialog_->activeColor2_P->setColor(TQColor(205,202,205));
dialog_->inactiveColor2_P->setColor(QColor(238,238,238)); dialog_->inactiveColor2_P->setColor(TQColor(238,238,238));
dialog_->buttonStyle_P->setCurrentItem(0); dialog_->buttonStyle_P->setCurrentItem(0);
dialog_->titleeffect_P->setCurrentItem(0); dialog_->titleeffect_P->setCurrentItem(0);
dialog_->i_titleeffect_P->setCurrentItem(0); dialog_->i_titleeffect_P->setCurrentItem(0);
@ -442,10 +442,10 @@ void BaghiraConfig::defaults()
dialog_->LineImpact_P->setValue(30); dialog_->LineImpact_P->setValue(30);
dialog_->borderSize_P->setValue(0); dialog_->borderSize_P->setValue(0);
dialog_->activeColor1_B->setColor(QColor(210,210,210)); dialog_->activeColor1_B->setColor(TQColor(210,210,210));
dialog_->inactiveColor1_B->setColor(QColor(200,200,200)); dialog_->inactiveColor1_B->setColor(TQColor(200,200,200));
dialog_->activeColor2_B->setColor(QColor(150,150,150)); dialog_->activeColor2_B->setColor(TQColor(150,150,150));
dialog_->inactiveColor2_B->setColor(QColor(140,140,140)); dialog_->inactiveColor2_B->setColor(TQColor(140,140,140));
dialog_->buttonStyle_B->setCurrentItem(0); dialog_->buttonStyle_B->setCurrentItem(0);
dialog_->titleeffect_B->setCurrentItem(4); dialog_->titleeffect_B->setCurrentItem(4);
dialog_->i_titleeffect_B->setCurrentItem(4); dialog_->i_titleeffect_B->setCurrentItem(4);
@ -458,8 +458,8 @@ void BaghiraConfig::defaults()
dialog_->LineImpact_B->setValue(0); dialog_->LineImpact_B->setValue(0);
dialog_->borderSize_B->setValue(6); dialog_->borderSize_B->setValue(6);
dialog_->activeColor1_T->setColor(QColor(238,238,238)); dialog_->activeColor1_T->setColor(TQColor(238,238,238));
dialog_->activeColor2_T->setColor(QColor(211,208,211)); dialog_->activeColor2_T->setColor(TQColor(211,208,211));
dialog_->buttonStyle_T->setCurrentItem(0); dialog_->buttonStyle_T->setCurrentItem(0);
dialog_->shapeUL_T->setChecked(true); dialog_->shapeUL_T->setChecked(true);
dialog_->shapeUR_T->setChecked(true); dialog_->shapeUR_T->setChecked(true);
@ -469,10 +469,10 @@ void BaghiraConfig::defaults()
dialog_->_3DImpact_T->setValue(20); dialog_->_3DImpact_T->setValue(20);
dialog_->borderSize_T->setValue(0); dialog_->borderSize_T->setValue(0);
dialog_->activeColor1_S->setColor(QColor(250,250,250)); dialog_->activeColor1_S->setColor(TQColor(250,250,250));
dialog_->inactiveColor1_S->setColor(QColor(230,230,230)); dialog_->inactiveColor1_S->setColor(TQColor(230,230,230));
dialog_->activeColor2_S->setColor(QColor(230,230,230)); dialog_->activeColor2_S->setColor(TQColor(230,230,230));
dialog_->inactiveColor2_S->setColor(QColor(250,250,250)); dialog_->inactiveColor2_S->setColor(TQColor(250,250,250));
dialog_->buttonStyle_S->setCurrentItem(0); dialog_->buttonStyle_S->setCurrentItem(0);
dialog_->titleeffect_S->setCurrentItem(0); dialog_->titleeffect_S->setCurrentItem(0);
dialog_->i_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}; 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; save = false;
layout = new QGridLayout(this,2,2,11,6, "Grid"); layout = new TQGridLayout(this,2,2,11,6, "Grid");
buttonLayout = new QVBoxLayout(0,0,6); 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"); inactiveButton = new AquariusButton(tmpPix,this, "Inactive Button");
buttonLayout->addWidget(inactiveButton); buttonLayout->addWidget(inactiveButton);
closeButton = new AquariusButton(tmpPix,this, "Close Button"); closeButton = new AquariusButton(tmpPix,this, "Close Button");
@ -524,34 +524,34 @@ ButtonColors::ButtonColors(QWidget *parent, const char * name) : QDialog(parent,
buttonLayout->addWidget(behindButton); buttonLayout->addWidget(behindButton);
shadeButton = new AquariusButton(tmpPix,this, "Shade Button"); shadeButton = new AquariusButton(tmpPix,this, "Shade Button");
buttonLayout->addWidget(shadeButton); buttonLayout->addWidget(shadeButton);
tmpPix = QPixmap(uic_findImage("preview-menu")); tmpPix = TQPixmap(uic_findImage("preview-menu"));
menuButton = new AquariusButton(tmpPix,this, "Menu Button"); menuButton = new AquariusButton(tmpPix,this, "Menu Button");
buttonLayout->addWidget(menuButton); buttonLayout->addWidget(menuButton);
tmpPix = QPixmap(uic_findImage("icon_help")); tmpPix = TQPixmap(uic_findImage("icon_help"));
helpButton = new AquariusButton(tmpPix,this, "Help Button"); helpButton = new AquariusButton(tmpPix,this, "Help Button");
buttonLayout->addWidget(helpButton); buttonLayout->addWidget(helpButton);
twoButts = new QHBoxLayout(0,0,6); twoButts = new TQHBoxLayout(0,0,6);
presets_ = new QComboBox(this); presets_ = new TQComboBox(this);
for (int i = 0; i < NUMBEROFCOLORS; i++) for (int i = 0; i < NUMBEROFCOLORS; i++)
presets_->insertItem ( presetColorName[i], i ); presets_->insertItem ( presetColorName[i], i );
twoButts->addWidget(presets_); twoButts->addWidget(presets_);
cancel = new QPushButton("Cancel", this); cancel = new TQPushButton("Cancel", this);
cancel->setDefault( true ); cancel->setDefault( true );
twoButts->addWidget(cancel); twoButts->addWidget(cancel);
twoButts->addStretch(); twoButts->addStretch();
layout->addLayout(twoButts,1,0); layout->addLayout(twoButts,1,0);
ok = new QPushButton("OK", this); ok = new TQPushButton("OK", this);
layout->addWidget(ok,1,1); layout->addWidget(ok,1,1);
layout->addLayout(buttonLayout,0,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 = new TQLabel(inactiveButton->name(), this);
indicator->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter | Qt::ExpandTabs); indicator->setAlignment(TQt::AlignHCenter | TQt::AlignVCenter | TQt::ExpandTabs);
QFont tmpFont = font(); TQFont tmpFont = font();
tmpFont.setBold( true ); tmpFont.setBold( true );
tmpFont.setPointSize( 24 ); tmpFont.setPointSize( 24 );
indicator->setFont(tmpFont); indicator->setFont(tmpFont);
@ -592,7 +592,7 @@ ButtonColors::ButtonColors(QWidget *parent, const char * name) : QDialog(parent,
layout->addLayout(pickerLayout,0,0); layout->addLayout(pickerLayout,0,0);
resize( QSize(485, 177).expandedTo(minimumSizeHint()) ); resize( TQSize(485, 177).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished ); clearWState( WState_Polished );
connect(presets_,SIGNAL(activated(int)), this, SLOT(setColorGroup(int))); 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(behindButton, SIGNAL(clicked()), this, SLOT(activateBehind()) );
connect(shadeButton, SIGNAL(clicked()), this, SLOT(activateShade()) ); connect(shadeButton, SIGNAL(clicked()), this, SLOT(activateShade()) );
connect(inactiveColor, SIGNAL(colorChanged(QColor)), inactiveButton, SLOT(setColor(QColor)) ); connect(inactiveColor, SIGNAL(colorChanged(TQColor)), inactiveButton, SLOT(setColor(TQColor)) );
connect(closeColor, SIGNAL(colorChanged(QColor)), closeButton, SLOT(setColor(QColor)) ); connect(closeColor, SIGNAL(colorChanged(TQColor)), closeButton, SLOT(setColor(TQColor)) );
connect(minColor, SIGNAL(colorChanged(QColor)), minButton, SLOT(setColor(QColor)) ); connect(minColor, SIGNAL(colorChanged(TQColor)), minButton, SLOT(setColor(TQColor)) );
connect(maxColor, SIGNAL(colorChanged(QColor)), maxButton, SLOT(setColor(QColor)) ); connect(maxColor, SIGNAL(colorChanged(TQColor)), maxButton, SLOT(setColor(TQColor)) );
connect(menuColor, SIGNAL(colorChanged(QColor)), menuButton, SLOT(setColor(QColor)) ); connect(menuColor, SIGNAL(colorChanged(TQColor)), menuButton, SLOT(setColor(TQColor)) );
connect(helpColor, SIGNAL(colorChanged(QColor)), helpButton, SLOT(setColor(QColor)) ); connect(helpColor, SIGNAL(colorChanged(TQColor)), helpButton, SLOT(setColor(TQColor)) );
connect(stickyColor, SIGNAL(colorChanged(QColor)), stickyButton, SLOT(setColor(QColor)) ); connect(stickyColor, SIGNAL(colorChanged(TQColor)), stickyButton, SLOT(setColor(TQColor)) );
connect(aboveColor, SIGNAL(colorChanged(QColor)), aboveButton, SLOT(setColor(QColor)) ); connect(aboveColor, SIGNAL(colorChanged(TQColor)), aboveButton, SLOT(setColor(TQColor)) );
connect(behindColor, SIGNAL(colorChanged(QColor)), behindButton, SLOT(setColor(QColor)) ); connect(behindColor, SIGNAL(colorChanged(TQColor)), behindButton, SLOT(setColor(TQColor)) );
connect(shadeColor, SIGNAL(colorChanged(QColor)), shadeButton, SLOT(setColor(QColor)) ); connect(shadeColor, SIGNAL(colorChanged(TQColor)), shadeButton, SLOT(setColor(TQColor)) );
} }
@ -630,16 +630,16 @@ ButtonColors::~ButtonColors(){
} }
void ButtonColors::setColorGroup(int i){ void ButtonColors::setColorGroup(int i){
inactiveColor->setColor(QColor((*presetColors[i])[0][0],(*presetColors[i])[0][1],(*presetColors[i])[0][2]).rgb()); inactiveColor->setColor(TQColor((*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()); closeColor->setColor(TQColor((*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()); minColor->setColor(TQColor((*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()); maxColor->setColor(TQColor((*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()); menuColor->setColor(TQColor((*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()); helpColor->setColor(TQColor((*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()); stickyColor->setColor(TQColor((*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()); aboveColor->setColor(TQColor((*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()); behindColor->setColor(TQColor((*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()); shadeColor->setColor(TQColor((*presetColors[i])[9][0],(*presetColors[i])[9][1],(*presetColors[i])[9][2]).rgb());
} }
void ButtonColors::setPicker(ColorPicker *picker){ void ButtonColors::setPicker(ColorPicker *picker){
@ -721,7 +721,7 @@ void ButtonColors::init(){
extern "C" extern "C"
{ {
QObject* allocate_config(KConfig* config, QWidget* parent) { TQObject* allocate_config(KConfig* config, TQWidget* parent) {
return(new BaghiraConfig(config, parent)); return(new BaghiraConfig(config, parent));
} }
} }

@ -11,19 +11,19 @@
#include <klocale.h> #include <klocale.h>
#include <kglobal.h> #include <kglobal.h>
#include <kcolorbutton.h> #include <kcolorbutton.h>
#include <qbutton.h> #include <tqbutton.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qfont.h> #include <tqfont.h>
#include <qgroupbox.h> #include <tqgroupbox.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qradiobutton.h> #include <tqradiobutton.h>
#include <qsettings.h> #include <tqsettings.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <qwhatsthis.h> #include <tqwhatsthis.h>
#include "baghiraconfig.h" #include "baghiraconfig.h"
#include "configdialog.h" #include "configdialog.h"
@ -39,11 +39,11 @@
// ------------- // -------------
// Constructor // Constructor
BaghiraConfig::BaghiraConfig(KConfig*, QWidget* parent) BaghiraConfig::BaghiraConfig(KConfig*, TQWidget* parent)
: QObject(parent), /*config_(0),*/ dialog_(0) : TQObject(parent), /*config_(0),*/ dialog_(0)
{ {
// config_ = new KConfig("baghirarc"); // config_ = new KConfig("baghirarc");
// config_ = new QSettings; // config_ = new TQSettings;
// config_->beginGroup("/baghira/Deco"); // config_->beginGroup("/baghira/Deco");
KGlobal::locale()->insertCatalogue("kwin_baghira_config"); KGlobal::locale()->insertCatalogue("kwin_baghira_config");
@ -165,11 +165,11 @@ BaghiraConfig::~BaghiraConfig()
void BaghiraConfig::load(KConfig*) void BaghiraConfig::load(KConfig*)
{ {
QSettings *config_ = new QSettings; TQSettings *config_ = new TQSettings;
config_->beginGroup("/baghira/Deco"); config_->beginGroup("/baghira/Deco");
QString value = config_->readEntry("TitleAlignment", "AlignHCenter"); TQString value = config_->readEntry("TitleAlignment", "AlignHCenter");
QRadioButton *button = (QRadioButton*)dialog_->titlealign-> TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->
child((const char *)value.latin1()); child((const char *)value.latin1());
if (button) button->setChecked(true); if (button) button->setChecked(true);
@ -184,10 +184,10 @@ void BaghiraConfig::load(KConfig*)
dialog_->noModalDeco->setChecked(config_->readBoolEntry("NoModalDeco",false)); dialog_->noModalDeco->setChecked(config_->readBoolEntry("NoModalDeco",false));
dialog_->delAppname->setChecked(config_->readBoolEntry("RemoveAppname",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_->activeColor1_J->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor1_1",TQColor(255,255,255).rgb())));
dialog_->inactiveColor1_J->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_1",QColor(204,214,230).rgb()))); dialog_->inactiveColor1_J->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor1_1",TQColor(204,214,230).rgb())));
dialog_->activeColor2_J->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_1",QColor(238,234,238).rgb()))); dialog_->activeColor2_J->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor2_1",TQColor(238,234,238).rgb())));
dialog_->inactiveColor2_J->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_1",QColor(194,196,211).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_->buttonStyle_J->setCurrentItem(config_->readNumEntry("ButtonStyle_1",1));
dialog_->titleeffect_J->setCurrentItem(config_->readNumEntry("TitleEffect_1", 1)); dialog_->titleeffect_J->setCurrentItem(config_->readNumEntry("TitleEffect_1", 1));
dialog_->i_titleeffect_J->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_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_->LineImpact_J->setValue(config_->readNumEntry("LineImpact_1",40));
dialog_->borderSize_J->setValue(config_->readNumEntry("BorderSize_1",0)); 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_->activeColor1_P->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor1_2",TQColor(238,238,238).rgb())));
dialog_->inactiveColor1_P->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_2",QColor(246,242,246).rgb()))); dialog_->inactiveColor1_P->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor1_2",TQColor(246,242,246).rgb())));
dialog_->activeColor2_P->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_2",QColor(205,202,205).rgb()))); dialog_->activeColor2_P->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor2_2",TQColor(205,202,205).rgb())));
dialog_->inactiveColor2_P->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_2",QColor(238,238,238).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_->buttonStyle_P->setCurrentItem(config_->readNumEntry("ButtonStyle_2",0));
dialog_->titleeffect_P->setCurrentItem(config_->readNumEntry("TitleEffect_2", 0)); dialog_->titleeffect_P->setCurrentItem(config_->readNumEntry("TitleEffect_2", 0));
dialog_->i_titleeffect_P->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_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_->LineImpact_P->setValue(config_->readNumEntry("LineImpact_2",40));
dialog_->borderSize_P->setValue(config_->readNumEntry("BorderSize_2",0)); 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_->activeColor1_B->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor1_3",TQColor(202,202,202).rgb())));
dialog_->inactiveColor1_B->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_3",QColor(200,200,200).rgb()))); dialog_->inactiveColor1_B->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor1_3",TQColor(200,200,200).rgb())));
dialog_->activeColor2_B->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_3",QColor(150,150,150).rgb()))); dialog_->activeColor2_B->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor2_3",TQColor(150,150,150).rgb())));
dialog_->inactiveColor2_B->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_3",QColor(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_->buttonStyle_B->setCurrentItem(config_->readNumEntry("ButtonStyle_3",0));
dialog_->titleeffect_B->setCurrentItem(config_->readNumEntry("TitleEffect_3", 4)); dialog_->titleeffect_B->setCurrentItem(config_->readNumEntry("TitleEffect_3", 4));
dialog_->i_titleeffect_B->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_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_->LineImpact_B->setValue(config_->readNumEntry("LineImpact_3",0));
dialog_->borderSize_B->setValue(config_->readNumEntry("BorderSize_3",6)); 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_->activeColor1_T->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor1_4",TQColor(238,238,238).rgb())));
dialog_->activeColor2_T->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_4",QColor(205,202,205).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_->buttonStyle_T->setCurrentItem(config_->readNumEntry("ButtonStyle_4",0));
dialog_->shapeUL_T->setChecked(config_->readBoolEntry("ShapeUL_4",true)); dialog_->shapeUL_T->setChecked(config_->readBoolEntry("ShapeUL_4",true));
dialog_->shapeUR_T->setChecked(config_->readBoolEntry("ShapeUR_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_->_3DImpact_T->setValue(config_->readNumEntry("3DImpact_4",20));
dialog_->borderSize_T->setValue(config_->readNumEntry("BorderSize_4",0)); 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_->activeColor1_S->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor1_5",TQColor(250,250,250).rgb())));
dialog_->inactiveColor1_S->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_5",QColor(230,230,230).rgb()))); dialog_->inactiveColor1_S->setColor(TQColor((unsigned int)config_->readNumEntry("inactiveColor1_5",TQColor(230,230,230).rgb())));
dialog_->activeColor2_S->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_5",QColor(230,230,230).rgb()))); dialog_->activeColor2_S->setColor(TQColor((unsigned int)config_->readNumEntry("activeColor2_5",TQColor(230,230,230).rgb())));
dialog_->inactiveColor2_S->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_5",QColor(250,250,250).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_->buttonStyle_S->setCurrentItem(config_->readNumEntry("ButtonStyle_5",0));
dialog_->titleeffect_S->setCurrentItem(config_->readNumEntry("TitleEffect_5", 0)); dialog_->titleeffect_S->setCurrentItem(config_->readNumEntry("TitleEffect_5", 0));
dialog_->i_titleeffect_S->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_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_->LineImpact_S->setValue(config_->readNumEntry("LineImpact_5",30));
dialog_->borderSize_S->setValue(config_->readNumEntry("BorderSize_5",0)); dialog_->borderSize_S->setValue(config_->readNumEntry("BorderSize_5",0));
buttonDialog_->inactiveColor->setColor(QColor((unsigned int)config_->readNumEntry("InactiveButtonColor", QColor(255,255,255).rgb()))); buttonDialog_->inactiveColor->setColor(TQColor((unsigned int)config_->readNumEntry("InactiveButtonColor", TQColor(255,255,255).rgb())));
buttonDialog_->closeColor->setColor(QColor((unsigned int)config_->readNumEntry("CloseButtonColor", QColor(200,85,70).rgb()))); buttonDialog_->closeColor->setColor(TQColor((unsigned int)config_->readNumEntry("CloseButtonColor", TQColor(200,85,70).rgb())));
buttonDialog_->minColor->setColor(QColor((unsigned int)config_->readNumEntry("MinButtonColor", QColor(230,155,40).rgb()))); buttonDialog_->minColor->setColor(TQColor((unsigned int)config_->readNumEntry("MinButtonColor", TQColor(230,155,40).rgb())));
buttonDialog_-> maxColor->setColor(QColor((unsigned int)config_->readNumEntry("MaxButtonColor", QColor(121,180,54).rgb()))); buttonDialog_-> maxColor->setColor(TQColor((unsigned int)config_->readNumEntry("MaxButtonColor", TQColor(121,180,54).rgb())));
buttonDialog_->menuColor->setColor(QColor((unsigned int)config_->readNumEntry("MenuButtonColor", QColor(74,140,242).rgb()))); buttonDialog_->menuColor->setColor(TQColor((unsigned int)config_->readNumEntry("MenuButtonColor", TQColor(74,140,242).rgb())));
buttonDialog_->helpColor->setColor(QColor((unsigned int)config_->readNumEntry("HelpButtonColor", QColor(0,0,0).rgb()))); buttonDialog_->helpColor->setColor(TQColor((unsigned int)config_->readNumEntry("HelpButtonColor", TQColor(0,0,0).rgb())));
buttonDialog_->stickyColor->setColor(QColor((unsigned int)config_->readNumEntry("StickyButtonColor", QColor(74,140,242).rgb()))); buttonDialog_->stickyColor->setColor(TQColor((unsigned int)config_->readNumEntry("StickyButtonColor", TQColor(74,140,242).rgb())));
buttonDialog_->aboveColor->setColor(QColor((unsigned int)config_->readNumEntry("AboveButtonColor", QColor(74,140,242).rgb()))); buttonDialog_->aboveColor->setColor(TQColor((unsigned int)config_->readNumEntry("AboveButtonColor", TQColor(74,140,242).rgb())));
buttonDialog_->behindColor->setColor(QColor((unsigned int)config_->readNumEntry("BehindButtonColor", QColor(74,140,242).rgb()))); buttonDialog_->behindColor->setColor(TQColor((unsigned int)config_->readNumEntry("BehindButtonColor", TQColor(74,140,242).rgb())));
buttonDialog_->shadeColor->setColor(QColor((unsigned int)config_->readNumEntry("ShadeButtonColor", QColor(74,140,242).rgb()))); buttonDialog_->shadeColor->setColor(TQColor((unsigned int)config_->readNumEntry("ShadeButtonColor", TQColor(74,140,242).rgb())));
buttonDialog_->init(); buttonDialog_->init();
config_->endGroup(); config_->endGroup();
delete config_; delete config_;
@ -282,11 +282,11 @@ void BaghiraConfig::load(KConfig*)
void BaghiraConfig::save(KConfig*) void BaghiraConfig::save(KConfig*)
{ {
QSettings *config_ = new QSettings; TQSettings *config_ = new TQSettings;
config_->beginGroup("/baghira/Deco"); config_->beginGroup("/baghira/Deco");
QRadioButton *button = (QRadioButton*)dialog_->titlealign->selected(); TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->selected();
if (button) config_->writeEntry("TitleAlignment", QString(button->name())); if (button) config_->writeEntry("TitleAlignment", TQString(button->name()));
config_->writeEntry("DrawComicFrame", dialog_->drawComicFrame->isChecked()); config_->writeEntry("DrawComicFrame", dialog_->drawComicFrame->isChecked());
config_->writeEntry("AddAutoSpacing", dialog_->addAutoSpacing->isChecked()); config_->writeEntry("AddAutoSpacing", dialog_->addAutoSpacing->isChecked());
config_->writeEntry("ResizeGrip", dialog_->ResizeGrip->isChecked()); config_->writeEntry("ResizeGrip", dialog_->ResizeGrip->isChecked());
@ -398,7 +398,7 @@ void BaghiraConfig::save(KConfig*)
void BaghiraConfig::defaults() void BaghiraConfig::defaults()
{ {
QRadioButton *button = (QRadioButton*)dialog_->titlealign->child("AlignHCenter"); TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->child("AlignHCenter");
if (button) button->setChecked(true); if (button) button->setChecked(true);
dialog_->allowEasyClosing->setChecked(false); dialog_->allowEasyClosing->setChecked(false);
dialog_->minTH->setValue(22); dialog_->minTH->setValue(22);
@ -411,10 +411,10 @@ void BaghiraConfig::defaults()
dialog_->noModalDeco->setChecked(false); dialog_->noModalDeco->setChecked(false);
dialog_->delAppname->setChecked(false); dialog_->delAppname->setChecked(false);
dialog_->activeColor1_J->setColor(QColor(255,255,255)); dialog_->activeColor1_J->setColor(TQColor(255,255,255));
dialog_->inactiveColor1_J->setColor(QColor(204,214,230)); dialog_->inactiveColor1_J->setColor(TQColor(204,214,230));
dialog_->activeColor2_J->setColor(QColor(238,234,238)); dialog_->activeColor2_J->setColor(TQColor(238,234,238));
dialog_->inactiveColor2_J->setColor(QColor(194,196,211)); dialog_->inactiveColor2_J->setColor(TQColor(194,196,211));
dialog_->buttonStyle_J->setCurrentItem(1); dialog_->buttonStyle_J->setCurrentItem(1);
dialog_->titleeffect_J->setCurrentItem(1); dialog_->titleeffect_J->setCurrentItem(1);
dialog_->i_titleeffect_J->setCurrentItem(1); dialog_->i_titleeffect_J->setCurrentItem(1);
@ -427,10 +427,10 @@ void BaghiraConfig::defaults()
dialog_->LineImpact_J->setValue(40); dialog_->LineImpact_J->setValue(40);
dialog_->borderSize_J->setValue(0); dialog_->borderSize_J->setValue(0);
dialog_->activeColor1_P->setColor(QColor(238,238,238)); dialog_->activeColor1_P->setColor(TQColor(238,238,238));
dialog_->inactiveColor1_P->setColor(QColor(246,242,246)); dialog_->inactiveColor1_P->setColor(TQColor(246,242,246));
dialog_->activeColor2_P->setColor(QColor(205,202,205)); dialog_->activeColor2_P->setColor(TQColor(205,202,205));
dialog_->inactiveColor2_P->setColor(QColor(238,238,238)); dialog_->inactiveColor2_P->setColor(TQColor(238,238,238));
dialog_->buttonStyle_P->setCurrentItem(0); dialog_->buttonStyle_P->setCurrentItem(0);
dialog_->titleeffect_P->setCurrentItem(0); dialog_->titleeffect_P->setCurrentItem(0);
dialog_->i_titleeffect_P->setCurrentItem(0); dialog_->i_titleeffect_P->setCurrentItem(0);
@ -443,10 +443,10 @@ void BaghiraConfig::defaults()
dialog_->LineImpact_P->setValue(30); dialog_->LineImpact_P->setValue(30);
dialog_->borderSize_P->setValue(0); dialog_->borderSize_P->setValue(0);
dialog_->activeColor1_B->setColor(QColor(210,210,210)); dialog_->activeColor1_B->setColor(TQColor(210,210,210));
dialog_->inactiveColor1_B->setColor(QColor(200,200,200)); dialog_->inactiveColor1_B->setColor(TQColor(200,200,200));
dialog_->activeColor2_B->setColor(QColor(150,150,150)); dialog_->activeColor2_B->setColor(TQColor(150,150,150));
dialog_->inactiveColor2_B->setColor(QColor(140,140,140)); dialog_->inactiveColor2_B->setColor(TQColor(140,140,140));
dialog_->buttonStyle_B->setCurrentItem(0); dialog_->buttonStyle_B->setCurrentItem(0);
dialog_->titleeffect_B->setCurrentItem(4); dialog_->titleeffect_B->setCurrentItem(4);
dialog_->i_titleeffect_B->setCurrentItem(4); dialog_->i_titleeffect_B->setCurrentItem(4);
@ -459,8 +459,8 @@ void BaghiraConfig::defaults()
dialog_->LineImpact_B->setValue(0); dialog_->LineImpact_B->setValue(0);
dialog_->borderSize_B->setValue(6); dialog_->borderSize_B->setValue(6);
dialog_->activeColor1_T->setColor(QColor(238,238,238)); dialog_->activeColor1_T->setColor(TQColor(238,238,238));
dialog_->activeColor2_T->setColor(QColor(211,208,211)); dialog_->activeColor2_T->setColor(TQColor(211,208,211));
dialog_->buttonStyle_T->setCurrentItem(0); dialog_->buttonStyle_T->setCurrentItem(0);
dialog_->shapeUL_T->setChecked(true); dialog_->shapeUL_T->setChecked(true);
dialog_->shapeUR_T->setChecked(true); dialog_->shapeUR_T->setChecked(true);
@ -470,10 +470,10 @@ void BaghiraConfig::defaults()
dialog_->_3DImpact_T->setValue(20); dialog_->_3DImpact_T->setValue(20);
dialog_->borderSize_T->setValue(0); dialog_->borderSize_T->setValue(0);
dialog_->activeColor1_S->setColor(QColor(250,250,250)); dialog_->activeColor1_S->setColor(TQColor(250,250,250));
dialog_->inactiveColor1_S->setColor(QColor(230,230,230)); dialog_->inactiveColor1_S->setColor(TQColor(230,230,230));
dialog_->activeColor2_S->setColor(QColor(230,230,230)); dialog_->activeColor2_S->setColor(TQColor(230,230,230));
dialog_->inactiveColor2_S->setColor(QColor(250,250,250)); dialog_->inactiveColor2_S->setColor(TQColor(250,250,250));
dialog_->buttonStyle_S->setCurrentItem(0); dialog_->buttonStyle_S->setCurrentItem(0);
dialog_->titleeffect_S->setCurrentItem(0); dialog_->titleeffect_S->setCurrentItem(0);
dialog_->i_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}; 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; save = false;
layout = new QGridLayout(this,2,2,11,6, "Grid"); layout = new TQGridLayout(this,2,2,11,6, "Grid");
buttonLayout = new QVBoxLayout(0,0,6); 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"); inactiveButton = new AquariusButton(tmpPix,this, "Inactive Button");
buttonLayout->addWidget(inactiveButton); buttonLayout->addWidget(inactiveButton);
closeButton = new AquariusButton(tmpPix,this, "Close Button"); closeButton = new AquariusButton(tmpPix,this, "Close Button");
@ -525,34 +525,34 @@ ButtonColors::ButtonColors(QWidget *parent, const char * name) : QDialog(parent,
buttonLayout->addWidget(behindButton); buttonLayout->addWidget(behindButton);
shadeButton = new AquariusButton(tmpPix,this, "Shade Button"); shadeButton = new AquariusButton(tmpPix,this, "Shade Button");
buttonLayout->addWidget(shadeButton); buttonLayout->addWidget(shadeButton);
tmpPix = QPixmap(uic_findImage("preview-menu")); tmpPix = TQPixmap(uic_findImage("preview-menu"));
menuButton = new AquariusButton(tmpPix,this, "Menu Button"); menuButton = new AquariusButton(tmpPix,this, "Menu Button");
buttonLayout->addWidget(menuButton); buttonLayout->addWidget(menuButton);
tmpPix = QPixmap(uic_findImage("icon_help")); tmpPix = TQPixmap(uic_findImage("icon_help"));
helpButton = new AquariusButton(tmpPix,this, "Help Button"); helpButton = new AquariusButton(tmpPix,this, "Help Button");
buttonLayout->addWidget(helpButton); buttonLayout->addWidget(helpButton);
twoButts = new QHBoxLayout(0,0,6); twoButts = new TQHBoxLayout(0,0,6);
presets_ = new QComboBox(this); presets_ = new TQComboBox(this);
for (int i = 0; i < NUMBEROFCOLORS; i++) for (int i = 0; i < NUMBEROFCOLORS; i++)
presets_->insertItem ( presetColorName[i], i ); presets_->insertItem ( presetColorName[i], i );
twoButts->addWidget(presets_); twoButts->addWidget(presets_);
cancel = new QPushButton("Cancel", this); cancel = new TQPushButton("Cancel", this);
cancel->setDefault( true ); cancel->setDefault( true );
twoButts->addWidget(cancel); twoButts->addWidget(cancel);
twoButts->addStretch(); twoButts->addStretch();
layout->addLayout(twoButts,1,0); layout->addLayout(twoButts,1,0);
ok = new QPushButton("OK", this); ok = new TQPushButton("OK", this);
layout->addWidget(ok,1,1); layout->addWidget(ok,1,1);
layout->addLayout(buttonLayout,0,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 = new TQLabel(inactiveButton->name(), this);
indicator->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter | Qt::ExpandTabs); indicator->setAlignment(TQt::AlignHCenter | TQt::AlignVCenter | TQt::ExpandTabs);
QFont tmpFont = font(); TQFont tmpFont = font();
tmpFont.setBold( true ); tmpFont.setBold( true );
tmpFont.setPointSize( 24 ); tmpFont.setPointSize( 24 );
indicator->setFont(tmpFont); indicator->setFont(tmpFont);
@ -593,7 +593,7 @@ ButtonColors::ButtonColors(QWidget *parent, const char * name) : QDialog(parent,
layout->addLayout(pickerLayout,0,0); layout->addLayout(pickerLayout,0,0);
resize( QSize(485, 177).expandedTo(minimumSizeHint()) ); resize( TQSize(485, 177).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished ); clearWState( WState_Polished );
connect(presets_,SIGNAL(activated(int)), this, SLOT(setColorGroup(int))); 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(behindButton, SIGNAL(clicked()), this, SLOT(activateBehind()) );
connect(shadeButton, SIGNAL(clicked()), this, SLOT(activateShade()) ); connect(shadeButton, SIGNAL(clicked()), this, SLOT(activateShade()) );
connect(inactiveColor, SIGNAL(colorChanged(QColor)), inactiveButton, SLOT(setColor(QColor)) ); connect(inactiveColor, SIGNAL(colorChanged(TQColor)), inactiveButton, SLOT(setColor(TQColor)) );
connect(closeColor, SIGNAL(colorChanged(QColor)), closeButton, SLOT(setColor(QColor)) ); connect(closeColor, SIGNAL(colorChanged(TQColor)), closeButton, SLOT(setColor(TQColor)) );
connect(minColor, SIGNAL(colorChanged(QColor)), minButton, SLOT(setColor(QColor)) ); connect(minColor, SIGNAL(colorChanged(TQColor)), minButton, SLOT(setColor(TQColor)) );
connect(maxColor, SIGNAL(colorChanged(QColor)), maxButton, SLOT(setColor(QColor)) ); connect(maxColor, SIGNAL(colorChanged(TQColor)), maxButton, SLOT(setColor(TQColor)) );
connect(menuColor, SIGNAL(colorChanged(QColor)), menuButton, SLOT(setColor(QColor)) ); connect(menuColor, SIGNAL(colorChanged(TQColor)), menuButton, SLOT(setColor(TQColor)) );
connect(helpColor, SIGNAL(colorChanged(QColor)), helpButton, SLOT(setColor(QColor)) ); connect(helpColor, SIGNAL(colorChanged(TQColor)), helpButton, SLOT(setColor(TQColor)) );
connect(stickyColor, SIGNAL(colorChanged(QColor)), stickyButton, SLOT(setColor(QColor)) ); connect(stickyColor, SIGNAL(colorChanged(TQColor)), stickyButton, SLOT(setColor(TQColor)) );
connect(aboveColor, SIGNAL(colorChanged(QColor)), aboveButton, SLOT(setColor(QColor)) ); connect(aboveColor, SIGNAL(colorChanged(TQColor)), aboveButton, SLOT(setColor(TQColor)) );
connect(behindColor, SIGNAL(colorChanged(QColor)), behindButton, SLOT(setColor(QColor)) ); connect(behindColor, SIGNAL(colorChanged(TQColor)), behindButton, SLOT(setColor(TQColor)) );
connect(shadeColor, SIGNAL(colorChanged(QColor)), shadeButton, SLOT(setColor(QColor)) ); connect(shadeColor, SIGNAL(colorChanged(TQColor)), shadeButton, SLOT(setColor(TQColor)) );
} }
@ -631,16 +631,16 @@ ButtonColors::~ButtonColors(){
} }
void ButtonColors::setColorGroup(int i){ void ButtonColors::setColorGroup(int i){
inactiveColor->setColor(QColor((*presetColors[i])[0][0],(*presetColors[i])[0][1],(*presetColors[i])[0][2]).rgb()); inactiveColor->setColor(TQColor((*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()); closeColor->setColor(TQColor((*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()); minColor->setColor(TQColor((*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()); maxColor->setColor(TQColor((*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()); menuColor->setColor(TQColor((*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()); helpColor->setColor(TQColor((*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()); stickyColor->setColor(TQColor((*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()); aboveColor->setColor(TQColor((*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()); behindColor->setColor(TQColor((*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()); shadeColor->setColor(TQColor((*presetColors[i])[9][0],(*presetColors[i])[9][1],(*presetColors[i])[9][2]).rgb());
} }
void ButtonColors::setPicker(ColorPicker *picker){ void ButtonColors::setPicker(ColorPicker *picker){
@ -722,7 +722,7 @@ void ButtonColors::init(){
extern "C" extern "C"
{ {
QObject* allocate_config(KConfig* config, QWidget* parent) { TQObject* allocate_config(KConfig* config, TQWidget* parent) {
return(new BaghiraConfig(config, parent)); return(new BaghiraConfig(config, parent));
} }
} }

@ -27,26 +27,26 @@
#ifndef BAGHIRACONFIG_H #ifndef BAGHIRACONFIG_H
#define BAGHIRACONFIG_H #define BAGHIRACONFIG_H
#include <qobject.h> #include <tqobject.h>
#include <qdialog.h> #include <tqdialog.h>
#include "colorpicker.h" #include "colorpicker.h"
#include "aquariusbutton.h" #include "aquariusbutton.h"
class KConfig; class KConfig;
class QSettings; class TQSettings;
class ConfigDialog; class ConfigDialog;
class QLabel; class TQLabel;
class QVBoxLayout; class TQVBoxLayout;
class QHBoxLayout; class TQHBoxLayout;
class QGridLayout; class TQGridLayout;
class QPushButton; class TQPushButton;
class QComboBox; class TQComboBox;
class ButtonColors : public QDialog class ButtonColors : public TQDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
ButtonColors(QWidget* parent, const char * name = 0); ButtonColors(TQWidget* parent, const char * name = 0);
~ButtonColors(); ~ButtonColors();
ColorPicker *inactiveColor; ColorPicker *inactiveColor;
ColorPicker *closeColor; ColorPicker *closeColor;
@ -71,10 +71,10 @@ public:
AquariusButton *behindButton; AquariusButton *behindButton;
AquariusButton *shadeButton; AquariusButton *shadeButton;
QHBoxLayout *twoButts; TQHBoxLayout *twoButts;
QPushButton *cancel; TQPushButton *cancel;
QPushButton *ok; TQPushButton *ok;
QComboBox *presets_; TQComboBox *presets_;
bool save; bool save;
public slots: public slots:
@ -95,10 +95,10 @@ private:
|------------|---| |------------|---|
*/ */
QVBoxLayout *buttonLayout; TQVBoxLayout *buttonLayout;
QVBoxLayout *pickerLayout; TQVBoxLayout *pickerLayout;
QGridLayout *layout; TQGridLayout *layout;
QLabel *indicator; TQLabel *indicator;
void setPicker(ColorPicker *picker); void setPicker(ColorPicker *picker);
@ -120,11 +120,11 @@ private slots:
}; };
class BaghiraConfig : public QObject class BaghiraConfig : public TQObject
{ {
Q_OBJECT Q_OBJECT
public: public:
BaghiraConfig(KConfig* config, QWidget* parent); BaghiraConfig(KConfig* config, TQWidget* parent);
~BaghiraConfig(); ~BaghiraConfig();
signals: signals:
@ -136,7 +136,7 @@ public slots:
void defaults(); void defaults();
private: private:
// QSettings *config_; // TQSettings *config_;
ConfigDialog *dialog_; ConfigDialog *dialog_;
ButtonColors *buttonDialog_; ButtonColors *buttonDialog_;
}; };

@ -27,27 +27,27 @@
#ifndef BAGHIRACONFIG_H #ifndef BAGHIRACONFIG_H
#define BAGHIRACONFIG_H #define BAGHIRACONFIG_H
#include <qobject.h> #include <tqobject.h>
#include <qdialog.h> #include <tqdialog.h>
#include <qvaluelist.h> #include <tqvaluelist.h>
#include "colorpicker.h" #include "colorpicker.h"
#include "aquariusbutton.h" #include "aquariusbutton.h"
class KConfig; class KConfig;
class QSettings; class TQSettings;
class ConfigDialog; class ConfigDialog;
class QLabel; class TQLabel;
class QVBoxLayout; class TQVBoxLayout;
class QHBoxLayout; class TQHBoxLayout;
class QGridLayout; class TQGridLayout;
class QPushButton; class TQPushButton;
class QComboBox; class TQComboBox;
class ButtonColors : public QDialog class ButtonColors : public TQDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
ButtonColors(QWidget* parent, const char * name = 0); ButtonColors(TQWidget* parent, const char * name = 0);
~ButtonColors(); ~ButtonColors();
ColorPicker *inactiveColor; ColorPicker *inactiveColor;
ColorPicker *closeColor; ColorPicker *closeColor;
@ -72,10 +72,10 @@ public:
AquariusButton *behindButton; AquariusButton *behindButton;
AquariusButton *shadeButton; AquariusButton *shadeButton;
QHBoxLayout *twoButts; TQHBoxLayout *twoButts;
QPushButton *cancel; TQPushButton *cancel;
QPushButton *ok; TQPushButton *ok;
QComboBox *presets_; TQComboBox *presets_;
bool save; bool save;
public slots: public slots:
@ -96,10 +96,10 @@ private:
|------------|---| |------------|---|
*/ */
QVBoxLayout *buttonLayout; TQVBoxLayout *buttonLayout;
QVBoxLayout *pickerLayout; TQVBoxLayout *pickerLayout;
QGridLayout *layout; TQGridLayout *layout;
QLabel *indicator; TQLabel *indicator;
void setPicker(ColorPicker *picker); void setPicker(ColorPicker *picker);
@ -122,11 +122,11 @@ private slots:
class CustomDecoSettings; class CustomDecoSettings;
class BaghiraConfig : public QObject class BaghiraConfig : public TQObject
{ {
Q_OBJECT Q_OBJECT
public: public:
BaghiraConfig(KConfig* config, QWidget* parent); BaghiraConfig(KConfig* config, TQWidget* parent);
~BaghiraConfig(); ~BaghiraConfig();
signals: signals:
@ -138,10 +138,10 @@ public slots:
void defaults(); void defaults();
private: private:
// QSettings *config_; // TQSettings *config_;
ConfigDialog *dialog_; ConfigDialog *dialog_;
ButtonColors *buttonDialog_; ButtonColors *buttonDialog_;
typedef QValueList<CustomDecoSettings> DecoList; typedef TQValueList<CustomDecoSettings> DecoList;
DecoList decoList; DecoList decoList;
}; };

@ -1,51 +1,51 @@
#include "colorpicker.h" #include "colorpicker.h"
#include <qcolor.h> #include <tqcolor.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qslider.h> #include <tqslider.h>
#include <qspinbox.h> #include <tqspinbox.h>
ColorPicker::ColorPicker(QWidget* parent, const char* name) : QGroupBox( parent, name){ ColorPicker::ColorPicker(TQWidget* parent, const char* name) : TQGroupBox( parent, name){
// box = new QGroupBox(parent); // box = new TQGroupBox(parent);
// setFrameShape(QFrame::GroupBoxPanel); // setFrameShape(TQFrame::GroupBoxPanel);
// setFrameShadow(QFrame::Sunken); // setFrameShadow(TQFrame::Sunken);
setColumnLayout(0, Qt::Vertical ); setColumnLayout(0, TQt::Vertical );
layout()->setSpacing( 6 ); layout()->setSpacing( 6 );
layout()->setMargin( 11 ); layout()->setMargin( 11 );
QVBoxLayout *vLayout = new QVBoxLayout(layout()); TQVBoxLayout *vLayout = new TQVBoxLayout(layout());
// gridLayout->setAlignment( Qt::AlignTop ); // gridLayout->setAlignment( TQt::AlignTop );
QHBoxLayout *redLayout = new QHBoxLayout(); TQHBoxLayout *redLayout = new TQHBoxLayout();
redSlider = new QSlider(0, 255, 1, 0, Qt::Horizontal, this, "redSlider"); redSlider = new TQSlider(0, 255, 1, 0, TQt::Horizontal, this, "redSlider");
redLayout->addWidget(redSlider); redLayout->addWidget(redSlider);
redValue = new QSpinBox(0,255,1,this); redValue = new TQSpinBox(0,255,1,this);
redValue->setValue(0); redValue->setValue(0);
redLayout->addWidget(redValue); redLayout->addWidget(redValue);
vLayout->addLayout(redLayout); vLayout->addLayout(redLayout);
QHBoxLayout *greenLayout = new QHBoxLayout(); TQHBoxLayout *greenLayout = new TQHBoxLayout();
greenSlider = new QSlider(0, 255, 1, 0, Qt::Horizontal, this, "greenSlider"); greenSlider = new TQSlider(0, 255, 1, 0, TQt::Horizontal, this, "greenSlider");
greenLayout->addWidget(greenSlider); greenLayout->addWidget(greenSlider);
greenValue = new QSpinBox(0,255,1,this); greenValue = new TQSpinBox(0,255,1,this);
greenValue->setValue(0); greenValue->setValue(0);
greenLayout->addWidget(greenValue); greenLayout->addWidget(greenValue);
vLayout->addLayout(greenLayout); vLayout->addLayout(greenLayout);
QHBoxLayout *blueLayout = new QHBoxLayout(); TQHBoxLayout *blueLayout = new TQHBoxLayout();
blueSlider = new QSlider(0, 255, 1, 0, Qt::Horizontal, this, "blueSlider"); blueSlider = new TQSlider(0, 255, 1, 0, TQt::Horizontal, this, "blueSlider");
blueLayout->addWidget(blueSlider); blueLayout->addWidget(blueSlider);
blueValue = new QSpinBox(0,255,1,this); blueValue = new TQSpinBox(0,255,1,this);
blueValue->setValue(0); blueValue->setValue(0);
blueLayout->addWidget(blueValue); blueLayout->addWidget(blueValue);
vLayout->addLayout(blueLayout); vLayout->addLayout(blueLayout);
// resize( QSize(350, 100).expandedTo(minimumSizeHint()) ); // resize( TQSize(350, 100).expandedTo(minimumSizeHint()) );
//connections //connections
connect(redSlider, SIGNAL(valueChanged (int)), this, SLOT(setRed(int))); connect(redSlider, SIGNAL(valueChanged (int)), this, SLOT(setRed(int)));
@ -59,7 +59,7 @@ ColorPicker::ColorPicker(QWidget* parent, const char* name) : QGroupBox( parent,
ColorPicker::~ColorPicker(){ ColorPicker::~ColorPicker(){
} }
void ColorPicker::setColor(QColor color){ void ColorPicker::setColor(TQColor color){
redSlider->blockSignals(true); redSlider->blockSignals(true);
redSlider->setValue( color.red() ); redSlider->setValue( color.red() );
redSlider->blockSignals(false); redSlider->blockSignals(false);
@ -88,7 +88,7 @@ void ColorPicker::setRed(int red){
redValue->blockSignals(true); redValue->blockSignals(true);
redValue->setValue(red); redValue->setValue(red);
redValue->blockSignals(false); redValue->blockSignals(false);
emit colorChanged(QColor(red, greenSlider->value(), blueSlider->value())); emit colorChanged(TQColor(red, greenSlider->value(), blueSlider->value()));
} }
void ColorPicker::setGreen(int green){ void ColorPicker::setGreen(int green){
@ -98,7 +98,7 @@ void ColorPicker::setGreen(int green){
greenValue->blockSignals(true); greenValue->blockSignals(true);
greenValue->setValue(green); greenValue->setValue(green);
greenValue->blockSignals(false); greenValue->blockSignals(false);
emit colorChanged(QColor(redSlider->value(), green, blueSlider->value())); emit colorChanged(TQColor(redSlider->value(), green, blueSlider->value()));
} }
void ColorPicker::setBlue(int blue){ void ColorPicker::setBlue(int blue){
@ -108,11 +108,11 @@ void ColorPicker::setBlue(int blue){
blueValue->blockSignals(true); blueValue->blockSignals(true);
blueValue->setValue(blue); blueValue->setValue(blue);
blueValue->blockSignals(false); blueValue->blockSignals(false);
emit colorChanged(QColor(redSlider->value(), greenSlider->value(), blue)); emit colorChanged(TQColor(redSlider->value(), greenSlider->value(), blue));
} }
QColor ColorPicker::Color(){ TQColor ColorPicker::Color(){
return QColor(redSlider->value(), greenSlider->value(), blueSlider->value()); return TQColor(redSlider->value(), greenSlider->value(), blueSlider->value());
} }
void ColorPicker::reset(){ void ColorPicker::reset(){

@ -1,25 +1,25 @@
#ifndef COLORPICKER_H #ifndef COLORPICKER_H
#define COLORPICKER_H #define COLORPICKER_H
//#include <qvariant.h> //#include <tqvariant.h>
#include <qgroupbox.h> #include <tqgroupbox.h>
class QSlider; class TQSlider;
class QSpinBox; class TQSpinBox;
class QColor; class TQColor;
//class QGroupBox; //class TQGroupBox;
class ColorPicker : public QGroupBox class ColorPicker : public TQGroupBox
{ {
Q_OBJECT Q_OBJECT
public: public:
ColorPicker( QWidget* parent = 0, const char* name = 0); ColorPicker( TQWidget* parent = 0, const char* name = 0);
~ColorPicker(); ~ColorPicker();
QColor Color(); TQColor Color();
public slots: public slots:
void setColor(QColor color); void setColor(TQColor color);
void setRed(int red); void setRed(int red);
void setGreen(int green); void setGreen(int green);
void setBlue(int blue); void setBlue(int blue);
@ -27,17 +27,17 @@ public slots:
void init(); void init();
protected: protected:
QSlider *redSlider; TQSlider *redSlider;
QSlider *greenSlider; TQSlider *greenSlider;
QSlider *blueSlider; TQSlider *blueSlider;
QSpinBox *redValue; TQSpinBox *redValue;
QSpinBox *greenValue; TQSpinBox *greenValue;
QSpinBox *blueValue; TQSpinBox *blueValue;
QColor color_; TQColor color_;
// QGroupBox *box; // TQGroupBox *box;
signals: signals:
void colorChanged(QColor color); void colorChanged(TQColor color);
}; };

File diff suppressed because it is too large Load Diff

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ConfigDialog</class> <class>ConfigDialog</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>ConfigDialog</cstring> <cstring>ConfigDialog</cstring>
</property> </property>
@ -19,7 +19,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QButtonGroup" row="0" column="1" rowspan="1" colspan="2"> <widget class="TQButtonGroup" row="0" column="1" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>titlealign</cstring> <cstring>titlealign</cstring>
</property> </property>
@ -36,7 +36,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QRadioButton" row="0" column="0"> <widget class="TQRadioButton" row="0" column="0">
<property name="name"> <property name="name">
<cstring>AlignLeft</cstring> <cstring>AlignLeft</cstring>
</property> </property>
@ -64,7 +64,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QRadioButton" row="0" column="2"> <widget class="TQRadioButton" row="0" column="2">
<property name="name"> <property name="name">
<cstring>AlignHCenter</cstring> <cstring>AlignHCenter</cstring>
</property> </property>
@ -95,7 +95,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QRadioButton" row="0" column="4"> <widget class="TQRadioButton" row="0" column="4">
<property name="name"> <property name="name">
<cstring>AlignRight</cstring> <cstring>AlignRight</cstring>
</property> </property>
@ -106,7 +106,7 @@
<string></string> <string></string>
</property> </property>
</widget> </widget>
<widget class="QRadioButton" row="0" column="6"> <widget class="TQRadioButton" row="0" column="6">
<property name="name"> <property name="name">
<cstring>noTitle</cstring> <cstring>noTitle</cstring>
</property> </property>
@ -133,7 +133,7 @@
</spacer> </spacer>
</grid> </grid>
</widget> </widget>
<widget class="QGroupBox" row="0" column="0" rowspan="3" colspan="1"> <widget class="TQGroupBox" row="0" column="0" rowspan="3" colspan="1">
<property name="name"> <property name="name">
<cstring>generalbox</cstring> <cstring>generalbox</cstring>
</property> </property>
@ -150,7 +150,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QComboBox" row="12" column="0"> <widget class="TQComboBox" row="12" column="0">
<item> <item>
<property name="text"> <property name="text">
<string>Jaguar</string> <string>Jaguar</string>
@ -180,7 +180,7 @@
<cstring>defaultMode</cstring> <cstring>defaultMode</cstring>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="9" column="0"> <widget class="TQCheckBox" row="9" column="0">
<property name="name"> <property name="name">
<cstring>delAppname</cstring> <cstring>delAppname</cstring>
</property> </property>
@ -203,7 +203,7 @@ from multipart titles</string>
<enum>Horizontal</enum> <enum>Horizontal</enum>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="3" column="0"> <widget class="TQCheckBox" row="3" column="0">
<property name="name"> <property name="name">
<cstring>drawComicFrame</cstring> <cstring>drawComicFrame</cstring>
</property> </property>
@ -214,7 +214,7 @@ from multipart titles</string>
<string>Draws a black frame around the window (not the Titlebar).&lt;br&gt;Anyway i suggest to get the kwin dropshadow patch.</string> <string>Draws a black frame around the window (not the Titlebar).&lt;br&gt;Anyway i suggest to get the kwin dropshadow patch.</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="8" column="0"> <widget class="TQCheckBox" row="8" column="0">
<property name="name"> <property name="name">
<cstring>noModalDeco</cstring> <cstring>noModalDeco</cstring>
</property> </property>
@ -222,7 +222,7 @@ from multipart titles</string>
<string>Hide deco for fixed size modal windows</string> <string>Hide deco for fixed size modal windows</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="6" column="0"> <widget class="TQCheckBox" row="6" column="0">
<property name="name"> <property name="name">
<cstring>maxResizable</cstring> <cstring>maxResizable</cstring>
</property> </property>
@ -230,7 +230,7 @@ from multipart titles</string>
<string>Keep maximized resizable</string> <string>Keep maximized resizable</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="2" column="0"> <widget class="TQCheckBox" row="2" column="0">
<property name="name"> <property name="name">
<cstring>ResizeGrip</cstring> <cstring>ResizeGrip</cstring>
</property> </property>
@ -241,7 +241,7 @@ from multipart titles</string>
<string>Starts in Brushed Metal mode instead of default, if the Style is set to Brushed Metal</string> <string>Starts in Brushed Metal mode instead of default, if the Style is set to Brushed Metal</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="11" column="0"> <widget class="TQLabel" row="11" column="0">
<property name="name"> <property name="name">
<cstring>textLabel1_7</cstring> <cstring>textLabel1_7</cstring>
</property> </property>
@ -249,7 +249,7 @@ from multipart titles</string>
<string>Default Mode is</string> <string>Default Mode is</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="7" column="0"> <widget class="TQCheckBox" row="7" column="0">
<property name="name"> <property name="name">
<cstring>fullSpec</cstring> <cstring>fullSpec</cstring>
</property> </property>
@ -260,7 +260,7 @@ from multipart titles</string>
<string>Check this to have any window in fullscreen Mode - demaximize the window by clicking into the top right corner of your screen</string> <string>Check this to have any window in fullscreen Mode - demaximize the window by clicking into the top right corner of your screen</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="4" column="0"> <widget class="TQCheckBox" row="4" column="0">
<property name="name"> <property name="name">
<cstring>allowEasyClosing</cstring> <cstring>allowEasyClosing</cstring>
</property> </property>
@ -271,7 +271,7 @@ from multipart titles</string>
<string>Allows Closing by clicking into the top left or right corner &lt;br&gt; Close Button must be most left or right element (also no spacers) &lt;br&gt; Closes on Mouse Button release (so you have the chance to move the mouse away and keep the Window) &lt;br&gt; The Window must be active and maximized &lt;br&gt; Unfortunately you will not be able tho resize the Window from that corner</string> <string>Allows Closing by clicking into the top left or right corner &lt;br&gt; Close Button must be most left or right element (also no spacers) &lt;br&gt; Closes on Mouse Button release (so you have the chance to move the mouse away and keep the Window) &lt;br&gt; The Window must be active and maximized &lt;br&gt; Unfortunately you will not be able tho resize the Window from that corner</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="5" column="0"> <widget class="TQCheckBox" row="5" column="0">
<property name="name"> <property name="name">
<cstring>addAutoSpacing</cstring> <cstring>addAutoSpacing</cstring>
</property> </property>
@ -279,7 +279,7 @@ from multipart titles</string>
<string>Add auto spacing</string> <string>Add auto spacing</string>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget" row="1" column="0"> <widget class="TQLayoutWidget" row="1" column="0">
<property name="name"> <property name="name">
<cstring>layout133</cstring> <cstring>layout133</cstring>
</property> </property>
@ -287,7 +287,7 @@ from multipart titles</string>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_3</cstring> <cstring>textLabel1_3</cstring>
</property> </property>
@ -312,7 +312,7 @@ from multipart titles</string>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>minTH</cstring> <cstring>minTH</cstring>
</property> </property>
@ -328,7 +328,7 @@ from multipart titles</string>
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QPushButton" row="0" column="0"> <widget class="TQPushButton" row="0" column="0">
<property name="name"> <property name="name">
<cstring>ButtonColorConfig</cstring> <cstring>ButtonColorConfig</cstring>
</property> </property>
@ -338,7 +338,7 @@ from multipart titles</string>
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QWidgetStack" row="2" column="1" rowspan="1" colspan="2"> <widget class="TQWidgetStack" row="2" column="1" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>decoStack</cstring> <cstring>decoStack</cstring>
</property> </property>
@ -351,14 +351,14 @@ from multipart titles</string>
<property name="lineWidth"> <property name="lineWidth">
<number>2</number> <number>2</number>
</property> </property>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>WStackPage</cstring> <cstring>WStackPage</cstring>
</property> </property>
<attribute name="id"> <attribute name="id">
<number>0</number> <number>0</number>
</attribute> </attribute>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
@ -376,7 +376,7 @@ from multipart titles</string>
</widget> </widget>
</widget> </widget>
</widget> </widget>
<widget class="QPushButton" row="1" column="1"> <widget class="TQPushButton" row="1" column="1">
<property name="name"> <property name="name">
<cstring>pushButton2</cstring> <cstring>pushButton2</cstring>
</property> </property>
@ -384,7 +384,7 @@ from multipart titles</string>
<string>Add style</string> <string>Add style</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton" row="1" column="2"> <widget class="TQPushButton" row="1" column="2">
<property name="name"> <property name="name">
<cstring>pushButton3</cstring> <cstring>pushButton3</cstring>
</property> </property>

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>CustomDecoSettings</class> <class>CustomDecoSettings</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>CustomDecoSettings</cstring> <cstring>CustomDecoSettings</cstring>
</property> </property>
@ -19,7 +19,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QGroupBox" row="5" column="0" rowspan="1" colspan="5"> <widget class="TQGroupBox" row="5" column="0" rowspan="1" colspan="5">
<property name="name"> <property name="name">
<cstring>boxCorner</cstring> <cstring>boxCorner</cstring>
</property> </property>
@ -30,7 +30,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget" row="0" column="0" rowspan="3" colspan="1"> <widget class="TQLayoutWidget" row="0" column="0" rowspan="3" colspan="1">
<property name="name"> <property name="name">
<cstring>layout45</cstring> <cstring>layout45</cstring>
</property> </property>
@ -38,7 +38,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>shapeUL</cstring> <cstring>shapeUL</cstring>
</property> </property>
@ -63,7 +63,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>shapeLL</cstring> <cstring>shapeLL</cstring>
</property> </property>
@ -73,7 +73,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QLayoutWidget" row="0" column="5" rowspan="3" colspan="1"> <widget class="TQLayoutWidget" row="0" column="5" rowspan="3" colspan="1">
<property name="name"> <property name="name">
<cstring>layout44</cstring> <cstring>layout44</cstring>
</property> </property>
@ -81,7 +81,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>shapeUR</cstring> <cstring>shapeUR</cstring>
</property> </property>
@ -106,7 +106,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>shapeLR</cstring> <cstring>shapeLR</cstring>
</property> </property>
@ -133,7 +133,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QSpinBox" row="1" column="3"> <widget class="TQSpinBox" row="1" column="3">
<property name="name"> <property name="name">
<cstring>borderSize</cstring> <cstring>borderSize</cstring>
</property> </property>
@ -141,7 +141,7 @@
<number>16</number> <number>16</number>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="2"> <widget class="TQLabel" row="1" column="2">
<property name="name"> <property name="name">
<cstring>labelBorderSize</cstring> <cstring>labelBorderSize</cstring>
</property> </property>
@ -202,7 +202,7 @@
</spacer> </spacer>
</grid> </grid>
</widget> </widget>
<widget class="QLayoutWidget" row="4" column="0" rowspan="1" colspan="5"> <widget class="TQLayoutWidget" row="4" column="0" rowspan="1" colspan="5">
<property name="name"> <property name="name">
<cstring>layout10</cstring> <cstring>layout10</cstring>
</property> </property>
@ -210,7 +210,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>labelTitleshadow</cstring> <cstring>labelTitleshadow</cstring>
</property> </property>
@ -235,7 +235,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>LineImpact</cstring> <cstring>LineImpact</cstring>
</property> </property>
@ -251,7 +251,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget" row="3" column="0" rowspan="1" colspan="5"> <widget class="TQLayoutWidget" row="3" column="0" rowspan="1" colspan="5">
<property name="name"> <property name="name">
<cstring>layout7_3</cstring> <cstring>layout7_3</cstring>
</property> </property>
@ -259,7 +259,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>label3D</cstring> <cstring>label3D</cstring>
</property> </property>
@ -284,7 +284,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>_3DImpact</cstring> <cstring>_3DImpact</cstring>
</property> </property>
@ -297,7 +297,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget" row="2" column="0"> <widget class="TQLayoutWidget" row="2" column="0">
<property name="name"> <property name="name">
<cstring>layout35</cstring> <cstring>layout35</cstring>
</property> </property>
@ -305,7 +305,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>labelButtonstyle</cstring> <cstring>labelButtonstyle</cstring>
</property> </property>
@ -313,7 +313,7 @@
<string>ButtonStyle</string> <string>ButtonStyle</string>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>labelTitle</cstring> <cstring>labelTitle</cstring>
</property> </property>
@ -324,7 +324,7 @@
<cstring>titleeffect</cstring> <cstring>titleeffect</cstring>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>labelInTitle</cstring> <cstring>labelInTitle</cstring>
</property> </property>
@ -337,7 +337,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QLayoutWidget" row="2" column="4"> <widget class="TQLayoutWidget" row="2" column="4">
<property name="name"> <property name="name">
<cstring>layout38</cstring> <cstring>layout38</cstring>
</property> </property>
@ -345,7 +345,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>labelColors</cstring> <cstring>labelColors</cstring>
</property> </property>
@ -356,7 +356,7 @@
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout33</cstring> <cstring>layout33</cstring>
</property> </property>
@ -382,7 +382,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout34</cstring> <cstring>layout34</cstring>
</property> </property>
@ -410,7 +410,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QLayoutWidget" row="2" column="2" rowspan="1" colspan="2"> <widget class="TQLayoutWidget" row="2" column="2" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>layout39</cstring> <cstring>layout39</cstring>
</property> </property>
@ -418,7 +418,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QComboBox"> <widget class="TQComboBox">
<item> <item>
<property name="text"> <property name="text">
<string>Panther</string> <string>Panther</string>
@ -443,7 +443,7 @@
<cstring>buttonStyle</cstring> <cstring>buttonStyle</cstring>
</property> </property>
</widget> </widget>
<widget class="QComboBox"> <widget class="TQComboBox">
<item> <item>
<property name="text"> <property name="text">
<string>Gradient</string> <string>Gradient</string>
@ -487,7 +487,7 @@
<string>Select an effect for the titlebar to change its appearance</string> <string>Select an effect for the titlebar to change its appearance</string>
</property> </property>
</widget> </widget>
<widget class="QComboBox"> <widget class="TQComboBox">
<item> <item>
<property name="text"> <property name="text">
<string>Gradient</string> <string>Gradient</string>
@ -550,7 +550,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3"> <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="3">
<property name="name"> <property name="name">
<cstring>drawIcon</cstring> <cstring>drawIcon</cstring>
</property> </property>
@ -558,7 +558,7 @@
<string>Draw Icon</string> <string>Draw Icon</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>DecoName</cstring> <cstring>DecoName</cstring>
</property> </property>

@ -24,17 +24,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define _MENUAPPLET_CPP_ #define _MENUAPPLET_CPP_
#include <qvariant.h> // avoid X11 #define's #include <tqvariant.h> // avoid X11 #define's
#include "menuapplet.h" #include "menuapplet.h"
#include <assert.h> #include <assert.h>
#include <qcursor.h> #include <tqcursor.h>
#include <kconfig.h> #include <kconfig.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <kglobal.h> #include <kglobal.h>
#include <klocale.h> #include <klocale.h>
#include <qlayout.h> #include <tqlayout.h>
#include <kdebug.h> #include <kdebug.h>
#include <netwm.h> #include <netwm.h>
#include <kapplication.h> #include <kapplication.h>
@ -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. 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 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 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 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 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" extern "C"
{ {
KPanelApplet* init( QWidget* parent_P, const QString& configFile_P ) KPanelApplet* init( TQWidget* parent_P, const TQString& configFile_P )
{ {
KGlobal::locale()->insertCatalogue("kmenuapplet"); KGlobal::locale()->insertCatalogue("kmenuapplet");
return new KickerMenuApplet::Applet( configFile_P, parent_P ); 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::ToolbarMask | NET::MenuMask | NET::DialogMask | NET::OverrideMask
| NET::TopMenuMask | NET::UtilityMask | NET::SplashMask; | 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" ), : KPanelApplet( configFile_P, Stretch, 0, parent_P, "menuapplet" ),
DCOPObject( "menuapplet" ), DCOPObject( "menuapplet" ),
module( NULL ), module( NULL ),
@ -91,8 +91,8 @@ Applet::Applet( const QString& configFile_P, QWidget* parent_P )
{ {
// for windowindicator // for windowindicator
setBackgroundOrigin(AncestorOrigin); setBackgroundOrigin(AncestorOrigin);
QIntDict<QMenuBar>(97); //allowing 97 entries - should be enough, if not - who cares: just a label and hashtables are slightly faster than lists... TQIntDict<TQMenuBar>(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); windowIndicator = new TQMenuBar(this);
windowList = new KWindowListMenu(windowIndicator); windowList = new KWindowListMenu(windowIndicator);
connect(windowList, SIGNAL(aboutToShow()), this, SLOT(initPopup())); connect(windowList, SIGNAL(aboutToShow()), this, SLOT(initPopup()));
windowIndicator->insertItem( "KDE", windowList, 0); windowIndicator->insertItem( "KDE", windowList, 0);
@ -138,13 +138,13 @@ void Applet::windowRemoved(WId w_P)
void Applet::windowAdded( WId w_P ) void Applet::windowAdded( WId w_P )
{ {
QString* title; TQString* title;
NETWinInfo info( qt_xdisplay(), w_P, qt_xrootwin(), NET::WMWindowType); NETWinInfo info( tqt_xdisplay(), w_P, tqt_xrootwin(), NET::WMWindowType);
XClassHint classHint; 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! // 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_name );
XFree( classHint.res_class ); XFree( classHint.res_class );
windowTitleDict.insert(w_P, title); windowTitleDict.insert(w_P, title);
@ -152,10 +152,10 @@ void Applet::windowAdded( WId w_P )
else else
{ //fallback { //fallback
// for windowindicator // 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 ); KWin::WindowInfo tmpInfo = KWin::windowInfo( w_P, NET::WMName );
//generate title: //generate title:
title = new QString(tmpInfo.name()); title = new TQString(tmpInfo.name());
if (title->contains("K3b")){ if (title->contains("K3b")){
// hack, weil herr trueg zwar ein erstklassiges brennprogramm schreiben, sich aber leider nicht an windowmanager konventionen halten kan... ;) // hack, weil herr trueg zwar ein erstklassiges brennprogramm schreiben, sich aber leider nicht an windowmanager konventionen halten kan... ;)
*title = "K3b"; *title = "K3b";
@ -181,7 +181,7 @@ void Applet::windowAdded( WId w_P )
if( transient_for == None ) if( transient_for == None )
return; return;
MenuEmbed* embed; MenuEmbed* embed;
if( transient_for == qt_xrootwin()) if( transient_for == tqt_xrootwin())
embed = new MenuEmbed( transient_for, true, this ); embed = new MenuEmbed( transient_for, true, this );
else else
{ {
@ -214,12 +214,12 @@ void Applet::windowAdded( WId w_P )
void Applet::activeWindowChanged( WId w_P ) void Applet::activeWindowChanged( WId w_P )
{ {
// kdDebug() << "active:" << w_P << endl; // kdDebug() << "active:" << w_P << endl;
QFont tmpFont; TQFont tmpFont;
for( WId window = w_P; for( WId window = w_P;
window != None; window != None;
window = tryTransientFor( window )) window = tryTransientFor( window ))
{ {
for( QValueList< MenuEmbed* >::ConstIterator it = menus.begin(); for( TQValueList< MenuEmbed* >::ConstIterator it = menus.begin();
it != menus.end(); it != menus.end();
++it ) ++it )
{ {
@ -228,7 +228,7 @@ void Applet::activeWindowChanged( WId w_P )
tmpFont = (*it)->font(); tmpFont = (*it)->font();
tmpFont.setBold(true); tmpFont.setBold(true);
windowIndicator->setFont(tmpFont); windowIndicator->setFont(tmpFont);
QString *newTitle = windowTitleDict[w_P]; TQString *newTitle = windowTitleDict[w_P];
newTitle ? newTitle ?
windowIndicator->changeItem(0, *newTitle): windowIndicator->changeItem(0, *newTitle):
windowIndicator->changeItem(0, "KDE"); windowIndicator->changeItem(0, "KDE");
@ -254,7 +254,7 @@ void Applet::activeWindowChanged( WId w_P )
} }
if( try_desktop ) if( try_desktop )
{ {
for( QValueList< MenuEmbed* >::ConstIterator it = menus.begin(); for( TQValueList< MenuEmbed* >::ConstIterator it = menus.begin();
it != menus.end(); it != menus.end();
++it ) ++it )
{ {
@ -263,7 +263,7 @@ void Applet::activeWindowChanged( WId w_P )
tmpFont = (*it)->font(); tmpFont = (*it)->font();
tmpFont.setBold(true); tmpFont.setBold(true);
windowIndicator->setFont(tmpFont); windowIndicator->setFont(tmpFont);
QString *newTitle = windowTitleDict[w_P]; TQString *newTitle = windowTitleDict[w_P];
newTitle ? newTitle ?
windowIndicator->changeItem(0, *newTitle): windowIndicator->changeItem(0, *newTitle):
windowIndicator->changeItem(0, "KDE"); 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 ? newTitle ?
windowIndicator->changeItem(0, *newTitle): windowIndicator->changeItem(0, *newTitle):
windowIndicator->changeItem(0, "KDE"); windowIndicator->changeItem(0, "KDE");
@ -305,16 +305,16 @@ void Applet::activateMenu( MenuEmbed* embed_P )
moveMenu( NULL ); 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 ); moveMenu( NULL );
return false; return false;
} }
void Applet::growClicked() void Applet::growClicked()
{ {
moveMenu( static_cast< const QWidget* >( sender())); moveMenu( static_cast< const TQWidget* >( sender()));
} }
void Applet::updateGrowIndicators() void Applet::updateGrowIndicators()
@ -338,7 +338,7 @@ void Applet::updateGrowIndicators()
grow_indicator_right.hide(); grow_indicator_right.hide();
} }
void Applet::moveMenu( const QWidget* indicator_P ) void Applet::moveMenu( const TQWidget* indicator_P )
{ {
if( active_menu == NULL ) if( active_menu == NULL )
{ {
@ -378,14 +378,14 @@ WId Applet::tryTransientFor( WId w_P )
if( info.state() & NET::Modal ) if( info.state() & NET::Modal )
return None;*/ return None;*/
WId ret = KWin::transientFor( w_P ); WId ret = KWin::transientFor( w_P );
if( ret == qt_xrootwin()) if( ret == tqt_xrootwin())
ret = None; ret = None;
return ret; return ret;
} }
void Applet::menuLost( MenuEmbed* embed ) void Applet::menuLost( MenuEmbed* embed )
{ {
for( QValueList< MenuEmbed* >::Iterator it = menus.begin(); for( TQValueList< MenuEmbed* >::Iterator it = menus.begin();
it != menus.end(); it != menus.end();
++it ) ++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 != menus.end();
++it ) ++it )
(*it)->setFixedSize( width() - windowIndicator->width()-1 ,height()); (*it)->setFixedSize( width() - windowIndicator->width()-1 ,height());
@ -416,7 +416,7 @@ void Applet::resizeEvent( QResizeEvent* ev )
moveMenu( NULL ); moveMenu( NULL );
} }
void Applet::paletteChange(const QPalette & /* oldPalette */) void Applet::paletteChange(const TQPalette & /* oldPalette */)
{ {
if( active_menu != NULL ) if( active_menu != NULL )
{ {
@ -428,7 +428,7 @@ void Applet::paletteChange(const QPalette & /* oldPalette */)
void Applet::claimSelection() void Applet::claimSelection()
{ {
assert( selection == NULL ); 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 // force taking the selection, but don't kill previous owner
if( selection->claim( true, false )) if( selection->claim( true, false ))
{ {
@ -440,8 +440,8 @@ void Applet::claimSelection()
connect( module, SIGNAL( windowRemoved( WId )), this, SLOT( windowRemoved( WId ))); connect( module, SIGNAL( windowRemoved( WId )), this, SLOT( windowRemoved( WId )));
connect( module, SIGNAL( activeWindowChanged( WId )), connect( module, SIGNAL( activeWindowChanged( WId )),
this, SLOT( activeWindowChanged( WId ))); this, SLOT( activeWindowChanged( WId )));
QValueList< WId > windows = module->windows(); TQValueList< WId > windows = module->windows();
for( QValueList< WId >::ConstIterator it = windows.begin(); for( TQValueList< WId >::ConstIterator it = windows.begin();
it != windows.end(); it != windows.end();
++it ) ++it )
windowAdded( *it ); windowAdded( *it );
@ -456,7 +456,7 @@ void Applet::lostSelection()
if( selection == NULL ) if( selection == NULL )
return; return;
// kdDebug() << "lost selection" << endl; // kdDebug() << "lost selection" << endl;
for( QValueList< MenuEmbed* >::ConstIterator it = menus.begin(); for( TQValueList< MenuEmbed* >::ConstIterator it = menus.begin();
it != menus.end(); it != menus.end();
++it ) ++it )
delete (*it); // delete all MenuEmbed's = release all menus delete (*it); // delete all MenuEmbed's = release all menus
@ -464,7 +464,7 @@ void Applet::lostSelection()
active_menu = NULL; active_menu = NULL;
if( selection_watcher == 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())); connect( selection_watcher, SIGNAL( lostOwner()), this, SLOT( claimSelection()));
} }
delete module; delete module;
@ -481,9 +481,9 @@ void Applet::readSettings()
desktop_menu = cfg.readBoolEntry( "ShowMenubar", false ); desktop_menu = cfg.readBoolEntry( "ShowMenubar", false );
cfg.setGroup( "KDE" ); cfg.setGroup( "KDE" );
if( cfg.readBoolEntry( "macStyle", false ) || desktop_menu ) if( cfg.readBoolEntry( "macStyle", false ) || desktop_menu )
QToolTip::remove( this ); TQToolTip::remove( this );
else else
QToolTip::add( this, i18n( TQToolTip::add( this, i18n(
"You do not appear to have enabled the standalone menubar; " "You do not appear to have enabled the standalone menubar; "
"enable it in the Behavior control module for desktop." )); "enable it in the Behavior control module for desktop." ));
if( !isDisabled() && active_menu == NULL ) if( !isDisabled() && active_menu == NULL )
@ -513,11 +513,11 @@ static
void initAtoms() void initAtoms()
{ {
char nm[ 100 ]; 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 nm2[] = "_KDE_TOPMENU_MINSIZE";
char* names[ 2 ] = { nm, nm2 }; char* names[ 2 ] = { nm, nm2 };
Atom atoms[ 2 ]; Atom atoms[ 2 ];
XInternAtoms( qt_xdisplay(), names, 2, False, atoms ); XInternAtoms( tqt_xdisplay(), names, 2, False, atoms );
selection_atom = atoms[ 0 ]; selection_atom = atoms[ 0 ];
msg_type_atom = atoms[ 1 ]; msg_type_atom = atoms[ 1 ];
} }
@ -530,7 +530,7 @@ Atom Applet::makeSelectionAtom()
} }
MenuEmbed::MenuEmbed( WId mainwindow_P, bool desktop_P, 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 ), : QXEmbed( parent_P, name_P ),
main_window( mainwindow_P ), main_window( mainwindow_P ),
desktop( desktop_P ) desktop( desktop_P )
@ -552,7 +552,7 @@ bool MenuEmbed::x11Event( XEvent* ev_P )
&& ev_P->xconfigurerequest.value_mask & ( CWWidth | CWHeight )) && ev_P->xconfigurerequest.value_mask & ( CWWidth | CWHeight ))
{ {
XConfigureRequestEvent& ev = ev_P->xconfigurerequest; XConfigureRequestEvent& ev = ev_P->xconfigurerequest;
QSize new_size = size(); TQSize new_size = size();
if( ev.value_mask & CWWidth ) if( ev.value_mask & CWWidth )
new_size.setWidth( ev.width ); new_size.setWidth( ev.width );
if( ev.value_mask & CWHeight ) if( ev.value_mask & CWHeight )
@ -565,7 +565,7 @@ bool MenuEmbed::x11Event( XEvent* ev_P )
// int x, y; // int x, y;
// unsigned int w, h, d, b; // unsigned int w, h, d, b;
// Window root; // 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; // kdDebug() << "RES3:" << width() << ":" << height() << ":" << w << ":" << h << endl;
return true; return true;
} }
@ -574,12 +574,12 @@ bool MenuEmbed::x11Event( XEvent* ev_P )
void MenuEmbed::sendSyntheticConfigureNotifyEvent() void MenuEmbed::sendSyntheticConfigureNotifyEvent()
{ {
QPoint globalPos = mapToGlobal(QPoint(0,0)); TQPoint globalPos = mapToGlobal(TQPoint(0,0));
if (embeddedWinId()) { if (embeddedWinId()) {
XConfigureEvent c; XConfigureEvent c;
memset(&c, 0, sizeof(c)); memset(&c, 0, sizeof(c));
c.type = ConfigureNotify; c.type = ConfigureNotify;
c.display = qt_xdisplay(); c.display = tqt_xdisplay();
c.send_event = True; c.send_event = True;
c.event = embeddedWinId(); c.event = embeddedWinId();
c.window = winId(); c.window = winId();
@ -590,7 +590,7 @@ void MenuEmbed::sendSyntheticConfigureNotifyEvent()
c.border_width = 0; c.border_width = 0;
c.above = None; c.above = None;
c.override_redirect = 0; 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; // kdDebug() << "RES2:" << width() << ":" << height() << ":" << minimumWidth() << ":" << minimumHeight() << endl;
XEvent ev; XEvent ev;
ev.xclient.display = qt_xdisplay(); ev.xclient.display = tqt_xdisplay();
ev.xclient.type = ClientMessage; ev.xclient.type = ClientMessage;
ev.xclient.window = embeddedWinId(); ev.xclient.window = embeddedWinId();
assert( msg_type_atom != None ); assert( msg_type_atom != None );
ev.xclient.message_type = msg_type_atom; ev.xclient.message_type = msg_type_atom;
ev.xclient.format = 32; 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[1] = minimumWidth();
ev.xclient.data.l[2] = minimumHeight(); ev.xclient.data.l[2] = minimumHeight();
ev.xclient.data.l[3] = 0; ev.xclient.data.l[3] = 0;
ev.xclient.data.l[4] = 0; ev.xclient.data.l[4] = 0;
XSendEvent( qt_xdisplay(), embeddedWinId(), False, NoEventMask, &ev ); XSendEvent( tqt_xdisplay(), embeddedWinId(), False, NoEventMask, &ev );
} }
} }

@ -26,9 +26,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define _MENUAPPLET_H_ #define _MENUAPPLET_H_
#include <kpanelapplet.h> #include <kpanelapplet.h>
#include <qintdict.h> #include <tqintdict.h>
#include <qvaluelist.h> #include <tqvaluelist.h>
#include <qmenubar.h> #include <tqmenubar.h>
#include <kwindowlistmenu.h> #include <kwindowlistmenu.h>
#include <kwinmodule.h> #include <kwinmodule.h>
#include <kmanagerselection.h> #include <kmanagerselection.h>
@ -50,15 +50,15 @@ class Applet : public KPanelApplet, public DCOPObject
k_dcop: k_dcop:
ASYNC configure(); ASYNC configure();
public: public:
Applet( const QString& configFile, QWidget *parent ); Applet( const TQString& configFile, TQWidget *parent );
virtual ~Applet(); virtual ~Applet();
virtual int widthForHeight( int height ) const; virtual int widthForHeight( int height ) const;
virtual int heightForWidth( int width ) 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 ); void menuLost( MenuEmbed* embed );
protected: protected:
virtual void resizeEvent( QResizeEvent* ); virtual void resizeEvent( TQResizeEvent* );
virtual void paletteChange(const QPalette& ); virtual void paletteChange(const TQPalette& );
private slots: private slots:
void windowAdded( WId w ); void windowAdded( WId w );
void activeWindowChanged( WId w ); void activeWindowChanged( WId w );
@ -72,12 +72,12 @@ class Applet : public KPanelApplet, public DCOPObject
private: private:
bool isDisabled() const; // does it own the manager selection? bool isDisabled() const; // does it own the manager selection?
void updateGrowIndicators(); void updateGrowIndicators();
void moveMenu( const QWidget* indicator ); void moveMenu( const TQWidget* indicator );
WId tryTransientFor( WId w ); WId tryTransientFor( WId w );
void activateMenu( MenuEmbed* embed ); void activateMenu( MenuEmbed* embed );
static Atom makeSelectionAtom(); static Atom makeSelectionAtom();
KWinModule* module; KWinModule* module;
QValueList< MenuEmbed* > menus; TQValueList< MenuEmbed* > menus;
MenuEmbed* active_menu; MenuEmbed* active_menu;
KArrowButton grow_indicator_left, grow_indicator_right; KArrowButton grow_indicator_left, grow_indicator_right;
KSelectionOwner* selection; KSelectionOwner* selection;
@ -85,8 +85,8 @@ class Applet : public KPanelApplet, public DCOPObject
bool desktop_menu; bool desktop_menu;
DCOPClient dcopclient; DCOPClient dcopclient;
// to show current active window (not necessary equal to the menubar) // to show current active window (not necessary equal to the menubar)
QMenuBar *windowIndicator; TQMenuBar *windowIndicator;
QIntDict<QString>windowTitleDict; TQIntDict<TQString>windowTitleDict;
KWindowListMenu* windowList; KWindowListMenu* windowList;
}; };
@ -96,11 +96,11 @@ class MenuEmbed
Q_OBJECT Q_OBJECT
public: public:
MenuEmbed( WId mainwindow, bool desktop, MenuEmbed( WId mainwindow, bool desktop,
QWidget* parent = NULL, const char* name = NULL ); TQWidget* parent = NULL, const char* name = NULL );
WId mainWindow() const; WId mainWindow() const;
bool isDesktopMenu() const; bool isDesktopMenu() const;
virtual void setMinimumSize( int w, int h ); 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: protected:
virtual void windowChanged( WId w ); virtual void windowChanged( WId w );
virtual bool x11Event( XEvent* ev ); virtual bool x11Event( XEvent* ev );

@ -24,13 +24,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define _MENUAPPLET_CPP_ #define _MENUAPPLET_CPP_
#include <qdir.h> #include <tqdir.h>
#include <qdesktopwidget.h> #include <tqdesktopwidget.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <qtimer.h> #include <tqtimer.h>
#include <qvariant.h> // avoid X11 #define's #include <tqvariant.h> // avoid X11 #define's
#include <kapplication.h> #include <kapplication.h>
#include <kconfig.h> #include <kconfig.h>
#include <kdebug.h> #include <kdebug.h>
@ -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. 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 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 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 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 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" 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"); KGlobal::locale()->insertCatalogue("kmenuapplet");
return new KickerMenuApplet::Applet( configFile_P, parent_P ); 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::ToolbarMask | NET::MenuMask | NET::DialogMask | NET::OverrideMask
| NET::TopMenuMask | NET::UtilityMask | NET::SplashMask; | 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"); config.setGroup("Menubar");
_maxWidth = config.readNumEntry("Width", QDesktopWidget().availableGeometry().width()); _maxWidth = config.readNumEntry("Width", TQDesktopWidget().availableGeometry().width());
_menuMover = new QLabel("<<|>>", this ); _menuMover = new TQLabel("<<|>>", this );
_menuMover->adjustSize(); _menuMover->adjustSize();
_menuMover->setFixedSize(_menuMover->size()); _menuMover->setFixedSize(_menuMover->size());
_menuMover->move(_maxWidth - _menuMover->width(),0); _menuMover->move(_maxWidth - _menuMover->width(),0);
_menuMover->hide(); _menuMover->hide();
_menuMover->installEventFilter(this); _menuMover->installEventFilter(this);
windowIndicator = new QMenuBar(this); windowIndicator = new TQMenuBar(this);
windowIndicator->installEventFilter(this); windowIndicator->installEventFilter(this);
windowIndicator->setBackgroundOrigin(QWidget::WidgetOrigin); windowIndicator->setBackgroundOrigin(TQWidget::WidgetOrigin);
windowIndicator->setLineWidth(0); windowIndicator->setLineWidth(0);
windowList = new KWindowListMenu(windowIndicator); windowList = new KWindowListMenu(windowIndicator);
connect(windowList, SIGNAL(aboutToShow()), this, SLOT(initPopup())); connect(windowList, SIGNAL(aboutToShow()), this, SLOT(initPopup()));
windowIndicator->insertItem( "KDE", windowList, 0); windowIndicator->insertItem( "KDE", windowList, 0);
QFont tmpFont = KGlobalSettings::menuFont(); TQFont tmpFont = KGlobalSettings::menuFont();
windowIndicator->setFont(tmpFont); windowIndicator->setFont(tmpFont);
// windowIndicator->adjustSize(); // windowIndicator->adjustSize();
// int tmpHeight = windowIndicator->height(); // int tmpHeight = windowIndicator->height();
@ -136,7 +136,7 @@ void Applet::fontChanged()
{ {
if (!windowIndicator) if (!windowIndicator)
return; return;
QFont tmpFont = KGlobalSettings::menuFont(); TQFont tmpFont = KGlobalSettings::menuFont();
// windowIndicator->setFont(tmpFont); // windowIndicator->setFont(tmpFont);
// windowIndicator->adjustSize(); // windowIndicator->adjustSize();
// int tmpHeight = windowIndicator->height(); // int tmpHeight = windowIndicator->height();
@ -167,32 +167,32 @@ void Applet::moveMenu()
if (!wannaMove) if (!wannaMove)
return; return;
active_menu->move( active_menu->x() + menuDX, active_menu->y()); 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 (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; menuDX = -5;
wannaMove = true; wannaMove = true;
active_menu->move( active_menu->x() - 5, active_menu->y()); active_menu->move( active_menu->x() - 5, active_menu->y());
QTimer::singleShot(200, this, SLOT(moveMenu())); TQTimer::singleShot(200, this, SLOT(moveMenu()));
} }
else else
{ {
menuDX = 5; menuDX = 5;
wannaMove = true; wannaMove = true;
active_menu->move( active_menu->x() + 5, active_menu->y()); active_menu->move( active_menu->x() + 5, active_menu->y());
QTimer::singleShot(200, this, SLOT(moveMenu())); TQTimer::singleShot(200, this, SLOT(moveMenu()));
} }
return false; return false;
} }
if (ev->type() == QEvent::MouseButtonRelease) if (ev->type() == TQEvent::MouseButtonRelease)
{ {
wannaMove = false; wannaMove = false;
return false; return false;
@ -201,8 +201,8 @@ bool Applet::eventFilter(QObject *o, QEvent *ev)
} }
#if 0 #if 0
// to fake menu consistency - doesn't work to good so far // to fake menu consistency - doesn't work to good so far
if (o == windowIndicator && ev->type() == QEvent::MouseMove && if (o == windowIndicator && ev->type() == TQEvent::MouseMove &&
(((QMouseEvent*)ev)->x() == windowIndicator->width()-1) && (((TQMouseEvent*)ev)->x() == windowIndicator->width()-1) &&
windowIndicator->isItemActive( 0 )) windowIndicator->isItemActive( 0 ))
// moving out to the right // moving out to the right
{ {
@ -212,25 +212,25 @@ bool Applet::eventFilter(QObject *o, QEvent *ev)
} }
else else
// #endif // #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 { // 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 0
if (w == windowIndicator) if (w == windowIndicator)
// #endif // #endif
{ {
if (w->backgroundOrigin() != QWidget::WidgetOrigin) if (w->backgroundOrigin() != TQWidget::WidgetOrigin)
{ {
w->blockSignals(TRUE); // to avoid loops w->blockSignals(TRUE); // to avoid loops
w->setBackgroundOrigin(QWidget::WidgetOrigin); w->setBackgroundOrigin(TQWidget::WidgetOrigin);
w->blockSignals(FALSE); w->blockSignals(FALSE);
} }
} }
// #if 0 // #if 0
else if (w->backgroundOrigin() != QWidget::ParentOrigin) else if (w->backgroundOrigin() != TQWidget::ParentOrigin)
{ {
w->blockSignals(TRUE); w->blockSignals(TRUE);
w->setBackgroundOrigin(QWidget::ParentOrigin); w->setBackgroundOrigin(TQWidget::ParentOrigin);
w->blockSignals(FALSE); w->blockSignals(FALSE);
} }
return FALSE; return FALSE;
@ -241,7 +241,7 @@ bool Applet::eventFilter(QObject *o, QEvent *ev)
void Applet::windowAdded( WId w_P ) 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 ); Window transient_for = KWin::transientFor( w_P );
if( info.windowType( SUPPORTED_WINDOW_TYPES ) != NET::TopMenu ) if( info.windowType( SUPPORTED_WINDOW_TYPES ) != NET::TopMenu )
@ -251,7 +251,7 @@ void Applet::windowAdded( WId w_P )
return; return;
MenuEmbed* embed; MenuEmbed* embed;
if( transient_for == qt_xrootwin()) if( transient_for == tqt_xrootwin())
{ {
embed = new MenuEmbed( transient_for, true, this ); 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 ); KWin::WindowInfo info2 = KWin::windowInfo( transient_for, NET::WMWindowType | NET::WMName );
embed = new MenuEmbed( transient_for, info2.windowType( SUPPORTED_WINDOW_TYPES ) == NET::Desktop, this ); embed = new MenuEmbed( transient_for, info2.windowType( SUPPORTED_WINDOW_TYPES ) == NET::Desktop, this );
// ========= NAMING =================== // ========= NAMING ===================
QString title(info2.name()); TQString title(info2.name());
XClassHint classHint; XClassHint classHint;
if (XGetClassHint( qt_xdisplay(), w_P, &classHint ) ) if (XGetClassHint( tqt_xdisplay(), w_P, &classHint ) )
{ // much better way to get a nice name! { // much better way to get a nice name!
QString name( classHint.res_class ); TQString name( classHint.res_class );
if (name.contains("SDL_App")) if (name.contains("SDL_App"))
goto titlejump; // mainly for scummvm apps - jumps to netwm caption parsing goto titlejump; // mainly for scummvm apps - jumps to netwm caption parsing
XFree( classHint.res_name ); XFree( classHint.res_name );
@ -333,7 +333,7 @@ void Applet::activeWindowChanged( WId w_P )
window != None; window != None;
window = tryTransientFor( window )) window = tryTransientFor( window ))
{ {
for( QValueList< MenuEmbed* >::ConstIterator it = menus.begin(); for( TQValueList< MenuEmbed* >::ConstIterator it = menus.begin();
it != menus.end(); it != menus.end();
++it ) ++it )
{ {
@ -372,7 +372,7 @@ void Applet::activeWindowChanged( WId w_P )
if( try_desktop ) if( try_desktop )
#endif #endif
{ {
for( QValueList< MenuEmbed* >::ConstIterator it = menus.begin(); for( TQValueList< MenuEmbed* >::ConstIterator it = menus.begin();
it != menus.end(); it != menus.end();
++it ) ++it )
{ {
@ -440,14 +440,14 @@ WId Applet::tryTransientFor( WId w_P )
if( info.state() & NET::Modal ) if( info.state() & NET::Modal )
return None;*/ return None;*/
WId ret = KWin::transientFor( w_P ); WId ret = KWin::transientFor( w_P );
if( ret == qt_xrootwin()) if( ret == tqt_xrootwin())
ret = None; ret = None;
return ret; return ret;
} }
void Applet::menuLost( MenuEmbed* embed ) 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 ) if( *it == embed )
{ {
@ -471,16 +471,16 @@ void Applet::positionChange( Position )
} }
// Detect mouse movement at the top screen edge also if the menubar // 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, // Kicker's FittsLawFrame. Therefore move the menubar a bit higher,
// so that it actually is positioned exactly at the screen edge // so that it actually is positioned exactly at the screen edge
// (i.e. at a negative y coordinate within this applet, due to // (i.e. at a negative y coordinate within this applet, due to
// Kicker's frame). // Kicker's frame).
void Applet::updateTopEdgeOffset() 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 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 else
topEdgeOffset = 0; topEdgeOffset = 0;
if( active_menu != NULL ) 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 ) if( active_menu != NULL )
{ {
@ -504,7 +504,7 @@ void Applet::paletteChange(const QPalette & /* oldPalette */)
void Applet::claimSelection() void Applet::claimSelection()
{ {
assert( selection == NULL ); 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 // force taking the selection, but don't kill previous owner
if( selection->claim( true, false )) if( selection->claim( true, false ))
{ {
@ -514,8 +514,8 @@ void Applet::claimSelection()
module = new KWinModule; module = new KWinModule;
connect( module, SIGNAL( windowAdded( WId )), this, SLOT( windowAdded( WId ))); connect( module, SIGNAL( windowAdded( WId )), this, SLOT( windowAdded( WId )));
connect( module, SIGNAL( activeWindowChanged( WId )), this, SLOT( activeWindowChanged( WId ))); connect( module, SIGNAL( activeWindowChanged( WId )), this, SLOT( activeWindowChanged( WId )));
QValueList< WId > windows = module->windows(); TQValueList< WId > windows = module->windows();
for( QValueList< WId >::ConstIterator it = windows.begin(); it != windows.end(); ++it ) for( TQValueList< WId >::ConstIterator it = windows.begin(); it != windows.end(); ++it )
windowAdded( *it ); windowAdded( *it );
activeWindowChanged( module->activeWindow()); activeWindowChanged( module->activeWindow());
} }
@ -528,7 +528,7 @@ void Applet::lostSelection()
if( selection == NULL ) if( selection == NULL )
return; return;
// kdDebug() << "lost selection" << endl; // kdDebug() << "lost selection" << endl;
for( QValueList< MenuEmbed* >::ConstIterator it = menus.begin(); for( TQValueList< MenuEmbed* >::ConstIterator it = menus.begin();
it != menus.end(); it != menus.end();
++it ) ++it )
delete (*it); // delete all MenuEmbed's = release all menus delete (*it); // delete all MenuEmbed's = release all menus
@ -536,7 +536,7 @@ void Applet::lostSelection()
active_menu = NULL; active_menu = NULL;
if( selection_watcher == 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())); connect( selection_watcher, SIGNAL( lostOwner()), this, SLOT( claimSelection()));
} }
delete module; delete module;
@ -553,9 +553,9 @@ void Applet::readSettings()
desktop_menu = cfg.readBoolEntry( "ShowMenubar", false ); desktop_menu = cfg.readBoolEntry( "ShowMenubar", false );
cfg.setGroup( "KDE" ); cfg.setGroup( "KDE" );
if( cfg.readBoolEntry( "macStyle", false ) || desktop_menu ) if( cfg.readBoolEntry( "macStyle", false ) || desktop_menu )
QToolTip::remove( this ); TQToolTip::remove( this );
else else
QToolTip::add( this, i18n( TQToolTip::add( this, i18n(
"You do not appear to have enabled the standalone menubar; " "You do not appear to have enabled the standalone menubar; "
"enable it in the Behavior control module for desktop." )); "enable it in the Behavior control module for desktop." ));
if( !isDisabled() && active_menu == NULL ) if( !isDisabled() && active_menu == NULL )
@ -591,11 +591,11 @@ static
void initAtoms() void initAtoms()
{ {
char nm[ 100 ]; 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 nm2[] = "_KDE_TOPMENU_MINSIZE";
char* names[ 2 ] = { nm, nm2 }; char* names[ 2 ] = { nm, nm2 };
Atom atoms[ 2 ]; Atom atoms[ 2 ];
XInternAtoms( qt_xdisplay(), names, 2, False, atoms ); XInternAtoms( tqt_xdisplay(), names, 2, False, atoms );
selection_atom = atoms[ 0 ]; selection_atom = atoms[ 0 ];
msg_type_atom = atoms[ 1 ]; msg_type_atom = atoms[ 1 ];
} }
@ -608,7 +608,7 @@ Atom Applet::makeSelectionAtom()
} }
MenuEmbed::MenuEmbed( WId mainwindow_P, bool desktop_P, 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 ), : QXEmbed( parent_P, name_P ),
main_window( mainwindow_P ), main_window( mainwindow_P ),
desktop( desktop_P ) desktop( desktop_P )
@ -629,7 +629,7 @@ bool MenuEmbed::x11Event( XEvent* ev_P )
&& ev_P->xconfigurerequest.value_mask & ( CWWidth | CWHeight )) && ev_P->xconfigurerequest.value_mask & ( CWWidth | CWHeight ))
{ {
XConfigureRequestEvent& ev = ev_P->xconfigurerequest; XConfigureRequestEvent& ev = ev_P->xconfigurerequest;
QSize new_size = size(); TQSize new_size = size();
if( ev.value_mask & CWWidth ) if( ev.value_mask & CWWidth )
new_size.setWidth( ev.width ); new_size.setWidth( ev.width );
if( ev.value_mask & CWHeight ) if( ev.value_mask & CWHeight )
@ -646,7 +646,7 @@ bool MenuEmbed::x11Event( XEvent* ev_P )
// int x, y; // int x, y;
// unsigned int w, h, d, b; // unsigned int w, h, d, b;
// Window root; // 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; // kdDebug() << "RES3:" << width() << ":" << height() << ":" << w << ":" << h << endl;
return true; return true;
} }
@ -655,12 +655,12 @@ bool MenuEmbed::x11Event( XEvent* ev_P )
void MenuEmbed::sendSyntheticConfigureNotifyEvent() void MenuEmbed::sendSyntheticConfigureNotifyEvent()
{ {
QPoint globalPos = mapToGlobal(QPoint(0,0)); TQPoint globalPos = mapToGlobal(TQPoint(0,0));
if (embeddedWinId()) { if (embeddedWinId()) {
XConfigureEvent c; XConfigureEvent c;
memset(&c, 0, sizeof(c)); memset(&c, 0, sizeof(c));
c.type = ConfigureNotify; c.type = ConfigureNotify;
c.display = qt_xdisplay(); c.display = tqt_xdisplay();
c.send_event = True; c.send_event = True;
c.event = embeddedWinId(); c.event = embeddedWinId();
c.window = winId(); c.window = winId();
@ -671,7 +671,7 @@ void MenuEmbed::sendSyntheticConfigureNotifyEvent()
c.border_width = 0; c.border_width = 0;
c.above = None; c.above = None;
c.override_redirect = 0; 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; // kdDebug() << "RES2:" << width() << ":" << height() << ":" << minimumWidth() << ":" << minimumHeight() << endl;
XEvent ev; XEvent ev;
ev.xclient.display = qt_xdisplay(); ev.xclient.display = tqt_xdisplay();
ev.xclient.type = ClientMessage; ev.xclient.type = ClientMessage;
ev.xclient.window = embeddedWinId(); ev.xclient.window = embeddedWinId();
assert( msg_type_atom != None ); assert( msg_type_atom != None );
ev.xclient.message_type = msg_type_atom; ev.xclient.message_type = msg_type_atom;
ev.xclient.format = 32; 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[1] = minimumWidth();
ev.xclient.data.l[2] = minimumHeight(); ev.xclient.data.l[2] = minimumHeight();
ev.xclient.data.l[3] = 0; ev.xclient.data.l[3] = 0;
ev.xclient.data.l[4] = 0; ev.xclient.data.l[4] = 0;
XSendEvent( qt_xdisplay(), embeddedWinId(), False, NoEventMask, &ev ); XSendEvent( tqt_xdisplay(), embeddedWinId(), False, NoEventMask, &ev );
} }
} }

@ -26,8 +26,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define _MENUAPPLET_H_ #define _MENUAPPLET_H_
#include <kpanelapplet.h> #include <kpanelapplet.h>
#include <qintdict.h> #include <tqintdict.h>
#include <qvaluelist.h> #include <tqvaluelist.h>
#include <kmenubar.h> #include <kmenubar.h>
#include <kwindowlistmenu.h> #include <kwindowlistmenu.h>
#include <kwinmodule.h> #include <kwinmodule.h>
@ -38,8 +38,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <karrowbutton.h> #include <karrowbutton.h>
#include <assert.h> #include <assert.h>
class QHBoxLayout; class TQHBoxLayout;
class QLabel; class TQLabel;
namespace KickerMenuApplet namespace KickerMenuApplet
{ {
@ -55,17 +55,17 @@ k_dcop:
virtual void showWindowList(); virtual void showWindowList();
public: public:
friend class MenuEmbed; friend class MenuEmbed;
Applet( const QString& configFile, QWidget *parent ); Applet( const TQString& configFile, TQWidget *parent );
virtual ~Applet(); virtual ~Applet();
virtual int widthForHeight( int height ) const; virtual int widthForHeight( int height ) const;
virtual int heightForWidth( int width ) const; virtual int heightForWidth( int width ) const;
void menuLost( MenuEmbed* embed ); void menuLost( MenuEmbed* embed );
void updateMenuGeometry( MenuEmbed* embed ); void updateMenuGeometry( MenuEmbed* embed );
protected: protected:
virtual void paletteChange(const QPalette& ); virtual void paletteChange(const TQPalette& );
virtual void positionChange( Position p ); virtual void positionChange( Position p );
bool eventFilter(QObject *, QEvent *ev); bool eventFilter(TQObject *, TQEvent *ev);
QMenuBar *windowIndicator; TQMenuBar *windowIndicator;
private slots: private slots:
void moveMenu(); void moveMenu();
void windowAdded( WId w ); void windowAdded( WId w );
@ -83,7 +83,7 @@ private:
static Atom makeSelectionAtom(); static Atom makeSelectionAtom();
void updateTopEdgeOffset(); void updateTopEdgeOffset();
KWinModule* module; KWinModule* module;
QValueList< MenuEmbed* > menus; TQValueList< MenuEmbed* > menus;
MenuEmbed* active_menu; MenuEmbed* active_menu;
KSelectionOwner* selection; KSelectionOwner* selection;
KSelectionWatcher* selection_watcher; KSelectionWatcher* selection_watcher;
@ -91,8 +91,8 @@ private:
DCOPClient dcopclient; DCOPClient dcopclient;
int topEdgeOffset; int topEdgeOffset;
KWindowListMenu* windowList; KWindowListMenu* windowList;
QHBoxLayout *layout; TQHBoxLayout *layout;
QLabel *_menuMover; TQLabel *_menuMover;
bool wannaMove; bool wannaMove;
int menuDX; int menuDX;
}; };
@ -101,12 +101,12 @@ class MenuEmbed : public QXEmbed
{ {
Q_OBJECT Q_OBJECT
public: 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; WId mainWindow() const;
bool isDesktopMenu() const; bool isDesktopMenu() const;
virtual void setMinimumSize( int w, int h ); 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()); }
QString title; TQString title;
protected: protected:
virtual void windowChanged( WId w ); virtual void windowChanged( WId w );
virtual bool x11Event( XEvent* ev ); virtual bool x11Event( XEvent* ev );

@ -68,7 +68,7 @@ DM::DM() : fd( -1 )
break; break;
case OldKDM: case OldKDM:
{ {
QString tf( ctl ); TQString tf( ctl );
tf.truncate( tf.find( ',' ) ); tf.truncate( tf.find( ',' ) );
fd = ::open( tf.latin1(), O_WRONLY ); fd = ::open( tf.latin1(), O_WRONLY );
} }
@ -85,7 +85,7 @@ DM::~DM()
bool bool
DM::exec( const char *cmd ) DM::exec( const char *cmd )
{ {
QCString buf; TQCString buf;
return exec( cmd, buf ); return exec( cmd, buf );
} }
@ -103,7 +103,7 @@ DM::exec( const char *cmd )
* from KDM. * from KDM.
*/ */
bool bool
DM::exec( const char *cmd, QCString &buf ) DM::exec( const char *cmd, TQCString &buf )
{ {
bool ret = false; bool ret = false;
int tl; int tl;
@ -151,7 +151,7 @@ DM::canShutdown()
if (DMType == OldKDM) if (DMType == OldKDM)
return strstr( ctl, ",maysd" ) != 0; return strstr( ctl, ",maysd" ) != 0;
QCString re; TQCString re;
return exec( "caps\n", re ) && re.find( "\tshutdown" ) >= 0; return exec( "caps\n", re ) && re.find( "\tshutdown" ) >= 0;
} }
@ -159,13 +159,13 @@ DM::canShutdown()
void void
DM::shutdown( KApplication::ShutdownType shutdownType, DM::shutdown( KApplication::ShutdownType shutdownType,
KApplication::ShutdownMode shutdownMode, KApplication::ShutdownMode shutdownMode,
const QString &bootOption ) const TQString &bootOption )
{ {
if (!bootOption.isEmpty() && DMType != NewKDM) if (!bootOption.isEmpty() && DMType != NewKDM)
return; return;
if (shutdownType != KApplication::ShutdownTypeNone) { if (shutdownType != KApplication::ShutdownTypeNone) {
QCString cmd( "shutdown\t" ); TQCString cmd( "shutdown\t" );
cmd.append( shutdownType == KApplication::ShutdownTypeReboot ? cmd.append( shutdownType == KApplication::ShutdownTypeReboot ?
"reboot\t" : "halt\t" ); "reboot\t" : "halt\t" );
if (!bootOption.isNull()) if (!bootOption.isNull())
@ -181,16 +181,16 @@ DM::shutdown( KApplication::ShutdownType shutdownType,
} }
bool bool
DM::bootOptions( QStringList &opts, int &defopt, int &current ) DM::bootOptions( TQStringList &opts, int &defopt, int &current )
{ {
if (DMType != NewKDM) if (DMType != NewKDM)
return false; return false;
QCString re; TQCString re;
if (!exec( "listbootoptions\n", re )) if (!exec( "listbootoptions\n", re ))
return false; return false;
opts = QStringList::split( '\t', QString::fromLocal8Bit( re.data() ) ); opts = TQStringList::split( '\t', TQString::fromLocal8Bit( re.data() ) );
if (opts.size() < 4) if (opts.size() < 4)
return false; return false;
@ -202,8 +202,8 @@ DM::bootOptions( QStringList &opts, int &defopt, int &current )
if (!ok) if (!ok)
return false; return false;
opts = QStringList::split( ' ', opts[1] ); opts = TQStringList::split( ' ', opts[1] );
for (QStringList::Iterator it = opts.begin(); it != opts.end(); ++it) for (TQStringList::Iterator it = opts.begin(); it != opts.end(); ++it)
(*it).replace( "\\s", " " ); (*it).replace( "\\s", " " );
return true; return true;
@ -221,7 +221,7 @@ DM::isSwitchable()
if (DMType == OldKDM) if (DMType == OldKDM)
return dpy[0] == ':'; return dpy[0] == ':';
QCString re; TQCString re;
return exec( "caps\n", re ) && re.find( "\tlocal" ) >= 0; return exec( "caps\n", re ) && re.find( "\tlocal" ) >= 0;
} }
@ -232,7 +232,7 @@ DM::numReserve()
if (DMType == OldKDM) if (DMType == OldKDM)
return strstr( ctl, ",rsvd" ) ? 1 : -1; return strstr( ctl, ",rsvd" ) ? 1 : -1;
QCString re; TQCString re;
int p; int p;
if (!(exec( "caps\n", re ) && (p = re.find( "\treserve " )) >= 0)) if (!(exec( "caps\n", re ) && (p = re.find( "\treserve " )) >= 0))
@ -252,13 +252,13 @@ DM::localSessions( SessList &list )
if (DMType == OldKDM) if (DMType == OldKDM)
return false; return false;
QCString re; TQCString re;
if (!exec( "list\talllocal\n", re )) if (!exec( "list\talllocal\n", re ))
return false; return false;
QStringList sess = QStringList::split( QChar('\t'), re.data() + 3 ); TQStringList sess = TQStringList::split( TQChar('\t'), re.data() + 3 );
for (QStringList::ConstIterator it = sess.begin(); it != sess.end(); ++it) { for (TQStringList::ConstIterator it = sess.begin(); it != sess.end(); ++it) {
QStringList ts = QStringList::split( QChar(','), *it, true ); TQStringList ts = TQStringList::split( TQChar(','), *it, true );
SessEnt se; SessEnt se;
se.display = ts[0]; se.display = ts[0];
if (ts[1][0] == '@') if (ts[1][0] == '@')
@ -275,11 +275,11 @@ DM::localSessions( SessList &list )
} }
void void
DM::sess2Str2( const SessEnt &se, QString &user, QString &loc ) DM::sess2Str2( const SessEnt &se, TQString &user, TQString &loc )
{ {
if (se.tty) { if (se.tty) {
user = i18n("user: ...", "%1: TTY login").arg( se.user ); 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 { } else {
user = user =
se.user.isEmpty() ? se.user.isEmpty() ?
@ -292,15 +292,15 @@ DM::sess2Str2( const SessEnt &se, QString &user, QString &loc )
.arg( se.user ).arg( se.session ); .arg( se.user ).arg( se.session );
loc = loc =
se.vt ? se.vt ?
QString("%1, vt%2").arg( se.display ).arg( se.vt ) : TQString("%1, vt%2").arg( se.display ).arg( se.vt ) :
se.display; se.display;
} }
} }
QString TQString
DM::sess2Str( const SessEnt &se ) DM::sess2Str( const SessEnt &se )
{ {
QString user, loc; TQString user, loc;
sess2Str2( se, user, loc ); sess2Str2( se, user, loc );
return i18n("session (location)", "%1 (%2)").arg( user ).arg( loc ); return i18n("session (location)", "%1 (%2)").arg( user ).arg( loc );
@ -309,7 +309,7 @@ DM::sess2Str( const SessEnt &se )
bool bool
DM::switchVT( int vt ) 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 void

@ -24,12 +24,12 @@
#include <kapplication.h> #include <kapplication.h>
struct SessEnt { struct SessEnt {
QString display, from, user, session; TQString display, from, user, session;
int vt; int vt;
bool self:1, tty:1; bool self:1, tty:1;
}; };
typedef QValueList<SessEnt> SessList; typedef TQValueList<SessEnt> SessList;
class DM { class DM {
@ -42,7 +42,7 @@ public:
bool canShutdown(); bool canShutdown();
void shutdown( KApplication::ShutdownType shutdownType, void shutdown( KApplication::ShutdownType shutdownType,
KApplication::ShutdownMode shutdownMode, KApplication::ShutdownMode shutdownMode,
const QString &bootOption = QString::null ); const TQString &bootOption = TQString::null );
void setLock( bool on ); void setLock( bool on );
@ -53,15 +53,15 @@ public:
bool switchVT( int vt ); bool switchVT( int vt );
void lockSwitchVT( 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 TQString sess2Str( const SessEnt &se );
static void sess2Str2( const SessEnt &se, QString &user, QString &loc ); static void sess2Str2( const SessEnt &se, TQString &user, TQString &loc );
private: private:
int fd; int fd;
bool exec( const char *cmd, QCString &ret ); bool exec( const char *cmd, TQCString &ret );
bool exec( const char *cmd ); bool exec( const char *cmd );
#else // Q_WS_X11 #else // Q_WS_X11
@ -72,7 +72,7 @@ public:
bool canShutdown() { return false; } bool canShutdown() { return false; }
void shutdown( KApplication::ShutdownType shutdownType, void shutdown( KApplication::ShutdownType shutdownType,
KApplication::ShutdownMode shutdownMode, KApplication::ShutdownMode shutdownMode,
const QString &bootOption = QString::null ) {} const TQString &bootOption = TQString::null ) {}
void setLock( bool ) {} void setLock( bool ) {}
@ -82,7 +82,7 @@ public:
bool localSessions( SessList &list ) { return false; } bool localSessions( SessList &list ) { return false; }
void switchVT( int vt ) {} void switchVT( int vt ) {}
bool bootOptions( QStringList &opts, int &dflt, int &curr ); bool bootOptions( TQStringList &opts, int &dflt, int &curr );
#endif // Q_WS_X11 #endif // Q_WS_X11

@ -20,9 +20,9 @@
#include <stdlib.h> #include <stdlib.h>
#include <kmenubar.h> #include <kmenubar.h>
// #include <qlabel.h> // #include <tqlabel.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qpopupmenu.h> #include <tqpopupmenu.h>
#include <dcopclient.h> #include <dcopclient.h>
#include <kglobal.h> #include <kglobal.h>
#include <kiconloader.h> #include <kiconloader.h>
@ -40,7 +40,7 @@
#define _ICONSET_(i) KGlobal::iconLoader()->loadIconSet(i, KIcon::Small, 0, false) #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) : 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 = new KMenuBar(this);
menu->setTopLevelMenu(false); menu->setTopLevelMenu(false);
menu->setFrameShape ( QFrame::NoFrame ); menu->setFrameShape ( TQFrame::NoFrame );
menu->setMargin ( 0 ); menu->setMargin ( 0 );
menu->setLineWidth ( 0 ); menu->setLineWidth ( 0 );
// sessions // sessions
sessionPopup = new QPopupMenu(this); sessionPopup = new TQPopupMenu(this);
menu->insertItem ( getenv("USER"), sessionPopup, 0); menu->insertItem ( getenv("USER"), sessionPopup, 0);
connect( sessionPopup, SIGNAL(aboutToShow()), SLOT(slotPopulateSessions()) ); connect( sessionPopup, SIGNAL(aboutToShow()), SLOT(slotPopulateSessions()) );
connect( sessionPopup, SIGNAL(activated(int)), SLOT(slotSessionActivated(int)) ); connect( sessionPopup, SIGNAL(activated(int)), SLOT(slotSessionActivated(int)) );
// languages // languages
langPopup = new QPopupMenu(this); langPopup = new TQPopupMenu(this);
KConfigBase *config = KGlobal::config(); KConfigBase *config = KGlobal::config();
config->setGroup("Locale"); config->setGroup("Locale");
langList = config->readListEntry ("Language", ':'); langList = config->readListEntry ("Language", ':');
// QString flag( locate( "locale", QString::fromLatin1( "l10n/%1/flag.png" ).arg(langList[0]) ) ); // TQString flag( locate( "locale", TQString::fromLatin1( "l10n/%1/flag.png" ).arg(langList[0]) ) );
// langLabel = new QLabel(this); // langLabel = new TQLabel(this);
// langLabel->setPixmap(_ICONSET_(flag).pixmap()); // langLabel->setPixmap(_ICONSET_(flag).pixmap());
menu->insertItem ( '[' + langList[0].section('_',0,0) + ']', langPopup, 1 ); 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); setFixedWidth(menu->width()+5);
mainView = menu; mainView = menu;
menu->move(menu->mapToParent(QPoint(0,0)).x(),0); menu->move(menu->mapToParent(TQPoint(0,0)).x(),0);
menu->show(); menu->show();
} }
@ -108,7 +108,7 @@ void UserManager::about()
void UserManager::lock() void UserManager::lock()
{ {
QCString appname( "kdesktop" ); TQCString appname( "kdesktop" );
// if ( kicker_screen_number ) // if ( kicker_screen_number )
// appname.sprintf("kdesktop-screen-%d", kicker_screen_number); // appname.sprintf("kdesktop-screen-%d", kicker_screen_number);
kapp->dcopClient()->send(appname, "KScreensaverIface", "lock()", ""); kapp->dcopClient()->send(appname, "KScreensaverIface", "lock()", "");
@ -127,18 +127,18 @@ void UserManager::slotPopulateLanguages()
config->setGroup("Locale"); config->setGroup("Locale");
langList = config->readListEntry ("Language", ':'); langList = config->readListEntry ("Language", ':');
int i = 0; int i = 0;
for ( QStringList::ConstIterator it = langList.begin(); for ( TQStringList::ConstIterator it = langList.begin();
it != langList.end(); ++it ) 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"); 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 ); langPopup->insertItem( _ICONSET_(flag), name, i );
i++; i++;
} }
// langPopup->popup(langLabel->mapToGlobal(QPoint(0,height()))); // langPopup->popup(langLabel->mapToGlobal(TQPoint(0,height())));
} }
void UserManager::slotLanguageActivated( int i ) void UserManager::slotLanguageActivated( int i )
@ -149,7 +149,7 @@ void UserManager::slotLanguageActivated( int i )
// langLabel->setPixmap(*langPopup->pixmap(i)); // langLabel->setPixmap(*langPopup->pixmap(i));
KConfig *config = new KConfig("kdeglobals"); KConfig *config = new KConfig("kdeglobals");
config->setGroup("Locale"); config->setGroup("Locale");
QString tmp = langList[i]; TQString tmp = langList[i];
langList.remove(langList.at(i)); langList.remove(langList.at(i));
langList.prepend(tmp); langList.prepend(tmp);
config->writeEntry ("Language", langList, ':'); config->writeEntry ("Language", langList, ':');
@ -265,7 +265,7 @@ void UserManager::doNewSession( bool lock_ )
void UserManager::saveSession() void UserManager::saveSession()
{ {
QByteArray data; TQByteArray data;
kapp->dcopClient()->send( "ksmserver", "default", kapp->dcopClient()->send( "ksmserver", "default",
"saveCurrentSession()", data ); "saveCurrentSession()", data );
} }
@ -273,7 +273,7 @@ void UserManager::saveSession()
extern "C" extern "C"
{ {
KPanelApplet* init( QWidget *parent, const QString& configFile) KPanelApplet* init( TQWidget *parent, const TQString& configFile)
{ {
KGlobal::locale()->insertCatalogue("usermanager"); KGlobal::locale()->insertCatalogue("usermanager");
return new UserManager(configFile, KPanelApplet::Normal, KPanelApplet::About, parent, "usermanager"); return new UserManager(configFile, KPanelApplet::Normal, KPanelApplet::About, parent, "usermanager");

@ -27,22 +27,22 @@
#endif #endif
#include <kpanelapplet.h> #include <kpanelapplet.h>
#include <qstring.h> #include <tqstring.h>
#include <qiconset.h> #include <tqiconset.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <kconfig.h> #include <kconfig.h>
class KMenuBar; class KMenuBar;
class QPopunMenu; class TQPopunMenu;
// class QLabel; // class TQLabel;
class UserManager : public KPanelApplet class UserManager : public KPanelApplet
{ {
Q_OBJECT Q_OBJECT
public: public:
UserManager(const QString& configFile, Type t = Normal, int actions = 0, UserManager(const TQString& configFile, Type t = Normal, int actions = 0,
QWidget *parent = 0, const char *name = 0); TQWidget *parent = 0, const char *name = 0);
/** destructor */ /** destructor */
~UserManager(); ~UserManager();
@ -64,15 +64,15 @@ protected:
private: private:
KConfig *ksConfig; KConfig *ksConfig;
QWidget *mainView; TQWidget *mainView;
KMenuBar *menu; KMenuBar *menu;
QPopupMenu *sessionPopup; TQPopupMenu *sessionPopup;
QPopupMenu *langPopup; TQPopupMenu *langPopup;
QStringList langList; TQStringList langList;
QIconSet exitIcon; TQIconSet exitIcon;
QIconSet lockIcon; TQIconSet lockIcon;
QIconSet fileSaveIcon; TQIconSet fileSaveIcon;
// QLabel *langLabel; // TQLabel *langLabel;
}; };
#endif #endif

@ -1,6 +1,6 @@
#include <kinstance.h> #include <kinstance.h>
#include <qsplitter.h> #include <tqsplitter.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <stdlib.h> #include <stdlib.h>
#include "dndlistbox.h" #include "dndlistbox.h"
@ -9,20 +9,20 @@
#include "baghirasidebar.h" #include "baghirasidebar.h"
#include "baghirasidebar.moc" #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) KonqSidebarPlugin(inst,parent,widgetParent,desktopName,name)
{ {
scrollView = new LinkView(widgetParent); scrollView = new LinkView(widgetParent);
scrollView->setHScrollBarMode(QScrollView::AlwaysOff); scrollView->setHScrollBarMode(TQScrollView::AlwaysOff);
connect (scrollView->Hardware(), SIGNAL(clicked(QListBoxItem *)), this, SLOT(callURL(QListBoxItem *))); connect (scrollView->Hardware(), SIGNAL(clicked(TQListBoxItem *)), this, SLOT(callURL(TQListBoxItem *)));
connect (scrollView->Locations(), SIGNAL(clicked(QListBoxItem *)), this, SLOT(callURL(QListBoxItem *))); connect (scrollView->Locations(), SIGNAL(clicked(TQListBoxItem *)), this, SLOT(callURL(TQListBoxItem *)));
} }
baghiraSidebar::~baghiraSidebar() baghiraSidebar::~baghiraSidebar()
{ {
} }
void baghiraSidebar::callURL(QListBoxItem *item) void baghiraSidebar::callURL(TQListBoxItem *item)
{ {
emit openURLRequest(KURL(((ListBoxLink*)(item))->URL()), KParts::URLArgs(true,0,0)); emit openURLRequest(KURL(((ListBoxLink*)(item))->URL()), KParts::URLArgs(true,0,0));
} }
@ -46,7 +46,7 @@ void baghiraSidebar::handleURL(const KURL &url)
} }
extern "C" { extern "C" {
KDE_EXPORT bool add_konqsidebar_baghirasidebar(QString* fn, QString* param, QMap<QString,QString> *map) { KDE_EXPORT bool add_konqsidebar_baghirasidebar(TQString* fn, TQString* param, TQMap<TQString,TQString> *map) {
Q_UNUSED(param); Q_UNUSED(param);
map->insert("Type", "Link"); map->insert("Type", "Link");
@ -61,7 +61,7 @@ extern "C" {
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); return new baghiraSidebar(instance,par,widp,desktopname,name);
} }

@ -11,7 +11,7 @@
class LinkView; class LinkView;
class KListBox; class KListBox;
class QListBoxItem; class TQListBoxItem;
class baghiraSidebar : public KonqSidebarPlugin class baghiraSidebar : public KonqSidebarPlugin
{ {
@ -25,22 +25,22 @@ public:
* @param parent The sidebar internal button info class responsible for this plugin. * @param parent The sidebar internal button info class responsible for this plugin.
* @param widgetParent The container which will contain the plugins widget. * @param widgetParent The container which will contain the plugins widget.
* @param desktopName The filename of the configuration file. * @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 */ /** destructor */
~baghiraSidebar(); ~baghiraSidebar();
virtual QWidget *getWidget(){return scrollView;} virtual TQWidget *getWidget(){return scrollView;}
virtual void *provides(const QString &) {return 0;} virtual void *provides(const TQString &) {return 0;}
protected: protected:
LinkView *scrollView; LinkView *scrollView;
virtual void handleURL(const KURL &url); virtual void handleURL(const KURL &url);
private slots: private slots:
void callURL(QListBoxItem *); void callURL(TQListBoxItem *);
signals: signals:
void openURLRequest(const KURL &url, const KParts::URLArgs &args); void openURLRequest(const KURL &url, const KParts::URLArgs &args);

@ -27,9 +27,9 @@ class BaghiraSidebarIface : virtual public DCOPObject
{ {
K_DCOP K_DCOP
k_dcop: k_dcop:
virtual void mediumAdded(const QString &name) = 0; virtual void mediumAdded(const TQString &name) = 0;
virtual void mediumRemoved(const QString &name) = 0; virtual void mediumRemoved(const TQString &name) = 0;
virtual void mediumChanged(const QString &name) = 0; virtual void mediumChanged(const TQString &name) = 0;
}; };
#endif #endif

@ -1,9 +1,9 @@
#include <dcopclient.h> #include <dcopclient.h>
#include <qdragobject.h> #include <tqdragobject.h>
#include <kurl.h> #include <kurl.h>
#include <qstrlist.h> #include <tqstrlist.h>
#include <qtimer.h> #include <tqtimer.h>
#include <kapplication.h> #include <kapplication.h>
#include <klocale.h> #include <klocale.h>
#include <kfileitem.h> #include <kfileitem.h>
@ -15,7 +15,7 @@
#include <kurlrequester.h> #include <kurlrequester.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include <kwin.h> #include <kwin.h>
#include <qclipboard.h> #include <tqclipboard.h>
#include "listboxlink.h" #include "listboxlink.h"
#include "linkconfig.h" #include "linkconfig.h"
#include "dndlistbox.h" #include "dndlistbox.h"
@ -37,11 +37,11 @@
#define MEDIA_PROPS 12 #define MEDIA_PROPS 12
#define MEDIALIST_PROPS 13 #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"); config.setGroup("Sidebar");
size_ = config.readNumEntry (QString(name) + "_IconSize", 48); size_ = config.readNumEntry (TQString(name) + "_IconSize", 48);
popupMenu = new KPopupMenu; popupMenu = new KPopupMenu;
popupMenu->insertTitle (i18n("Icon Size"),122,122); popupMenu->insertTitle (i18n("Icon Size"),122,122);
popupMenu->insertItem("16x16", this, SLOT(setIconSize(int)),0,16,123); 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); 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 ); KListBox::insertItem( lbi, index );
if (height() <= numRows()*itemHeight()) if (height() <= numRows()*itemHeight())
emit itemNumberChanged(TRUE); 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 ); KListBox::insertItem( lbi, after );
if (height() <= numRows()*itemHeight()) 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 ) ); insertItem( new ListBoxLink(icon, size_, title, url ) );
} }
@ -83,9 +83,9 @@ void ResizingLinkBox::removeItem( int index )
void ResizingLinkBox::setIconSize(int size) void ResizingLinkBox::setIconSize(int size)
{ {
size_ = size; size_ = size;
KConfig *config = new KConfig(QDir::homeDirPath() + "/.qt/baghirarc"); KConfig *config = new KConfig(TQDir::homeDirPath() + "/.qt/baghirarc");
config->setGroup("Sidebar"); config->setGroup("Sidebar");
config->writeEntry (QString(name()) + "_IconSize", size); config->writeEntry (TQString(name()) + "_IconSize", size);
config->sync(); config->sync();
ListBoxLink *runner; ListBoxLink *runner;
ListBoxDevice *current; ListBoxDevice *current;
@ -107,14 +107,14 @@ void ResizingLinkBox::setIconSize(int size)
blockSignals ( false ); blockSignals ( false );
} }
void ResizingLinkBox::mousePressEvent ( QMouseEvent *mpe ) void ResizingLinkBox::mousePressEvent ( TQMouseEvent *mpe )
{ {
KListBox::mousePressEvent( 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()); ListBoxLink *link = (ListBoxLink*)itemAt(mpe->pos());
if (isSelected(link)) emit clicked(link); if (isSelected(link)) emit clicked(link);
@ -124,17 +124,17 @@ void ResizingLinkBox::mouseReleaseEvent ( QMouseEvent *mpe )
KListBox::mouseReleaseEvent( 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 ); KListBox::contentsWheelEvent ( we );
else else
emit scrolled(0, -we->delta()); 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"); config.setGroup("Sidebar");
hiddenDevices = config.readListEntry("HiddenDevices"); hiddenDevices = config.readListEntry("HiddenDevices");
currentFloppy = 0L; 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("system", size_, i18n("My Computer"), "media:/", "", "", TRUE, FALSE, FALSE));
insertItem(new ListBoxDevice("network", size_, i18n("Network"), "lan:/localhost", "", "", TRUE, FALSE, FALSE)); insertItem(new ListBoxDevice("network", size_, i18n("Network"), "lan:/localhost", "", "", TRUE, FALSE, FALSE));
#endif #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 = KApplication::dcopClient();
client->connectDCOPSignal("kded", "mediamanager", "mediumAdded(QString)", "BaghiraSidebarIface", "mediumAdded(QString)", FALSE); client->connectDCOPSignal("kded", "mediamanager", "mediumAdded(TQString)", "BaghiraSidebarIface", "mediumAdded(TQString)", FALSE);
client->connectDCOPSignal("kded", "mediamanager", "mediumRemoved(QString)", "BaghiraSidebarIface", "mediumRemoved(const QString)", FALSE); client->connectDCOPSignal("kded", "mediamanager", "mediumRemoved(TQString)", "BaghiraSidebarIface", "mediumRemoved(const TQString)", FALSE);
client->connectDCOPSignal("kded", "mediamanager", "mediumChanged(QString)", "BaghiraSidebarIface", "mediumChanged(QString)", FALSE); client->connectDCOPSignal("kded", "mediamanager", "mediumChanged(TQString)", "BaghiraSidebarIface", "mediumChanged(TQString)", FALSE);
/* Get the media info - huhhh ;) */ /* Get the media info - huhhh ;) */
QByteArray data, replyData; TQByteArray data, replyData;
QCString replyType; TQCString replyType;
QDataStream arg(data, IO_WriteOnly); TQDataStream arg(data, IO_WriteOnly);
arg << ""; // ask for the full list arg << ""; // ask for the full list
if (!client->call("kded", "mediamanager", "fullList()", data, replyType, replyData)) if (!client->call("kded", "mediamanager", "fullList()", data, replyType, replyData))
qDebug("there was some error using DCOP."); tqDebug("there was some error using DCOP.");
else else
{ {
QDataStream reply(replyData, IO_ReadOnly); TQDataStream reply(replyData, IO_ReadOnly);
if (replyType == "QStringList") if (replyType == "TQStringList")
{ {
QStringList result; TQStringList result;
reply >> result; reply >> result;
blockSignals ( true ); blockSignals ( true );
for (uint i = 0; i < result.size()/MEDIALIST_PROPS; i++) 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 ); blockSignals ( false );
} }
else else
qWarning("fullList() returned an unexpected type of reply!"); tqWarning("fullList() returned an unexpected type of reply!");
} }
// setCurrentItem( 0 ); // setCurrentItem( 0 );
} }
@ -206,7 +206,7 @@ MediaListBox::~MediaListBox()
ListBoxDevice *runner; ListBoxDevice *runner;
for ( runner = deviceList.first(); runner; runner = deviceList.next() ) for ( runner = deviceList.first(); runner; runner = deviceList.next() )
hiddenDevices.append(runner->name()); hiddenDevices.append(runner->name());
KConfig config(QDir::homeDirPath() + "/.qt/baghirarc"); KConfig config(TQDir::homeDirPath() + "/.qt/baghirarc");
config.setGroup("Sidebar"); config.setGroup("Sidebar");
config.writeEntry("HiddenDevices", hiddenDevices); 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]; icon = deviceProperties[MEDIALIST_PROPS*n+ICON_NAME];
if (icon.isNull()) if (icon.isNull())
{ {
@ -272,7 +272,7 @@ ListBoxDevice *MediaListBox::createListBoxDevice(QStringList & deviceProperties,
icon.truncate( icon.length()-2 ); icon.truncate( icon.length()-2 );
if (icon.contains("floppy")) icon.prepend("3"); if (icon.contains("floppy")) icon.prepend("3");
} }
QString label; TQString label;
label = deviceProperties[MEDIALIST_PROPS*n+USER_LABEL]; label = deviceProperties[MEDIALIST_PROPS*n+USER_LABEL];
if (label.isNull()) if (label.isNull())
{ {
@ -286,7 +286,7 @@ ListBoxDevice *MediaListBox::createListBoxDevice(QStringList & deviceProperties,
#endif #endif
} }
int MediaListBox::index (const QString & name ) int MediaListBox::index (const TQString & name )
{ {
ListBoxDevice *device; ListBoxDevice *device;
for (uint i = 0; i < count(); i++) for (uint i = 0; i < count(); i++)
@ -297,20 +297,20 @@ int MediaListBox::index (const QString & name )
return -1; return -1;
} }
void MediaListBox::mediumAdded(const QString &name) void MediaListBox::mediumAdded(const TQString &name)
{ {
QByteArray data, replyData; TQByteArray data, replyData;
QCString replyType; TQCString replyType;
QDataStream arg(data, IO_WriteOnly); TQDataStream arg(data, IO_WriteOnly);
arg << name; // ask for this item only arg << name; // ask for this item only
if (!client->call("kded", "mediamanager", "properties(QString)", data, replyType, replyData)) if (!client->call("kded", "mediamanager", "properties(TQString)", data, replyType, replyData))
qDebug("there was some error using DCOP."); tqDebug("there was some error using DCOP.");
else else
{ {
QDataStream reply(replyData, IO_ReadOnly); TQDataStream reply(replyData, IO_ReadOnly);
if (replyType == "QStringList") if (replyType == "TQStringList")
{ {
QStringList result; TQStringList result;
reply >> result; reply >> result;
ListBoxDevice *dev = createListBoxDevice(result); ListBoxDevice *dev = createListBoxDevice(result);
if (hiddenDevices.contains(dev->name())) if (hiddenDevices.contains(dev->name()))
@ -325,24 +325,24 @@ void MediaListBox::mediumAdded(const QString &name)
} }
} }
else 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; TQByteArray data, replyData;
QCString replyType; TQCString replyType;
QDataStream arg(data, IO_WriteOnly); TQDataStream arg(data, IO_WriteOnly);
arg << name; // ask for this item only arg << name; // ask for this item only
if (!client->call("kded", "mediamanager", "properties(QString)", data, replyType, replyData)) if (!client->call("kded", "mediamanager", "properties(TQString)", data, replyType, replyData))
qDebug("there was some error using DCOP."); tqDebug("there was some error using DCOP.");
else else
{ {
QDataStream reply(replyData, IO_ReadOnly); TQDataStream reply(replyData, IO_ReadOnly);
if (replyType == "QStringList") if (replyType == "TQStringList")
{ {
QStringList result; TQStringList result;
reply >> result; reply >> result;
int i = index(name); int i = index(name);
if (i<0) if (i<0)
@ -351,24 +351,24 @@ void MediaListBox::mediumRemoved(const QString &name)
removeItem(i); removeItem(i);
} }
else 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; TQByteArray data, replyData;
QCString replyType; TQCString replyType;
QDataStream arg(data, IO_WriteOnly); TQDataStream arg(data, IO_WriteOnly);
arg << name; // ask for this item only arg << name; // ask for this item only
if (!client->call("kded", "mediamanager", "properties(QString)", data, replyType, replyData)) if (!client->call("kded", "mediamanager", "properties(TQString)", data, replyType, replyData))
qDebug("there was some error using DCOP."); tqDebug("there was some error using DCOP.");
else else
{ {
QDataStream reply(replyData, IO_ReadOnly); TQDataStream reply(replyData, IO_ReadOnly);
if (replyType == "QStringList") if (replyType == "TQStringList")
{ {
QStringList result; TQStringList result;
reply >> result; reply >> result;
int i = index(name); int i = index(name);
if (i<0) if (i<0)
@ -406,16 +406,16 @@ void MediaListBox::mediumChanged(const QString &name)
blockSignals(false); blockSignals(false);
} }
else else
qWarning("properties() returned an unexpected type of reply!"); tqWarning("properties() returned an unexpected type of reply!");
} }
} }
#define _FLOPPYID_ 0 #define _FLOPPYID_ 0
#define _FLOPPYINDEX_ 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_); popupMenu->removeItem(_FLOPPYID_);
ListBoxDevice *device = (ListBoxDevice*)itemAt(mpe->pos()); ListBoxDevice *device = (ListBoxDevice*)itemAt(mpe->pos());
@ -427,7 +427,7 @@ void MediaListBox::mousePressEvent ( QMouseEvent *mpe )
popupMenu->popup(mpe->globalPos()); popupMenu->popup(mpe->globalPos());
return; 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()); ListBoxDevice *device = (ListBoxDevice*)itemAt(mpe->pos());
int dy = itemRect(device).y(); int dy = itemRect(device).y();
@ -445,7 +445,7 @@ void MediaListBox::mousePressEvent ( QMouseEvent *mpe )
ResizingLinkBox::mousePressEvent( mpe ); ResizingLinkBox::mousePressEvent( mpe );
} }
void MediaListBox::resizeEvent ( QResizeEvent * re) void MediaListBox::resizeEvent ( TQResizeEvent * re)
{ {
if (width() != re->oldSize().width()) if (width() != re->oldSize().width())
{ {
@ -455,13 +455,13 @@ void MediaListBox::resizeEvent ( QResizeEvent * re)
ResizingLinkBox::resizeEvent(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) ResizingLinkBox( parent, name, f), _poof(0), _poofIndex(0), _poofAnimPix(0), _poofPix(0)
{ {
setAcceptDrops(true); setAcceptDrops(true);
dialog = new LinkConfig(); dialog = new LinkConfig();
connect(dialog->buttonOk, SIGNAL(clicked()), this, SLOT(updateLink())); connect(dialog->buttonOk, SIGNAL(clicked()), this, SLOT(updateLink()));
setCursor(Qt::PointingHandCursor); setCursor(TQt::PointingHandCursor);
} }
DnDListBox::~DnDListBox() DnDListBox::~DnDListBox()
@ -471,18 +471,18 @@ DnDListBox::~DnDListBox()
void DnDListBox::poof(ListBoxLink *link) void DnDListBox::poof(ListBoxLink *link)
{ {
_poofIndex = 0; _poofIndex = 0;
_poofPix = new QPixmap(locateLocal("data", "baghira/poof.png"), "png"); _poofPix = new TQPixmap(locateLocal("data", "baghira/poof.png"), "png");
_poofAnimPix = new QPixmap(_poofPix->width(), _poofPix->width()); _poofAnimPix = new TQPixmap(_poofPix->width(), _poofPix->width());
if (!_poof) 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); KWin::setShadowSize(_poof->winId(), 0);
_poof->setFixedSize(_poofPix->width(), _poofPix->width()); _poof->setFixedSize(_poofPix->width(), _poofPix->width());
int x = QCursor::pos().x() - _poof->width()/2; int x = TQCursor::pos().x() - _poof->width()/2;
int y = QCursor::pos().y() - _poof->height()/2; int y = TQCursor::pos().y() - _poof->height()/2;
QPixmap bgPix = QPixmap::grabWindow( qt_xrootwin(), x, y, _poofPix->width(), _poofPix->width()); TQPixmap bgPix = TQPixmap::grabWindow( tqt_xrootwin(), x, y, _poofPix->width(), _poofPix->width());
_poof->move(x,y); _poof->move(x,y);
_poof->show(); _poof->show();
_poof->setBackgroundOrigin(QWidget::WidgetOrigin); _poof->setBackgroundOrigin(TQWidget::WidgetOrigin);
_poof->setPaletteBackgroundPixmap( bgPix ); _poof->setPaletteBackgroundPixmap( bgPix );
runPoof(); runPoof();
removeItem ( index(link) ); removeItem ( index(link) );
@ -503,30 +503,30 @@ void DnDListBox::runPoof()
return; return;
} }
_poof->erase(); _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; ++_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; // 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); dee->accept(true);
} }
void DnDListBox::dropEvent ( QDropEvent *de ) void DnDListBox::dropEvent ( TQDropEvent *de )
{ {
QStrList list; TQStrList list;
QString title; TQString title;
QString command; TQString command;
QString icon; TQString icon;
int oldIndex; int oldIndex;
QCString subtype; TQCString subtype;
if (BaghiraLinkDrag::decode(de, &title, &command, &icon, &oldIndex)) // internal move if (BaghiraLinkDrag::decode(de, &title, &command, &icon, &oldIndex)) // internal move
{ {
BaghiraLinkDrag::setAccepted(); BaghiraLinkDrag::setAccepted();
QListBoxItem *after = itemAt(de->pos()); TQListBoxItem *after = itemAt(de->pos());
int newIndex = index(after); int newIndex = index(after);
if (!dragging_ || oldIndex < 0 || oldIndex > count()-2) if (!dragging_ || oldIndex < 0 || oldIndex > count()-2)
insertItem (new ListBoxLink(icon, size_, title, command), after?newIndex:count()); 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 ); removeItem ( (newIndex < 0 || oldIndex < newIndex) ? oldIndex : oldIndex + 1 );
} }
} }
else if ( QUriDrag::decode(de, list) ) else if ( TQUriDrag::decode(de, list) )
{ {
char *uri; char *uri;
KURL url; KURL url;
QListBoxItem *after = itemAt(de->pos()); TQListBoxItem *after = itemAt(de->pos());
for ( uri = list.first(); uri; uri = list.next() ) for ( uri = list.first(); uri; uri = list.next() )
{ {
url = KURL(uri); url = KURL(uri);
if (url.protocol() == "http") 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 else
{ {
KFileItem item = KFileItem(KFileItem::Unknown, KFileItem::Unknown, url, true); 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); KURL url(command);
if (url.isValid()) if (url.isValid())
{ {
QListBoxItem *after = itemAt(de->pos()); TQListBoxItem *after = itemAt(de->pos());
if (url.protocol() == "http") 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 else
{ {
KFileItem item = KFileItem(KFileItem::Unknown, KFileItem::Unknown, url, true); KFileItem item = KFileItem(KFileItem::Unknown, KFileItem::Unknown, url, true);
@ -569,13 +569,13 @@ void DnDListBox::dropEvent ( QDropEvent *de )
} }
else if (command.contains('@')) else if (command.contains('@'))
{ {
QListBoxItem *after = itemAt(de->pos()); TQListBoxItem *after = itemAt(de->pos());
command.replace(" ",""); command.replace(" ","");
insertItem(new ListBoxLink("kmail", size_, command, "mailto:"+command), after?index(after):count()); insertItem(new ListBoxLink("kmail", size_, command, "mailto:"+command), after?index(after):count());
} }
else if (command.contains("'at'")) //last chance for anti-spam addy 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(" ","");
command.replace("'at'","@"); command.replace("'at'","@");
insertItem(new ListBoxLink("kmail", size_, command, "mailto:"+command), after?index(after):count()); 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; currentItem = 0;
popupMenu->removeItem(0); popupMenu->removeItem(0);
@ -598,22 +598,22 @@ void DnDListBox::mousePressEvent ( QMouseEvent *mpe )
popupMenu->popup(mpe->globalPos()); popupMenu->popup(mpe->globalPos());
return; return;
} }
if (mpe->button() == Qt::MidButton) if (mpe->button() == TQt::MidButton)
{ {
pasteURL(QClipboard::Selection, itemAt(mpe->pos())); pasteURL(TQClipboard::Selection, itemAt(mpe->pos()));
return; return;
} }
ResizingLinkBox::mousePressEvent( mpe ); ResizingLinkBox::mousePressEvent( mpe );
} }
void DnDListBox::mouseReleaseEvent ( QMouseEvent *mre ) void DnDListBox::mouseReleaseEvent ( TQMouseEvent *mre )
{ {
if (!dragging_) ResizingLinkBox::mouseReleaseEvent( 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_) if (!dragging_)
{ {
@ -622,9 +622,9 @@ void DnDListBox::mouseMoveEvent ( QMouseEvent * mme )
{ {
dragging_ = true; dragging_ = true;
BaghiraLinkDrag *d = new BaghiraLinkDrag( link->text(), link->URL(), link->icon(), index(link), this ); 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(); d->drag();
if (mme->state() & Qt::ControlButton || BaghiraLinkDrag::accepted()) if (mme->state() & TQt::ControlButton || BaghiraLinkDrag::accepted())
return; return;
poof(link); poof(link);
// do NOT delete d. // do NOT delete d.
@ -635,14 +635,14 @@ void DnDListBox::mouseMoveEvent ( QMouseEvent * mme )
dragging_ = false; 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); KURL url(string);
if (url.isValid()) if (url.isValid())
{ {
if (url.protocol() == "http") 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 else
{ {
KFileItem item = KFileItem(KFileItem::Unknown, KFileItem::Unknown, url, true); KFileItem item = KFileItem(KFileItem::Unknown, KFileItem::Unknown, url, true);

@ -7,50 +7,50 @@
#endif #endif
#include <klistbox.h> #include <klistbox.h>
#include <qptrlist.h> #include <tqptrlist.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include "baghirasidebariface.h" #include "baghirasidebariface.h"
class DCOPClient; class DCOPClient;
class QDragEnterEvent; class TQDragEnterEvent;
class QDragMoveEvent; class TQDragMoveEvent;
class QDragLeaveEvent; class TQDragLeaveEvent;
class QDropEvent; class TQDropEvent;
class QKeyEvent; class TQKeyEvent;
class QPoint; class TQPoint;
class KPopupMenu; class KPopupMenu;
class LinkConfig; class LinkConfig;
class ListBoxLink; class ListBoxLink;
class ListBoxDevice; class ListBoxDevice;
class QResizeEvent; class TQResizeEvent;
class ResizingLinkBox : public KListBox class ResizingLinkBox : public KListBox
{ {
Q_OBJECT Q_OBJECT
public: public:
ResizingLinkBox( QWidget * parent = 0, const char * name = 0, WFlags f = 0 ); ResizingLinkBox( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 );
~ResizingLinkBox(){}; ~ResizingLinkBox(){};
void insertItem( const QListBoxItem *, int index=-1 ); void insertItem( const TQListBoxItem *, int index=-1 );
void insertItem( const QListBoxItem *lbi, const QListBoxItem *after ); void insertItem( const TQListBoxItem *lbi, const TQListBoxItem *after );
void insertItem( const QString & icon, const QString & title, const QString & url ); void insertItem( const TQString & icon, const TQString & title, const TQString & url );
void insertItem( const QString &text, int index=-1 ) 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 ){ void insertItem( const TQPixmap &pixmap, const TQString &text, int index=-1 ){
insertItem( new QListBoxPixmap(pixmap, text), index ); insertItem( new TQListBoxPixmap(pixmap, text), index );
} }
void removeItem( int index ); void removeItem( int index );
protected: protected:
void mousePressEvent ( QMouseEvent * ); void mousePressEvent ( TQMouseEvent * );
void mouseReleaseEvent ( QMouseEvent * ); void mouseReleaseEvent ( TQMouseEvent * );
void contentsWheelEvent ( QWheelEvent * ); void contentsWheelEvent ( TQWheelEvent * );
KPopupMenu *popupMenu; KPopupMenu *popupMenu;
uint size_; uint size_;
private slots: private slots:
@ -64,24 +64,24 @@ class MediaListBox : public ResizingLinkBox, virtual public BaghiraSidebarIface
{ {
Q_OBJECT Q_OBJECT
public: public:
MediaListBox( QWidget * parent = 0, const char * name = 0, WFlags f = 0 ); MediaListBox( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 );
~MediaListBox(); ~MediaListBox();
ListBoxDevice *createListBoxDevice(QStringList & deviceProperties, uint n = 0); ListBoxDevice *createListBoxDevice(TQStringList & deviceProperties, uint n = 0);
void mediumAdded(const QString &name); void mediumAdded(const TQString &name);
void mediumRemoved(const QString &name); void mediumRemoved(const TQString &name);
void mediumChanged(const QString &name); void mediumChanged(const TQString &name);
int index (const QString & name ); int index (const TQString & name );
void removeItem( int index ); void removeItem( int index );
protected: protected:
void mousePressEvent ( QMouseEvent * ); void mousePressEvent ( TQMouseEvent * );
void resizeEvent ( QResizeEvent * ); void resizeEvent ( TQResizeEvent * );
private: private:
KPopupMenu *devicePopup; KPopupMenu *devicePopup;
DCOPClient *client; DCOPClient *client;
ListBoxDevice *currentFloppy; ListBoxDevice *currentFloppy;
typedef QPtrList<ListBoxDevice> DeviceList; typedef TQPtrList<ListBoxDevice> DeviceList;
DeviceList deviceList; DeviceList deviceList;
QStringList hiddenDevices; TQStringList hiddenDevices;
private slots: private slots:
void kfloppy(); void kfloppy();
void toggleDevice(int id); void toggleDevice(int id);
@ -92,31 +92,31 @@ class DnDListBox : public ResizingLinkBox
Q_OBJECT Q_OBJECT
public: public:
DnDListBox( QWidget * parent = 0, const char * name = 0, WFlags f = 0 ); DnDListBox( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 );
/** destructor */ /** destructor */
~DnDListBox(); ~DnDListBox();
void poof(ListBoxLink *link); void poof(ListBoxLink *link);
protected: protected:
void mousePressEvent ( QMouseEvent * ); void mousePressEvent ( TQMouseEvent * );
void mouseReleaseEvent ( QMouseEvent * ); void mouseReleaseEvent ( TQMouseEvent * );
void mouseMoveEvent ( QMouseEvent * e ); void mouseMoveEvent ( TQMouseEvent * e );
void dragEnterEvent ( QDragEnterEvent * ); void dragEnterEvent ( TQDragEnterEvent * );
// void dragMoveEvent ( QDragMoveEvent * ); // void dragMoveEvent ( TQDragMoveEvent * );
// void dragLeaveEvent ( QDragLeaveEvent * ); // void dragLeaveEvent ( TQDragLeaveEvent * );
void dropEvent ( QDropEvent * ); void dropEvent ( TQDropEvent * );
void startDrag(); void startDrag();
private: private:
ListBoxLink *currentItem; //TODO: unshadow int KListBox::currentItem() ListBoxLink *currentItem; //TODO: unshadow int KListBox::currentItem()
LinkConfig *dialog; LinkConfig *dialog;
bool dragging_; bool dragging_;
void pasteURL(int mode, QListBoxItem *after = 0); void pasteURL(int mode, TQListBoxItem *after = 0);
bool _draggedMe; bool _draggedMe;
int _poofIndex; int _poofIndex;
QPixmap *_poofPix; TQPixmap *_poofPix;
QPixmap *_poofAnimPix; TQPixmap *_poofAnimPix;
QWidget *_poof; TQWidget *_poof;
private slots: private slots:
void configureLink(); void configureLink();
void updateLink(); void updateLink();

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>LinkConfig</class> <class>LinkConfig</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>LinkConfig</cstring> <cstring>LinkConfig</cstring>
</property> </property>
@ -22,7 +22,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget" row="0" column="0"> <widget class="TQLayoutWidget" row="0" column="0">
<property name="name"> <property name="name">
<cstring>layout11</cstring> <cstring>layout11</cstring>
</property> </property>
@ -30,7 +30,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -43,7 +43,7 @@
<cstring>title</cstring> <cstring>title</cstring>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
@ -66,7 +66,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>layout10</cstring> <cstring>layout10</cstring>
</property> </property>
@ -91,7 +91,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonOk</cstring> <cstring>buttonOk</cstring>
</property> </property>
@ -108,7 +108,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonCancel</cstring> <cstring>buttonCancel</cstring>
</property> </property>

@ -1,54 +1,54 @@
#include <stdlib.h> #include <stdlib.h>
#include <qcursor.h> #include <tqcursor.h>
#include <qsplitter.h> #include <tqsplitter.h>
#include <klocale.h> #include <klocale.h>
#include <qdir.h> #include <tqdir.h>
#include <kconfig.h> #include <kconfig.h>
#include <qtimer.h> #include <tqtimer.h>
#include "dndlistbox.h" #include "dndlistbox.h"
#include "listboxlink.h" #include "listboxlink.h"
#include "linkview.h" #include "linkview.h"
#include "linkview.moc" #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 ;) // 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: protected:
virtual bool eventFilter( QObject *o, QEvent *e) virtual bool eventFilter( TQObject *o, TQEvent *e)
{ {
if (e->type() == QEvent::Leave) if (e->type() == TQEvent::Leave)
return ((QScrollView*)o)->rect().contains(((QScrollView*)o)->mapFromGlobal (QCursor::pos())); return ((TQScrollView*)o)->rect().contains(((TQScrollView*)o)->mapFromGlobal (TQCursor::pos()));
return false; return false;
} }
}; };
LinkView::LinkView(QWidget * parent, const char * name, WFlags f): LinkView::LinkView(TQWidget * parent, const char * name, WFlags f):
QScrollView(parent, name, f) TQScrollView(parent, name, f)
{ {
setFrameShape( QFrame::StyledPanel ); setFrameShape( TQFrame::StyledPanel );
setFrameShadow( QFrame::Sunken ); setFrameShadow( TQFrame::Sunken );
setBackgroundMode(Qt::PaletteBase); setBackgroundMode(TQt::PaletteBase);
_blocked = FALSE; _blocked = FALSE;
splitter = new QSplitter( Qt::Vertical, viewport() ); splitter = new TQSplitter( TQt::Vertical, viewport() );
addChild(splitter); addChild(splitter);
splitter->setMargin(5); splitter->setMargin(5);
splitter->setBackgroundMode(Qt::PaletteBase); splitter->setBackgroundMode(TQt::PaletteBase);
splitter->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum); splitter->setSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Minimum);
splitter->setFrameShape( QFrame::NoFrame ); splitter->setFrameShape( TQFrame::NoFrame );
splitter->setChildrenCollapsible(TRUE); splitter->setChildrenCollapsible(TRUE);
splitter->setHandleWidth( 3 ); splitter->setHandleWidth( 3 );
splitter->setOpaqueResize(); splitter->setOpaqueResize();
hardware = new MediaListBox(splitter, "hardware"); hardware = new MediaListBox(splitter, "hardware");
splitter->setResizeMode( hardware, QSplitter::KeepSize ); splitter->setResizeMode( hardware, TQSplitter::KeepSize );
hardware->setFrameShape( QFrame::NoFrame ); hardware->setFrameShape( TQFrame::NoFrame );
hardware->setHScrollBarMode(QScrollView::AlwaysOff); hardware->setHScrollBarMode(TQScrollView::AlwaysOff);
hardware->setVScrollBarMode(QScrollView::AlwaysOff); hardware->setVScrollBarMode(TQScrollView::AlwaysOff);
locations = new DnDListBox(splitter, "locations"); locations = new DnDListBox(splitter, "locations");
// splitter->setResizeMode( locations, QSplitter::KeepSize ); // splitter->setResizeMode( locations, TQSplitter::KeepSize );
locations->setFrameShape( QFrame::NoFrame ); locations->setFrameShape( TQFrame::NoFrame );
locations->setHScrollBarMode(QScrollView::AlwaysOff); locations->setHScrollBarMode(TQScrollView::AlwaysOff);
locations->setVScrollBarMode(QScrollView::AlwaysOff); locations->setVScrollBarMode(TQScrollView::AlwaysOff);
// custom area, locations // custom area, locations
loadLinks(); loadLinks();
locations->setCurrentItem(0); 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 (locations, SIGNAL(scrolled(int,int)), this, SLOT(scrollBy(int,int)));
connect (hardware, SIGNAL(itemNumberChanged(bool)), this, SLOT(adjustSplitter2Hardware(bool))); connect (hardware, SIGNAL(itemNumberChanged(bool)), this, SLOT(adjustSplitter2Hardware(bool)));
connect (locations, SIGNAL(itemNumberChanged(bool)), this, SLOT(adjustSplitter2Locations())); connect (locations, SIGNAL(itemNumberChanged(bool)), this, SLOT(adjustSplitter2Locations()));
QTimer::singleShot(50, this, SLOT(adjustSplitter2Locations())); TQTimer::singleShot(50, this, SLOT(adjustSplitter2Locations()));
QTimer::singleShot(60, this, SLOT(postInstallEventFilter())); TQTimer::singleShot(60, this, SLOT(postInstallEventFilter()));
} }
static EventKiller *eventKiller = 0L; static EventKiller *eventKiller = 0L;
@ -79,13 +79,13 @@ void LinkView::postInstallEventFilter()
installEventFilter(eventKiller); installEventFilter(eventKiller);
} }
bool LinkView::eventFilter(QObject *o, QEvent *e) bool LinkView::eventFilter(TQObject *o, TQEvent *e)
{ {
if (o != hardware) if (o != hardware)
return QScrollView::eventFilter(o, e); return TQScrollView::eventFilter(o, e);
if (_blocked || e->type() != QEvent::Resize) if (_blocked || e->type() != TQEvent::Resize)
return FALSE; // not a resize - non of our business return FALSE; // not a resize - non of our business
QResizeEvent *rev = (QResizeEvent*)e; TQResizeEvent *rev = (TQResizeEvent*)e;
if (rev->size().height() == rev->oldSize().height()) if (rev->size().height() == rev->oldSize().height())
return FALSE; // height didn't change return FALSE; // height didn't change
int tmpH = rev->size().height() + locations->numRows()*locations->itemHeight()+20; 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() ); 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; int tmpH = hardware->height() + locations->numRows()*locations->itemHeight()+20;
if (tmpH < rev->size().height()) if (tmpH < rev->size().height())
@ -144,27 +144,27 @@ void LinkView::loadLinks()
{ {
if (!locations) if (!locations)
return; return;
KConfig config(QDir::homeDirPath() + "/.qt/baghirarc"); KConfig config(TQDir::homeDirPath() + "/.qt/baghirarc");
config.setGroup("Sidebar"); config.setGroup("Sidebar");
splitter->setSizes(config.readIntListEntry ("Sizes")); splitter->setSizes(config.readIntListEntry ("Sizes"));
loadedLinks = (uint)config.readNumEntry("NumLinks", 0); loadedLinks = (uint)config.readNumEntry("NumLinks", 0);
locations->blockSignals ( true ); locations->blockSignals ( true );
if (loadedLinks == 0) // no settings stored - load defaults if (loadedLinks == 0) // no settings stored - load defaults
{ {
locations->insertItem("desktop", i18n("Desktop"), QDir::homeDirPath()+"/Desktop"); locations->insertItem("desktop", i18n("Desktop"), TQDir::homeDirPath()+"/Desktop");
locations->insertItem("folder_home", getenv("USER"), QDir::homeDirPath()); locations->insertItem("folder_home", getenv("USER"), TQDir::homeDirPath());
locations->insertItem("kmenu", i18n("Programs"), "programs:/"); locations->insertItem("kmenu", i18n("Programs"), "programs:/");
} }
QString num; TQString num;
for (uint i = 0; i < loadedLinks; i++) for (uint i = 0; i < loadedLinks; i++)
{ {
QString title; TQString title;
QString icon; TQString icon;
QString url; TQString url;
num.setNum(i); num.setNum(i);
title = config.readEntry("Link_"+num+"_Title", "???"); title = config.readEntry("Link_"+num+"_Title", "???");
icon = config.readEntry("Link_"+num+"_Icon", "empty"); 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->insertItem(icon, title, url);
} }
locations->blockSignals ( false ); locations->blockSignals ( false );
@ -174,11 +174,11 @@ void LinkView::saveLinks()
{ {
if (!locations) if (!locations)
return; return;
KConfig *config = new KConfig(QDir::homeDirPath() + "/.qt/baghirarc"); KConfig *config = new KConfig(TQDir::homeDirPath() + "/.qt/baghirarc");
config->setGroup("Sidebar"); config->setGroup("Sidebar");
config->writeEntry("Sizes", splitter->sizes()); config->writeEntry("Sizes", splitter->sizes());
config->writeEntry("NumLinks", (int)locations->count()); config->writeEntry("NumLinks", (int)locations->count());
QString num; TQString num;
for (uint i = 0; i < locations->count(); i++) for (uint i = 0; i < locations->count(); i++)
{ {
num.setNum(i); num.setNum(i);

@ -6,18 +6,18 @@
#include <config.h> #include <config.h>
#endif #endif
#include <qscrollview.h> #include <tqscrollview.h>
class ListBoxLink; class ListBoxLink;
class DnDListBox; class DnDListBox;
class MediaListBox; class MediaListBox;
class LinkView : public QScrollView class LinkView : public TQScrollView
{ {
Q_OBJECT Q_OBJECT
public: public:
LinkView(QWidget * parent = 0, const char * name = 0, WFlags f = 0); LinkView(TQWidget * parent = 0, const char * name = 0, WFlags f = 0);
/** destructor */ /** destructor */
~LinkView(); ~LinkView();
@ -27,12 +27,12 @@ public:
void saveLinks(); void saveLinks();
protected: protected:
void viewportResizeEvent( QResizeEvent * ); void viewportResizeEvent( TQResizeEvent * );
bool eventFilter(QObject *, QEvent *); bool eventFilter(TQObject *, TQEvent *);
private: private:
MediaListBox *hardware; MediaListBox *hardware;
DnDListBox *locations; DnDListBox *locations;
QSplitter *splitter; TQSplitter *splitter;
bool _blocked; bool _blocked;
uint loadedLinks; uint loadedLinks;
private slots: private slots:

@ -1,23 +1,23 @@
#include <kiconloader.h> #include <kiconloader.h>
#include "listboxlink.h" #include "listboxlink.h"
#include <qpainter.h> #include <tqpainter.h>
#include <qbitmap.h> #include <tqbitmap.h>
#include "eject.xbm" #include "eject.xbm"
#include "lock.xbm" #include "lock.xbm"
static QBitmap eject = QBitmap( eject_width, eject_height, eject_bits, true ); static TQBitmap eject = TQBitmap( eject_width, eject_height, eject_bits, true );
static QBitmap locked = QBitmap( lock_width, lock_height, lock_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; url_ = url;
} }
void ListBoxLink::setIcon(const QString & icon) void ListBoxLink::setIcon(const TQString & icon)
{ {
icon_ = 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()) if (!eject.mask())
eject.setMask(eject); eject.setMask(eject);
@ -48,7 +48,7 @@ ListBoxDevice::ListBoxDevice(const QString & icon, uint size, const QString & ti
locked.setMask(locked); 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()) if (!eject.mask())
eject.setMask(eject); eject.setMask(eject);
@ -56,14 +56,14 @@ ListBoxDevice::ListBoxDevice(const QPixmap & pixmap, const QString & title, cons
locked.setMask(locked); locked.setMask(locked);
} }
int ListBoxDevice::width ( const QListBox * lb ) const int ListBoxDevice::width ( const TQListBox * lb ) const
{ {
if (ejectable_ && mounted_ && lb) if (ejectable_ && mounted_ && lb)
return lb->width(); return lb->width();
return ListBoxLink::width(lb); return ListBoxLink::width(lb);
} }
void ListBoxDevice::paint( QPainter * p ) void ListBoxDevice::paint( TQPainter * p )
{ {
if ((ejectable_ || removable_) && mounted_) if ((ejectable_ || removable_) && mounted_)
{ {

@ -6,55 +6,55 @@
#include <config.h> #include <config.h>
#endif #endif
#include <qlistbox.h> #include <tqlistbox.h>
class KListBox; class KListBox;
class QPainter; class TQPainter;
class QPixmap; class TQPixmap;
class QStringList; class TQStringList;
class KURL; class KURL;
class ListBoxLink : public QListBoxPixmap class ListBoxLink : public TQListBoxPixmap
{ {
friend class DnDListBox; friend class DnDListBox;
public: public:
ListBoxLink(const QString & icon, uint size, const QString & title, const QString & url); ListBoxLink(const TQString & icon, uint size, const TQString & title, const TQString & url);
ListBoxLink(const QPixmap & pixmap, const QString & title, const QString & url); ListBoxLink(const TQPixmap & pixmap, const TQString & title, const TQString & url);
ListBoxLink(ListBoxLink & link); ListBoxLink(ListBoxLink & link);
~ListBoxLink(); ~ListBoxLink();
QString & URL(){return url_;} TQString & URL(){return url_;}
void setURL(const QString & url); void setURL(const TQString & url);
QString & icon(){return icon_;} TQString & icon(){return icon_;}
void setIcon(const QString & icon); void setIcon(const TQString & icon);
int height ( const QListBox * lb ) const; int height ( const TQListBox * lb ) const;
private: private:
QString url_; //TODO: make this KURL?! TQString url_; //TODO: make this KURL?!
QString icon_; TQString icon_;
}; };
class ListBoxDevice : public ListBoxLink class ListBoxDevice : public ListBoxLink
{ {
friend class MediaListBox; friend class MediaListBox;
public: 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 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 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 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(){}; ~ListBoxDevice(){};
QString & name(){return name_;} TQString & name(){return name_;}
bool mounted(){return mounted_;} bool mounted(){return mounted_;}
bool ejectable(){return ejectable_;} bool ejectable(){return ejectable_;}
bool removable(){return removable_;} bool removable(){return removable_;}
QString & mountPoint(){return mountPoint_;} TQString & mountPoint(){return mountPoint_;}
int id(){return id_;} int id(){return id_;}
int width ( const QListBox * lb ) const; int width ( const TQListBox * lb ) const;
protected: protected:
void paint( QPainter * p ); void paint( TQPainter * p );
private: private:
QString name_; TQString name_;
QString mountPoint_; TQString mountPoint_;
bool mounted_; bool mounted_;
bool ejectable_; bool ejectable_;
bool removable_; bool removable_;

@ -1,4 +1,4 @@
#include <qbuffer.h> #include <tqbuffer.h>
#include "baghiralinkdrag.h" #include "baghiralinkdrag.h"
static bool _accepted; static bool _accepted;
@ -6,36 +6,36 @@ static bool _accepted;
#define _TLO_ 0 #define _TLO_ 0
#define _TO_ 4*sizeof(int) #define _TO_ 4*sizeof(int)
#define _CLO_ 1*sizeof(int) #define _CLO_ 1*sizeof(int)
#define _CO_ 4*sizeof(int) + title.length()*sizeof(QChar) #define _CO_ 4*sizeof(int) + title.length()*sizeof(TQChar)
#define _CO2_ 4*sizeof(int) + title->length()*sizeof(QChar) #define _CO2_ 4*sizeof(int) + title->length()*sizeof(TQChar)
#define _ILO_ 2*sizeof(int) #define _ILO_ 2*sizeof(int)
#define _IO_ 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(QChar) #define _IO2_ 4*sizeof(int) + (title->length()+command->length())*sizeof(TQChar)
#define _IxO_ 3*sizeof(int) #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; _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; int tmpLength;
tmpChar = const_cast<QChar*>(title.unicode()); tmpChar = const_cast<TQChar*>(title.unicode());
tmpLength = title.length(); tmpLength = title.length();
memcpy(a.data(), &tmpLength, sizeof(int)); memcpy(a.data(), &tmpLength, sizeof(int));
memcpy(a.data() + _TO_ , tmpChar, tmpLength*sizeof(QChar)); memcpy(a.data() + _TO_ , tmpChar, tmpLength*sizeof(TQChar));
tmpChar = const_cast<QChar*>(command.unicode()); tmpChar = const_cast<TQChar*>(command.unicode());
tmpLength = command.length(); tmpLength = command.length();
memcpy(a.data() + _CLO_ , &tmpLength, sizeof(int)); memcpy(a.data() + _CLO_ , &tmpLength, sizeof(int));
memcpy(a.data() + _CO_, tmpChar, tmpLength*sizeof(QChar)); memcpy(a.data() + _CO_, tmpChar, tmpLength*sizeof(TQChar));
tmpChar = const_cast<QChar*>(icon.unicode()); tmpChar = const_cast<TQChar*>(icon.unicode());
tmpLength = icon.length(); tmpLength = icon.length();
memcpy(a.data() + _ILO_, &tmpLength, sizeof(int)); 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)); 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 if (a.size() < 4*sizeof(int)) // some empty stuff
{ {
return false; return false;
} }
QChar* tmpChar; TQChar* tmpChar;
int tmpLength; int tmpLength;
memcpy(&tmpLength, a.data(), sizeof(int)); memcpy(&tmpLength, a.data(), sizeof(int));
tmpChar = new QChar[tmpLength]; tmpChar = new TQChar[tmpLength];
memcpy(tmpChar, a.data() + _TO_, tmpLength*sizeof(QChar)); memcpy(tmpChar, a.data() + _TO_, tmpLength*sizeof(TQChar));
title->setUnicode(tmpChar, tmpLength); title->setUnicode(tmpChar, tmpLength);
delete tmpChar; delete tmpChar;
memcpy(&tmpLength, a.data() + _CLO_, sizeof(int)); memcpy(&tmpLength, a.data() + _CLO_, sizeof(int));
tmpChar = new QChar[tmpLength]; tmpChar = new TQChar[tmpLength];
memcpy(tmpChar, a.data() + _CO2_, tmpLength*sizeof(QChar)); memcpy(tmpChar, a.data() + _CO2_, tmpLength*sizeof(TQChar));
command->setUnicode(tmpChar, tmpLength); command->setUnicode(tmpChar, tmpLength);
delete tmpChar; delete tmpChar;
memcpy(&tmpLength, a.data() + _ILO_, sizeof(int)); memcpy(&tmpLength, a.data() + _ILO_, sizeof(int));
tmpChar = new QChar[tmpLength]; tmpChar = new TQChar[tmpLength];
memcpy(tmpChar, a.data() + _IO2_, tmpLength*sizeof(QChar)); memcpy(tmpChar, a.data() + _IO2_, tmpLength*sizeof(TQChar));
icon->setUnicode(tmpChar, tmpLength); icon->setUnicode(tmpChar, tmpLength);
delete tmpChar; tmpChar = 0L; delete tmpChar; tmpChar = 0L;
@ -84,7 +84,7 @@ bool BaghiraLinkDrag::accepted()
return _accepted; return _accepted;
} }
bool BaghiraLinkDrag::canDecode( const QMimeSource * e ) bool BaghiraLinkDrag::canDecode( const TQMimeSource * e )
{ {
return e->provides("application/baghiralink"); return e->provides("application/baghiralink");
#if 0 #if 0
@ -92,7 +92,7 @@ bool BaghiraLinkDrag::canDecode( const QMimeSource * e )
{ {
return false; return false;
} }
QByteArray a = e->encodedData("application/baghiralink"); TQByteArray a = e->encodedData("application/baghiralink");
if (a.size() != BAGHIRALINK_BUFSIZE) if (a.size() != BAGHIRALINK_BUFSIZE)
{ {
return false; return false;
@ -115,11 +115,11 @@ const char * BaghiraLinkDrag::format ( int i ) const
return 0; 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 a;
} }
return QByteArray(); return TQByteArray();
} }

@ -1,24 +1,24 @@
#ifndef _BAGHIRALINKDRAG_H_ #ifndef _BAGHIRALINKDRAG_H_
#define _BAGHIRALINKDRAG_H_ #define _BAGHIRALINKDRAG_H_
#include <qdragobject.h> #include <tqdragobject.h>
#include <qstring.h> #include <tqstring.h>
class BaghiraLinkDrag : public QDragObject class BaghiraLinkDrag : public TQDragObject
{ {
// Q_OBJECT // Q_OBJECT
public: 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(); ~BaghiraLinkDrag();
static bool decode( const QMimeSource * e, QString * title, QString * command, QString * icon, int * index); static bool decode( const TQMimeSource * e, TQString * title, TQString * command, TQString * icon, int * index);
static bool canDecode( const QMimeSource * e); static bool canDecode( const TQMimeSource * e);
static void setAccepted( ); static void setAccepted( );
virtual const char * format ( int i = 0 ) const; virtual const char * format ( int i = 0 ) const;
virtual QByteArray encodedData ( const char * ) const; virtual TQByteArray encodedData ( const char * ) const;
static bool accepted( ); static bool accepted( );
private: private:
QByteArray a; TQByteArray a;
}; };
#endif #endif

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ConfigDialog</class> <class>ConfigDialog</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>ConfigDialog</cstring> <cstring>ConfigDialog</cstring>
</property> </property>
@ -22,7 +22,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget" row="3" column="0"> <widget class="TQLayoutWidget" row="3" column="0">
<property name="name"> <property name="name">
<cstring>Layout1</cstring> <cstring>Layout1</cstring>
</property> </property>
@ -36,7 +36,7 @@
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonHelp</cstring> <cstring>buttonHelp</cstring>
</property> </property>
@ -67,7 +67,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonOk</cstring> <cstring>buttonOk</cstring>
</property> </property>
@ -84,7 +84,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonCancel</cstring> <cstring>buttonCancel</cstring>
</property> </property>
@ -100,7 +100,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QPushButton" row="1" column="0"> <widget class="TQPushButton" row="1" column="0">
<property name="name"> <property name="name">
<cstring>buttonDetail</cstring> <cstring>buttonDetail</cstring>
</property> </property>
@ -111,7 +111,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QGroupBox" row="0" column="0"> <widget class="TQGroupBox" row="0" column="0">
<property name="name"> <property name="name">
<cstring>baseGroup</cstring> <cstring>baseGroup</cstring>
</property> </property>
@ -145,7 +145,7 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
@ -210,7 +210,7 @@
<number>48</number> <number>48</number>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="3" column="0"> <widget class="TQLabel" row="3" column="0">
<property name="name"> <property name="name">
<cstring>textLabel5</cstring> <cstring>textLabel5</cstring>
</property> </property>
@ -218,7 +218,7 @@
<string>&lt;b&gt;Command&lt;/b&gt;</string> <string>&lt;b&gt;Command&lt;/b&gt;</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="4" column="0"> <widget class="TQLabel" row="4" column="0">
<property name="name"> <property name="name">
<cstring>textLabel1_2</cstring> <cstring>textLabel1_2</cstring>
</property> </property>
@ -226,7 +226,7 @@
<string>&lt;i&gt;Keywords&lt;/i&gt;</string> <string>&lt;i&gt;Keywords&lt;/i&gt;</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -234,7 +234,7 @@
<string>&lt;i&gt;&lt;b&gt;Name&lt;/b&gt;&lt;/i&gt;</string> <string>&lt;i&gt;&lt;b&gt;Name&lt;/b&gt;&lt;/i&gt;</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="0"> <widget class="TQLabel" row="2" column="0">
<property name="name"> <property name="name">
<cstring>textLabel4</cstring> <cstring>textLabel4</cstring>
</property> </property>
@ -247,7 +247,7 @@
<cstring>keywords</cstring> <cstring>keywords</cstring>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="3"> <widget class="TQCheckBox" row="5" column="0" rowspan="1" colspan="3">
<property name="name"> <property name="name">
<cstring>startupFeedback</cstring> <cstring>startupFeedback</cstring>
</property> </property>
@ -255,7 +255,7 @@
<string>Activate startup feedback</string> <string>Activate startup feedback</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="6" column="0" rowspan="1" colspan="3"> <widget class="TQCheckBox" row="6" column="0" rowspan="1" colspan="3">
<property name="name"> <property name="name">
<cstring>showInSystray</cstring> <cstring>showInSystray</cstring>
</property> </property>
@ -282,7 +282,7 @@
</size> </size>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="4"> <widget class="TQLabel" row="0" column="4">
<property name="name"> <property name="name">
<cstring>textLabel3</cstring> <cstring>textLabel3</cstring>
</property> </property>
@ -306,7 +306,7 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QGroupBox" row="2" column="0"> <widget class="TQGroupBox" row="2" column="0">
<property name="name"> <property name="name">
<cstring>extendedGroup</cstring> <cstring>extendedGroup</cstring>
</property> </property>
@ -317,7 +317,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="0" column="0" rowspan="2" colspan="5"> <widget class="TQLabel" row="0" column="0" rowspan="2" colspan="5">
<property name="name"> <property name="name">
<cstring>textLabel7</cstring> <cstring>textLabel7</cstring>
</property> </property>
@ -339,7 +339,7 @@
<enum>Horizontal</enum> <enum>Horizontal</enum>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="5"> <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="5">
<property name="name"> <property name="name">
<cstring>startInTerminal</cstring> <cstring>startInTerminal</cstring>
</property> </property>
@ -347,7 +347,7 @@
<string>Start in terminal</string> <string>Start in terminal</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="4" column="0" rowspan="1" colspan="2"> <widget class="TQLabel" row="4" column="0" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>textLabel9</cstring> <cstring>textLabel9</cstring>
</property> </property>
@ -380,7 +380,7 @@
<enum>Horizontal</enum> <enum>Horizontal</enum>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="6" column="0" rowspan="1" colspan="5"> <widget class="TQCheckBox" row="6" column="0" rowspan="1" colspan="5">
<property name="name"> <property name="name">
<cstring>startAsUser</cstring> <cstring>startAsUser</cstring>
</property> </property>
@ -388,7 +388,7 @@
<string>Start as different user</string> <string>Start as different user</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="7" column="0" rowspan="1" colspan="2"> <widget class="TQLabel" row="7" column="0" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>textLabel6</cstring> <cstring>textLabel6</cstring>
</property> </property>
@ -421,7 +421,7 @@
<enum>Horizontal</enum> <enum>Horizontal</enum>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="10" column="0" rowspan="2" colspan="1"> <widget class="TQLabel" row="10" column="0" rowspan="2" colspan="1">
<property name="name"> <property name="name">
<cstring>textLabel8</cstring> <cstring>textLabel8</cstring>
</property> </property>

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>HelpDialog</class> <class>HelpDialog</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>HelpDialog</cstring> <cstring>HelpDialog</cstring>
</property> </property>
@ -69,7 +69,7 @@ Please note:&lt;br&gt;
&lt;br&gt;&lt;br&gt; &lt;br&gt;&lt;br&gt;
&lt;b&gt;Description:&lt;/b&gt;&lt;br&gt; &lt;b&gt;Description:&lt;/b&gt;&lt;br&gt;
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..." 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.&lt;br&gt; 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.&lt;br&gt;
(Optional, not searched)</string> (Optional, not searched)</string>
</property> </property>
<property name="readOnly"> <property name="readOnly">
@ -79,7 +79,7 @@ You can use Qt richtext tags and there's no limit on the size, but keep it usefu
<bool>false</bool> <bool>false</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton" row="1" column="1"> <widget class="TQPushButton" row="1" column="1">
<property name="name"> <property name="name">
<cstring>buttonClose</cstring> <cstring>buttonClose</cstring>
</property> </property>

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>LinkConfig</class> <class>LinkConfig</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>LinkConfig</cstring> <cstring>LinkConfig</cstring>
</property> </property>
@ -22,7 +22,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>layout10</cstring> <cstring>layout10</cstring>
</property> </property>
@ -47,7 +47,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonOk</cstring> <cstring>buttonOk</cstring>
</property> </property>
@ -64,7 +64,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonCancel</cstring> <cstring>buttonCancel</cstring>
</property> </property>
@ -114,7 +114,7 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget" row="0" column="0"> <widget class="TQLayoutWidget" row="0" column="0">
<property name="name"> <property name="name">
<cstring>layout3</cstring> <cstring>layout3</cstring>
</property> </property>
@ -122,7 +122,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -135,7 +135,7 @@
<cstring>title</cstring> <cstring>title</cstring>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
@ -151,7 +151,7 @@
<string>&lt;b&gt;Command&lt;/b&gt;</string> <string>&lt;b&gt;Command&lt;/b&gt;</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit"> <widget class="TQLineEdit">
<property name="name"> <property name="name">
<cstring>command</cstring> <cstring>command</cstring>
</property> </property>

File diff suppressed because it is too large Load Diff

@ -6,55 +6,55 @@
#include <config.h> #include <config.h>
#endif #endif
#include <qpoint.h> #include <tqpoint.h>
#include <qwidget.h> #include <tqwidget.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qscrollview.h> #include <tqscrollview.h>
#include <qmap.h> #include <tqmap.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <qsortedlist.h> #include <tqsortedlist.h>
#include <qptrlist.h> #include <tqptrlist.h>
#include <klineedit.h> #include <klineedit.h>
#include <kservicegroup.h> #include <kservicegroup.h>
#include "mykey.h" #include "mykey.h"
class KIconLoader; class KIconLoader;
class QPaintEvent; class TQPaintEvent;
class QMouseEvent; class TQMouseEvent;
class QEvent; class TQEvent;
class QPixmap; class TQPixmap;
class QVBoxLayout; class TQVBoxLayout;
class QComboBox; class TQComboBox;
class StartMenuButton; class StartMenuButton;
class KConfig; class KConfig;
class LinkConfig; class LinkConfig;
class Panel : public QWidget//QScrollView class Panel : public TQWidget//TQScrollView
{ {
friend class StartMenu; friend class StartMenu;
friend class StartMenuButton; friend class StartMenuButton;
Q_OBJECT Q_OBJECT
public: 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; } Orientation orientation(){ return _orientation; }
void setOrientation ( Orientation o ); void setOrientation ( Orientation o );
// void addItem ( QWidget *w ); // void addItem ( TQWidget *w );
StartMenuButton* addIcon ( QString icon, QString title, QString command, QPoint pt = QPoint(-1,-1) ); StartMenuButton* addIcon ( TQString icon, TQString title, TQString command, TQPoint pt = TQPoint(-1,-1) );
void save(KConfig* config); void save(KConfig* config);
void repositionIcon ( StartMenuButton* bt, QPoint pt ); void repositionIcon ( StartMenuButton* bt, TQPoint pt );
void ensureVisible(QRect & rect); void ensureVisible(TQRect & rect);
void reloadIcons(int size); void reloadIcons(int size);
void poof(); void poof();
public slots: public slots:
void updateSize(int); void updateSize(int);
protected: protected:
void wheelEvent ( QWheelEvent * ); void wheelEvent ( TQWheelEvent * );
void dragEnterEvent ( QDragEnterEvent * ); void dragEnterEvent ( TQDragEnterEvent * );
void dropEvent ( QDropEvent * ); void dropEvent ( TQDropEvent * );
void mouseReleaseEvent ( QMouseEvent * e ); void mouseReleaseEvent ( TQMouseEvent * e );
void resizeEvent ( QResizeEvent * ); void resizeEvent ( TQResizeEvent * );
LinkConfig *linkConfigDialog; LinkConfig *linkConfigDialog;
int _size; int _size;
private: private:
@ -62,74 +62,74 @@ private:
Orientation _orientation; Orientation _orientation;
bool _draggedMe; bool _draggedMe;
int _poofIndex; int _poofIndex;
QPoint iconAddPosition; TQPoint iconAddPosition;
QPixmap *_poofPix; TQPixmap *_poofPix;
QPixmap *_poofAnimPix; TQPixmap *_poofAnimPix;
QWidget *_poof; TQWidget *_poof;
private slots: private slots:
void addIcon(); void addIcon();
void runPoof(); void runPoof();
signals: signals:
void message(const QString&); void message(const TQString&);
void clearStatus(); void clearStatus();
}; };
class QTextDrag; class TQTextDrag;
class StartMenuButton : public QWidget class StartMenuButton : public TQWidget
{ {
friend class Panel; friend class Panel;
Q_OBJECT Q_OBJECT
public: public:
enum Orientation { Horizontal = 0, Vertical, Status }; enum Orientation { Horizontal = 0, Vertical, Status };
StartMenuButton ( int size, QString icon, QString title, QString command, Orientation orientation, QWidget* parent = 0, const char * name = 0); StartMenuButton ( int size, TQString icon, TQString title, TQString command, Orientation orientation, TQWidget* parent = 0, const char * name = 0);
void smartMove(QPoint & pt); // prevents collisions with other childs of parentWidget() void smartMove(TQPoint & pt); // prevents collisions with other childs of parentWidget()
void smartMove(int x, int y); void smartMove(int x, int y);
void reloadIcon(int size); void reloadIcon(int size);
public slots: public slots:
void edit(); void edit();
protected: protected:
QString & command(){return m_command;} TQString & command(){return m_command;}
QString & title(){return m_title;} TQString & title(){return m_title;}
QString & icon(){return m_icon;} TQString & icon(){return m_icon;}
void mouseReleaseEvent ( QMouseEvent * e ); void mouseReleaseEvent ( TQMouseEvent * e );
void mouseMoveEvent ( QMouseEvent * e ); void mouseMoveEvent ( TQMouseEvent * e );
void enterEvent( QEvent * ); void enterEvent( TQEvent * );
void leaveEvent( QEvent * ); void leaveEvent( TQEvent * );
bool isMoving() {return _moving;} bool isMoving() {return _moving;}
private: private:
Orientation m_orientation; Orientation m_orientation;
bool _moving; bool _moving;
QTextDrag *myDrag; TQTextDrag *myDrag;
QString m_command; TQString m_command;
QString m_title; TQString m_title;
QString m_icon; TQString m_icon;
QLabel* m_titleLabel; TQLabel* m_titleLabel;
QLabel* m_pixmapLabel; TQLabel* m_pixmapLabel;
QPixmap m_pix; TQPixmap m_pix;
QPixmap m_hoverPix; TQPixmap m_hoverPix;
signals: signals:
void pressed(const QString &); void pressed(const TQString &);
void hovered(const QString &); void hovered(const TQString &);
void unhovered(); void unhovered();
void updateSize(int); void updateSize(int);
}; };
class KService; class KService;
class QDate; class TQDate;
class AppList; class AppList;
class StartMenuEntry : public QWidget class StartMenuEntry : public TQWidget
{ {
friend class AppList; friend class AppList;
Q_OBJECT Q_OBJECT
public: 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(); ~StartMenuEntry();
void reloadIcon(int size); void reloadIcon(int size);
bool display; bool display;
QString title(); TQString title();
void saveStats(); void saveStats();
int rank; int rank;
bool forNewbie; bool forNewbie;
@ -143,34 +143,34 @@ public:
bool operator<( const double& d ) const; bool operator<( const double& d ) const;
bool operator>( const double& d ) const; bool operator>( const double& d ) const;
protected: protected:
void focusInEvent ( QFocusEvent * ); void focusInEvent ( TQFocusEvent * );
void focusOutEvent ( QFocusEvent * ); void focusOutEvent ( TQFocusEvent * );
void mouseReleaseEvent ( QMouseEvent * e ); void mouseReleaseEvent ( TQMouseEvent * e );
void mouseMoveEvent ( QMouseEvent * mme ); void mouseMoveEvent ( TQMouseEvent * mme );
void keyPressEvent ( QKeyEvent * e ); void keyPressEvent ( TQKeyEvent * e );
void enterEvent( QEvent * ); void enterEvent( TQEvent * );
void leaveEvent( QEvent * ); void leaveEvent( TQEvent * );
KService* m_service; KService* m_service;
QString groupPath; TQString groupPath;
QDate lastUse; TQDate lastUse;
uint usage; uint usage;
private: private:
void execute(); void execute();
QString exec; TQString exec;
bool isCurrent; bool isCurrent;
QLabel* m_titleLabel; TQLabel* m_titleLabel;
QLabel* m_commentLabel; TQLabel* m_commentLabel;
QLabel* m_pixmapLabel; TQLabel* m_pixmapLabel;
QPixmap m_pix; TQPixmap m_pix;
QPixmap m_hoverPix; TQPixmap m_hoverPix;
signals: signals:
void closeMenu(); void closeMenu();
void pressed(); void pressed();
void appDown(); void appDown();
void appUp(); void appUp();
void appLeft(); void appLeft();
void hovered(const QString &); void hovered(const TQString &);
void sayText(const QString&); void sayText(const TQString&);
void unhovered(); void unhovered();
void popup(StartMenuEntry*); void popup(StartMenuEntry*);
void executed(); void executed();
@ -180,17 +180,17 @@ class KPopupMenu;
class ConfigDialog; class ConfigDialog;
class HelpDialog; class HelpDialog;
class AppList : public QScrollView class AppList : public TQScrollView
{ {
friend class StartMenu; friend class StartMenu;
Q_OBJECT Q_OBJECT
public: public:
AppList(int size = 32, QWidget * parent = 0); AppList(int size = 32, TQWidget * parent = 0);
StartMenuEntry* addApp(KService * service, QStringList & captions, QString relPath); StartMenuEntry* addApp(KService * service, TQStringList & captions, TQString relPath);
void finish(); void finish();
StartMenuEntry* handledEntry; // for rightclick menu action 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); void reloadIcons(int size);
public slots: public slots:
void addEntry(); void addEntry();
@ -200,35 +200,35 @@ public slots:
void editDialog(); void editDialog();
void clear(); void clear();
void reset(); void reset();
void search(const QString & string); void search(const TQString & string);
void appDown(); void appDown();
void appUp(); void appUp();
void appLeft(); void appLeft();
void sort(); void sort();
void showCategory(const QString & string); void showCategory(const TQString & string);
void unblockPopup(){popupBlocked_ = false;} void unblockPopup(){popupBlocked_ = false;}
protected: protected:
QStringList categories; TQStringList categories;
int favItemAmount; int favItemAmount;
void save(KConfig* config); void save(KConfig* config);
void mouseReleaseEvent ( QMouseEvent * e ); void mouseReleaseEvent ( TQMouseEvent * e );
void windowActivationChange ( bool oldActive ); void windowActivationChange ( bool oldActive );
private: private:
void init(); void init();
void insertGroup(KServiceGroup *g, QStringList & captions, QStringList & paths); void insertGroup(KServiceGroup *g, TQStringList & captions, TQStringList & paths);
KServiceGroup::Ptr m_root; KServiceGroup::Ptr m_root;
KIconLoader *m_iconLoader; KIconLoader *m_iconLoader;
QLabel *infoLabel; TQLabel *infoLabel;
QVBoxLayout * infoLayout; TQVBoxLayout * infoLayout;
QVBoxLayout * m_VLayout; TQVBoxLayout * m_VLayout;
QFrame * m_widget; TQFrame * m_widget;
bool newbie; bool newbie;
QStringList neewbieApps; TQStringList neewbieApps;
KPopupMenu *m_popup; KPopupMenu *m_popup;
bool popupBlocked_; bool popupBlocked_;
int _size; int _size;
typedef QSortedList<StartMenuEntry> StartMenuEntryList; typedef TQSortedList<StartMenuEntry> StartMenuEntryList;
typedef QMap<QString,StartMenuEntryList> KeyWordList; typedef TQMap<TQString,StartMenuEntryList> KeyWordList;
StartMenuEntryList entryList; StartMenuEntryList entryList;
KeyWordList m_keywordList; KeyWordList m_keywordList;
KeyWordList m_groupList; KeyWordList m_groupList;
@ -238,80 +238,80 @@ private slots:
void popup(StartMenuEntry*); void popup(StartMenuEntry*);
signals: signals:
void looseKey(); void looseKey();
void message(const QString&); void message(const TQString&);
void sayText(const QString&); void sayText(const TQString&);
void clearStatus(); void clearStatus();
}; };
class QStringList; class TQStringList;
class SearchLine : public KLineEdit class SearchLine : public KLineEdit
{ {
Q_OBJECT Q_OBJECT
public: public:
SearchLine( QWidget * parent ); SearchLine( TQWidget * parent );
bool blocked; bool blocked;
protected slots: protected slots:
void makeCompletion (const QString &); void makeCompletion (const TQString &);
void block(){blocked = true;} void block(){blocked = true;}
signals: signals:
void typedTextChanged(const QString & string); void typedTextChanged(const TQString & string);
}; };
class KURIFilterData; class KURIFilterData;
class StarterConfig; class StarterConfig;
class QSignalMapper; class TQSignalMapper;
class KSqueezedTextLabel; class KSqueezedTextLabel;
class StartMenu : public QWidget class StartMenu : public TQWidget
{ {
friend class starter; // to allow setting the shortcutlis directly friend class starter; // to allow setting the shortcutlis directly
Q_OBJECT Q_OBJECT
public: public:
enum PanelPosition { North = 0, South, West, East, Nowhere }; 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(); ~StartMenu();
void show(); void show();
void hide(); void hide();
void reloadIcons(int size); void reloadIcons(int size);
QStringList & categories(){return appList->categories;}; TQStringList & categories(){return appList->categories;};
typedef QMap<MyKey,QString> ShortcutList; typedef TQMap<MyKey,TQString> ShortcutList;
void updateShortcuts(ShortcutList &); void updateShortcuts(ShortcutList &);
void setFavItemAmount(int i) {if (appList) appList->favItemAmount = i;} void setFavItemAmount(int i) {if (appList) appList->favItemAmount = i;}
void setPanelPosition(PanelPosition p); void setPanelPosition(PanelPosition p);
public slots: public slots:
void sayText(const QString &text); void sayText(const TQString &text);
void toggleKTTS(bool); void toggleKTTS(bool);
void setCategory(const QString & category); void setCategory(const TQString & category);
void save(); void save();
protected: protected:
bool eventFilter ( QObject * o, QEvent * e ); bool eventFilter ( TQObject * o, TQEvent * e );
ShortcutList shortcutList; ShortcutList shortcutList;
private slots: private slots:
void message(const QString &text); void message(const TQString &text);
void centerMessage(const QString &text); void centerMessage(const TQString &text);
void clearStatus(); void clearStatus();
void execute(const QString & command); void execute(const TQString & command);
void search(const QString & string); void search(const TQString & string);
void endHistory(); void endHistory();
// void slotLock(); // void slotLock();
private: private:
bool inMove; bool inMove;
uint m_spokenText; uint m_spokenText;
int _size; int _size;
QWidget *header; TQWidget *header;
QPoint movePoint; TQPoint movePoint;
KURIFilterData *_filterData; KURIFilterData *_filterData;
AppList *appList; AppList *appList;
QComboBox *categoryCombo; TQComboBox *categoryCombo;
SearchLine *searchLine; SearchLine *searchLine;
KSqueezedTextLabel *statusBar; KSqueezedTextLabel *statusBar;
Panel *m_panel; Panel *m_panel;
QStringList history; TQStringList history;
QStringList::Iterator currentHistoryItem; TQStringList::Iterator currentHistoryItem;
PanelPosition m_panelPos; PanelPosition m_panelPos;
StartMenuButton *userButton; StartMenuButton *userButton;
QGridLayout *panelLayout; TQGridLayout *panelLayout;
signals: signals:
void aboutToHide(); void aboutToHide();

@ -1,23 +1,23 @@
#ifndef MYKEY_H #ifndef MYKEY_H
#define MYKEY_H #define MYKEY_H
#include <qstring.h> #include <tqstring.h>
class MyKey class MyKey
{ {
public: public:
MyKey(short key, short modFlags){modFlags_ = modFlags; key_ = key;} MyKey(short key, short modFlags){modFlags_ = modFlags; key_ = key;}
MyKey(){modFlags_ = 0; key_ = 0;} 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; modFlags_ = 0;
if (tmpString.contains("256")) // QString.setNum(Qt::ShiftButton) if (tmpString.contains("256")) // TQString.setNum(TQt::ShiftButton)
modFlags_ |= Qt::ShiftButton; modFlags_ |= TQt::ShiftButton;
if (tmpString.contains("512")) // QString.setNum(Qt::ControlButton) if (tmpString.contains("512")) // TQString.setNum(TQt::ControlButton)
modFlags_ |= Qt::ControlButton; modFlags_ |= TQt::ControlButton;
if (tmpString.contains("1024")) // QString.setNum(Qt::AltButton) if (tmpString.contains("1024")) // TQString.setNum(TQt::AltButton)
modFlags_ |= Qt::AltButton; modFlags_ |= TQt::AltButton;
tmpString = string.right(string.length() - string.findRev('+') - 1); tmpString = string.right(string.length() - string.findRev('+') - 1);
key_ = tmpString.toShort(); key_ = tmpString.toShort();
} }
@ -39,25 +39,25 @@ public:
{ {
return (!(modFlags_ > myKey.modFlags()) && key_ > myKey.key()); return (!(modFlags_ > myKey.modFlags()) && key_ > myKey.key());
} }
QString toString() const TQString toString() const
{ {
QString string; TQString string;
QString numString; TQString numString;
if (modFlags_ & Qt::ShiftButton) if (modFlags_ & TQt::ShiftButton)
{ {
numString.setNum(Qt::ShiftButton); numString.setNum(TQt::ShiftButton);
string += numString; string += numString;
string += '+'; string += '+';
} }
if (modFlags_ & Qt::ControlButton) if (modFlags_ & TQt::ControlButton)
{ {
numString.setNum(Qt::ControlButton); numString.setNum(TQt::ControlButton);
string += numString; string += numString;
string += '+'; string += '+';
} }
if (modFlags_ & Qt::AltButton) if (modFlags_ & TQt::AltButton)
{ {
numString.setNum(Qt::AltButton); numString.setNum(TQt::AltButton);
string += numString; string += numString;
string += '+'; string += '+';
} }

@ -1,20 +1,20 @@
#include <qcombobox.h> #include <tqcombobox.h>
#include <qcursor.h> #include <tqcursor.h>
#include <qdesktopwidget.h> #include <tqdesktopwidget.h>
#include <kglobal.h> #include <kglobal.h>
#include <klocale.h> #include <klocale.h>
#include <kconfig.h> #include <kconfig.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <kapplication.h> #include <kapplication.h>
# include <kpopupmenu.h> # include <kpopupmenu.h>
#include <qimage.h> #include <tqimage.h>
#include <qfile.h> #include <tqfile.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qradiobutton.h> #include <tqradiobutton.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qtimer.h> #include <tqtimer.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <dcopclient.h> #include <dcopclient.h>
#include <kdebug.h> #include <kdebug.h>
@ -35,15 +35,15 @@
(_v_ == 2) ? 32 :\ (_v_ == 2) ? 32 :\
(_v_ == 3) ? 48 : 64 (_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) : DCOPObject("StarterIface"), KPanelApplet(configFile, type, actions, parent, name)
{ {
configPopup = new KPopupMenu(this); configPopup = new KPopupMenu(this);
popupBlocked = false; popupBlocked = false;
mainView = new QLabel(this); mainView = new TQLabel(this);
configDialog = new StarterConfig(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); configDialog->move((desktop.width() - configDialog->width())/2, (desktop.height() - configDialog->height())/2);
KConfig config("bStarter", false, false); KConfig config("bStarter", false, false);
config.setGroup("Settings"); config.setGroup("Settings");
@ -71,7 +71,7 @@ starter::starter(const QString& configFile, Type type, int actions, QWidget *par
_iconSize = config.readNumEntry("IconSize", 32 ); _iconSize = config.readNumEntry("IconSize", 32 );
configDialog->iconSize->setCurrentItem(_SIZE2VALUE_(_iconSize)); configDialog->iconSize->setCurrentItem(_SIZE2VALUE_(_iconSize));
startMenu = new StartMenu(_iconSize, this, Qt::WType_Popup); startMenu = new StartMenu(_iconSize, this, TQt::WType_Popup);
shortcutList = startMenu->shortcutList; shortcutList = startMenu->shortcutList;
configDialog->categoryList->insertStringList(startMenu->categories()); configDialog->categoryList->insertStringList(startMenu->categories());
connect (startMenu, SIGNAL(aboutToHide()), this, SLOT(unblockPopupDelayed())); 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->categoryList, SIGNAL(highlighted(int)), this, SLOT(activateShortcutButton(int)));
connect(configDialog->buttonShortcut, SIGNAL(capturedShortcut (const KShortcut &)), this, SLOT(addShortcut(const KShortcut &))); 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())); connect(configDialog->buttonOk, SIGNAL(clicked()), this, SLOT(updateSettings()));
StarterHelp *helpDialog = new StarterHelp(configDialog); StarterHelp *helpDialog = new StarterHelp(configDialog);
connect(configDialog->buttonHelp, SIGNAL(clicked()), helpDialog, SLOT(show())); connect(configDialog->buttonHelp, SIGNAL(clicked()), helpDialog, SLOT(show()));
@ -120,14 +120,14 @@ void starter::addShortcut(const KShortcut &cut)
// generate MyKey // generate MyKey
short state = 0; short state = 0;
if (cut.seq(0).key(0).modFlags() & KKey::CTRL) if (cut.seq(0).key(0).modFlags() & KKey::CTRL)
state |= Qt::ControlButton; state |= TQt::ControlButton;
if (cut.seq(0).key(0).modFlags() & KKey::ALT) if (cut.seq(0).key(0).modFlags() & KKey::ALT)
state |= Qt::AltButton; state |= TQt::AltButton;
if (cut.seq(0).key(0).modFlags() & KKey::SHIFT) if (cut.seq(0).key(0).modFlags() & KKey::SHIFT)
state |= Qt::ShiftButton; state |= TQt::ShiftButton;
MyKey key(cut.seq(0).keyCodeQt(), state); MyKey key(cut.seq(0).keyCodeQt(), state);
// Test if this is a valid shotrcut, i.e. contains 'ctrl' or 'alt', returns iff not // Test if this is a valid shotrcut, i.e. contains 'ctrl' or 'alt', returns iff not
if (!(state & Qt::ControlButton || state & Qt::AltButton)) if (!(state & TQt::ControlButton || state & TQt::AltButton))
{ {
KMessageBox::sorry(this, i18n("<qt>To ensure usefull behaviour of the searchline, the shortcut <b>must contain</b> a metabutton, i.e. <b>'ctrl' and/or 'alt'</b></qt>"), i18n("Sorry, invalid Shortcut")); KMessageBox::sorry(this, i18n("<qt>To ensure usefull behaviour of the searchline, the shortcut <b>must contain</b> a metabutton, i.e. <b>'ctrl' and/or 'alt'</b></qt>"), i18n("Sorry, invalid Shortcut"));
return; return;
@ -154,13 +154,13 @@ void starter::addShortcut(const KShortcut &cut)
configDialog->buttonShortcut->setShortcut(cut, false); configDialog->buttonShortcut->setShortcut(cut, false);
} }
void starter::updateShortcutButton(const QString & category) void starter::updateShortcutButton(const TQString & category)
{ {
ShortcutList::Iterator it; ShortcutList::Iterator it;
for ( it = shortcutList.begin(); it != shortcutList.end(); ++it ) for ( it = shortcutList.begin(); it != shortcutList.end(); ++it )
if (it.data() == category) 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); KKey kkey(&qke);
KShortcut ksc(kkey); KShortcut ksc(kkey);
configDialog->buttonShortcut->setShortcut(ksc, false); configDialog->buttonShortcut->setShortcut(ksc, false);
@ -205,7 +205,7 @@ void starter::updateSettings()
} }
startMenu->setFavItemAmount(configDialog->favItemAmount->value()); startMenu->setFavItemAmount(configDialog->favItemAmount->value());
config->setGroup("Shortcuts"); config->setGroup("Shortcuts");
QStringList cuts; QStringList cats; TQStringList cuts; TQStringList cats;
ShortcutList::Iterator it; ShortcutList::Iterator it;
for ( it = shortcutList.begin(); it != shortcutList.end(); ++it ) for ( it = shortcutList.begin(); it != shortcutList.end(); ++it )
{ {
@ -218,46 +218,46 @@ void starter::updateSettings()
delete config; 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() void starter::reloadImages()
{ {
KIconLoader* iLoader = KGlobal::iconLoader(); KIconLoader* iLoader = KGlobal::iconLoader();
QString pth; TQString pth;
if (_VALID_(BaseURL)) if (_VALID_(BaseURL))
pth = configDialog->BaseURL->url(); pth = configDialog->BaseURL->url();
else else
pth = iLoader->iconPath("bStarter", KIcon::Small, true); pth = iLoader->iconPath("bStarter", KIcon::Small, true);
if (pth) if (pth)
pixmap = QImage(pth); pixmap = TQImage(pth);
if (!pth || pixmap.isNull()) if (!pth || pixmap.isNull())
{ {
pixmap = QPixmap(22,22); pixmap = TQPixmap(22,22);
pixmap.fill(Qt::black); pixmap.fill(TQt::black);
} }
pth = QString(); pth = TQString();
if (_VALID_(HoverURL)) if (_VALID_(HoverURL))
pth = configDialog->HoverURL->url(); pth = configDialog->HoverURL->url();
else else
pth = iLoader->iconPath("bStarter_hover", KIcon::Small, true); pth = iLoader->iconPath("bStarter_hover", KIcon::Small, true);
if (pth) if (pth)
hoverPixmap = QImage(pth); hoverPixmap = TQImage(pth);
if (!pth || hoverPixmap.isNull()) if (!pth || hoverPixmap.isNull())
{ {
hoverPixmap = QPixmap(22,22); hoverPixmap = TQPixmap(22,22);
hoverPixmap.fill(Qt::black); hoverPixmap.fill(TQt::black);
} }
pth = QString(); pth = TQString();
if (_VALID_(DownURL)) if (_VALID_(DownURL))
pth = configDialog->DownURL->url(); pth = configDialog->DownURL->url();
else else
pth = iLoader->iconPath("bStarter_down", KIcon::Small, true); pth = iLoader->iconPath("bStarter_down", KIcon::Small, true);
if (pth) if (pth)
downPixmap = QImage(pth); downPixmap = TQImage(pth);
if (!pth || downPixmap.isNull()) if (!pth || downPixmap.isNull())
{ {
downPixmap = QPixmap(22,22); downPixmap = TQPixmap(22,22);
downPixmap.fill(Qt::white); downPixmap.fill(TQt::white);
} }
int wd = pixmap.width(); int wd = pixmap.width();
int ht = pixmap.height(); int ht = pixmap.height();
@ -269,7 +269,7 @@ void starter::reloadImages()
repaint(); 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()); 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()); 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() void starter::configureMenu()
{ {
KApplication::startServiceByDesktopName("kmenuedit", QStringList(), 0, 0, 0, "", true); KApplication::startServiceByDesktopName("kmenuedit", TQStringList(), 0, 0, 0, "", true);
} }
void starter::preferences() 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 int starter::widthForHeight(int height) const
@ -302,7 +302,7 @@ int starter::heightForWidth(int width) const
void starter::unblockPopupDelayed() void starter::unblockPopupDelayed()
{ {
popupBlocked = true; popupBlocked = true;
QTimer::singleShot ( 50, this, SLOT(unblockPopup()) ); TQTimer::singleShot ( 50, this, SLOT(unblockPopup()) );
} }
void starter::unblockPopup() void starter::unblockPopup()
@ -335,14 +335,14 @@ void starter::popupMenu()
} }
else else
{ {
QRect desktop = QDesktopWidget().availableGeometry( startMenu ); TQRect desktop = TQDesktopWidget().availableGeometry( startMenu );
startMenu->resize(desktop.width()/5, 2*desktop.height()/3); startMenu->resize(desktop.width()/5, 2*desktop.height()/3);
startMenu->setFixedSize(startMenu->size()); 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 // 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()); TQPoint pt = mapToGlobal(pos());
QRect desktop = QDesktopWidget().availableGeometry( startMenu ); TQRect desktop = TQDesktopWidget().availableGeometry( startMenu );
int x = pt.x(); int x = pt.x();
int y = pt.y(); int y = pt.y();
@ -372,9 +372,9 @@ void starter::popupMenu()
y = desktop.bottom() - startMenu->height(); y = desktop.bottom() - startMenu->height();
if (y < 0) y = 0; 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 else
{ {
QRect desktop = QDesktopWidget().availableGeometry( startMenu ); TQRect desktop = TQDesktopWidget().availableGeometry( startMenu );
// setActiveWindow(); // setActiveWindow();
startMenu->resize(desktop.width()/2, desktop.width()*9/32); startMenu->resize(desktop.width()/2, desktop.width()*9/32);
startMenu->setFixedSize(startMenu->size()); 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 // 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->customDialogPos->isChecked())
{ {
if (configDialog->dialogFollowMouse->isChecked()) if (configDialog->dialogFollowMouse->isChecked())
{ {
QRect desktop = QDesktopWidget().availableGeometry( startMenu ); TQRect desktop = TQDesktopWidget().availableGeometry( startMenu );
int x,y; 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; 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; if (y < 0) y = 0;
pt = QPoint(x, y); pt = TQPoint(x, y);
} }
else else
pt = QPoint(configDialog->dialogX->value(), configDialog->dialogY->value()); pt = TQPoint(configDialog->dialogX->value(), configDialog->dialogY->value());
} }
else else
{ {
QRect desktop = QDesktopWidget().availableGeometry( startMenu ); TQRect desktop = TQDesktopWidget().availableGeometry( startMenu );
pt = QPoint((desktop.right() - startMenu->width())/2, (desktop.bottom() - startMenu->height())/2); pt = TQPoint((desktop.right() - startMenu->width())/2, (desktop.bottom() - startMenu->height())/2);
} }
if (configDialog->showDialogTitlebar->isChecked()) if (configDialog->showDialogTitlebar->isChecked())
startMenu->reparent(this, Qt::WType_TopLevel, pt, true); startMenu->reparent(this, TQt::WType_TopLevel, pt, true);
else 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()) switch (e->type())
{ {
case QEvent::Enter: case TQEvent::Enter:
{ {
mainView->setPixmap(hoverPixmap); mainView->setPixmap(hoverPixmap);
mainView->repaint(); mainView->repaint();
return TRUE; return TRUE;
} }
case QEvent::Leave: case TQEvent::Leave:
{ {
mainView->setPixmap(startMenu->isShown() ? downPixmap : pixmap); mainView->setPixmap(startMenu->isShown() ? downPixmap : pixmap);
mainView->repaint(); mainView->repaint();
return TRUE; 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; return TRUE;
} }
if (((QMouseEvent*)e)->button() == Qt::LeftButton) if (((TQMouseEvent*)e)->button() == TQt::LeftButton)
{ {
mainView->setPixmap(downPixmap); mainView->setPixmap(downPixmap);
mainView->repaint(); mainView->repaint();
@ -455,9 +455,9 @@ bool starter::eventFilter( QObject*, QEvent *e )
} }
return TRUE; return TRUE;
} }
case QEvent::MouseButtonRelease: case TQEvent::MouseButtonRelease:
{ {
if (((QMouseEvent*)e)->button() != Qt::LeftButton) if (((TQMouseEvent*)e)->button() != TQt::LeftButton)
return FALSE; return FALSE;
if (mainView->hasMouse()) if (mainView->hasMouse())
mainView->setPixmap(hoverPixmap); mainView->setPixmap(hoverPixmap);
@ -473,7 +473,7 @@ bool starter::eventFilter( QObject*, QEvent *e )
extern "C" extern "C"
{ {
KPanelApplet* init( QWidget *parent, const QString& configFile) KPanelApplet* init( TQWidget *parent, const TQString& configFile)
{ {
KGlobal::locale()->insertCatalogue("starter"); KGlobal::locale()->insertCatalogue("starter");
return new starter(configFile, KPanelApplet::Normal, return new starter(configFile, KPanelApplet::Normal,

@ -7,17 +7,17 @@
#endif #endif
#include <kpanelapplet.h> #include <kpanelapplet.h>
#include <qmap.h> #include <tqmap.h>
#include <qstring.h> #include <tqstring.h>
#include <qpixmap.h> #include <tqpixmap.h>
// #include <qpainter.h> // #include <tqpainter.h>
#include <kconfig.h> #include <kconfig.h>
#include <kshortcut.h> #include <kshortcut.h>
#include "starteriface.h" #include "starteriface.h"
#include "mykey.h" #include "mykey.h"
class DCOPClient; class DCOPClient;
class QLabel; class TQLabel;
class KPopupMenu; class KPopupMenu;
class StartMenu; class StartMenu;
class StarterConfig; class StarterConfig;
@ -27,8 +27,8 @@ class starter : public KPanelApplet, virtual public StarterIface
Q_OBJECT Q_OBJECT
public: public:
starter(const QString& configFile, Type t = Normal, int actions = 0, starter(const TQString& configFile, Type t = Normal, int actions = 0,
QWidget *parent = 0, const char *name = 0); TQWidget *parent = 0, const char *name = 0);
~starter(); ~starter();
virtual int widthForHeight(int height) const; virtual int widthForHeight(int height) const;
@ -37,29 +37,29 @@ public:
void popupMenu(); void popupMenu();
void showMenu(); void showMenu();
protected: protected:
virtual void resizeEvent ( QResizeEvent * ); virtual void resizeEvent ( TQResizeEvent * );
private: private:
enum State {Default, Hover, Down}; enum State {Default, Hover, Down};
State state; State state;
int _iconSize; int _iconSize;
bool eventFilter( QObject *o, QEvent *e ); bool eventFilter( TQObject *o, TQEvent *e );
bool popupBlocked; bool popupBlocked;
// bool isDialog_; // bool isDialog_;
QLabel *mainView; TQLabel *mainView;
// QPainter m_painter; // TQPainter m_painter;
DCOPClient *client; DCOPClient *client;
KPopupMenu *configPopup; KPopupMenu *configPopup;
StartMenu *startMenu; StartMenu *startMenu;
QPixmap pixmap; TQPixmap pixmap;
QPixmap hoverPixmap; TQPixmap hoverPixmap;
QPixmap downPixmap; TQPixmap downPixmap;
StarterConfig *configDialog; StarterConfig *configDialog;
typedef QMap<MyKey,QString> ShortcutList; typedef TQMap<MyKey,TQString> ShortcutList;
ShortcutList shortcutList; ShortcutList shortcutList;
private slots: private slots:
void addShortcut(const KShortcut&); void addShortcut(const KShortcut&);
void updateShortcutButton(const QString&); void updateShortcutButton(const TQString&);
void configureMenu(); void configureMenu();
void reloadImages(); void reloadImages();
void updateSettings(); void updateSettings();

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>StarterConfig</class> <class>StarterConfig</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>StarterConfig</cstring> <cstring>StarterConfig</cstring>
</property> </property>
@ -22,7 +22,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QGroupBox" row="0" column="0"> <widget class="TQGroupBox" row="0" column="0">
<property name="name"> <property name="name">
<cstring>groupBox5</cstring> <cstring>groupBox5</cstring>
</property> </property>
@ -38,7 +38,7 @@
<cstring>BaseURL</cstring> <cstring>BaseURL</cstring>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>textLabel2_3</cstring> <cstring>textLabel2_3</cstring>
</property> </property>
@ -51,7 +51,7 @@
<cstring>HoverURL</cstring> <cstring>HoverURL</cstring>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>textLabel1_2</cstring> <cstring>textLabel1_2</cstring>
</property> </property>
@ -59,7 +59,7 @@
<string>&lt;b&gt;Base&lt;/b&gt;</string> <string>&lt;b&gt;Base&lt;/b&gt;</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="0"> <widget class="TQLabel" row="2" column="0">
<property name="name"> <property name="name">
<cstring>textLabel3</cstring> <cstring>textLabel3</cstring>
</property> </property>
@ -74,7 +74,7 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QLayoutWidget" row="4" column="0" rowspan="1" colspan="2"> <widget class="TQLayoutWidget" row="4" column="0" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>Layout1</cstring> <cstring>Layout1</cstring>
</property> </property>
@ -88,7 +88,7 @@
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonHelp</cstring> <cstring>buttonHelp</cstring>
</property> </property>
@ -119,7 +119,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonOk</cstring> <cstring>buttonOk</cstring>
</property> </property>
@ -136,7 +136,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonCancel</cstring> <cstring>buttonCancel</cstring>
</property> </property>
@ -152,7 +152,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QButtonGroup" row="3" column="0"> <widget class="TQButtonGroup" row="3" column="0">
<property name="name"> <property name="name">
<cstring>buttonGroup1</cstring> <cstring>buttonGroup1</cstring>
</property> </property>
@ -163,7 +163,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget" row="0" column="0"> <widget class="TQLayoutWidget" row="0" column="0">
<property name="name"> <property name="name">
<cstring>layout10</cstring> <cstring>layout10</cstring>
</property> </property>
@ -171,7 +171,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>customDialogSize</cstring> <cstring>customDialogSize</cstring>
</property> </property>
@ -182,7 +182,7 @@
<string>Custom dialog size</string> <string>Custom dialog size</string>
</property> </property>
</widget> </widget>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>dialogW</cstring> <cstring>dialogW</cstring>
</property> </property>
@ -193,7 +193,7 @@
<number>3000</number> <number>3000</number>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
@ -201,7 +201,7 @@
<string>x</string> <string>x</string>
</property> </property>
</widget> </widget>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>dialogH</cstring> <cstring>dialogH</cstring>
</property> </property>
@ -231,7 +231,7 @@
</spacer> </spacer>
</hbox> </hbox>
</widget> </widget>
<widget class="QRadioButton" row="4" column="0"> <widget class="TQRadioButton" row="4" column="0">
<property name="name"> <property name="name">
<cstring>dialogFollowMouse</cstring> <cstring>dialogFollowMouse</cstring>
</property> </property>
@ -242,7 +242,7 @@
<string>Show dialog under mouse</string> <string>Show dialog under mouse</string>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget" row="3" column="0"> <widget class="TQLayoutWidget" row="3" column="0">
<property name="name"> <property name="name">
<cstring>layout12</cstring> <cstring>layout12</cstring>
</property> </property>
@ -250,7 +250,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>fixedDialogPos</cstring> <cstring>fixedDialogPos</cstring>
</property> </property>
@ -261,7 +261,7 @@
<string>Fixed</string> <string>Fixed</string>
</property> </property>
</widget> </widget>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>dialogX</cstring> <cstring>dialogX</cstring>
</property> </property>
@ -269,7 +269,7 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel2_2</cstring> <cstring>textLabel2_2</cstring>
</property> </property>
@ -277,7 +277,7 @@
<string>:</string> <string>:</string>
</property> </property>
</widget> </widget>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>dialogY</cstring> <cstring>dialogY</cstring>
</property> </property>
@ -304,7 +304,7 @@
</spacer> </spacer>
</hbox> </hbox>
</widget> </widget>
<widget class="QCheckBox" row="2" column="0"> <widget class="TQCheckBox" row="2" column="0">
<property name="name"> <property name="name">
<cstring>customDialogPos</cstring> <cstring>customDialogPos</cstring>
</property> </property>
@ -326,7 +326,7 @@
<enum>Horizontal</enum> <enum>Horizontal</enum>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="8" column="0"> <widget class="TQCheckBox" row="8" column="0">
<property name="name"> <property name="name">
<cstring>showDialogTitlebar</cstring> <cstring>showDialogTitlebar</cstring>
</property> </property>
@ -362,7 +362,7 @@
<enum>Horizontal</enum> <enum>Horizontal</enum>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget" row="6" column="0"> <widget class="TQLayoutWidget" row="6" column="0">
<property name="name"> <property name="name">
<cstring>layout6</cstring> <cstring>layout6</cstring>
</property> </property>
@ -370,7 +370,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_3</cstring> <cstring>textLabel1_3</cstring>
</property> </property>
@ -381,7 +381,7 @@
<string>Panel Position</string> <string>Panel Position</string>
</property> </property>
</widget> </widget>
<widget class="QComboBox"> <widget class="TQComboBox">
<item> <item>
<property name="text"> <property name="text">
<string>North</string> <string>North</string>
@ -421,7 +421,7 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QGroupBox" row="2" column="0"> <widget class="TQGroupBox" row="2" column="0">
<property name="name"> <property name="name">
<cstring>groupBox6</cstring> <cstring>groupBox6</cstring>
</property> </property>
@ -432,7 +432,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget" row="0" column="0"> <widget class="TQLayoutWidget" row="0" column="0">
<property name="name"> <property name="name">
<cstring>layout11</cstring> <cstring>layout11</cstring>
</property> </property>
@ -440,7 +440,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>customPopupSize</cstring> <cstring>customPopupSize</cstring>
</property> </property>
@ -451,7 +451,7 @@
<string>Custom popup size</string> <string>Custom popup size</string>
</property> </property>
</widget> </widget>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>popupW</cstring> <cstring>popupW</cstring>
</property> </property>
@ -462,7 +462,7 @@
<number>3000</number> <number>3000</number>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -470,7 +470,7 @@
<string>x</string> <string>x</string>
</property> </property>
</widget> </widget>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>popupH</cstring> <cstring>popupH</cstring>
</property> </property>
@ -514,7 +514,7 @@
<enum>Horizontal</enum> <enum>Horizontal</enum>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget" row="2" column="0"> <widget class="TQLayoutWidget" row="2" column="0">
<property name="name"> <property name="name">
<cstring>layout6_2</cstring> <cstring>layout6_2</cstring>
</property> </property>
@ -522,7 +522,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_3_2</cstring> <cstring>textLabel1_3_2</cstring>
</property> </property>
@ -533,7 +533,7 @@
<string>Panel Position</string> <string>Panel Position</string>
</property> </property>
</widget> </widget>
<widget class="QComboBox"> <widget class="TQComboBox">
<item> <item>
<property name="text"> <property name="text">
<string>North</string> <string>North</string>
@ -573,7 +573,7 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QGroupBox" row="1" column="0"> <widget class="TQGroupBox" row="1" column="0">
<property name="name"> <property name="name">
<cstring>groupBox4</cstring> <cstring>groupBox4</cstring>
</property> </property>
@ -584,7 +584,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget" row="2" column="0"> <widget class="TQLayoutWidget" row="2" column="0">
<property name="name"> <property name="name">
<cstring>layout9</cstring> <cstring>layout9</cstring>
</property> </property>
@ -592,7 +592,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel2_4</cstring> <cstring>textLabel2_4</cstring>
</property> </property>
@ -600,7 +600,7 @@
<string>Items in favorite list</string> <string>Items in favorite list</string>
</property> </property>
</widget> </widget>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>favItemAmount</cstring> <cstring>favItemAmount</cstring>
</property> </property>
@ -641,7 +641,7 @@
<enum>Horizontal</enum> <enum>Horizontal</enum>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="0" column="0"> <widget class="TQCheckBox" row="0" column="0">
<property name="name"> <property name="name">
<cstring>useKTTS</cstring> <cstring>useKTTS</cstring>
</property> </property>
@ -649,7 +649,7 @@
<string>Talk to me (via KTTS)</string> <string>Talk to me (via KTTS)</string>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget" row="3" column="0"> <widget class="TQLayoutWidget" row="3" column="0">
<property name="name"> <property name="name">
<cstring>layout9</cstring> <cstring>layout9</cstring>
</property> </property>
@ -657,7 +657,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_4</cstring> <cstring>textLabel1_4</cstring>
</property> </property>
@ -665,7 +665,7 @@
<string>Icon SIze</string> <string>Icon SIze</string>
</property> </property>
</widget> </widget>
<widget class="QComboBox"> <widget class="TQComboBox">
<item> <item>
<property name="text"> <property name="text">
<string>16/22</string> <string>16/22</string>
@ -699,7 +699,7 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QGroupBox" row="0" column="1" rowspan="4" colspan="1"> <widget class="TQGroupBox" row="0" column="1" rowspan="4" colspan="1">
<property name="name"> <property name="name">
<cstring>groupBox7</cstring> <cstring>groupBox7</cstring>
</property> </property>
@ -710,7 +710,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QListBox" row="0" column="0"> <widget class="TQListBox" row="0" column="0">
<property name="name"> <property name="name">
<cstring>categoryList</cstring> <cstring>categoryList</cstring>
</property> </property>
@ -718,7 +718,7 @@
<enum>AlwaysOff</enum> <enum>AlwaysOff</enum>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget" row="1" column="0"> <widget class="TQLayoutWidget" row="1" column="0">
<property name="name"> <property name="name">
<cstring>layout18</cstring> <cstring>layout18</cstring>
</property> </property>

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>StarterHelp</class> <class>StarterHelp</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>StarterHelp</cstring> <cstring>StarterHelp</cstring>
</property> </property>
@ -19,11 +19,11 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QTabWidget" row="0" column="0"> <widget class="TQTabWidget" row="0" column="0">
<property name="name"> <property name="name">
<cstring>tabWidget2</cstring> <cstring>tabWidget2</cstring>
</property> </property>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>tab</cstring> <cstring>tab</cstring>
</property> </property>
@ -34,7 +34,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>textLabel5</cstring> <cstring>textLabel5</cstring>
</property> </property>
@ -55,7 +55,7 @@ Pressing &lt;b&gt;down&lt;/b&gt; will move the keyboard focus to the below entr
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>tab</cstring> <cstring>tab</cstring>
</property> </property>
@ -66,7 +66,7 @@ Pressing &lt;b&gt;down&lt;/b&gt; will move the keyboard focus to the below entr
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>textLabel6</cstring> <cstring>textLabel6</cstring>
</property> </property>
@ -80,7 +80,7 @@ Pressing the &lt;b&gt;up&lt;/b&gt; key on the topmost item will act as above.&lt
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>TabPage</cstring> <cstring>TabPage</cstring>
</property> </property>
@ -91,7 +91,7 @@ Pressing the &lt;b&gt;up&lt;/b&gt; key on the topmost item will act as above.&lt
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>

File diff suppressed because it is too large Load Diff

@ -1,32 +1,32 @@
#ifndef __LIQUID_STYLE_H #ifndef __LIQUID_STYLE_H
#define __LIQUID_STYLE_H #define __LIQUID_STYLE_H
#include <qcstring.h> #include <tqcstring.h>
#include <qdir.h> #include <tqdir.h>
#include <qintdict.h> #include <tqintdict.h>
#include <qprogressbar.h> #include <tqprogressbar.h>
#include <qtimer.h> #include <tqtimer.h>
#include <qwmatrix.h> #include <tqwmatrix.h>
#include <kpixmap.h> #include <kpixmap.h>
#include <qwidget.h> #include <tqwidget.h>
#include <kstyle.h> #include <kstyle.h>
// #define BITMAP_ITEMS 75 // Don't worry, they're demand loaded ;-) // #define BITMAP_ITEMS 75 // Don't worry, they're demand loaded ;-)
#define LIQUID_MENU_CHANGE 667 #define LIQUID_MENU_CHANGE 667
#define MOSFET_BUTTON_CHANGE 661 #define MOSFET_BUTTON_CHANGE 661
class QColor; class TQColor;
class QHeader; class TQHeader;
class QImage; class TQImage;
class QMenuBar; class TQMenuBar;
class QPalette; class TQPalette;
class QPoint; class TQPoint;
class QPushButton; class TQPushButton;
class QRect; class TQRect;
class QScrollBar; class TQScrollBar;
class QSize; class TQSize;
class QString; class TQString;
class QTabBar; class TQTabBar;
class LiquidStyle; class LiquidStyle;
enum BitmapData{RadioOn = 0, RadioOff, RadioOnHover, RadioOffHover, RadioOnPressed, RadioOffPressed, enum BitmapData{RadioOn = 0, RadioOff, RadioOnHover, RadioOffHover, RadioOnPressed, RadioOffPressed,
@ -80,32 +80,32 @@ class ButtonTile
for ( int i = 0;i < 9;++i ) for ( int i = 0;i < 9;++i )
if ( pixmaps[ i ] ) delete pixmaps[ i ]; if ( pixmaps[ i ] ) delete pixmaps[ i ];
} }
QPixmap* pixmap( Tile pos ) TQPixmap* pixmap( Tile pos )
{ {
return ( pixmaps[ ( int ) pos ] ); return ( pixmaps[ ( int ) pos ] );
} }
void setPixmap( Tile pos, QPixmap *pix ) void setPixmap( Tile pos, TQPixmap *pix )
{ {
pixmaps[ ( int ) pos ] = pix; pixmaps[ ( int ) pos ] = pix;
} }
protected: protected:
QPixmap *pixmaps[ 9 ]; TQPixmap *pixmaps[ 9 ];
}; };
class OptionHandler : public QObject class OptionHandler : public TQObject
{ {
Q_OBJECT Q_OBJECT
public: public:
OptionHandler( QObject *parent ); OptionHandler( TQObject *parent );
void reloadSettings(); void reloadSettings();
inline static bool useShadowText() inline static bool useShadowText()
{ {
return ( shadowText ); return ( shadowText );
} }
const QColor& textColor(); const TQColor& textColor();
const QColor& bgColor(); const TQColor& bgColor();
const QColor& buttonColor(); const TQColor& buttonColor();
static int custCols[8]; static int custCols[8];
inline void reset() inline void reset()
@ -123,17 +123,17 @@ public:
return (drawMenuStripe_); return (drawMenuStripe_);
} }
inline static QColor menuStripeColor() inline static TQColor menuStripeColor()
{ {
return menuStripeColor_; return menuStripeColor_;
} }
inline static QColor textColorHigh() inline static TQColor textColorHigh()
{ {
return fgColorHigh; return fgColorHigh;
} }
inline static QColor menuColorHigh() inline static TQColor menuColorHigh()
{ {
return colorHigh; return colorHigh;
} }
@ -167,7 +167,7 @@ public:
{ {
return ( customWidgetColor ); return ( customWidgetColor );
} }
inline static const QColor& customColor( int idx ) inline static const TQColor& customColor( int idx )
{ {
return ( customColors[ idx ] ); return ( customColors[ idx ] );
} }
@ -224,19 +224,19 @@ public:
{ {
return (useCustomExpanderColor); return (useCustomExpanderColor);
} }
inline static QColor CustomExpanderColor() inline static TQColor CustomExpanderColor()
{ {
return (expanderColor); return (expanderColor);
} }
inline static QColor DotlineColor() inline static TQColor DotlineColor()
{ {
return (dotlineColor); return (dotlineColor);
} }
inline QColor InactiveButtonColor() inline TQColor InactiveButtonColor()
{ {
switch (inactiveButtonColor) switch (inactiveButtonColor)
{ {
case 0 : return (QColor(232,232,232)); case 0 : return (TQColor(232,232,232));
case 1 : return (bgColor()); case 1 : return (bgColor());
case 2 : return (buttonColor()); case 2 : return (buttonColor());
case 3 : return (customInactiveButtonColor); case 3 : return (customInactiveButtonColor);
@ -310,12 +310,12 @@ public:
return scrollerActive; return scrollerActive;
} }
inline static QColor Color() inline static TQColor Color()
{ {
return color; return color;
} }
inline static QColor Color2() inline static TQColor Color2()
{ {
return color2; return color2;
} }
@ -330,7 +330,7 @@ public:
return tabStyle_; return tabStyle_;
} }
inline static QColor & BrushTint() inline static TQColor & BrushTint()
{ {
return brushTint; return brushTint;
} }
@ -348,7 +348,7 @@ public:
{ {
return animateProgress; return animateProgress;
} }
inline static QColor CustomButtonColor() inline static TQColor CustomButtonColor()
{ {
return customButtonColor; return customButtonColor;
} }
@ -358,28 +358,28 @@ public:
return animateButton; return animateButton;
} }
inline static QColor aDecoColor1() inline static TQColor aDecoColor1()
{ {
return aDecoColor1_; return aDecoColor1_;
} }
inline static QColor aDecoColor2() inline static TQColor aDecoColor2()
{ {
return aDecoColor2_; return aDecoColor2_;
} }
inline static QColor titleColor( int i ) inline static TQColor titleColor( int i )
{ {
return titleColor_[i]; return titleColor_[i];
} }
inline static QColor titleButtonColor( int i ) inline static TQColor titleButtonColor( int i )
{ {
return titleButtonColor_[i]; return titleButtonColor_[i];
} }
QMenuBar *currentMenu; TQMenuBar *currentMenu;
QPixmap *indicatedMenuItemPix; TQPixmap *indicatedMenuItemPix;
QRect *indicatedMenuItemRect; TQRect *indicatedMenuItemRect;
QPixmap *lastIndicatedMenuItemPix; TQPixmap *lastIndicatedMenuItemPix;
QRect *lastIndicatedMenuItemRect; TQRect *lastIndicatedMenuItemRect;
bool mouseOverMenu; bool mouseOverMenu;
WId lastIndicatedMenuItemID; WId lastIndicatedMenuItemID;
static unsigned long wmDesign; static unsigned long wmDesign;
@ -388,12 +388,12 @@ public:
public slots: public slots:
inline void warningSlot() inline void warningSlot()
{ {
qWarning("widget destroyed"); tqWarning("widget destroyed");
} }
protected: protected:
static QColor titleColor_[2]; static TQColor titleColor_[2];
static QColor titleButtonColor_[3]; static TQColor titleButtonColor_[3];
// menu // menu
static int menuBackground; static int menuBackground;
@ -402,19 +402,19 @@ protected:
static bool animateButton; static bool animateButton;
static bool shadowText; static bool shadowText;
static bool drawMenuStripe_; static bool drawMenuStripe_;
static QColor menuStripeColor_; static TQColor menuStripeColor_;
static bool glossyMenus_; static bool glossyMenus_;
//color //color
static QColor customButtonColor; static TQColor customButtonColor;
//widgets //widgets
static bool customWidgetColor; static bool customWidgetColor;
static QColor customColors[ 10 ]; static TQColor customColors[ 10 ];
//menu //menu
static bool useCustomMenuColor; static bool useCustomMenuColor;
static QColor color, color2, colorHigh, fgColor, fgColorHigh; static TQColor color, color2, colorHigh, fgColor, fgColorHigh;
//incativeButton //incativeButton
static int inactiveButtonColor; static int inactiveButtonColor;
static QColor customInactiveButtonColor; static TQColor customInactiveButtonColor;
//Design //Design
//stipples //stipples
@ -427,7 +427,7 @@ protected:
//istviews; //istviews;
static bool drawDotlines, useCustomExpanderColor; static bool drawDotlines, useCustomExpanderColor;
static int expanderStyle; static int expanderStyle;
static QColor expanderColor, dotlineColor; static TQColor expanderColor, dotlineColor;
static int dotlineStyle; static int dotlineStyle;
//slider //slider
static bool squeezesbslider; static bool squeezesbslider;
@ -450,31 +450,31 @@ protected:
static bool drawProgressLabel; static bool drawProgressLabel;
static tabStyle tabStyle_; static tabStyle tabStyle_;
QString colorStr, fgColorStr/*, panelColorStr*/; TQString colorStr, fgColorStr/*, panelColorStr*/;
static QColor brushTint; static TQColor brushTint;
static QColor aDecoColor1_; static TQColor aDecoColor1_;
static QColor aDecoColor2_; static TQColor aDecoColor2_;
static bool tintBrush; static bool tintBrush;
static bool animateSlider; static bool animateSlider;
static bool animateProgress; static bool animateProgress;
}; };
class EventKiller : public QObject class EventKiller : public TQObject
{ {
Q_OBJECT Q_OBJECT
public: public:
bool eventFilter( QObject *, QEvent *) bool eventFilter( TQObject *, TQEvent *)
{ {
return TRUE; return TRUE;
} }
}; };
class BMShower : public QObject class BMShower : public TQObject
{ {
Q_OBJECT Q_OBJECT
public: public:
BMShower(QObject *parent); BMShower(TQObject *parent);
bool eventFilter( QObject *object, QEvent *event ); bool eventFilter( TQObject *object, TQEvent *event );
}; };
class ButtonFadeInfo class ButtonFadeInfo
@ -499,96 +499,96 @@ public:
virtual ~LiquidStyle(); virtual ~LiquidStyle();
bool isPlain() const; bool isPlain() const;
virtual void polish( QWidget *w ); virtual void polish( TQWidget *w );
// virtual void polishPopupMenu( QPopupMenu *w ); // virtual void polishPopupMenu( TQPopupMenu *w );
virtual void unPolish( QWidget *w ); virtual void unPolish( TQWidget *w );
virtual void polish( QPalette &p ); virtual void polish( TQPalette &p );
virtual void unPolish( QApplication *a ); virtual void unPolish( TQApplication *a );
int styleHint(StyleHint sh, const QWidget * w, const QStyleOption & opt, QStyleHintReturn * shr) const; int styleHint(StyleHint sh, const TQWidget * w, const TQStyleOption & opt, TQStyleHintReturn * 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 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, QPainter* p, const QRect &r, const QColorGroup &cg, SFlags flags = Style_Default, const QStyleOption& = QStyleOption::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, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags flags = Style_Default, const QStyleOption& = QStyleOption::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, QPainter *p, const QWidget *widget, const QRect &r, const QStyleOption& = QStyleOption::Default ) const; // void drawControlMask( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& = TQStyleOption::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 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, QPainter *p, const QWidget *widget, const QRect &r, const QStyleOption& = QStyleOption::Default ) const; // void drawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& = TQStyleOption::Default ) const;
int pixelMetric( PixelMetric m, const QWidget *widget = 0 ) const; int pixelMetric( PixelMetric m, const TQWidget *widget = 0 ) const;
QSize sizeFromContents( ContentsType contents, const QWidget *widget, const QSize &contentSize, const QStyleOption& opt ) const; TQSize sizeFromContents( ContentsType contents, const TQWidget *widget, const TQSize &contentSize, const TQStyleOption& opt ) const;
QRect subRect( SubRect r, const QWidget *widget ) const; TQRect subRect( SubRect r, const TQWidget *widget ) const;
QRect querySubControlMetrics( ComplexControl control, const QWidget *widget, SubControl subcontrol, const QStyleOption &opt = QStyleOption::Default ) const; TQRect querySubControlMetrics( ComplexControl control, const TQWidget *widget, SubControl subcontrol, const TQStyleOption &opt = TQStyleOption::Default ) const;
// Fix Qt3's wacky image positions // Fix TQt3's wacky image positions
QPixmap stylePixmap( StylePixmap stylepixmap, const QWidget *widget = 0, const QStyleOption& = QStyleOption::Default ) const; TQPixmap stylePixmap( StylePixmap stylepixmap, const TQWidget *widget = 0, const TQStyleOption& = TQStyleOption::Default ) const;
bool eventFilter( QObject *object, QEvent *event ); bool eventFilter( TQObject *object, TQEvent *event );
private slots: private slots:
void updateProgressPos(); void updateProgressPos();
void updateSliderPos(); void updateSliderPos();
void progressBarDestroyed(QObject*); void progressBarDestroyed(TQObject*);
void fakeMouse(); void fakeMouse();
protected: protected:
void clearImage( QImage &img ) const; void clearImage( TQImage &img ) const;
ButtonTile* createButtonTile( const QColor &c, const QColor &bgColor, QImage *buttonImage, QImage *shadowImage, QImage *glowImage, QIntDict <ButtonTile>*buttonDict, QIntDict<ButtonTile>*shadowDict, QIntDict<ButtonTile>*glowDict, int w, int h, int xOff, int yOff, int centerW, int centerH, int shadowH, int glowWH, bool sunken) const; ButtonTile* createButtonTile( const TQColor &c, const TQColor &bgColor, TQImage *buttonImage, TQImage *shadowImage, TQImage *glowImage, TQIntDict <ButtonTile>*buttonDict, TQIntDict<ButtonTile>*shadowDict, TQIntDict<ButtonTile>*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; ButtonTile* createRoundFrameTile(TQImage &img, const TQColor &color, const TQColor *bg, const TQColor &baseColor ) const;
QPixmap* createSliderEnd( const QColor &c, const QColor &bgColor, bool top/*, bool vertical*/ ) const; TQPixmap* createSliderEnd( const TQColor &c, const TQColor &bgColor, bool top/*, bool vertical*/ ) const;
ButtonTile* separateTiles( QPixmap *pix, int xO, int yO, int w, int h, int sh, bool sunken) const; ButtonTile* separateTiles( TQPixmap *pix, int xO, int yO, int w, int h, int sh, bool sunken) const;
QPixmap* getPixmap( BitmapData item ) const; TQPixmap* getPixmap( BitmapData item ) const;
QPixmap* adjustHSV( QImage &img, const QColor &c, const QColor *bg = NULL ) const; TQPixmap* adjustHSV( TQImage &img, const TQColor &c, const TQColor *bg = NULL ) const;
QImage* adjustHSVImage( QImage &img, const QColor &c, const QColor *bg = NULL ) const; TQImage* adjustHSVImage( TQImage &img, const TQColor &c, const TQColor *bg = NULL ) const;
void adjustHSV( QPixmap &pix, const QColor &c ) const; void adjustHSV( TQPixmap &pix, const TQColor &c ) const;
QImage* tintBrush( const QImage &img, const QColor &c ) const; TQImage* tintBrush( const TQImage &img, const TQColor &c ) const;
QPixmap* processEmbedded( const char *label, const QColor &c, bool blend = false, const QColor *bg = NULL ) const; TQPixmap* processEmbedded( const char *label, const TQColor &c, bool blend = false, const TQColor *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 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( 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 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( 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 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( QPainter *p, const QRect &r, const QColorGroup &cg, bool isHTML = false, bool focused = false, bool inverse = false/*, bool round = 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( QPainter *p, const QRect &r, const QColorGroup &cg, bool focused, QPoint offset ) const; void drawRoundFrame( TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool focused, TQPoint offset ) const;
void drawHTMLCBBorder( const QPixmap &pix, const QColor &c ) const; void drawHTMLCBBorder( const TQPixmap &pix, const TQColor &c ) const;
bool isHTMLWidget( const QWidget *w ) const; bool isHTMLWidget( const TQWidget *w ) const;
private: private:
LiquidStyle( const LiquidStyle & ); LiquidStyle( const LiquidStyle & );
LiquidStyle& operator=( const LiquidStyle & ); LiquidStyle& operator=( const LiquidStyle & );
int getBrightness(unsigned int rgb) const; int getBrightness(unsigned int rgb) const;
QImage fetchImage( const char *name ); TQImage fetchImage( const char *name );
QColor mapFadeColor(QColor &color, int index) const; TQColor mapFadeColor(TQColor &color, int index) const;
void fadeIn(QPushButton *button); void fadeIn(TQPushButton *button);
void fadeOut(QPushButton *button); void fadeOut(TQPushButton *button);
QColor brushedMetalColor(QColor &c) const; TQColor brushedMetalColor(TQColor &c) const;
QColor originalBgColor; TQColor originalBgColor;
QBitmap *sbLeft, *sbRight, *sbUp, *sbDown, *checkmark; TQBitmap *sbLeft, *sbRight, *sbUp, *sbDown, *checkmark;
QImage *btnBorderImg, *btnShadowImg, *slider_top, *slider_btm, *slider_top_shd, *slider_btm_shd, *rectbutton, *combo, *comboShadow, *buttonGlow, *roundFrame; TQImage *btnBorderImg, *btnShadowImg, *slider_top, *slider_btm, *slider_top_shd, *slider_btm_shd, *rectbutton, *combo, *comboShadow, *buttonGlow, *roundFrame;
QPixmap *btnBlendPix, *menuPix, *groupShadow ; TQPixmap *btnBlendPix, *menuPix, *groupShadow ;
QPixmap plainBrush, gradBrush; TQPixmap plainBrush, gradBrush;
QBrush pagerBrush, pagerHoverBrush; TQBrush pagerBrush, pagerHoverBrush;
QPixmap *pixmaps[ BITMAP_ITEMS ]; TQPixmap *pixmaps[ BITMAP_ITEMS ];
QPixmap sbBuffer; TQPixmap sbBuffer;
QScrollBar *currentScrollBar; TQScrollBar *currentScrollBar;
QWMatrix lMatrix; TQWMatrix lMatrix;
QWMatrix rMatrix; TQWMatrix rMatrix;
QWMatrix iMatrix; TQWMatrix iMatrix;
QWMatrix mMatrix; TQWMatrix mMatrix;
QWMatrix m2Matrix; TQWMatrix m2Matrix;
bool isKicker, isOOO, isHTMLButton, initialPaletteLoaded, inExitPolish; bool isKicker, isOOO, isHTMLButton, initialPaletteLoaded, inExitPolish;
QHeader *currentHeader; TQHeader *currentHeader;
QTabBar *currentTabBar; TQTabBar *currentTabBar;
int headerHoverID; int headerHoverID;
int headerSortID; int headerSortID;
QPoint btnOffset; TQPoint btnOffset;
QPoint cursorPos_; TQPoint cursorPos_;
QWidget *currentTaskContainer; TQWidget *currentTaskContainer;
KPixmap activeToolbarPix; KPixmap activeToolbarPix;
bool isTaskContainer, taskContainerHover; bool isTaskContainer, taskContainerHover;
QPalette polishedPalette, tooltipPalette; TQPalette polishedPalette, tooltipPalette;
unsigned int qtrcModificationTime; unsigned int qtrcModificationTime;
int progAnimShift; int progAnimShift;
@ -599,29 +599,29 @@ private:
OptionHandler *optionHandler; OptionHandler *optionHandler;
QIntDict<ButtonTile>btnDict; TQIntDict<ButtonTile>btnDict;
QIntDict<ButtonFadeInfo>bfi; TQIntDict<ButtonFadeInfo>bfi;
QIntDict<QRgb*>fadeColorMap; TQIntDict<TQRgb*>fadeColorMap;
QIntDict<ButtonTile>btnShadowedDict; TQIntDict<ButtonTile>btnShadowedDict;
QIntDict<ButtonTile>buttonGlowDict; TQIntDict<ButtonTile>buttonGlowDict;
QIntDict<ButtonTile>comboDict; TQIntDict<ButtonTile>comboDict;
QIntDict<ButtonTile>comboShadowedDict; TQIntDict<ButtonTile>comboShadowedDict;
QIntDict<ButtonTile>tabDict; TQIntDict<ButtonTile>tabDict;
QIntDict<ButtonTile>inverseTabDict; TQIntDict<ButtonTile>inverseTabDict;
QIntDict<ButtonTile>rectBtnDict; TQIntDict<ButtonTile>rectBtnDict;
QIntDict<ButtonTile>progress2Dict; TQIntDict<ButtonTile>progress2Dict;
QMap<QWidget*, int> progAnimWidgets; TQMap<TQWidget*, int> progAnimWidgets;
QPixmap *tmpBtnPix; TQPixmap *tmpBtnPix;
ButtonTile *inactiveRoundFrame; ButtonTile *inactiveRoundFrame;
ButtonTile *activeRoundFrame; ButtonTile *activeRoundFrame;
QWidget *highlightWidget; TQWidget *highlightWidget;
QScrollBar *activeScroller; TQScrollBar *activeScroller;
EventKiller *eventKiller; EventKiller *eventKiller;
BMShower *bmShower; BMShower *bmShower;
static QPixmap popupBack; static TQPixmap popupBack;
QWidget *paintWidget; TQWidget *paintWidget;
}; };
#endif #endif

File diff suppressed because it is too large Load Diff

@ -1,17 +1,17 @@
#include "baghira.h" #include "baghira.h"
#include <qapplication.h> #include <tqapplication.h>
#include <qbrush.h> #include <tqbrush.h>
#include <qcolor.h> #include <tqcolor.h>
#include <qevent.h> #include <tqevent.h>
#include <qimage.h> #include <tqimage.h>
#include <qobject.h> #include <tqobject.h>
#include <qpainter.h> #include <tqpainter.h>
#include <qpalette.h> #include <tqpalette.h>
#include <qpopupmenu.h> #include <tqpopupmenu.h>
#include <qrect.h> #include <tqrect.h>
#include <qsettings.h> #include <tqsettings.h>
#include <qsize.h> #include <tqsize.h>
#include <qstring.h> #include <tqstring.h>
// #include <kconfig.h> // #include <kconfig.h>
#include <kpixmapeffect.h> #include <kpixmapeffect.h>
#include <stdio.h> #include <stdio.h>
@ -24,42 +24,42 @@
x > u ? u :\ x > u ? u :\
x x
OptionHandler::OptionHandler( QObject *parent ) : QObject( parent ) { OptionHandler::OptionHandler( TQObject *parent ) : TQObject( parent ) {
scrollerActive = false; scrollerActive = false;
groupShadowButton = false; groupShadowButton = false;
reloadSettings(); reloadSettings();
} }
const QColor& OptionHandler::textColor() { const TQColor& OptionHandler::textColor() {
return ( useCustomMenuColor ? fgColor : qApp->palette().active().text() ); return ( useCustomMenuColor ? fgColor : tqApp->palette().active().text() );
} }
const QColor& OptionHandler::bgColor() { const TQColor& OptionHandler::bgColor() {
return qApp->palette().active().background(); return tqApp->palette().active().background();
} }
const QColor& OptionHandler::buttonColor() { const TQColor& OptionHandler::buttonColor() {
LiquidStyle * style = ( LiquidStyle* ) parent(); LiquidStyle * style = ( LiquidStyle* ) parent();
/*if (style->isKicker) return style->origPanelBrush.color(); /*if (style->isKicker) return style->origPanelBrush.color();
else */if (style->isOOO) return CustomButtonColor(); else */if (style->isOOO) return CustomButtonColor();
else return qApp->palette().active().button(); else return tqApp->palette().active().button();
} }
void OptionHandler::reloadSettings() { void OptionHandler::reloadSettings() {
// gather options... // gather options...
QSettings config; TQSettings config;
config.beginGroup("/baghira/Style"); config.beginGroup("/baghira/Style");
//we need that first to make sure we use some proper settings ;) //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: // design handling:
// first try file: // first try file:
QString tmpString; TQString tmpString;
FILE *file = NULL; FILE *file = NULL;
wmDesign = 5; wmDesign = 5;
for (int i = 0; i < 8; i++) for (int i = 0; i < 8; i++)
custCols[i] = -1; custCols[i] = -1;
if (qstrcmp( qApp->argv() [ 0 ], "ksplash" ) == 0) if (qstrcmp( tqApp->argv() [ 0 ], "ksplash" ) == 0)
{ {
style_ = Panther; style_ = Panther;
_toolbuttonStyle = Panther; _toolbuttonStyle = Panther;
@ -72,17 +72,17 @@ void OptionHandler::reloadSettings() {
{ {
// first try for a tmp file from bab starter // first try for a tmp file from bab starter
int tmpFile = 0; int tmpFile = 0;
tmpString = QDir::homeDirPath() + "/.baghira/.bab/" + qApp->argv() [ 0 ]; tmpString = TQDir::homeDirPath() + "/.baghira/.bab/" + tqApp->argv() [ 0 ];
file = fopen(tmpString.latin1(), "r"); file = fopen(tmpString.latin1(), "r");
if( file == NULL ) if( file == NULL )
{ {
tmpFile = 1; tmpFile = 1;
tmpString = QDir::homeDirPath() + "/.baghira/" + qApp->argv() [ 0 ]; tmpString = TQDir::homeDirPath() + "/.baghira/" + tqApp->argv() [ 0 ];
file = fopen(tmpString.latin1(), "r"); file = fopen(tmpString.latin1(), "r");
if( file == NULL ) if( file == NULL )
{ {
tmpFile = 2; tmpFile = 2;
tmpString = QDir::homeDirPath() + "/.baghira/.bab/.style"; tmpString = TQDir::homeDirPath() + "/.baghira/.bab/.style";
file = fopen(tmpString.latin1(), "r"); file = fopen(tmpString.latin1(), "r");
} }
} }
@ -110,7 +110,7 @@ void OptionHandler::reloadSettings() {
remove(tmpString.latin1()); // remove TEMPORARY file remove(tmpString.latin1()); // remove TEMPORARY file
else if (tmpFile == 2) else if (tmpFile == 2)
{ {
tmpString = QDir::homeDirPath() + "/.baghira/.bab/.deco"; tmpString = TQDir::homeDirPath() + "/.baghira/.bab/.deco";
if ((file = fopen(tmpString.latin1(), "r")) != NULL) if ((file = fopen(tmpString.latin1(), "r")) != NULL)
{ {
fscanf(file,"%u\n%u\n",&i3, &wmDesign); fscanf(file,"%u\n%u\n",&i3, &wmDesign);
@ -148,23 +148,23 @@ void OptionHandler::reloadSettings() {
useCustomMenuColor = (menuColorStyle == 2); useCustomMenuColor = (menuColorStyle == 2);
shadowText = config.readBoolEntry( "Menu_ShadowText", false); shadowText = config.readBoolEntry( "Menu_ShadowText", false);
if (useCustomMenuColor){ if (useCustomMenuColor){
color = QColor( config.readNumEntry( "Menu_Color1", 0 ) ); color = TQColor( config.readNumEntry( "Menu_Color1", 0 ) );
color2 = QColor( config.readNumEntry( "Menu_Color2", 0 ) ); color2 = TQColor( config.readNumEntry( "Menu_Color2", 0 ) );
colorHigh = QColor( config.readNumEntry( "Menu_ColorHighlight", 0 ) ); colorHigh = TQColor( config.readNumEntry( "Menu_ColorHighlight", 0 ) );
fgColor = QColor( config.readNumEntry( "Menu_TextColor", 0 ) ); fgColor = TQColor( config.readNumEntry( "Menu_TextColor", 0 ) );
fgColorHigh = QColor( config.readNumEntry( "Menu_TextColorHighlight", 0 ) ); fgColorHigh = TQColor( config.readNumEntry( "Menu_TextColorHighlight", 0 ) );
} }
else if (menuColorButton){ else if (menuColorButton){
color = customButtonColor; color = customButtonColor;
color2 = customButtonColor.dark(130); color2 = customButtonColor.dark(130);
} }
else { else {
color = qApp->palette().active().background(); color = tqApp->palette().active().background();
color2 = qApp->palette().active().background().dark(130); color2 = tqApp->palette().active().background().dark(130);
} }
drawMenuStripe_ = config.readBoolEntry("Menu_DrawMenuStripe", false); drawMenuStripe_ = config.readBoolEntry("Menu_DrawMenuStripe", false);
if (drawMenuStripe_) if (drawMenuStripe_)
menuStripeColor_ = QColor(config.readNumEntry("Menu_StripeColor"),(int)Qt::white.rgb()); menuStripeColor_ = TQColor(config.readNumEntry("Menu_StripeColor"),(int)TQt::white.rgb());
// color stuff // color stuff
// widgets // widgets
customWidgetColor = config.readBoolEntry( "Colors_UseCustomColors", false); customWidgetColor = config.readBoolEntry( "Colors_UseCustomColors", false);
@ -181,7 +181,7 @@ void OptionHandler::reloadSettings() {
customColors[ CustomSBGroove ].setRgb( config.readNumEntry( "Colors_SliderGroove", ( int ) bgColor().rgb() ) ); customColors[ CustomSBGroove ].setRgb( config.readNumEntry( "Colors_SliderGroove", ( int ) bgColor().rgb() ) );
} }
if (inactiveButtonColor == Custom) 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); contrast += config.readNumEntry( "Design_StippleContrast", 3);
bevelHighlights_ = config.readBoolEntry( "Design_BevelAsHighlight", true); bevelHighlights_ = config.readBoolEntry( "Design_BevelAsHighlight", true);
//shadows //shadows
@ -191,11 +191,11 @@ groupboxshadow = (style_ == Brushed) ? false : config.readBoolEntry( "Design_Sha
expanderStyle = config.readNumEntry( "Special_ExpanderStyle", Apple); expanderStyle = config.readNumEntry( "Special_ExpanderStyle", Apple);
useCustomExpanderColor = config.readBoolEntry( "Special_CustomExpanderColor", false); useCustomExpanderColor = config.readBoolEntry( "Special_CustomExpanderColor", false);
if (useCustomExpanderColor) 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); drawDotlines = config.readBoolEntry( "Special_DrawTreeLines", true);
if (drawDotlines){ if (drawDotlines){
dotlineStyle = config.readNumEntry( "Special_TreelineStyle", Line); 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 //slider
squeezesbslider = config.readBoolEntry( "Special_SqueezeSlider", false ); squeezesbslider = config.readBoolEntry( "Special_SqueezeSlider", false );
@ -218,24 +218,24 @@ groupboxshadow = (style_ == Brushed) ? false : config.readBoolEntry( "Design_Sha
config.endGroup(); config.endGroup();
config.beginGroup("/baghira/Deco"); config.beginGroup("/baghira/Deco");
titleButtonColor_[0] = QColor((unsigned int)config.readNumEntry( "CloseButtonColor", QColor(200,85,70).rgb())); titleButtonColor_[0] = TQColor((unsigned int)config.readNumEntry( "CloseButtonColor", TQColor(200,85,70).rgb()));
titleButtonColor_[1] = QColor((unsigned int)config.readNumEntry( "MinButtonColor", QColor(230,155,40).rgb())); titleButtonColor_[1] = TQColor((unsigned int)config.readNumEntry( "MinButtonColor", TQColor(230,155,40).rgb()));
titleButtonColor_[2] = QColor((unsigned int)config.readNumEntry( "MaxButtonColor", QColor(121,180,54).rgb())); titleButtonColor_[2] = TQColor((unsigned int)config.readNumEntry( "MaxButtonColor", TQColor(121,180,54).rgb()));
if (style_ == Jaguar) if (style_ == Jaguar)
{ {
titleColor_[0] = QColor((unsigned int)config.readNumEntry( "inactiveColor1_1", QColor(204,214,230).rgb())); titleColor_[0] = TQColor((unsigned int)config.readNumEntry( "inactiveColor1_1", TQColor(204,214,230).rgb()));
titleColor_[1] = QColor((unsigned int)config.readNumEntry( "inactiveColor2_1", QColor(194,196,211).rgb())); titleColor_[1] = TQColor((unsigned int)config.readNumEntry( "inactiveColor2_1", TQColor(194,196,211).rgb()));
} }
else if (style_ != Brushed) else if (style_ != Brushed)
{ {
titleColor_[0] = QColor((unsigned int)config.readNumEntry( "activeColor1_2", QColor(238,238,238).rgb())); titleColor_[0] = TQColor((unsigned int)config.readNumEntry( "activeColor1_2", TQColor(238,238,238).rgb()));
titleColor_[1] = QColor((unsigned int)config.readNumEntry( "activeColor2_2", QColor(205,202,205).rgb())); titleColor_[1] = TQColor((unsigned int)config.readNumEntry( "activeColor2_2", TQColor(205,202,205).rgb()));
} }
if (style_ == Tiger) if (style_ == Tiger)
{ {
int r,g,b; int r,g,b;
aDecoColor1_ = QColor((unsigned int)config.readNumEntry( "activeColor2_4", (unsigned int) QColor(205,202,205).rgb())); aDecoColor1_ = TQColor((unsigned int)config.readNumEntry( "activeColor2_4", (unsigned int) TQColor(205,202,205).rgb()));
aDecoColor2_ = QColor((unsigned int)config.readNumEntry( "activeColor1_4", (unsigned int) QColor(238,238,238).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); 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); 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); 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 else
{ {
aDecoColor1_ = Qt::black; aDecoColor1_ = TQt::black;
aDecoColor2_ = Qt::black; aDecoColor2_ = TQt::black;
} }
config.endGroup(); config.endGroup();
// Option gathered // Option gathered

@ -1,35 +1,35 @@
//#include <qdir.h> //#include <tqdir.h>
#include "baghira.h" #include "baghira.h"
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include <qapplication.h> #include <tqapplication.h>
#include <qbrush.h> #include <tqbrush.h>
#include <qcolor.h> #include <tqcolor.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include <qcursor.h> #include <tqcursor.h>
#include <qdialog.h> #include <tqdialog.h>
#include <qframe.h> #include <tqframe.h>
#include <qfile.h> #include <tqfile.h>
#include <qheader.h> #include <tqheader.h>
#include <qgroupbox.h> #include <tqgroupbox.h>
//#include <qiconview.h> //#include <tqiconview.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qlistbox.h> #include <tqlistbox.h>
#include <klistview.h> #include <klistview.h>
#include <kmenubar.h> #include <kmenubar.h>
#include <qpalette.h> #include <tqpalette.h>
#include <qpainter.h> #include <tqpainter.h>
#include <qpopupmenu.h> #include <tqpopupmenu.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qscrollbar.h> #include <tqscrollbar.h>
#include <qscrollview.h> #include <tqscrollview.h>
#include <qsizepolicy.h> #include <tqsizepolicy.h>
#include <qslider.h> #include <tqslider.h>
#include <qtabbar.h> #include <tqtabbar.h>
#include <qtoolbar.h> #include <tqtoolbar.h>
#include <qtoolbutton.h> #include <tqtoolbutton.h>
#include <kdeversion.h> #include <kdeversion.h>
#include <kpixmapeffect.h> #include <kpixmapeffect.h>
#include <kglobalsettings.h> #include <kglobalsettings.h>
@ -49,7 +49,7 @@ x
#endif #endif
void LiquidStyle::polish( QPalette &pal ) void LiquidStyle::polish( TQPalette &pal )
{ {
if ( inExitPolish ) if ( inExitPolish )
return ; return ;
@ -67,12 +67,12 @@ void LiquidStyle::polish( QPalette &pal )
btnDict.clear(); btnDict.clear();
btnShadowedDict.clear(); btnShadowedDict.clear();
// reset brushes // reset brushes
pagerHoverBrush = QBrush(); pagerHoverBrush = TQBrush();
pagerBrush = QBrush(); pagerBrush = TQBrush();
bool newPalette = false; bool newPalette = false;
struct stat buffer; 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; unsigned int lastModTime = ( unsigned int ) buffer.st_mtime;
if ( lastModTime > qtrcModificationTime ) if ( lastModTime > qtrcModificationTime )
@ -91,57 +91,57 @@ void LiquidStyle::polish( QPalette &pal )
return ; return ;
} }
originalBgColor = pal.color(QPalette::Active, QColorGroup::Background); originalBgColor = pal.color(TQPalette::Active, TQColorGroup::Background);
if (optionHandler->style() == Brushed) if (optionHandler->style() == Brushed)
pal.setColor(QColorGroup::Background, brushedMetalColor(optionHandler->BrushTint())); pal.setColor(TQColorGroup::Background, brushedMetalColor(optionHandler->BrushTint()));
if (isOOO) if (isOOO)
pal.setColor( QColorGroup::Button, pal.active().background() ); pal.setColor( TQColorGroup::Button, pal.active().background() );
else if (optionHandler->custCols[0] != -1) else if (optionHandler->custCols[0] != -1)
{ {
pal.setColor(QColorGroup::Background, QColor(optionHandler->custCols[0])); pal.setColor(TQColorGroup::Background, TQColor(optionHandler->custCols[0]));
pal.setColor(QColorGroup::Button, QColor(optionHandler->custCols[1])); pal.setColor(TQColorGroup::Button, TQColor(optionHandler->custCols[1]));
pal.setColor(QColorGroup::Base, QColor(optionHandler->custCols[2])); pal.setColor(TQColorGroup::Base, TQColor(optionHandler->custCols[2]));
pal.setColor(QPalette::Active, QColorGroup::Text, QColor(optionHandler->custCols[3])); pal.setColor(TQPalette::Active, TQColorGroup::Text, TQColor(optionHandler->custCols[3]));
pal.setColor(QPalette::Active, QColorGroup::Foreground, QColor(optionHandler->custCols[3])); pal.setColor(TQPalette::Active, TQColorGroup::Foreground, TQColor(optionHandler->custCols[3]));
pal.setColor(QColorGroup::Highlight, QColor(optionHandler->custCols[4])); pal.setColor(TQColorGroup::Highlight, TQColor(optionHandler->custCols[4]));
pal.setColor(QPalette::Active, QColorGroup::HighlightedText, QColor(optionHandler->custCols[5])); pal.setColor(TQPalette::Active, TQColorGroup::HighlightedText, TQColor(optionHandler->custCols[5]));
pal.setColor(QPalette::Active, QColorGroup::ButtonText, QColor(optionHandler->custCols[6])); pal.setColor(TQPalette::Active, TQColorGroup::ButtonText, TQColor(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::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(TQPalette::Inactive, TQColorGroup::Text, TQColor(optionHandler->custCols[3]));
pal.setColor(QPalette::Inactive, QColorGroup::HighlightedText, QColor(optionHandler->custCols[5])); pal.setColor(TQPalette::Inactive, TQColorGroup::HighlightedText, TQColor(optionHandler->custCols[5]));
pal.setColor(QPalette::Inactive, QColorGroup::ButtonText, QColor(optionHandler->custCols[6])); pal.setColor(TQPalette::Inactive, TQColorGroup::ButtonText, TQColor(optionHandler->custCols[6]));
} }
else else
pal.setColor( QColorGroup::Button, optionHandler->CustomButtonColor() ); pal.setColor( TQColorGroup::Button, optionHandler->CustomButtonColor() );
#if 0 #if 0
if ( isKicker ) if ( isKicker )
{ {
origPanelBrush = pal.brush( QPalette::Active, QColorGroup::Background ); origPanelBrush = pal.brush( TQPalette::Active, TQColorGroup::Background );
origPanelPalette = pal; origPanelPalette = pal;
QColor c( pal.active().background() ); TQColor c( pal.active().background() );
if ( optionHandler->usePanelCustomColor() && optionHandler->panelCustomColor().isValid() ) if ( optionHandler->usePanelCustomColor() && optionHandler->panelCustomColor().isValid() )
c = optionHandler->panelCustomColor(); c = optionHandler->panelCustomColor();
kickerColor = c; kickerColor = c;
pal.setColor( QColorGroup::Mid, optionHandler->CustomButtonColor().dark( 110 ) ); pal.setColor( TQColorGroup::Mid, optionHandler->CustomButtonColor().dark( 110 ) );
pal.setColor( QColorGroup::Dark, optionHandler->CustomButtonColor().dark( 130 ) ); pal.setColor( TQColorGroup::Dark, optionHandler->CustomButtonColor().dark( 130 ) );
pal.setColor( QColorGroup::Midlight, optionHandler->CustomButtonColor().light( 110 ) ); pal.setColor( TQColorGroup::Midlight, optionHandler->CustomButtonColor().light( 110 ) );
pal.setColor( QColorGroup::Light, optionHandler->CustomButtonColor().light( 115 ) ); pal.setColor( TQColorGroup::Light, optionHandler->CustomButtonColor().light( 115 ) );
pal.setColor( QColorGroup::Button, optionHandler->CustomButtonColor()); pal.setColor( TQColorGroup::Button, optionHandler->CustomButtonColor());
if (optionHandler->style() == Brushed) if (optionHandler->style() == Brushed)
{ {
QBrush brush( c, gradBrush ); TQBrush brush( c, gradBrush );
pal.setBrush( QColorGroup::Background, brush ); pal.setBrush( TQColorGroup::Background, brush );
} }
else if ( optionHandler->usePanelStipple() ) else if ( optionHandler->usePanelStipple() )
{ {
QPixmap stipple( 64, 64 ); TQPixmap stipple( 64, 64 );
stipple.fill( c.rgb() ); stipple.fill( c.rgb() );
QPainter p( &stipple ); TQPainter p( &stipple );
p.setPen( c.dark( 100 + (int)(optionHandler->stippleContrast()/4) ) ); p.setPen( c.dark( 100 + (int)(optionHandler->stippleContrast()/4) ) );
for ( int i = 1; i < 64; i += 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 ) for ( int i = 2; i < 63; i += 4 )
p.drawLine( 0, i, 63, i ); p.drawLine( 0, i, 63, i );
p.end(); p.end();
QBrush brush( c, stipple ); TQBrush brush( c, stipple );
pal.setBrush( QColorGroup::Background, brush ); pal.setBrush( TQColorGroup::Background, brush );
} }
else else
pal.setBrush( QColorGroup::Background, c ); pal.setBrush( TQColorGroup::Background, c );
} }
#endif #endif
/*else*/ if (optionHandler->style() == Brushed) /*else*/ if (optionHandler->style() == Brushed)
{ {
QColor c( pal.active().background() ); TQColor c( pal.active().background() );
QBrush brush( c, gradBrush ); TQBrush brush( c, gradBrush );
pal.setBrush( QColorGroup::Background, brush ); pal.setBrush( TQColorGroup::Background, brush );
} }
else if ( !isPlain() ) else if ( !isPlain() )
{ {
QColor c( pal.active().background() ); TQColor c( pal.active().background() );
QPixmap stipple( 64, 64 ); TQPixmap stipple( 64, 64 );
stipple.fill( c.rgb() ); stipple.fill( c.rgb() );
QPainter p; TQPainter p;
p.begin( &stipple ); p.begin( &stipple );
p.setPen( c.dark( 100 + (int)(optionHandler->stippleContrast()/2) ) ); p.setPen( c.dark( 100 + (int)(optionHandler->stippleContrast()/2) ) );
for ( i = 1; i < 64; i += 4 ) for ( i = 1; i < 64; i += 4 )
@ -182,41 +182,41 @@ void LiquidStyle::polish( QPalette &pal )
for ( i = 2; i < 63; i += 4 ) for ( i = 2; i < 63; i += 4 )
p.drawLine( 0, i, 63, i ); p.drawLine( 0, i, 63, i );
p.end(); p.end();
QBrush brush( c, stipple ); TQBrush brush( c, stipple );
pal.setBrush( QColorGroup::Background, brush ); pal.setBrush( TQColorGroup::Background, brush );
} }
if (optionHandler->bevelHighlights()) if (optionHandler->bevelHighlights())
{ {
QColor c(pal.active().highlight()); TQColor c(pal.active().highlight());
QColor c2(c.light(140)); TQColor c2(c.light(140));
QPixmap pix2 = QPixmap(48,48); TQPixmap pix2 = TQPixmap(48,48);
QPainter coolPainter(&pix2); TQPainter coolPainter(&pix2);
KPixmap pix = QPixmap(48,24); KPixmap pix = TQPixmap(48,24);
KPixmapEffect::gradient(pix,c,c2,KPixmapEffect::VerticalGradient,0); KPixmapEffect::gradient(pix,c,c2,KPixmapEffect::VerticalGradient,0);
coolPainter.drawPixmap(0,0,pix); coolPainter.drawPixmap(0,0,pix);
KPixmapEffect::gradient(pix,c2,c,KPixmapEffect::VerticalGradient,0); KPixmapEffect::gradient(pix,c2,c,KPixmapEffect::VerticalGradient,0);
coolPainter.drawPixmap(0,24,pix); coolPainter.drawPixmap(0,24,pix);
QBrush brush(c, pix2); TQBrush brush(c, pix2);
pal.setBrush(QColorGroup::Highlight, brush); pal.setBrush(TQColorGroup::Highlight, brush);
} }
polishedPalette = pal; polishedPalette = pal;
optionHandler->reset(); optionHandler->reset();
} }
void LiquidStyle::unPolish( QApplication *app ) void LiquidStyle::unPolish( TQApplication *app )
{ {
popupBack.resize(0,0); popupBack.resize(0,0);
QPalette pal( app->palette() ); TQPalette pal( app->palette() );
inExitPolish = true; inExitPolish = true;
if ( !isPlain() ) if ( !isPlain() )
{ {
// reset any stipples // reset any stipples
if ( pal.brush( QPalette::Active, QColorGroup::Background ).pixmap() ) if ( pal.brush( TQPalette::Active, TQColorGroup::Background ).pixmap() )
pal.setBrush( QColorGroup::Background, pal.active().background() ); pal.setBrush( TQColorGroup::Background, pal.active().background() );
if ( pal.brush( QPalette::Active, QColorGroup::Button ).pixmap() ) if ( pal.brush( TQPalette::Active, TQColorGroup::Button ).pixmap() )
pal.setBrush( QColorGroup::Button, pal.active().button() ); pal.setBrush( TQColorGroup::Button, pal.active().button() );
// app->blockSignals( TRUE ); // app->blockSignals( TRUE );
app->setPalette( pal ); app->setPalette( pal );
// app->blockSignals( FALSE ); // app->blockSignals( FALSE );
@ -225,14 +225,14 @@ void LiquidStyle::unPolish( QApplication *app )
inExitPolish = false; 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"); // bool testWidget = w->inherits("Splash");
// int testInt = 0; // int testInt = 0;
// if (w->sizePolicy().horData() == QSizePolicy::Minimum || w->sizePolicy().horData() == QSizePolicy::MinimumExpanding) // if (w->sizePolicy().horData() == TQSizePolicy::Minimum || w->sizePolicy().horData() == TQSizePolicy::MinimumExpanding)
// qWarning("%s, \"%s\"",w->className(), w->name()); // tqWarning("%s, \"%s\"",w->className(), w->name());
// w->installEventFilter(this); // w->installEventFilter(this);
bool tmpBool = false; bool tmpBool = false;
@ -244,12 +244,12 @@ void LiquidStyle::polish( QWidget *w )
if (w->isTopLevel()) if (w->isTopLevel())
{ {
if ( ::qt_cast<QPopupMenu*>(w)) // popup menu designs if ( ::tqt_cast<TQPopupMenu*>(w)) // popup menu designs
{ {
switch (optionHandler->MenuBackground()) switch (optionHandler->MenuBackground())
{ {
case Plain: case Plain:
w->setBackgroundMode( QWidget::PaletteBackground ); w->setBackgroundMode( TQWidget::PaletteBackground );
if (optionHandler->UseCustomMenuColor()) if (optionHandler->UseCustomMenuColor())
w->setPaletteBackgroundColor(optionHandler->Color()); w->setPaletteBackgroundColor(optionHandler->Color());
else if (optionHandler->MenuColorButton()) else if (optionHandler->MenuColorButton())
@ -259,24 +259,24 @@ void LiquidStyle::polish( QWidget *w )
break; break;
case Stipples: case Stipples:
{ {
QColor c; TQColor c;
if (optionHandler->UseCustomMenuColor()) if (optionHandler->UseCustomMenuColor())
c = QColor( optionHandler->Color() ); c = TQColor( optionHandler->Color() );
else if (optionHandler->MenuColorButton()) else if (optionHandler->MenuColorButton())
c = QColor( optionHandler->buttonColor() ); c = TQColor( optionHandler->buttonColor() );
else else
c = QColor( originalBgColor ); c = TQColor( originalBgColor );
if (popupBack.isNull()) if (popupBack.isNull())
{ {
popupBack = QPixmap(64,64); popupBack = TQPixmap(64,64);
QPixmap *stipple = &popupBack; TQPixmap *stipple = &popupBack;
stipple->fill( c.rgb() ); stipple->fill( c.rgb() );
QPainter p; TQPainter p;
p.begin( stipple ); p.begin( stipple );
if (optionHandler->UseCustomMenuColor()) if (optionHandler->UseCustomMenuColor())
{ {
QColor c2 = QColor( optionHandler->Color2() ); TQColor c2 = TQColor( optionHandler->Color2() );
p.setPen(QColor((3*c.red()+c2.red())/4, p.setPen(TQColor((3*c.red()+c2.red())/4,
(3*c.green()+c2.green())/4, (3*c.green()+c2.green())/4,
(3*c.blue()+c2.blue())/4)); (3*c.blue()+c2.blue())/4));
for ( int i = 1; i < 64; i += 4 ) for ( int i = 1; i < 64; i += 4 )
@ -306,24 +306,24 @@ void LiquidStyle::polish( QWidget *w )
} }
p.end(); p.end();
} }
w->setBackgroundMode( QWidget::NoBackground ); w->setBackgroundMode( TQWidget::NoBackground );
break; break;
} }
case Gradient: case Gradient:
{ {
w->setBackgroundMode( QWidget::PaletteBackground ); w->setBackgroundMode( TQWidget::PaletteBackground );
KPixmap tmpPix = QPixmap(w->width(), 32); KPixmap tmpPix = TQPixmap(w->width(), 32);
w->setPaletteBackgroundPixmap(KPixmapEffect::unbalancedGradient(tmpPix, optionHandler->Color(), optionHandler->Color2(),KPixmapEffect::HorizontalGradient, 100, 100, 16)); w->setPaletteBackgroundPixmap(KPixmapEffect::unbalancedGradient(tmpPix, optionHandler->Color(), optionHandler->Color2(),KPixmapEffect::HorizontalGradient, 100, 100, 16));
w->installEventFilter( this ); w->installEventFilter( this );
break; break;
} }
default: default:
w->setBackgroundMode( QWidget::PaletteBackground ); w->setBackgroundMode( TQWidget::PaletteBackground );
break; break;
} }
//set popup menu opacity for them as they bypass the windowmanager //set popup menu opacity for them as they bypass the windowmanager
unsigned long opacity = optionHandler->MenuOpacity()/100.0*OPAQUE; 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; goto kstpolish;
} }
else else
@ -334,14 +334,14 @@ void LiquidStyle::polish( QWidget *w )
Atom actual; Atom actual;
int format, result; int format, result;
unsigned long n, left; 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 if (result != Success || data == None) // not found set design
{ {
int tmp = optionHandler->wmDesign != Tiger ? optionHandler->wmDesign : Panther; 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<QPopupMenu*>(w) || ::qt_cast<QMenuBar*>(w) || w->isDesktop() || ::qt_cast<QListBox*>(w) || w->inherits("QTipLabel") || w->inherits("AlphaWidget") || w->inherits("ScrollWidget") || w->inherits("PlayerWidget"))) if ((optionHandler->style() == Brushed) && !( ::tqt_cast<TQPopupMenu*>(w) || ::tqt_cast<TQMenuBar*>(w) || w->isDesktop() || ::tqt_cast<TQListBox*>(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 // install resize event filter, allowing us to update the b/m gradient on horizontal resizes. some widgets must be excluded though
{ {
if (!isKicker) if (!isKicker)
@ -353,8 +353,8 @@ void LiquidStyle::polish( QWidget *w )
if (w->inherits("KURLBar")/*ListBox*/) if (w->inherits("KURLBar")/*ListBox*/)
{ {
w->setPaletteBackgroundColor(qApp->palette().color(QPalette::Active, QColorGroup::Base)); w->setPaletteBackgroundColor(tqApp->palette().color(TQPalette::Active, TQColorGroup::Base));
// ((QListBox*)w)->viewport()->setPaletteBackgroundColor(qApp->palette().color(QPalette::Active, QColorGroup::Base)); // ((TQListBox*)w)->viewport()->setPaletteBackgroundColor(tqApp->palette().color(TQPalette::Active, TQColorGroup::Base));
goto kstpolish; goto kstpolish;
} }
@ -379,138 +379,138 @@ void LiquidStyle::polish( QWidget *w )
if (qstrcmp( w->name(), "kde toolbar widget" ) == 0 ) if (qstrcmp( w->name(), "kde toolbar widget" ) == 0 )
w->installEventFilter( this ); w->installEventFilter( this );
if (::qt_cast<QButton*>(w)) if (::tqt_cast<TQButton*>(w))
{ {
w->setBackgroundOrigin(QWidget::WindowOrigin); w->setBackgroundOrigin(TQWidget::WindowOrigin);
if (::qt_cast<QPushButton*>(w)) if (::tqt_cast<TQPushButton*>(w))
{ {
if (w->inherits("KKeyButton")) if (w->inherits("KKeyButton"))
{ {
w->setBackgroundMode( QWidget::PaletteBackground); w->setBackgroundMode( TQWidget::PaletteBackground);
QPalette pal( w->palette() ); TQPalette pal( w->palette() );
pal.setBrush( QColorGroup::Background, qApp->palette().active().background() ); pal.setBrush( TQColorGroup::Background, tqApp->palette().active().background() );
w->setPalette( pal ); w->setPalette( pal );
} }
else if (w->inherits("KCalcButton")) else if (w->inherits("KCalcButton"))
{ {
w->setBackgroundMode( QWidget::PaletteBackground); w->setBackgroundMode( TQWidget::PaletteBackground);
QPalette pal( w->palette() ); TQPalette pal( w->palette() );
pal.setBrush( QColorGroup::Background, qApp->palette().brush(QPalette::Active, QColorGroup::Background)); pal.setBrush( TQColorGroup::Background, tqApp->palette().brush(TQPalette::Active, TQColorGroup::Background));
w->setPalette( pal ); w->setPalette( pal );
} }
else else
#if !KDE_IS_VERSION(3,4,3) #if !KDE_IS_VERSION(3,4,3)
if (!(w->parent() && w->parent()->inherits("MiniBar"))) if (!(w->parent() && w->parent()->inherits("MiniBar")))
#endif #endif
w->setBackgroundMode( QWidget::NoBackground); w->setBackgroundMode( TQWidget::NoBackground);
w->installEventFilter( this ); w->installEventFilter( this );
goto kstpolish; 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 ); w->installEventFilter( this );
goto kstpolish; goto kstpolish;
} }
} }
if ( ::qt_cast<QToolBar*>(w)) if ( ::tqt_cast<TQToolBar*>(w))
{ {
if (optionHandler->useToolButtonFrame() && w->inherits("KToolBar")) if (optionHandler->useToolButtonFrame() && w->inherits("KToolBar"))
((QToolBar*)w)->boxLayout()->setSpacing( 0 ); ((TQToolBar*)w)->boxLayout()->setSpacing( 0 );
((QToolBar*)w)->setMargin( 4 ); ((TQToolBar*)w)->setMargin( 4 );
w->setBackgroundMode(PaletteBackground); w->setBackgroundMode(PaletteBackground);
w->setBackgroundOrigin(QWidget::WindowOrigin); w->setBackgroundOrigin(TQWidget::WindowOrigin);
if (optionHandler->style() > Panther) if (optionHandler->style() > Panther)
{ {
w->installEventFilter( this ); w->installEventFilter( this );
if (optionHandler->wmDesign == Tiger) 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 ; goto kstpolish ;
} }
//if (testWidget) qWarning("testwidget stage %d",testInt++); //if (testWidget) tqWarning("testwidget stage %d",testInt++);
if (tmpBool = ::qt_cast<QToolButton*>(w) || w->inherits( "QToolBarSeparator" ) || w->inherits( "KToolBarSeparator" ) ) if (tmpBool = ::tqt_cast<TQToolButton*>(w) || w->inherits( "TQToolBarSeparator" ) || w->inherits( "KToolBarSeparator" ) )
{ {
if (tmpBool && w->parentWidget() && ::qt_cast<QToolBar*>(w->parentWidget()) ) if (tmpBool && w->parentWidget() && ::tqt_cast<TQToolBar*>(w->parentWidget()) )
{ {
w->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); w->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
} }
w->setBackgroundMode( QWidget::PaletteBackground ); w->setBackgroundMode( TQWidget::PaletteBackground );
w->setBackgroundOrigin(QWidget::WindowOrigin); w->setBackgroundOrigin(TQWidget::WindowOrigin);
w->installEventFilter( this ); w->installEventFilter( this );
goto kstpolish; goto kstpolish;
} }
if (::qt_cast<QComboBox*>(w)) if (::tqt_cast<TQComboBox*>(w))
{ {
w->setBackgroundMode(NoBackground); w->setBackgroundMode(NoBackground);
w->installEventFilter( this ); w->installEventFilter( this );
w->setBackgroundOrigin(QWidget::WindowOrigin); w->setBackgroundOrigin(TQWidget::WindowOrigin);
goto kstpolish; goto kstpolish;
} }
if (w->inherits("TaskBar")) if (w->inherits("TaskBar"))
{ {
w->setBackgroundOrigin(QWidget::WidgetOrigin); w->setBackgroundOrigin(TQWidget::WidgetOrigin);
goto kstpolish; goto kstpolish;
} }
if (w->inherits("QSpinWidget") || w->inherits("KDockWidgetAbstractHeaderDrag")){ if (w->inherits("TQSpinWidget") || w->inherits("KDockWidgetAbstractHeaderDrag")){
w->installEventFilter( this ); w->installEventFilter( this );
goto kstpolish; 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 // 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... // original liquid did this on khtml, too (at speed loss) so we'll see, if we get errors from this...
QPalette pal( w->palette() ); TQPalette pal( w->palette() );
pal.setBrush( QColorGroup::Background, pal.active().background() ); pal.setBrush( TQColorGroup::Background, pal.active().background() );
w->setPalette( pal ); w->setPalette( pal );
} }
if (::qt_cast<QSlider*>(w)) if (::tqt_cast<TQSlider*>(w))
{ {
//avoid flicker //avoid flicker
w->setBackgroundMode( QWidget::NoBackground ); w->setBackgroundMode( TQWidget::NoBackground );
goto kstpolish; goto kstpolish;
} }
if ((::qt_cast<QScrollView*>(w) || w->inherits("KateView") || w->inherits("TEWidget") || w->inherits("CHexViewWidget")) && !(w->isA("KOAgenda"))) if ((::tqt_cast<TQScrollView*>(w) || w->inherits("KateView") || w->inherits("TEWidget") || w->inherits("CHexViewWidget")) && !(w->isA("KOAgenda")))
{ {
if (::qt_cast<KListView*>(w) && optionHandler->custCols[7] != -1 && ((KListView*)w)->alternateBackground() == KGlobalSettings::alternateBackgroundColor()) if (::tqt_cast<KListView*>(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 _FORCE_SCROLLBARS_
if (::qt_cast<QScrollView*>(w) && !w->inherits( "KActiveLabel" )) if (::tqt_cast<TQScrollView*>(w) && !w->inherits( "KActiveLabel" ))
{ {
((QScrollView*)w)->setVScrollBarMode(QScrollView::AlwaysOn); ((TQScrollView*)w)->setVScrollBarMode(TQScrollView::AlwaysOn);
} }
#endif #endif
if (::qt_cast<QListBox*>(w) && w->isTopLevel()) if (::tqt_cast<TQListBox*>(w) && w->isTopLevel())
//set opacity for them as they bypass the windowmanager //set opacity for them as they bypass the windowmanager
{ {
uint opacity = 0.8*OPAQUE; 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 #if 0
// doesn't work properly - best would be to have the items drawn via style() // 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) if (height > 0)
{ {
QPalette pal = w->palette(); TQPalette pal = w->palette();
QColor c(pal.active().highlight()); TQColor c(pal.active().highlight());
QColor c2(c.light(140)); TQColor c2(c.light(140));
KPixmap pix = QPixmap(48,height); KPixmap pix = TQPixmap(48,height);
KPixmapEffect::gradient(pix,c2,c,KPixmapEffect::VerticalGradient,0); KPixmapEffect::gradient(pix,c2,c,KPixmapEffect::VerticalGradient,0);
QBrush brush(c, pix); TQBrush brush(c, pix);
pal.setBrush(QColorGroup::Highlight, brush); pal.setBrush(TQColorGroup::Highlight, brush);
w->setPalette(pal); w->setPalette(pal);
} }
#endif #endif
@ -520,20 +520,20 @@ void LiquidStyle::polish( QWidget *w )
goto kstpolish; goto kstpolish;
} }
if (w->inherits("QStatusBar")) if (w->inherits("TQStatusBar"))
{ {
w->setBackgroundOrigin(QWidget::WindowOrigin); w->setBackgroundOrigin(TQWidget::WindowOrigin);
if ( qstrcmp( w->name(), "KonquerorFrameStatusBar" ) == 0 ) 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 ); w->installEventFilter( this );
} }
goto kstpolish; 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 ); w->installEventFilter( this );
goto kstpolish; goto kstpolish;
} }
@ -545,10 +545,10 @@ void LiquidStyle::polish( QWidget *w )
} }
if (w->inherits( "KickerTip" )) 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->setPaletteBackgroundColor(tqApp->palette().color(TQPalette::Active, TQColorGroup::Button));
w->setBackgroundMode( QWidget::NoBackground ); w->setBackgroundMode( TQWidget::NoBackground );
goto kstpolish; goto kstpolish;
} }
@ -556,7 +556,7 @@ void LiquidStyle::polish( QWidget *w )
{ {
if ( !isViewport && w->parent() && qstrcmp( w->parent() ->name(), "proxyview" ) == 0 ) if ( !isViewport && w->parent() && qstrcmp( w->parent() ->name(), "proxyview" ) == 0 )
{ {
w->setBackgroundOrigin( QWidget::WindowOrigin ); w->setBackgroundOrigin( TQWidget::WindowOrigin );
goto kstpolish ; goto kstpolish ;
} }
@ -564,22 +564,22 @@ void LiquidStyle::polish( QWidget *w )
goto kstpolish ; goto kstpolish ;
if ( !isKicker&& !isViewport && !isViewportChild && !w->testWFlags( WType_Popup ) && !w->inherits( "KDesktop" ) && !w->inherits( "PasswordDlg" )) 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<QPushButton*>(w) || ::qt_cast<QComboBox*>(w)) goto kstpolish; if ( ::tqt_cast<TQPushButton*>(w) || ::tqt_cast<TQComboBox*>(w)) goto kstpolish;
if ( ::qt_cast<QMenuBar*>(w)) if ( ::tqt_cast<TQMenuBar*>(w))
{ {
// if (optionHandler->SupportAppleBar() && w->isTopLevel()){ // if (optionHandler->SupportAppleBar() && w->isTopLevel()){
// // QPalette pal(w->palette()); // // TQPalette pal(w->palette());
// qWarning("resetting erase pixmap"); // tqWarning("resetting erase pixmap");
// QColor c( w->palette().active().background() ); // TQColor c( w->palette().active().background() );
// QPixmap stipple( 64, 64 ); // TQPixmap stipple( 64, 64 );
// stipple.fill( c.rgb() ); // stipple.fill( c.rgb() );
// QPainter p; // TQPainter p;
// p.begin( &stipple ); // p.begin( &stipple );
// p.setPen( c.dark( 100 + (int)(optionHandler->stippleContrast()/2) ) ); // p.setPen( c.dark( 100 + (int)(optionHandler->stippleContrast()/2) ) );
// for (int i = 1; i < 64; i += 4 ) { // for (int i = 1; i < 64; i += 4 ) {
@ -591,23 +591,23 @@ void LiquidStyle::polish( QWidget *w )
// p.drawLine( 0, i, 63, i ); // p.drawLine( 0, i, 63, i );
// } // }
// p.end(); // p.end();
// // QBrush brush( c, stipple ); // // TQBrush brush( c, stipple );
// // pal.setBrush( QColorGroup::Background, brush ); // // pal.setBrush( TQColorGroup::Background, brush );
// // w->setPalette( pal ); // // w->setPalette( pal );
// w->setErasePixmap(stipple); // w->setErasePixmap(stipple);
// } // }
w->setBackgroundMode( QWidget::PaletteBackground ); w->setBackgroundMode( TQWidget::PaletteBackground );
if (optionHandler->UseCustomMenuColor()) if (optionHandler->UseCustomMenuColor())
{ {
QPalette pal( w->palette() ); TQPalette pal( w->palette() );
pal.setBrush( QColorGroup::Highlight, optionHandler->menuColorHigh() ); pal.setBrush( TQColorGroup::Highlight, optionHandler->menuColorHigh() );
pal.setBrush( QColorGroup::HighlightedText, optionHandler->textColorHigh() ); pal.setBrush( TQColorGroup::HighlightedText, optionHandler->textColorHigh() );
w->setPalette( pal ); w->setPalette( pal );
} }
w->setBackgroundOrigin(QWidget::WindowOrigin); w->setBackgroundOrigin(TQWidget::WindowOrigin);
w->installEventFilter( this ); w->installEventFilter( this );
#if 0 #if 0
if (!::qt_cast<KMenuBar*>(w)) if (!::tqt_cast<KMenuBar*>(w))
{ {
bool bold = w->font().bold(); bool bold = w->font().bold();
bool italic = w->font().italic(); bool italic = w->font().italic();
@ -615,142 +615,142 @@ void LiquidStyle::polish( QWidget *w )
bool overline = w->font().overline(); bool overline = w->font().overline();
w->setFont(KGlobalSettings::menuFont()); w->setFont(KGlobalSettings::menuFont());
if (bold) if (bold)
(const_cast<QFont*>(&w->font()))->setBold(true); (const_cast<TQFont*>(&w->font()))->setBold(true);
if (italic) if (italic)
(const_cast<QFont*>(&w->font()))->setItalic(true); (const_cast<TQFont*>(&w->font()))->setItalic(true);
if (underline) if (underline)
(const_cast<QFont*>(&w->font()))->setUnderline(true); (const_cast<TQFont*>(&w->font()))->setUnderline(true);
if (overline) if (overline)
(const_cast<QFont*>(&w->font()))->setOverline(true); (const_cast<TQFont*>(&w->font()))->setOverline(true);
} }
#endif #endif
goto kstpolish ; goto kstpolish ;
} }
if (::qt_cast<QFrame*>(w)) if (::tqt_cast<TQFrame*>(w))
{ {
w->setBackgroundOrigin(QWidget::WindowOrigin); w->setBackgroundOrigin(TQWidget::WindowOrigin);
if ( ::qt_cast<QLabel*>(w)) if ( ::tqt_cast<TQLabel*>(w))
{ {
if (w->parentWidget() && w->parentWidget()->inherits("Kontact::Splash")) if (w->parentWidget() && w->parentWidget()->inherits("Kontact::Splash"))
goto kstpolish; 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->setPalette( tooltipPalette );
w->setBackgroundOrigin(QWidget::WidgetOrigin); w->setBackgroundOrigin(TQWidget::WidgetOrigin);
w->installEventFilter( this ); w->installEventFilter( this );
} }
} }
if (qstrcmp( w->name(), "backdrop" ) == 0) //kscd if (qstrcmp( w->name(), "backdrop" ) == 0) //kscd
{ {
((QFrame *)w)->setFrameShape(QFrame::LineEditPanel); ((TQFrame *)w)->setFrameShape(TQFrame::LineEditPanel);
((QFrame *)w)->setFrameShadow(QFrame::Sunken); ((TQFrame *)w)->setFrameShadow(TQFrame::Sunken);
goto kstpolish; goto kstpolish;
} }
if (w->inherits( "KWinInternal::TabBox" )) if (w->inherits( "KWinInternal::TabBox" ))
{ {
uint opacity = 0.8*OPAQUE; 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; goto kstpolish;
} }
else if (w->inherits( "KAnimWidget" )) 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! w->installEventFilter( this ); // the widget resets it's frameshape on mouseevents - looks crap!
goto kstpolish ; goto kstpolish ;
} }
else if (((QFrame *)w)->frameShape() >= QFrame::Box && ((QFrame *)w)->frameShape() <= QFrame::WinPanel){ else if (((TQFrame *)w)->frameShape() >= TQFrame::Box && ((TQFrame *)w)->frameShape() <= TQFrame::WinPanel){
((QFrame *)w)->setFrameShape(QFrame::StyledPanel); ((TQFrame *)w)->setFrameShape(TQFrame::StyledPanel);
goto kstpolish ; goto kstpolish ;
} }
} }
//if (testWidget) qWarning("testwidget stage %d",testInt++); //if (testWidget) tqWarning("testwidget stage %d",testInt++);
if ( w->parentWidget() && ( ( ::qt_cast<QListBox*>(w) && ::qt_cast<QPushButton*>(w->parentWidget())) || w->inherits( "KCompletionBox" ) ) ) { if ( w->parentWidget() && ( ( ::tqt_cast<TQListBox*>(w) && ::tqt_cast<TQPushButton*>(w->parentWidget())) || w->inherits( "KCompletionBox" ) ) ) {
QListBox* listbox = (QListBox*) w; TQListBox* listbox = (TQListBox*) w;
listbox->setBackgroundMode( NoBackground ); listbox->setBackgroundMode( NoBackground );
w->installEventFilter( this ); w->installEventFilter( this );
goto kstpolish; goto kstpolish;
} }
//if (testWidget) qWarning("testwidget stage %d",testInt++); //if (testWidget) tqWarning("testwidget stage %d",testInt++);
if (::qt_cast<QHeader*>(w)){ if (::tqt_cast<TQHeader*>(w)){
// if (::qt_cast<QListView*>(w->parentWidget())) // if (::tqt_cast<TQListView*>(w->parentWidget()))
// headerSortID = ((QListView*)w->parentWidget())->sortColumn(); // headerSortID = ((TQListView*)w->parentWidget())->sortColumn();
// if (w->parentWidget()) qWarning(w->parentWidget()->className()); // if (w->parentWidget()) tqWarning(w->parentWidget()->className());
w->setBackgroundMode( NoBackground ); w->setBackgroundMode( NoBackground );
w->installEventFilter( this ); w->installEventFilter( this );
goto kstpolish; goto kstpolish;
} }
//if (testWidget) qWarning("testwidget stage %d",testInt++); //if (testWidget) tqWarning("testwidget stage %d",testInt++);
if (::qt_cast<QTabBar*>(w)){ if (::tqt_cast<TQTabBar*>(w)){
// qWarning("installing tab event"); // tqWarning("installing tab event");
w->setMouseTracking( true ); w->setMouseTracking( true );
w->installEventFilter( this ); w->installEventFilter( this );
w->setBackgroundOrigin(QWidget::WindowOrigin); w->setBackgroundOrigin(TQWidget::WindowOrigin);
goto kstpolish; goto kstpolish;
} }
if (::qt_cast<QGroupBox*>(w) && ((QGroupBox*)w)->frameShape() == QFrame::GroupBoxPanel && !((QGroupBox*)w)->isFlat()) if (::tqt_cast<TQGroupBox*>(w) && ((TQGroupBox*)w)->frameShape() == TQFrame::GroupBoxPanel && !((TQGroupBox*)w)->isFlat())
{ {
if ( optionHandler->drawGroupBoxShadow() ) if ( optionHandler->drawGroupBoxShadow() )
{ {
w->setPaletteBackgroundPixmap ( *groupShadow ); w->setPaletteBackgroundPixmap ( *groupShadow );
if (((QGroupBox*)w)->isCheckable()) if (((TQGroupBox*)w)->isCheckable())
{ {
QWidget *cb = (QWidget*)w->child("qt_groupbox_checkbox",0,false); TQWidget *cb = (TQWidget*)w->child("qt_groupbox_checkbox",0,false);
cb->setPalette(w->parentWidget() ? w->parentWidget()->palette() : qApp->palette()); cb->setPalette(w->parentWidget() ? w->parentWidget()->palette() : tqApp->palette());
QFont font( cb->font() ); TQFont font( cb->font() );
font.setBold( true ); font.setBold( true );
cb->setFont( font ); cb->setFont( font );
} }
} }
w->setBackgroundOrigin(QWidget::WindowOrigin); w->setBackgroundOrigin(TQWidget::WindowOrigin);
w->installEventFilter(this); 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->setBackgroundMode( NoBackground );
w->installEventFilter(this); w->installEventFilter(this);
connect(w, SIGNAL(destroyed(QObject*)), this, SLOT(progressBarDestroyed(QObject*))); connect(w, SIGNAL(destroyed(TQObject*)), this, SLOT(progressBarDestroyed(TQObject*)));
goto kstpolish; goto kstpolish;
} }
if ( w->inherits( "QDockWindow" ) ) { if ( w->inherits( "TQDockWindow" ) ) {
w->setBackgroundMode( QWidget::PaletteBackground ); w->setBackgroundMode( TQWidget::PaletteBackground );
w->setBackgroundOrigin(QWidget::WindowOrigin); w->setBackgroundOrigin(TQWidget::WindowOrigin);
w->installEventFilter( this ); w->installEventFilter( this );
goto kstpolish ; goto kstpolish ;
} }
if ( ::qt_cast<QScrollBar*>(w)) { if ( ::tqt_cast<TQScrollBar*>(w)) {
QCursor tmpCursor(Qt::PointingHandCursor); TQCursor tmpCursor(TQt::PointingHandCursor);
w->setCursor(tmpCursor); w->setCursor(tmpCursor);
w->installEventFilter( this ); w->installEventFilter( this );
w->setBackgroundMode( QWidget::NoBackground ); w->setBackgroundMode( TQWidget::NoBackground );
goto kstpolish ; goto kstpolish ;
} }
if ( w->inherits( "KdetvView")) { 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 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 isViewport;
bool isViewportChild; bool isViewportChild;
@ -763,20 +763,20 @@ void LiquidStyle::unPolish( QWidget *w ) {
goto kstunpolish; goto kstunpolish;
} }
if ( w->inherits("QToolBar") || qstrcmp( w->name(), "kde toolbar widget" ) == 0 ) { if ( w->inherits("TQToolBar") || qstrcmp( w->name(), "kde toolbar widget" ) == 0 ) {
w->setBackgroundOrigin( QWidget::WidgetOrigin ); w->setBackgroundOrigin( TQWidget::WidgetOrigin );
// w->unsetPalette(); // w->unsetPalette();
goto kstunpolish; goto kstunpolish;
} }
if ( w->inherits( "QPopupMenu" ) ) { if ( w->inherits( "TQPopupMenu" ) ) {
w->unsetPalette(); w->unsetPalette();
w->setBackgroundMode( QWidget::PaletteButton ); w->setBackgroundMode( TQWidget::PaletteButton );
w->removeEventFilter( this ); 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; goto kstunpolish;
} }
if (::qt_cast<QListBox*>(w) && w->isTopLevel()){ if (::tqt_cast<TQListBox*>(w) && w->isTopLevel()){
XDeleteProperty (qt_xdisplay(), w->winId(), XInternAtom(qt_xdisplay(), OPACITY, False)); XDeleteProperty (tqt_xdisplay(), w->winId(), XInternAtom(tqt_xdisplay(), OPACITY, False));
goto kstunpolish; goto kstunpolish;
} }
if ( !isPlain () && w->inherits( "KonqIconViewWidget" ) || if ( !isPlain () && w->inherits( "KonqIconViewWidget" ) ||
@ -789,11 +789,11 @@ void LiquidStyle::unPolish( QWidget *w ) {
goto kstunpolish; goto kstunpolish;
} }
if (w->isA( "QViewportWidget" ) || w->inherits( "QClipperWidget" ) ) if (w->isA( "TQViewportWidget" ) || w->inherits( "TQClipperWidget" ) )
goto kstunpolish; goto kstunpolish;
if ( !isPlain() ) { if ( !isPlain() ) {
if ( w->inherits( "KActiveLabel" ) || w->inherits( "QTipLabel" ) ) { if ( w->inherits( "KActiveLabel" ) || w->inherits( "TQTipLabel" ) ) {
w->unsetPalette(); w->unsetPalette();
goto kstunpolish; goto kstunpolish;
} }
@ -803,18 +803,18 @@ void LiquidStyle::unPolish( QWidget *w ) {
return; return;
}*/ }*/
} }
else if ( w->inherits( "QMenuBar" ) ) { else if ( w->inherits( "TQMenuBar" ) ) {
w->setBackgroundMode( QWidget::PaletteButton ); w->setBackgroundMode( TQWidget::PaletteButton );
if ( !isPlain() ) if ( !isPlain() )
w->setBackgroundOrigin( QWidget::WidgetOrigin ); w->setBackgroundOrigin( TQWidget::WidgetOrigin );
goto kstunpolish; goto kstunpolish;
}else if ( w->inherits( "QDockWindow" ) ) { }else if ( w->inherits( "TQDockWindow" ) ) {
w->setBackgroundMode( QWidget::PaletteButton ); w->setBackgroundMode( TQWidget::PaletteButton );
if ( !isPlain() ) if ( !isPlain() )
w->setBackgroundOrigin( QWidget::WidgetOrigin ); w->setBackgroundOrigin( TQWidget::WidgetOrigin );
goto kstunpolish; goto kstunpolish;
} else if ( w->inherits( "QComboBox" ) || w->inherits( "QPushButton" ) ) { } else if ( w->inherits( "TQComboBox" ) || w->inherits( "TQPushButton" ) ) {
if (w->inherits( "QPushButton" )) if (w->inherits( "TQPushButton" ))
{ {
ButtonFadeInfo *bfi_ = bfi[w->winId()]; ButtonFadeInfo *bfi_ = bfi[w->winId()];
if (bfi_){ if (bfi_){
@ -824,20 +824,20 @@ void LiquidStyle::unPolish( QWidget *w ) {
bfi.remove(w->winId()); bfi.remove(w->winId());
} }
} }
w->setBackgroundMode( QWidget::PaletteButton ); w->setBackgroundMode( TQWidget::PaletteButton );
} else if ( w->inherits( "QScrollBar" ) ) { } else if ( w->inherits( "TQScrollBar" ) ) {
// if (!w->isEnabled()) w->setEnabled(true); // if (!w->isEnabled()) w->setEnabled(true);
w->setBackgroundMode( QWidget::PaletteBackground ); w->setBackgroundMode( TQWidget::PaletteBackground );
goto kstunpolish; goto kstunpolish;
} else if ( w->inherits( "QHeader" ) ) { } else if ( w->inherits( "TQHeader" ) ) {
w->setMouseTracking( false ); w->setMouseTracking( false );
} }
if ( w->inherits( "QToolButton" ) ) { if ( w->inherits( "TQToolButton" ) ) {
// w->unsetPalette(); // w->unsetPalette();
w->setBackgroundMode( QWidget::PaletteButton ); w->setBackgroundMode( TQWidget::PaletteButton );
if ( !isPlain() ) if ( !isPlain() )
w->setBackgroundOrigin( QWidget::WidgetOrigin ); w->setBackgroundOrigin( TQWidget::WidgetOrigin );
goto kstunpolish; goto kstunpolish;
} }
@ -848,9 +848,9 @@ void LiquidStyle::unPolish( QWidget *w ) {
( qstrcmp( w->parent() ->name(), "qt_clipped_viewport" ) == 0 ) ); ( qstrcmp( w->parent() ->name(), "qt_clipped_viewport" ) == 0 ) );
if ( isViewportChild ) { 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 ) ) { if ( isHTMLWidget( w ) ) {
w->setBackgroundMode( QWidget::PaletteBackground ); w->setBackgroundMode( TQWidget::PaletteBackground );
goto kstunpolish; goto kstunpolish;
} }
} }
@ -858,10 +858,10 @@ void LiquidStyle::unPolish( QWidget *w ) {
if ( !isPlain() ) { if ( !isPlain() ) {
if ( !isViewport && w->parent() && qstrcmp( w->parent() ->name(), "proxyview" ) == 0 ) { if ( !isViewport && w->parent() && qstrcmp( w->parent() ->name(), "proxyview" ) == 0 ) {
w->setBackgroundOrigin( QWidget::WidgetOrigin ); w->setBackgroundOrigin( TQWidget::WidgetOrigin );
goto kstunpolish; goto kstunpolish;
} }
if ( w->ownPalette() && !w->inherits( "QButton" ) && !w->inherits( "QComboBox" ) ) if ( w->ownPalette() && !w->inherits( "TQButton" ) && !w->inherits( "TQComboBox" ) )
goto kstunpolish; goto kstunpolish;
if ( w->inherits( "PanelButtonBase" ) ) if ( w->inherits( "PanelButtonBase" ) )
goto kstunpolish; goto kstunpolish;
@ -869,8 +869,8 @@ void LiquidStyle::unPolish( QWidget *w ) {
if ( !isViewport && !isViewportChild && !w->testWFlags( WType_Popup ) && if ( !isViewport && !isViewportChild && !w->testWFlags( WType_Popup ) &&
!w->inherits( "KDesktop" ) && !w->inherits( "PasswordDlg" ) ) { !w->inherits( "KDesktop" ) && !w->inherits( "PasswordDlg" ) ) {
if ( w->backgroundOrigin() == QWidget::WindowOrigin ) if ( w->backgroundOrigin() == TQWidget::WindowOrigin )
w->setBackgroundOrigin( QWidget::WidgetOrigin ); w->setBackgroundOrigin( TQWidget::WidgetOrigin );
goto kstunpolish; goto kstunpolish;
} }
} }

@ -1,14 +1,14 @@
#include "baghira.h" #include "baghira.h"
#include <qbitmap.h> #include <tqbitmap.h>
#include <qimage.h> #include <tqimage.h>
#include <qcolor.h> #include <tqcolor.h>
#include <qpalette.h> #include <tqpalette.h>
#include <qrect.h> #include <tqrect.h>
#include <qpoint.h> #include <tqpoint.h>
#include <qapplication.h> #include <tqapplication.h>
#include <qpainter.h> #include <tqpainter.h>
#include <qpen.h> #include <tqpen.h>
//#include <kwordwrap.h> //#include <kwordwrap.h>
@ -33,7 +33,7 @@
A1 = CLAMP(A1 + A2,0,255); A1 = CLAMP(A1 + A2,0,255);
#define DELTA_COLOR(D,R,G,B) \ #define DELTA_COLOR(D,R,G,B) \
delta = (255 - qRed(D))/2; \ delta = (255 - tqRed(D))/2; \
destR = R - delta; \ destR = R - delta; \
destG = G - delta; \ destG = G - delta; \
destB = B - delta; destB = B - delta;
@ -83,42 +83,42 @@
if ( B < 0 ) B = 0; else if ( B > 255 ) B = 255; if ( B < 0 ) B = 0; else if ( B > 255 ) B = 255;
#ifndef PRINTDEVICE #ifndef PRINTDEVICE
#define PRINTDEVICE(_p_) qWarning("device is %s", (_p_->device()->devType() == QInternal::Widget) ?\ #define PRINTDEVICE(_p_) tqWarning("device is %s", (_p_->device()->devType() == TQInternal::Widget) ?\
"Widget": (_p_->device()->devType() == QInternal::Pixmap) ?\ "Widget": (_p_->device()->devType() == TQInternal::Pixmap) ?\
"Pixmap": (_p_->device()->devType() == QInternal::Printer) ?\ "Pixmap": (_p_->device()->devType() == TQInternal::Printer) ?\
"Printer": (_p_->device()->devType() == QInternal::Picture) ?\ "Printer": (_p_->device()->devType() == TQInternal::Picture) ?\
"Picture": (_p_->device()->devType() == QInternal::UndefinedDevice) ?\ "Picture": (_p_->device()->devType() == TQInternal::UndefinedDevice) ?\
"UndefinedDevice": "fuckdevice!" ); "UndefinedDevice": "fuckdevice!" );
#endif #endif
int LiquidStyle::getBrightness(unsigned int rgb) const { int LiquidStyle::getBrightness(unsigned int rgb) const {
int red = qRed( rgb ); int red = tqRed( rgb );
int green = qGreen( rgb ); int green = tqGreen( rgb );
int blue = qBlue( rgb ); int blue = tqBlue( rgb );
int V = red; int V = red;
if (green > V) V = green; if (green > V) V = green;
if (blue > V) V = blue; if (blue > V) V = blue;
return V; 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 ); pix->convertFromImage( *tmp );
delete tmp; delete tmp;
return ( pix ); 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 ) if ( img.depth() != 32 )
img = img.convertDepth( 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 ); dest->setAlphaBuffer( true );
unsigned int *data = ( unsigned int * ) img.bits(); unsigned int *data = ( unsigned int * ) img.bits();
unsigned int *destData = ( unsigned int* ) dest->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 ) for ( current = 0 ; current < total ; ++current )
{ {
alpha = qAlpha( data[ current ] ); alpha = tqAlpha( data[ current ] );
if (alpha) if (alpha)
{ {
if (optionHandler->IcyButtons()) if (optionHandler->IcyButtons())
{ {
red = qRed( data[ current ] ); red = tqRed( data[ current ] );
green = qGreen( data[ current ] ); green = tqGreen( data[ current ] );
blue = qBlue( data[ current ] ); blue = tqBlue( data[ current ] );
SATURATION_COLOR(red, green, blue); SATURATION_COLOR(red, green, blue);
} }
else else
@ -177,22 +177,22 @@ ButtonTile* LiquidStyle::createRoundFrameTile(QImage &img, const QColor &color,
#endif #endif
// force back to valid colorspace ! // force back to valid colorspace !
COLOR_SPACE(destR, destG, destB); 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; destPix = *dest;
ButtonTile *ret = separateTiles( &destPix, 11, 10, 6, 1, 0, false); ButtonTile *ret = separateTiles( &destPix, 11, 10, 6, 1, 0, false);
delete dest; delete dest;
return ret; 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 ) if ( img.depth() != 32 )
img = img.convertDepth( 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 ); dest->setAlphaBuffer( true );
unsigned int *data = ( unsigned int * ) img.bits(); unsigned int *data = ( unsigned int * ) img.bits();
unsigned int *destData = ( unsigned int* ) dest->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; // float srcPercent, destPercent;
for ( current = 0 ; current < total ; ++current ) for ( current = 0 ; current < total ; ++current )
{ {
alpha = qAlpha( data[ current ] ); alpha = tqAlpha( data[ current ] );
if (optionHandler->IcyButtons()) if (optionHandler->IcyButtons())
{ {
red = qRed( data[ current ] ); red = tqRed( data[ current ] );
green = qGreen( data[ current ] ); green = tqGreen( data[ current ] );
blue = qBlue( data[ current ] ); blue = tqBlue( data[ current ] );
SATURATION_COLOR2(sq, red, green, blue); SATURATION_COLOR2(sq, red, green, blue);
} }
else else
@ -237,16 +237,16 @@ QImage* LiquidStyle::adjustHSVImage( QImage &img, const QColor &c, const QColor
} }
// force back to valid colorspace ! // force back to valid colorspace !
COLOR_SPACE(destR, destG, destB); COLOR_SPACE(destR, destG, destB);
destData[ current ] = qRgba( destR, destG, destB, alpha ); destData[ current ] = tqRgba( destR, destG, destB, alpha );
} }
return ( dest ); 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 ) // if ( img.depth() != 32 )
// img = img.convertDepth( 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 *data = ( unsigned int * ) img.bits();
unsigned int *destData = ( unsigned int* ) dest->bits(); unsigned int *destData = ( unsigned int* ) dest->bits();
int total = img.width() * img.height(); int total = img.width() * img.height();
@ -262,19 +262,19 @@ QImage* LiquidStyle::tintBrush( const QImage &img, const QColor &c ) const
// float srcPercent, destPercent; // float srcPercent, destPercent;
for ( current = 0 ; current < total ; ++current ) for ( current = 0 ; current < total ; ++current )
{ {
alpha = qAlpha( data[ current ] ); alpha = tqAlpha( data[ current ] );
blue = qBlue( data[ current ] ); blue = tqBlue( data[ current ] );
red = qRed( data[ current ] ); red = tqRed( data[ current ] );
green = qGreen( data[ current ] ); green = tqGreen( data[ current ] );
SATURATION_COLOR(red, green, blue); SATURATION_COLOR(red, green, blue);
// force back to valid colorspace ! // force back to valid colorspace !
COLOR_SPACE(destR, destG, destB); COLOR_SPACE(destR, destG, destB);
destData[ current ] = qRgba( destR, destG, destB, alpha ); destData[ current ] = tqRgba( destR, destG, destB, alpha );
} }
return ( dest ); return ( dest );
} }
QColor LiquidStyle::brushedMetalColor(QColor &c) const TQColor LiquidStyle::brushedMetalColor(TQColor &c) const
{ {
if (optionHandler->TintBrush()) if (optionHandler->TintBrush())
{ {
@ -284,21 +284,21 @@ QColor LiquidStyle::brushedMetalColor(QColor &c) const
int destR, destG, destB, grey, iGrey, delta; int destR, destG, destB, grey, iGrey, delta;
SATURATION_COLOR(180, 180, 180); SATURATION_COLOR(180, 180, 180);
COLOR_SPACE(destR, destG, destB); COLOR_SPACE(destR, destG, destB);
return QColor(destR, destG, destB); return TQColor(destR, destG, destB);
} }
else 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 x, y;
int w = img.width(); int w = img.width();
int h = img.height(); int h = img.height();
unsigned int pixel = qRgba( 0, 0, 0, 0 ); unsigned int pixel = tqRgba( 0, 0, 0, 0 );
unsigned int *data; unsigned int *data;
for ( y = 0 ; y < h ; ++y ) for ( y = 0 ; y < h ; ++y )
@ -306,10 +306,10 @@ void LiquidStyle::clearImage( QImage &img ) const
// img.fill( pixel ); // 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(); TQImage img = pix.convertToImage();
QPixmap *result = adjustHSV( img, c); TQPixmap *result = adjustHSV( img, c);
pix = *result; pix = *result;
delete 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. 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. centerW (centerH) is the width (height) of the central button fraction.
shadowH is the height of the buttons shadow*/ shadowH is the height of the buttons shadow*/
ButtonTile* LiquidStyle::createButtonTile( const QColor &c, ButtonTile* LiquidStyle::createButtonTile( const TQColor &c,
const QColor &bgColor, const TQColor &bgColor,
QImage *buttonImage, TQImage *buttonImage,
QImage *shadowImage, TQImage *shadowImage,
QImage *glowImage, TQImage *glowImage,
QIntDict<ButtonTile>*buttonDict, TQIntDict<ButtonTile>*buttonDict,
QIntDict<ButtonTile>*shadowDict, TQIntDict<ButtonTile>*shadowDict,
QIntDict<ButtonTile>*glowDict, TQIntDict<ButtonTile>*glowDict,
int w, int h, int xOff, int yOff, int w, int h, int xOff, int yOff,
int centerW, int centerH, int centerW, int centerH,
int shadowH, int glowWH, int shadowH, int glowWH,
bool sunken) const bool sunken) const
{ {
int x, y, delta; int x, y, delta;
@ -360,7 +360,7 @@ ButtonTile* LiquidStyle::createButtonTile( const QColor &c,
int shadowOverhead; int shadowOverhead;
shadowH > glowWH ? shadowOverhead = shadowH - glowWH : shadowOverhead = 0; 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); img.setAlphaBuffer( !isPlain() || optionHandler->drawGroupBoxShadow() ? true : false);
clearImage( img ); clearImage( img );
@ -388,15 +388,15 @@ ButtonTile* LiquidStyle::createButtonTile( const QColor &c,
if (optionHandler->buttonStyle() == Jaguar) // has brighter shadows... if (optionHandler->buttonStyle() == Jaguar) // has brighter shadows...
{ {
for ( x = 0 ; x < w ; ++x ) 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 else
{ {
for ( x = 0 ; x < w ; ++x ) for ( x = 0 ; x < w ; ++x )
if ((alpha = qAlpha( data[ x ] ))) if ((alpha = tqAlpha( data[ x ] )))
{ {
destData[ x + glowWH ] = data[x]; destData[ x + glowWH ] = data[x];
} }
@ -409,11 +409,11 @@ ButtonTile* LiquidStyle::createButtonTile( const QColor &c,
data = ( unsigned int * ) glowImage->scanLine( y ); data = ( unsigned int * ) glowImage->scanLine( y );
destData = ( unsigned int * ) img.scanLine( y ); destData = ( unsigned int * ) img.scanLine( y );
for ( x = 0 ; x < w + 2*glowWH ; ++x ) 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); DELTA_COLOR(data[ x ], srcR, srcG, srcB);
COLOR_SPACE(destR, destG, destB); 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 ); data = ( unsigned int * ) buttonImage->scanLine( y );
destData = ( unsigned int * ) img.scanLine( y + glowWH ); destData = ( unsigned int * ) img.scanLine( y + glowWH );
for ( x = 0 ; x < w ; ++x ) 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 (!rect || (y > 1 && y < h-2 && x > 0 && x < w-1) )
{ {
if (optionHandler->IcyButtons()) if (optionHandler->IcyButtons())
{ {
red = qRed( data[ x ] ); red = tqRed( data[ x ] );
green = qGreen( data[ x ] ); green = tqGreen( data[ x ] );
blue = qBlue( data[ x ] ); blue = tqBlue( data[ x ] );
SATURATION_COLOR2(sq, red, green, blue); SATURATION_COLOR2(sq, red, green, blue);
} }
else else
@ -441,24 +441,24 @@ ButtonTile* LiquidStyle::createButtonTile( const QColor &c,
} }
else else
{ {
red = qRed( data[ x ] ); red = tqRed( data[ x ] );
green = qGreen( data[ x ] ); green = tqGreen( data[ x ] );
blue = qBlue( data[ x ] ); blue = tqBlue( data[ x ] );
TINT_WHITE(55, red, green, blue); TINT_WHITE(55, red, green, blue);
} }
if (alpha != 255) 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); 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 ); pix->convertFromImage( img );
tile = separateTiles( pix, xOff+glowWH, yOff+glowWH, centerW, centerH, shadowH, sunken); tile = separateTiles( pix, xOff+glowWH, yOff+glowWH, centerW, centerH, shadowH, sunken);
@ -473,7 +473,7 @@ ButtonTile* LiquidStyle::createButtonTile( const QColor &c,
return ( tile ); 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; int x, y, delta;
@ -490,7 +490,7 @@ QPixmap* LiquidStyle::createSliderEnd( const QColor &c, const QColor &bgColor, b
unsigned int *data, *destData; 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! img.setAlphaBuffer( true ); // we need this always, as the slider groove is nevernever plain!
clearImage( img ); 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 ); top ? data = ( unsigned int * ) slider_top_shd->scanLine( y ) : data = ( unsigned int * ) slider_btm_shd->scanLine( y );
destData = ( unsigned int * ) img.scanLine( y ); destData = ( unsigned int * ) img.scanLine( y );
for ( x = 0; x < 13; ++x ) 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()); DELTA_COLOR(data[ x ], bgColor.red(), bgColor.green(), bgColor.blue());
COLOR_SPACE(destR, destG, destB); COLOR_SPACE(destR, destG, destB);
destData[ x ] = qRgba( destR, destG, destB, alpha ); destData[ x ] = tqRgba( destR, destG, destB, alpha );
} }
} }
// then the button and overlay // 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 ); top ? data = ( unsigned int * ) slider_top->scanLine( y ) : data = ( unsigned int * ) slider_btm->scanLine( y );
destData = ( unsigned int * ) img.scanLine( top ? y + 2 : y ); destData = ( unsigned int * ) img.scanLine( top ? y + 2 : y );
for ( x = 0 ; x < 13 ; ++x ) for ( x = 0 ; x < 13 ; ++x )
if ((alpha = qAlpha( data[ x ] ))) { if ((alpha = tqAlpha( data[ x ] ))) {
if (optionHandler->IcyButtons()) { if (optionHandler->IcyButtons()) {
red = qRed( data[ x ] ); red = tqRed( data[ x ] );
green = qGreen( data[ x] ); green = tqGreen( data[ x] );
blue = qBlue( data[ x] ); blue = tqBlue( data[ x] );
SATURATION_COLOR2(sq, red, green, blue); SATURATION_COLOR2(sq, red, green, blue);
} }
else { else {
DELTA_COLOR(data[ x ], srcR, srcG, srcB); DELTA_COLOR(data[ x ], srcR, srcG, srcB);
} }
if (alpha != 255) { if (alpha != 255) {
if ( qAlpha( destData[ x ] ) ) { if ( tqAlpha( destData[ x ] ) ) {
ALPHA_COLOR2(alpha, qAlpha( destData[ x ]), qRed( destData[ x ]), qGreen( destData[ x ]), qBlue( destData[ x ])); ALPHA_COLOR2(alpha, tqAlpha( destData[ x ]), tqRed( destData[ x ]), tqGreen( destData[ x ]), tqBlue( destData[ x ]));
} }
} }
COLOR_SPACE(destR, destG, destB); 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 ); pix->convertFromImage( img );
return ( pix ); 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) // 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) // 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, ButtonTile* LiquidStyle::separateTiles( TQPixmap *pix,
int xO, int yO, int w, int h, int xO, int yO, int w, int h,
int, bool sunken) const int, bool sunken) const
{ {
ButtonTile * tile = new ButtonTile(); ButtonTile * tile = new ButtonTile();
QPixmap *tmp; TQPixmap *tmp;
int w1 = xO; int w1 = xO;
int w2 = w; int w2 = w;
@ -583,72 +583,72 @@ ButtonTile* LiquidStyle::separateTiles( QPixmap *pix,
if ( !sunken ) { if ( !sunken ) {
// Top tiles // Top tiles
tmp = new QPixmap( w1, h1 ); tmp = new TQPixmap( w1, h1 );
// bitBlt(...,x,y,width,height) // bitBlt(...,x,y,width,height)
copyBlt( tmp, 0, 0, pix, xO1, yO1, w1, h1 ); copyBlt( tmp, 0, 0, pix, xO1, yO1, w1, h1 );
tile->setPixmap( TileTopLeft, tmp ); tile->setPixmap( TileTopLeft, tmp );
tmp = new QPixmap( w2, h1 ); tmp = new TQPixmap( w2, h1 );
copyBlt( tmp, 0, 0, pix, xO2, yO1, w2, h1 ); copyBlt( tmp, 0, 0, pix, xO2, yO1, w2, h1 );
tile->setPixmap( TileTop, tmp ); tile->setPixmap( TileTop, tmp );
tmp = new QPixmap( w3, h1 ); tmp = new TQPixmap( w3, h1 );
copyBlt( tmp, 0, 0, pix, xO3, yO1, w3, h1 ); copyBlt( tmp, 0, 0, pix, xO3, yO1, w3, h1 );
tile->setPixmap( TileTopRight, tmp ); tile->setPixmap( TileTopRight, tmp );
// Middle tiles // Middle tiles
tmp = new QPixmap( w1, h2 ); tmp = new TQPixmap( w1, h2 );
copyBlt( tmp, 0, 0, pix, xO1, yO2, w1, h2 ); copyBlt( tmp, 0, 0, pix, xO1, yO2, w1, h2 );
tile->setPixmap( TileLeft, tmp ); tile->setPixmap( TileLeft, tmp );
tmp = new QPixmap( w2, h2 ); tmp = new TQPixmap( w2, h2 );
copyBlt( tmp, 0, 0, pix, xO2, yO2, w2, h2 ); copyBlt( tmp, 0, 0, pix, xO2, yO2, w2, h2 );
tile->setPixmap( TileMiddle, tmp ); tile->setPixmap( TileMiddle, tmp );
tmp = new QPixmap( w3, h2 ); tmp = new TQPixmap( w3, h2 );
copyBlt( tmp, 0, 0, pix, xO3, yO2, w3, h2 ); copyBlt( tmp, 0, 0, pix, xO3, yO2, w3, h2 );
tile->setPixmap( TileRight, tmp ); tile->setPixmap( TileRight, tmp );
// Bottom tiles // Bottom tiles
tmp = new QPixmap( w1, h3 ); tmp = new TQPixmap( w1, h3 );
copyBlt( tmp, 0, 0, pix, xO1, yO3, w1, h3 ); copyBlt( tmp, 0, 0, pix, xO1, yO3, w1, h3 );
tile->setPixmap( TileBtmLeft, tmp ); tile->setPixmap( TileBtmLeft, tmp );
tmp = new QPixmap( w2, h3 ); tmp = new TQPixmap( w2, h3 );
copyBlt( tmp, 0, 0, pix, xO2, yO3, w2, h3 ); copyBlt( tmp, 0, 0, pix, xO2, yO3, w2, h3 );
tile->setPixmap( TileBtm, tmp ); tile->setPixmap( TileBtm, tmp );
tmp = new QPixmap( w3, h3 ); tmp = new TQPixmap( w3, h3 );
copyBlt( tmp, 0, 0, pix, xO3, yO3, w3, h3 ); copyBlt( tmp, 0, 0, pix, xO3, yO3, w3, h3 );
tile->setPixmap( TileBtmRight, tmp ); tile->setPixmap( TileBtmRight, tmp );
} }
else { else {
// Top tiles // Top tiles
tmp = new QPixmap( w1, h3 ); tmp = new TQPixmap( w1, h3 );
// bitBlt(...,x,y,width,height) // bitBlt(...,x,y,width,height)
copyBlt( tmp, 0, 0, pix, xO1, yO1, w1, h3 ); copyBlt( tmp, 0, 0, pix, xO1, yO1, w1, h3 );
tile->setPixmap( TileTopLeft, tmp ); tile->setPixmap( TileTopLeft, tmp );
tmp = new QPixmap( w2, h3 ); tmp = new TQPixmap( w2, h3 );
copyBlt( tmp, 0, 0, pix, xO2, yO1, w2, h3 ); copyBlt( tmp, 0, 0, pix, xO2, yO1, w2, h3 );
tile->setPixmap( TileTop, tmp ); tile->setPixmap( TileTop, tmp );
tmp = new QPixmap( w3, h3 ); tmp = new TQPixmap( w3, h3 );
copyBlt( tmp, 0, 0, pix, xO3, yO1, w3, h3 ); copyBlt( tmp, 0, 0, pix, xO3, yO1, w3, h3 );
tile->setPixmap( TileTopRight, tmp ); tile->setPixmap( TileTopRight, tmp );
// Middle tiles // Middle tiles
tmp = new QPixmap( w1, h2 ); tmp = new TQPixmap( w1, h2 );
copyBlt( tmp, 0, 0, pix, xO1, yO2 + h3 - h1, w1, h2 ); copyBlt( tmp, 0, 0, pix, xO1, yO2 + h3 - h1, w1, h2 );
tile->setPixmap( TileLeft, tmp ); 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 ); copyBlt( tmp, 0, 0, pix, xO2, yO2 + h3 - h1, w2, h2 );
tile->setPixmap( TileMiddle, tmp ); 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 ); copyBlt( tmp, 0, 0, pix, xO3, yO2 + h3 - h1, w3, h2 );
tile->setPixmap( TileRight, tmp ); tile->setPixmap( TileRight, tmp );
// Bottom tiles // Bottom tiles
tmp = new QPixmap( w1, h1 ); tmp = new TQPixmap( w1, h1 );
copyBlt( tmp, 0, 0, pix, xO1, yO3 + h3 - h1, w1, h1 ); copyBlt( tmp, 0, 0, pix, xO1, yO3 + h3 - h1, w1, h1 );
tile->setPixmap( TileBtmLeft, tmp ); 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 ); copyBlt( tmp, 0, 0, pix, xO2, yO3 + h3 - h1, w2, h1 );
tile->setPixmap( TileBtm, tmp ); 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 ); copyBlt( tmp, 0, 0, pix, xO3, yO3 + h3 - h1, w3, h1 );
tile->setPixmap( TileBtmRight, tmp ); tile->setPixmap( TileBtmRight, tmp );
} }
@ -664,64 +664,64 @@ ButtonTile* LiquidStyle::separateTiles( QPixmap *pix,
#define _LRWIDTH_ (_LOFF_ + _ROFF_) #define _LRWIDTH_ (_LOFF_ + _ROFF_)
#define _TBHEIGHT_ (_TOFF_ + _BOFF_) #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<LiquidStyle*>( this ); LiquidStyle *ptr = const_cast<LiquidStyle*>( this );
ButtonTile *tile = pushedDown ? btnDict.find( myC.rgb() ) : btnShadowedDict.find( myC.rgb() ); ButtonTile *tile = pushedDown ? btnDict.find( myC.rgb() ) : btnShadowedDict.find( myC.rgb() );
if ( !tile ) 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 ) if ( !tile )
{ {
qWarning( "Button tile is NULL!" ); tqWarning( "Button tile is NULL!" );
return ; return ;
} }
QPainter *p; TQPainter *p;
QPen oldPen = painter->pen(); TQPen oldPen = painter->pen();
if (!isHTMLButton) if (!isHTMLButton)
{ {
if ( !tmpBtnPix ) if ( !tmpBtnPix )
ptr->tmpBtnPix = new QPixmap( w, h ); ptr->tmpBtnPix = new TQPixmap( w, h );
else if ( w > tmpBtnPix->width() || h > tmpBtnPix->height() ) else if ( w > tmpBtnPix->width() || h > tmpBtnPix->height() )
{ {
// make temp pixmap size == largest button // make temp pixmap size == largest button
ptr->tmpBtnPix->resize(w,h); ptr->tmpBtnPix->resize(w,h);
} }
p = new QPainter(tmpBtnPix); p = new TQPainter(tmpBtnPix);
if (!isPlain()) if (!isPlain())
{ {
QPixmap *stipple; TQPixmap *stipple;
if (paintWidget && paintWidget->parentWidget()) if (paintWidget && paintWidget->parentWidget())
{ {
stipple = const_cast<QPixmap*>(paintWidget->parentWidget()->palette().brush(QPalette::Active, QColorGroup::Background).pixmap()); stipple = const_cast<TQPixmap*>(paintWidget->parentWidget()->palette().brush(TQPalette::Active, TQColorGroup::Background).pixmap());
if (!stipple || stipple->isNull()) 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 else
p->drawTiledPixmap( 0, 0, w, h, *stipple, bgX, bgY ); p->drawTiledPixmap( 0, 0, w, h, *stipple, bgX, bgY );
} }
else else
{ {
stipple = cg.brush( QColorGroup::Background ).pixmap(); stipple = cg.brush( TQColorGroup::Background ).pixmap();
stipple ? p->drawTiledPixmap( 0, 0, w, h, *stipple, bgX, bgY ) : 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 else
p->fillRect(0,0,w,h, cg.brush( QColorGroup::Background )); p->fillRect(0,0,w,h, cg.brush( TQColorGroup::Background ));
} }
else else
{ {
p = painter; p = painter;
} }
// QPainter p(tmpBtnPix); // TQPainter p(tmpBtnPix);
// tiled fills // tiled fills
if ( w > _LRWIDTH_ ) if ( w > _LRWIDTH_ )
@ -753,16 +753,16 @@ void LiquidStyle::drawRoundButton( QPainter *painter, const QColorGroup &cg, con
} }
void LiquidStyle::drawRectangularButton( QPainter *painter, void LiquidStyle::drawRectangularButton( TQPainter *painter,
const QColorGroup &cg, const QColor &c, const TQColorGroup &cg, const TQColor &c,
int x, int y, int w, int h, int x, int y, int w, int h,
bool sunken, bool hover, bool isCombo, int position, bool isHTML) const bool sunken, bool hover, bool isCombo, int position, bool isHTML) const
{ {
#define _HEIGHT_ ptr->rectbutton->height() #define _HEIGHT_ ptr->rectbutton->height()
#define _WIDTH_ ptr->rectbutton->width() #define _WIDTH_ ptr->rectbutton->width()
LiquidStyle *ptr = const_cast<LiquidStyle*>( this ); LiquidStyle *ptr = const_cast<LiquidStyle*>( this );
QColor tmpColor; TQColor tmpColor;
tmpColor = isCombo && !(hover || sunken) ? optionHandler->InactiveButtonColor() : c; tmpColor = isCombo && !(hover || sunken) ? optionHandler->InactiveButtonColor() : c;
int xOffset, width; int xOffset, width;
@ -770,11 +770,11 @@ void LiquidStyle::drawRectangularButton( QPainter *painter,
ButtonTile *tile = rectBtnDict.find( tmpColor.rgb() ); ButtonTile *tile = rectBtnDict.find( tmpColor.rgb() );
if ( !tile ) if ( !tile )
tile = createButtonTile( tmpColor, cg.background(), ptr->rectbutton, ((QImage*)0L), ((QImage*)0L), &(ptr->rectBtnDict), (QIntDict<ButtonTile>*)0L, (QIntDict<ButtonTile>*)0L, 33, 25, 10, 5, 13, 15, 0, 0, sunken); tile = createButtonTile( tmpColor, cg.background(), ptr->rectbutton, ((TQImage*)0L), ((TQImage*)0L), &(ptr->rectBtnDict), (TQIntDict<ButtonTile>*)0L, (TQIntDict<ButtonTile>*)0L, 33, 25, 10, 5, 13, 15, 0, 0, sunken);
if ( !tile ) if ( !tile )
{ {
qWarning( "Button tile is NULL!" ); tqWarning( "Button tile is NULL!" );
return ; return ;
} }
@ -802,23 +802,23 @@ void LiquidStyle::drawRectangularButton( QPainter *painter,
break; break;
} }
QPainter *p; TQPainter *p;
QPen oldPen = painter->pen(); TQPen oldPen = painter->pen();
if (!isHTML) if (!isHTML)
{ {
if ( !tmpBtnPix ) if ( !tmpBtnPix )
ptr->tmpBtnPix = new QPixmap( w, h ); ptr->tmpBtnPix = new TQPixmap( w, h );
else if ( w > tmpBtnPix->width() || h > tmpBtnPix->height() ) else if ( w > tmpBtnPix->width() || h > tmpBtnPix->height() )
{ {
// make temp pixmap size == largest button // make temp pixmap size == largest button
ptr->tmpBtnPix->resize(w,h); ptr->tmpBtnPix->resize(w,h);
} }
p = new QPainter(tmpBtnPix); p = new TQPainter(tmpBtnPix);
if (position != center && paintWidget && paintWidget->parentWidget()) if (position != center && paintWidget && paintWidget->parentWidget())
{ {
if (this->paintWidget->parentWidget()->paletteBackgroundPixmap ()) 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 else
p->fillRect( 0, 0, w, h, this->paintWidget->parentWidget()->paletteBackgroundColor()); p->fillRect( 0, 0, w, h, this->paintWidget->parentWidget()->paletteBackgroundColor());
} }
@ -831,7 +831,7 @@ void LiquidStyle::drawRectangularButton( QPainter *painter,
} }
int tileH = 0; int tileH = 0;
QPixmap tmpPix(_LOFF_, 1); TQPixmap tmpPix(_LOFF_, 1);
if (position == left || position == full) if (position == left || position == full)
{ {
@ -946,10 +946,10 @@ void LiquidStyle::drawRectangularButton( QPainter *painter,
// second part of combos if needed // second part of combos if needed
tile = rectBtnDict.find( c.rgb() ); tile = rectBtnDict.find( c.rgb() );
if ( !tile ) if ( !tile )
tile = createButtonTile( c, cg.background(), ptr->rectbutton, ((QImage*)0L), ((QImage*)0L), &(ptr->rectBtnDict), (QIntDict<ButtonTile>*)0L, (QIntDict<ButtonTile>*)0L, 33, 25, 10, 5, 13, 15, 0, 0, sunken); tile = createButtonTile( c, cg.background(), ptr->rectbutton, ((TQImage*)0L), ((TQImage*)0L), &(ptr->rectBtnDict), (TQIntDict<ButtonTile>*)0L, (TQIntDict<ButtonTile>*)0L, 33, 25, 10, 5, 13, 15, 0, 0, sunken);
if ( !tile ) if ( !tile )
{ {
qWarning( "Button tile is NULL!" ); tqWarning( "Button tile is NULL!" );
return ; return ;
} }
@ -1038,31 +1038,31 @@ void LiquidStyle::drawRectangularButton( QPainter *painter,
} }
void LiquidStyle::drawCombo( QPainter *painter, void LiquidStyle::drawCombo( TQPainter *painter,
const QColorGroup &cg, const TQColorGroup &cg,
const QColor &c, const TQColor &c,
int x, int y, int w, int h, int x, int y, int w, int h,
bool sunken, bool hover, bool isCombo, bool sunken, bool hover, bool isCombo,
int position, bool isHTML ) const int position, bool isHTML ) const
{ {
LiquidStyle *ptr = const_cast<LiquidStyle*>( this ); LiquidStyle *ptr = const_cast<LiquidStyle*>( this );
QColor myC =(isOOO && isCombo)?optionHandler->CustomButtonColor():c; TQColor myC =(isOOO && isCombo)?optionHandler->CustomButtonColor():c;
QColor tmpColor = isCombo && !(hover || sunken) ? optionHandler->InactiveButtonColor() : myC; TQColor tmpColor = isCombo && !(hover || sunken) ? optionHandler->InactiveButtonColor() : myC;
ButtonTile *tile = sunken ? comboDict.find( tmpColor.rgb() ) : comboShadowedDict.find( tmpColor.rgb() ); ButtonTile *tile = sunken ? comboDict.find( tmpColor.rgb() ) : comboShadowedDict.find( tmpColor.rgb() );
if ( !tile ) if ( !tile )
{ {
if (optionHandler->buttonStyle() == Milk && sunken) if (optionHandler->buttonStyle() == Milk && sunken)
tile = createButtonTile( tmpColor, cg.background(), ptr->btnBorderImg, ptr->comboShadow, ((QImage*)0L), &(ptr->comboDict), &(ptr->comboShadowedDict), (QIntDict<ButtonTile>*)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<ButtonTile>*)0L, 44, 21, 7, 9, 30, 1, 2, 0, true);
else else
tile = createButtonTile( tmpColor, cg.background(), ptr->combo, ptr->comboShadow, ((QImage*)0L), &(ptr->comboDict), &(ptr->comboShadowedDict), (QIntDict<ButtonTile>*)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<ButtonTile>*)0L, 44, 21, 7, 9, 30, 1, 2, 0, sunken);
} }
if ( !tile ) if ( !tile )
{ {
qWarning( "Button tile is NULL!" ); tqWarning( "Button tile is NULL!" );
return ; return ;
} }
@ -1092,23 +1092,23 @@ void LiquidStyle::drawCombo( QPainter *painter,
break; break;
} }
QPainter *p; TQPainter *p;
QPen oldPen = painter->pen(); TQPen oldPen = painter->pen();
if (!isHTML) if (!isHTML)
{ {
if ( !tmpBtnPix ) if ( !tmpBtnPix )
ptr->tmpBtnPix = new QPixmap( w, h ); ptr->tmpBtnPix = new TQPixmap( w, h );
else if ( w > tmpBtnPix->width() || h > tmpBtnPix->height() ) else if ( w > tmpBtnPix->width() || h > tmpBtnPix->height() )
{ {
// make temp pixmap size == largest button // make temp pixmap size == largest button
ptr->tmpBtnPix->resize(w,h); ptr->tmpBtnPix->resize(w,h);
} }
p = new QPainter(tmpBtnPix); p = new TQPainter(tmpBtnPix);
#if 0 #if 0
QPixmap *stipple = cg.brush( QColorGroup::Background ).pixmap(); TQPixmap *stipple = cg.brush( TQColorGroup::Background ).pixmap();
if ( !stipple ) // button may have custom colorgroup 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 ) if ( stipple )
p->drawTiledPixmap( 0, 0, w, h, *stipple); p->drawTiledPixmap( 0, 0, w, h, *stipple);
else else
@ -1117,7 +1117,7 @@ void LiquidStyle::drawCombo( QPainter *painter,
if (position != center && paintWidget && paintWidget->parentWidget()) if (position != center && paintWidget && paintWidget->parentWidget())
{ {
if (this->paintWidget->parentWidget()->paletteBackgroundPixmap ()) 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 else
p->fillRect( 0, 0, w, h, this->paintWidget->parentWidget()->paletteBackgroundColor()); p->fillRect( 0, 0, w, h, this->paintWidget->parentWidget()->paletteBackgroundColor());
} }
@ -1173,11 +1173,11 @@ void LiquidStyle::drawCombo( QPainter *painter,
tile = comboShadowedDict.find( myC.rgb() ); tile = comboShadowedDict.find( myC.rgb() );
if ( !tile ) if ( !tile )
{ {
tile = createButtonTile( myC, cg.background(), ptr->combo, ptr->comboShadow, ((QImage*)0L), &(ptr->comboDict), &(ptr->comboShadowedDict), (QIntDict<ButtonTile>*)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<ButtonTile>*)0L, 44, 21, 7, 9, 30, 1, 2, 0, sunken);
} }
if ( !tile ) if ( !tile )
{ {
qWarning( "Button tile is NULL!" ); tqWarning( "Button tile is NULL!" );
return ; return ;
} }
if ( w > _LRWIDTH_ ) if ( w > _LRWIDTH_ )
@ -1242,15 +1242,15 @@ void LiquidStyle::drawCombo( QPainter *painter,
p->setPen(oldPen); p->setPen(oldPen);
} }
void LiquidStyle::drawRoundFrame( QPainter *p, const QRect &r, void LiquidStyle::drawRoundFrame( TQPainter *p, const TQRect &r,
const QColorGroup &cg, bool focused, QPoint offset ) const const TQColorGroup &cg, bool focused, TQPoint offset ) const
{ {
ButtonTile *tile = focused ? activeRoundFrame : inactiveRoundFrame; ButtonTile *tile = focused ? activeRoundFrame : inactiveRoundFrame;
if (!tile) tile = createRoundFrameTile(*roundFrame, focused ? cg.button() : optionHandler->InactiveButtonColor(), &cg.background(), cg.base() ); if (!tile) tile = createRoundFrameTile(*roundFrame, focused ? cg.button() : optionHandler->InactiveButtonColor(), &cg.background(), cg.base() );
// first: fill background (tiled) // first: fill background (tiled)
// outer // outer
QPixmap *stipple = cg.brush( QColorGroup::Background ).pixmap(); TQPixmap *stipple = cg.brush( TQColorGroup::Background ).pixmap();
if (stipple) if (stipple)
{ {
p->drawTiledPixmap( r.x(),r.y(), 7, 8, *stipple, offset.x(), offset.y()); 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, void LiquidStyle::drawEditFrame( TQPainter *p, const TQRect &r,
const QColorGroup &cg, bool isHTML, bool focused, bool inverse ) const const TQColorGroup &cg, bool isHTML, bool focused, bool inverse ) const
{ {
QColor fill( cg.background().dark( 105 ) ); TQColor fill( cg.background().dark( 105 ) );
QColor tmp(0,0,0); TQColor tmp(0,0,0);
QColor light1( 0, 0, 0 ); TQColor light1( 0, 0, 0 );
QColor light2( 0, 0, 0 ); TQColor light2( 0, 0, 0 );
QColor dark1( 0, 0, 0 ); TQColor dark1( 0, 0, 0 );
QColor dark2( 0, 0, 0 ); TQColor dark2( 0, 0, 0 );
QColor dark3( 0, 0, 0 ); TQColor dark3( 0, 0, 0 );
if ( !focused ) if ( !focused )
{ {
@ -1390,12 +1390,12 @@ void LiquidStyle::drawEditFrame( QPainter *p, const QRect &r,
p->drawLine( right - 1, y + 2, right - 1, bottom - 2 ); 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 )
{ {
if ( !w->inherits( "QClipperWidget" ) ) if ( !w->inherits( "TQClipperWidget" ) )
return ( false ); return ( false );
w = w->parent(); w = w->parent();
if ( w ) if ( w )
@ -1408,9 +1408,9 @@ bool LiquidStyle::isHTMLWidget( const QWidget *widget ) const
return ( false ); 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.begin( &pix );
p.setPen( c.dark( 200 ) ); p.setPen( c.dark( 200 ) );
p.drawRect( 0, 0, 16, 16 ); p.drawRect( 0, 0, 16, 16 );

Loading…
Cancel
Save