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
----
after a long time, this is a snapshot of the current cvs version and probably the last baghira for Qt3 ever.
after a long time, this is a snapshot of the current cvs version and probably the last baghira for TQt3 ever.
there won't be Baghira for Qt4, don't ask.
- several bugfixes, minor changes, whatever.

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

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

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

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

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

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

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

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

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

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

File diff suppressed because it is too large Load Diff

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>Help</class>
<widget class="QDialog">
<widget class="TQDialog">
<property name="name">
<cstring>Help</cstring>
</property>
@ -36,7 +36,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget" row="1" column="0">
<widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
<cstring>layout2</cstring>
</property>
@ -61,7 +61,7 @@
</size>
</property>
</spacer>
<widget class="QPushButton">
<widget class="TQPushButton">
<property name="name">
<cstring>closeButton</cstring>
</property>
@ -71,11 +71,11 @@
</widget>
</hbox>
</widget>
<widget class="QTabWidget" row="0" column="0">
<widget class="TQTabWidget" row="0" column="0">
<property name="name">
<cstring>tabWidget2</cstring>
</property>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@ -86,7 +86,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget" row="1" column="0">
<widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
<cstring>layout3</cstring>
</property>
@ -111,7 +111,7 @@
</size>
</property>
</spacer>
<widget class="QPushButton">
<widget class="TQPushButton">
<property name="name">
<cstring>startBAB</cstring>
</property>
@ -171,7 +171,7 @@ c) BAB is also a DCOP interface to the Baghira Style and Windeco</string>
</widget>
</grid>
</widget>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</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;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;
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;
@ -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>
</grid>
</widget>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</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>
</grid>
</widget>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@ -267,7 +267,7 @@ and&lt;br&gt;
for hosting the Project</string>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>

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

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

File diff suppressed because it is too large Load Diff

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

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

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

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

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

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

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

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

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

File diff suppressed because it is too large Load Diff

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ConfigDialog</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>ConfigDialog</cstring>
</property>
@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</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">
<cstring>titlealign</cstring>
</property>
@ -36,7 +36,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QRadioButton" row="0" column="0">
<widget class="TQRadioButton" row="0" column="0">
<property name="name">
<cstring>AlignLeft</cstring>
</property>
@ -64,7 +64,7 @@
</size>
</property>
</spacer>
<widget class="QRadioButton" row="0" column="2">
<widget class="TQRadioButton" row="0" column="2">
<property name="name">
<cstring>AlignHCenter</cstring>
</property>
@ -95,7 +95,7 @@
</size>
</property>
</spacer>
<widget class="QRadioButton" row="0" column="4">
<widget class="TQRadioButton" row="0" column="4">
<property name="name">
<cstring>AlignRight</cstring>
</property>
@ -106,7 +106,7 @@
<string></string>
</property>
</widget>
<widget class="QRadioButton" row="0" column="6">
<widget class="TQRadioButton" row="0" column="6">
<property name="name">
<cstring>noTitle</cstring>
</property>
@ -133,7 +133,7 @@
</spacer>
</grid>
</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">
<cstring>generalbox</cstring>
</property>
@ -150,7 +150,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QComboBox" row="12" column="0">
<widget class="TQComboBox" row="12" column="0">
<item>
<property name="text">
<string>Jaguar</string>
@ -180,7 +180,7 @@
<cstring>defaultMode</cstring>
</property>
</widget>
<widget class="QCheckBox" row="9" column="0">
<widget class="TQCheckBox" row="9" column="0">
<property name="name">
<cstring>delAppname</cstring>
</property>
@ -203,7 +203,7 @@ from multipart titles</string>
<enum>Horizontal</enum>
</property>
</widget>
<widget class="QCheckBox" row="3" column="0">
<widget class="TQCheckBox" row="3" column="0">
<property name="name">
<cstring>drawComicFrame</cstring>
</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>
</property>
</widget>
<widget class="QCheckBox" row="8" column="0">
<widget class="TQCheckBox" row="8" column="0">
<property name="name">
<cstring>noModalDeco</cstring>
</property>
@ -222,7 +222,7 @@ from multipart titles</string>
<string>Hide deco for fixed size modal windows</string>
</property>
</widget>
<widget class="QCheckBox" row="6" column="0">
<widget class="TQCheckBox" row="6" column="0">
<property name="name">
<cstring>maxResizable</cstring>
</property>
@ -230,7 +230,7 @@ from multipart titles</string>
<string>Keep maximized resizable</string>
</property>
</widget>
<widget class="QCheckBox" row="2" column="0">
<widget class="TQCheckBox" row="2" column="0">
<property name="name">
<cstring>ResizeGrip</cstring>
</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>
</property>
</widget>
<widget class="QLabel" row="11" column="0">
<widget class="TQLabel" row="11" column="0">
<property name="name">
<cstring>textLabel1_7</cstring>
</property>
@ -249,7 +249,7 @@ from multipart titles</string>
<string>Default Mode is</string>
</property>
</widget>
<widget class="QCheckBox" row="7" column="0">
<widget class="TQCheckBox" row="7" column="0">
<property name="name">
<cstring>fullSpec</cstring>
</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>
</property>
</widget>
<widget class="QCheckBox" row="4" column="0">
<widget class="TQCheckBox" row="4" column="0">
<property name="name">
<cstring>allowEasyClosing</cstring>
</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>
</property>
</widget>
<widget class="QCheckBox" row="5" column="0">
<widget class="TQCheckBox" row="5" column="0">
<property name="name">
<cstring>addAutoSpacing</cstring>
</property>
@ -279,7 +279,7 @@ from multipart titles</string>
<string>Add auto spacing</string>
</property>
</widget>
<widget class="QLayoutWidget" row="1" column="0">
<widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
<cstring>layout133</cstring>
</property>
@ -287,7 +287,7 @@ from multipart titles</string>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>textLabel1_3</cstring>
</property>
@ -312,7 +312,7 @@ from multipart titles</string>
</size>
</property>
</spacer>
<widget class="QSpinBox">
<widget class="TQSpinBox">
<property name="name">
<cstring>minTH</cstring>
</property>
@ -328,7 +328,7 @@ from multipart titles</string>
</widget>
</hbox>
</widget>
<widget class="QPushButton" row="0" column="0">
<widget class="TQPushButton" row="0" column="0">
<property name="name">
<cstring>ButtonColorConfig</cstring>
</property>
@ -338,7 +338,7 @@ from multipart titles</string>
</widget>
</grid>
</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">
<cstring>decoStack</cstring>
</property>
@ -351,14 +351,14 @@ from multipart titles</string>
<property name="lineWidth">
<number>2</number>
</property>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>WStackPage</cstring>
</property>
<attribute name="id">
<number>0</number>
</attribute>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@ -376,7 +376,7 @@ from multipart titles</string>
</widget>
</widget>
</widget>
<widget class="QPushButton" row="1" column="1">
<widget class="TQPushButton" row="1" column="1">
<property name="name">
<cstring>pushButton2</cstring>
</property>
@ -384,7 +384,7 @@ from multipart titles</string>
<string>Add style</string>
</property>
</widget>
<widget class="QPushButton" row="1" column="2">
<widget class="TQPushButton" row="1" column="2">
<property name="name">
<cstring>pushButton3</cstring>
</property>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -1,23 +1,23 @@
#include <kiconloader.h>
#include "listboxlink.h"
#include <qpainter.h>
#include <qbitmap.h>
#include <tqpainter.h>
#include <tqbitmap.h>
#include "eject.xbm"
#include "lock.xbm"
static QBitmap eject = QBitmap( eject_width, eject_height, eject_bits, true );
static QBitmap locked = QBitmap( lock_width, lock_height, lock_bits, true );
static TQBitmap eject = TQBitmap( eject_width, eject_height, eject_bits, true );
static TQBitmap locked = TQBitmap( lock_width, lock_height, lock_bits, true );
ListBoxLink::ListBoxLink( const QString & icon, uint size, const QString & title, const QString & url): QListBoxPixmap(KGlobal::iconLoader()->loadIcon(icon, KIcon::Desktop, size), title),url_(url),icon_(icon)
ListBoxLink::ListBoxLink( const TQString & icon, uint size, const TQString & title, const TQString & url): TQListBoxPixmap(KGlobal::iconLoader()->loadIcon(icon, KIcon::Desktop, size), title),url_(url),icon_(icon)
{
}
ListBoxLink::ListBoxLink( const QPixmap & pixmap, const QString & title, const QString & url) : QListBoxPixmap(pixmap, title), url_(url), icon_(0)
ListBoxLink::ListBoxLink( const TQPixmap & pixmap, const TQString & title, const TQString & url) : TQListBoxPixmap(pixmap, title), url_(url), icon_(0)
{
}
ListBoxLink::ListBoxLink(ListBoxLink & link) : QListBoxPixmap(*link.pixmap(), link.text()), url_(link.URL()), icon_(link.icon())
ListBoxLink::ListBoxLink(ListBoxLink & link) : TQListBoxPixmap(*link.pixmap(), link.text()), url_(link.URL()), icon_(link.icon())
{
}
@ -25,22 +25,22 @@ ListBoxLink::~ListBoxLink()
{
}
void ListBoxLink::setURL(const QString & url)
void ListBoxLink::setURL(const TQString & url)
{
url_ = url;
}
void ListBoxLink::setIcon(const QString & icon)
void ListBoxLink::setIcon(const TQString & icon)
{
icon_ = icon;
}
int ListBoxLink::height ( const QListBox * lb ) const
int ListBoxLink::height ( const TQListBox * lb ) const
{
return (QListBoxPixmap::height ( lb ) + 4);
return (TQListBoxPixmap::height ( lb ) + 4);
}
ListBoxDevice::ListBoxDevice(const QString & icon, uint size, const QString & title, const QString & url, const QString & name, const QString & mountPoint, bool mounted, bool ejectable, bool removable, int id) : ListBoxLink(icon, size, title, url), name_(name), mountPoint_(mountPoint), mounted_(mounted), ejectable_(ejectable), removable_(removable),id_(id)
ListBoxDevice::ListBoxDevice(const TQString & icon, uint size, const TQString & title, const TQString & url, const TQString & name, const TQString & mountPoint, bool mounted, bool ejectable, bool removable, int id) : ListBoxLink(icon, size, title, url), name_(name), mountPoint_(mountPoint), mounted_(mounted), ejectable_(ejectable), removable_(removable),id_(id)
{
if (!eject.mask())
eject.setMask(eject);
@ -48,7 +48,7 @@ ListBoxDevice::ListBoxDevice(const QString & icon, uint size, const QString & ti
locked.setMask(locked);
}
ListBoxDevice::ListBoxDevice(const QPixmap & pixmap, const QString & title, const QString & url, const QString & name, const QString & mountPoint, bool mounted, bool ejectable, bool removable, int id) : ListBoxLink(pixmap, title, url), name_(name), mountPoint_(mountPoint), mounted_(mounted), ejectable_(ejectable), removable_(removable),id_(id)
ListBoxDevice::ListBoxDevice(const TQPixmap & pixmap, const TQString & title, const TQString & url, const TQString & name, const TQString & mountPoint, bool mounted, bool ejectable, bool removable, int id) : ListBoxLink(pixmap, title, url), name_(name), mountPoint_(mountPoint), mounted_(mounted), ejectable_(ejectable), removable_(removable),id_(id)
{
if (!eject.mask())
eject.setMask(eject);
@ -56,14 +56,14 @@ ListBoxDevice::ListBoxDevice(const QPixmap & pixmap, const QString & title, cons
locked.setMask(locked);
}
int ListBoxDevice::width ( const QListBox * lb ) const
int ListBoxDevice::width ( const TQListBox * lb ) const
{
if (ejectable_ && mounted_ && lb)
return lb->width();
return ListBoxLink::width(lb);
}
void ListBoxDevice::paint( QPainter * p )
void ListBoxDevice::paint( TQPainter * p )
{
if ((ejectable_ || removable_) && mounted_)
{

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

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

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

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

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

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

File diff suppressed because it is too large Load Diff

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

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

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

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

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

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

File diff suppressed because it is too large Load Diff

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

File diff suppressed because it is too large Load Diff

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

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

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

Loading…
Cancel
Save