diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-05 17:16:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-05 17:16:35 +0000 |
commit | 91064f3b1d93fb0449e588f70552f050b4033e9f (patch) | |
tree | 5d042542cfd52a1ea454774157300f0509b84441 | |
parent | 5cf5e6b8214ace7beb2836bce2f2b3e3324222ca (diff) | |
download | gtk-qt-engine-91064f3b1d93fb0449e588f70552f050b4033e9f.tar.gz gtk-qt-engine-91064f3b1d93fb0449e588f70552f050b4033e9f.zip |
Port gtk-qt-engine to TQt4
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/gtk-qt-engine@1230499 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r-- | kcm_gtk/emacsdetails.ui | 18 | ||||
-rw-r--r-- | kcm_gtk/kcmgtk.cpp | 306 | ||||
-rw-r--r-- | kcm_gtk/kcmgtk.h | 41 | ||||
-rw-r--r-- | kcm_gtk/kcmgtkwidget.ui | 130 | ||||
-rw-r--r-- | kcm_gtk/mozillaprofile.ui | 8 | ||||
-rw-r--r-- | kcm_gtk/searchpaths.ui | 32 | ||||
-rw-r--r-- | src/qt_main.c | 6 | ||||
-rw-r--r-- | src/qt_qt_wrapper.cpp | 1036 | ||||
-rw-r--r-- | src/qt_qt_wrapper.h | 20 | ||||
-rw-r--r-- | src/qt_rc_style.c | 22 | ||||
-rw-r--r-- | src/qt_rc_style.h | 24 | ||||
-rw-r--r-- | src/qt_style.h | 24 | ||||
-rw-r--r-- | src/qt_theme_draw.c | 198 |
13 files changed, 933 insertions, 932 deletions
diff --git a/kcm_gtk/emacsdetails.ui b/kcm_gtk/emacsdetails.ui index 677a69c..489a356 100644 --- a/kcm_gtk/emacsdetails.ui +++ b/kcm_gtk/emacsdetails.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>EmacsDetails</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>EmacsDetails</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -28,7 +28,7 @@ When enabled, they will override the standard keyboard shortcuts in GTK applications.</string> </property> </widget> - <widget class="QListView"> + <widget class="TQListView"> <column> <property name="text"> <string>Shortcut</string> @@ -184,9 +184,9 @@ When enabled, they will override the standard keyboard shortcuts in GTK applicat <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <hbox> <property name="name"> @@ -202,14 +202,14 @@ When enabled, they will override the standard keyboard shortcuts in GTK applicat <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>101</width> <height>21</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushButton4</cstring> </property> @@ -229,5 +229,5 @@ When enabled, they will override the standard keyboard shortcuts in GTK applicat <slot>close()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kcm_gtk/kcmgtk.cpp b/kcm_gtk/kcmgtk.cpp index 036836d..3c0860b 100644 --- a/kcm_gtk/kcmgtk.cpp +++ b/kcm_gtk/kcmgtk.cpp @@ -18,35 +18,35 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include <kglobal.h> #include <kfontdialog.h> #include <kiconloader.h> -#include <qfile.h> -#include <qtextstream.h> -#include <qregexp.h> -#include <qdir.h> -#include <qcombobox.h> -#include <qmap.h> -#include <qbuttongroup.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qlabel.h> +#include <tqfile.h> +#include <tqtextstream.h> +#include <tqregexp.h> +#include <tqdir.h> +#include <tqcombobox.h> +#include <tqmap.h> +#include <tqbuttongroup.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqlabel.h> #include <kurllabel.h> #include <kapplication.h> #include <kfontcombo.h> -#include <qspinbox.h> +#include <tqspinbox.h> #include <ksqueezedtextlabel.h> #include <stdlib.h> #include <kmessagebox.h> #include <kconfig.h> -#include <qstyle.h> -#include <qheader.h> +#include <tqstyle.h> +#include <tqheader.h> #include <klistview.h> -#include <qmessagebox.h> -#include <qcheckbox.h> +#include <tqmessagebox.h> +#include <tqcheckbox.h> #include <kglobal.h> #include <kstandarddirs.h> @@ -56,19 +56,19 @@ #include "kcmgtk.h" #include "mozillaprofile.h" -const QString KcmGtk::GTK_RC_FILE(".gtkrc-2.0-kde-kde4"); -const QString KcmGtk::KDE_RC_DIR(KGlobal::dirs()->localkdedir() + "/env/"); -const QString KcmGtk::GTK_QT_RC_FILE("gtk-qt-engine.rc.sh"); +const TQString KcmGtk::GTK_RC_FILE(".gtkrc-2.0-kde-kde4"); +const TQString KcmGtk::KDE_RC_DIR(KGlobal::dirs()->localkdedir() + "/env/"); +const TQString KcmGtk::GTK_TQT_RC_FILE("gtk-qt-engine.rc.sh"); -/*typedef KGenericFactory<KcmGtk, QWidget> KcmGtkFactory; +/*typedef KGenericFactory<KcmGtk, TQWidget> KcmGtkFactory; K_EXPORT_COMPONENT_FACTORY( kcm_gtk, KcmGtkFactory("gtk"))*/ extern "C" { - KCModule *create_kcmgtk( QWidget * parent, const char * name ) + KCModule *create_kcmgtk( TQWidget * tqparent, const char * name ) { KGlobal::locale()->insertCatalogue( "gtkqtengine" ); - return new KcmGtk( parent, "kcmgtk" ); + return new KcmGtk( tqparent, "kcmgtk" ); } } @@ -77,21 +77,21 @@ GtkRcParser::GtkRcParser() { } -void GtkRcParser::parse(QString fileName) +void GtkRcParser::parse(TQString fileName) { - QFile file(fileName); + TQFile file(fileName); file.open(IO_ReadOnly); - QTextStream stream(&file); + TQTextStream stream(&file); - QRegExp includeRe("include\\s*\"([^\"]*)\""); - QRegExp fontRe("font_name\\s*=\\s*\"([^\"]*)\""); - QRegExp keyThemeRe("gtk-key-theme-name\\s*=\\s*\"([^\"]*)\""); + TQRegExp includeRe("include\\s*\"([^\"]*)\""); + TQRegExp fontRe("font_name\\s*=\\s*\"([^\"]*)\""); + TQRegExp keyThemeRe("gtk-key-theme-name\\s*=\\s*\"([^\"]*)\""); - QStringList includes; + TQStringList includes; while (1) { - QString line = stream.readLine(); + TQString line = stream.readLine(); if (line.isNull()) break; if (line.startsWith("#")) @@ -103,7 +103,7 @@ void GtkRcParser::parse(QString fileName) { if (includeRe.search(line) == -1) continue; - QString themePath = includeRe.cap(1); + TQString themePath = includeRe.cap(1); if (themePath.endsWith("/gtk-2.0/gtkrc") && !themePath.startsWith("/etc")) style = includeRe.cap(1); } @@ -118,7 +118,7 @@ void GtkRcParser::parse(QString fileName) { if (keyThemeRe.search(line) == -1) continue; - if (keyThemeRe.cap(1).lower() == "emacs") + if (TQString(keyThemeRe.cap(1)).lower() == "emacs") emacs = true; } } @@ -126,16 +126,16 @@ void GtkRcParser::parse(QString fileName) file.close(); } -QFont GtkRcParser::parseFont(QString fontString) +TQFont GtkRcParser::parseFont(TQString fontString) { - QFont ret; + TQFont ret; while (true) { - int lastSpacePos = fontString.findRev(' '); + int lastSpacePos = fontString.tqfindRev(' '); if (lastSpacePos == -1) break; - QString lastWord = fontString.right(fontString.length() - lastSpacePos).stripWhiteSpace(); + TQString lastWord = fontString.right(fontString.length() - lastSpacePos).stripWhiteSpace(); if (lastWord.lower() == "bold") ret.setBold(true); @@ -156,8 +156,8 @@ QFont GtkRcParser::parseFont(QString fontString) return ret; } -KcmGtk::KcmGtk(QWidget *parent, const char *name, const QStringList&) - : KCModule(parent, name), +KcmGtk::KcmGtk(TQWidget *tqparent, const char *name, const TQStringList&) + : KCModule(tqparent, name), myAboutData(0), emacsDetailsDialog(NULL), searchPathsDialog(NULL) @@ -166,17 +166,17 @@ KcmGtk::KcmGtk(QWidget *parent, const char *name, const QStringList&) config = new KConfig("kcmgtkrc"); - QStringList gtkSearchPathsDefault; + TQStringList gtkSearchPathsDefault; gtkSearchPathsDefault.append("/usr"); gtkSearchPathsDefault.append("/usr/local"); gtkSearchPathsDefault.append("/opt/gnome"); - gtkSearchPathsDefault.append(QDir::homeDirPath() + "/.local"); + gtkSearchPathsDefault.append(TQDir::homeDirPath() + "/.local"); gtkSearchPaths = config->readListEntry("gtkSearchPaths", gtkSearchPathsDefault); - // Add the widget to our layout - QBoxLayout* l = new QVBoxLayout(this); + // Add the widget to our tqlayout + TQBoxLayout* l = new TQVBoxLayout(this); widget = new KcmGtkWidget(this); l->addWidget(widget); @@ -191,33 +191,33 @@ KcmGtk::KcmGtk(QWidget *parent, const char *name, const QStringList&) load(); // Connect some signals - connect(widget->warning2, SIGNAL(leftClickedURL(const QString&)), KApplication::kApplication(), SLOT(invokeBrowser(const QString&))); - connect(widget->styleGroup, SIGNAL(clicked(int)), SLOT(itemChanged())); - connect(widget->fontGroup, SIGNAL(clicked(int)), SLOT(itemChanged())); - connect(widget->styleBox, SIGNAL(activated(int)), SLOT(itemChanged())); - connect(widget->styleBox, SIGNAL(activated(int)), SLOT(styleChanged())); - connect(widget->emacsBox, SIGNAL(toggled(bool)), SLOT(itemChanged())); - connect(widget->fontChange, SIGNAL(clicked()), SLOT(fontChangeClicked())); - connect(widget->firefoxFix, SIGNAL(clicked()), SLOT(firefoxFixClicked())); - connect(widget->emacsDetails, SIGNAL(clicked()), SLOT(emacsDetailsClicked())); - connect(widget->warning3, SIGNAL(clicked()), SLOT(searchPathsClicked())); + connect(widget->warning2, TQT_SIGNAL(leftClickedURL(const TQString&)), KApplication::kApplication(), TQT_SLOT(invokeBrowser(const TQString&))); + connect(widget->styleGroup, TQT_SIGNAL(clicked(int)), TQT_SLOT(itemChanged())); + connect(widget->fontGroup, TQT_SIGNAL(clicked(int)), TQT_SLOT(itemChanged())); + connect(widget->styleBox, TQT_SIGNAL(activated(int)), TQT_SLOT(itemChanged())); + connect(widget->styleBox, TQT_SIGNAL(activated(int)), TQT_SLOT(styleChanged())); + connect(widget->emacsBox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(itemChanged())); + connect(widget->fontChange, TQT_SIGNAL(clicked()), TQT_SLOT(fontChangeClicked())); + connect(widget->firefoxFix, TQT_SIGNAL(clicked()), TQT_SLOT(firefoxFixClicked())); + connect(widget->emacsDetails, TQT_SIGNAL(clicked()), TQT_SLOT(emacsDetailsClicked())); + connect(widget->warning3, TQT_SIGNAL(clicked()), TQT_SLOT(searchPathsClicked())); } void KcmGtk::getInstalledThemes() { themes.clear(); - for ( QStringList::Iterator it = gtkSearchPaths.begin(); it != gtkSearchPaths.end(); ++it ) + for ( TQStringList::Iterator it = gtkSearchPaths.begin(); it != gtkSearchPaths.end(); ++it ) { - QString path = (*it) + "/share/themes/"; - QDir dir(path); - QStringList entryList = dir.entryList(QDir::Dirs, QDir::Unsorted); - for ( QStringList::Iterator it2 = entryList.begin(); it2 != entryList.end(); ++it2 ) + TQString path = (*it) + "/share/themes/"; + TQDir dir(path); + TQStringList entryList = dir.entryList(TQDir::Dirs, TQDir::Unsorted); + for ( TQStringList::Iterator it2 = entryList.begin(); it2 != entryList.end(); ++it2 ) { if ((*it2).startsWith(".")) continue; - if (themes.find(*it2) != themes.end()) + if (themes.tqfind(*it2) != themes.end()) continue; - if (!QFile::exists(path + (*it2) + "/gtk-2.0/gtkrc")) + if (!TQFile::exists(path + (*it2) + "/gtk-2.0/gtkrc")) continue; themes.insert((*it2), path + (*it2) + "/gtk-2.0/gtkrc"); } @@ -226,7 +226,7 @@ void KcmGtk::getInstalledThemes() widget->styleBox->clear(); widget->styleBox->insertStringList(themes.keys()); - bool installed = (themes.find("Qt") != themes.end()); + bool installed = (themes.tqfind("TQt") != themes.end()); widget->styleKde->setEnabled(installed); widget->warning1->setHidden(installed); widget->warning2->setHidden(installed); @@ -255,20 +255,20 @@ void KcmGtk::styleChanged() itemChanged(); } -QString KcmGtk::env(QString key) +TQString KcmGtk::env(TQString key) { char* value = getenv(key.latin1()); if (value == NULL) - return QString::null; + return TQString(); else - return QString(value); + return TQString(value); } void KcmGtk::updateFontPreview() { widget->fontPreview->setFont(font); widget->fontPreview->setText( - i18n("%1 (size %2)").arg(font.family()).arg(QString::number(font.pointSize()))); + i18n("%1 (size %2)").tqarg(font.family()).tqarg(TQString::number(font.pointSize()))); widget->fontPreview2->setFont(font); } @@ -281,18 +281,18 @@ KcmGtk::~KcmGtk() void KcmGtk::load() { - parser.parse(QDir::homeDirPath() + "/" + GTK_RC_FILE); + parser.parse(TQDir::homeDirPath() + "/" + GTK_RC_FILE); - bool usingQtEngine = false; + bool usingTQtEngine = false; if (!parser.style.isEmpty()) { - for ( QMapIterator<QString, QString> it = themes.begin(); it != themes.end(); ++it ) + for ( TQMapIterator<TQString, TQString> it = themes.begin(); it != themes.end(); ++it ) { if (it.data() != parser.style) continue; - if (it.key() == "Qt") - usingQtEngine = true; + if (it.key() == "TQt") + usingTQtEngine = true; for (int i=0 ; i<widget->styleBox->count() ; ++i) { @@ -306,17 +306,17 @@ void KcmGtk::load() break; } - if (usingQtEngine) + if (usingTQtEngine) widget->styleGroup->setButton(widget->styleGroup->id(widget->styleKde)); else widget->styleGroup->setButton(widget->styleGroup->id(widget->styleOther)); } font = parser.font; - if (QApplication::font().family() == font.family() && - QApplication::font().pointSize() == font.pointSize() && - QApplication::font().bold() == font.bold() && - QApplication::font().italic() == font.italic()) + if (TQApplication::font().family() == font.family() && + TQApplication::font().pointSize() == font.pointSize() && + TQApplication::font().bold() == font.bold() && + TQApplication::font().italic() == font.italic()) widget->fontGroup->setButton(widget->fontGroup->id(widget->fontKde)); else widget->fontGroup->setButton(widget->fontGroup->id(widget->fontOther)); @@ -330,24 +330,24 @@ void KcmGtk::load() void KcmGtk::save() { // First write out the gtkrc file - QFile file(QDir::homeDirPath() + "/" + GTK_RC_FILE); + TQFile file(TQDir::homeDirPath() + "/" + GTK_RC_FILE); file.open(IO_WriteOnly); - QTextStream stream(&file); + TQTextStream stream(&file); - QFont selectedFont(widget->fontKde->isChecked() ? QApplication::font() : font); - QString fontName = selectedFont.family() + " " + - QString(selectedFont.bold() ? "Bold " : "") + - QString(selectedFont.italic() ? "Italic " : "") + - QString::number(selectedFont.pointSize()); + TQFont selectedFont(widget->fontKde->isChecked() ? TQApplication::font() : font); + TQString fontName = selectedFont.family() + " " + + TQString(selectedFont.bold() ? "Bold " : "") + + TQString(selectedFont.italic() ? "Italic " : "") + + TQString::number(selectedFont.pointSize()); - QString themeName = widget->styleKde->isChecked() ? themes["Qt"] : themes[widget->styleBox->currentText()]; - QString themeNameShort = widget->styleKde->isChecked() ? QString("Qt") : widget->styleBox->currentText(); + TQString themeName = widget->styleKde->isChecked() ? themes["TQt"] : themes[widget->styleBox->currentText()]; + TQString themeNameShort = widget->styleKde->isChecked() ? TQString("TQt") : widget->styleBox->currentText(); stream << "# This file was written by KDE\n"; stream << "# You can edit it in the KDE control center, under \"GTK Styles and Fonts\"\n"; stream << "\n"; stream << "include \"" << themeName << "\"\n"; - if (QFile::exists("/etc/gtk-2.0/gtkrc")) + if (TQFile::exists("/etc/gtk-2.0/gtkrc")) stream << "include \"/etc/gtk-2.0/gtkrc\"\n"; stream << "\n"; stream << "style \"user-font\"\n"; @@ -365,22 +365,22 @@ void KcmGtk::save() file.close(); // Now we check if that file is actually being loaded. - QDir kdeRcDir; + TQDir kdeRcDir; if (!kdeRcDir.exists(KDE_RC_DIR)) { // Make sure KDE's rc dir exists kdeRcDir.mkdir(KDE_RC_DIR); } - file.setName(KDE_RC_DIR + "/" + GTK_QT_RC_FILE); + file.setName(KDE_RC_DIR + "/" + GTK_TQT_RC_FILE); bool envFileDidNotExist = (!file.exists()); file.open(IO_ReadWrite); - stream.setDevice(&file); + stream.setDevice(TQT_TQIODEVICE(&file)); bool found = false; for (;;) { - QString line = stream.readLine(); + TQString line = stream.readLine(); if (line.isNull()) break; @@ -404,16 +404,16 @@ void KcmGtk::save() // Tell the user to restart KDE if the environment file was created this time if (envFileDidNotExist) - QMessageBox::information(this, "Restart KDE", "Your changes have been saved, but you will have to restart KDE for them to take effect.", QMessageBox::Ok); + TQMessageBox::information(this, "Restart KDE", "Your changes have been saved, but you will have to restart KDE for them to take effect.", TQMessageBox::Ok); - // Older versions of the Gtk-Qt theme engine wrote directly into ~/.gtkrc-2.0 + // Older versions of the Gtk-TQt theme engine wrote directly into ~/.gtkrc-2.0 // If the user has upgraded, that file needs to be deleted so the old settings // won't override the new ones set now. - file.setName(QDir::homeDirPath() + "/.gtkrc-2.0"); + file.setName(TQDir::homeDirPath() + "/.gtkrc-2.0"); if (file.exists()) { file.open(IO_ReadOnly); - QString firstLine; + TQString firstLine; file.readLine(firstLine, 50); file.close(); @@ -422,19 +422,19 @@ void KcmGtk::save() } // Simarly, remove the line we added to ~/.bashrc to tell GTK to load ~/.gtkrc-2.0 - file.setName(QDir::homeDirPath() + "/.bashrc"); + file.setName(TQDir::homeDirPath() + "/.bashrc"); if (file.exists()) { file.open(IO_ReadOnly); - QByteArray fileData = file.readAll(); + TQByteArray fileData = file.readAll(); file.close(); - QString rcLine = "export GTK2_RC_FILES=$HOME/.gtkrc-2.0"; - QString fileDataString(fileData); - fileDataString.replace("\n" + rcLine, "\n# (This is no longer needed from version 0.8 of the theme engine)\n# " + rcLine); + TQString rcLine = "export GTK2_RC_FILES=$HOME/.gtkrc-2.0"; + TQString fileDataString(fileData); + fileDataString.tqreplace("\n" + rcLine, "\n# (This is no longer needed from version 0.8 of the theme engine)\n# " + rcLine); file.open(IO_WriteOnly); - stream.setDevice(&file); + stream.setDevice(TQT_TQIODEVICE(&file)); stream << fileDataString; file.close(); } @@ -448,7 +448,7 @@ int KcmGtk::buttons() return KCModule::Apply; } -QString KcmGtk::quickHelp() const +TQString KcmGtk::quickHelp() const { return i18n(""); } @@ -457,10 +457,10 @@ QString KcmGtk::quickHelp() const void KcmGtk::firefoxFixClicked() { profiles.clear(); - getProfiles(QDir::homeDirPath() + "/.mozilla/firefox/", 0); - getProfiles(QDir::homeDirPath() + "/.thunderbird/", 1); + getProfiles(TQDir::homeDirPath() + "/.mozilla/firefox/", 0); + getProfiles(TQDir::homeDirPath() + "/.thunderbird/", 1); - QString profilePath; + TQString profilePath; if (profiles.count() == 0) { KMessageBox::error(this, i18n("No Mozilla profiles found"), i18n("Could not load Mozilla profiles")); @@ -477,9 +477,9 @@ void KcmGtk::firefoxFixClicked() w->profilesList->header()->hide(); w->profilesList->hideColumn(1); - QPixmap icon = KGlobal::iconLoader()->loadIcon("kuser", KIcon::Small); + TQPixmap icon = KGlobal::iconLoader()->loadIcon("kuser", KIcon::Small); - for ( QMapIterator<QString,QString> it = profiles.begin(); it != profiles.end(); ++it ) + for ( TQMapIterator<TQString,TQString> it = profiles.begin(); it != profiles.end(); ++it ) { KListViewItem* i = new KListViewItem(w->profilesList); i->setPixmap(0, icon); @@ -488,13 +488,13 @@ void KcmGtk::firefoxFixClicked() } dialog->setMainWidget(w); - if (dialog->exec() == QDialog::Rejected) + if (dialog->exec() == TQDialog::Rejected) { delete dialog; return; } - QListViewItemIterator it2(w->profilesList, QListViewItemIterator::Selected); + TQListViewItemIterator it2(w->profilesList, TQListViewItemIterator::Selected); while (it2.current()) { KListViewItem* i = (KListViewItem*) it2.current(); @@ -508,22 +508,22 @@ void KcmGtk::firefoxFixClicked() KMessageBox::information(this, i18n("Your Mozilla profile was updated sucessfully. You must close and restart all Firefox and Thunderbird windows for the changes to take effect"), i18n("Mozilla profile")); } -void KcmGtk::getProfiles(const QString& basePath, int type) +void KcmGtk::getProfiles(const TQString& basePath, int type) { - QString fileName = basePath + "/profiles.ini"; - if (QFile::exists(fileName)) + TQString fileName = basePath + "/profiles.ini"; + if (TQFile::exists(fileName)) { KConfig config(fileName, true, false); - QStringList groups = config.groupList(); + TQStringList groups = config.groupList(); - for ( QStringList::Iterator it = groups.begin(); it != groups.end(); ++it ) + for ( TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it ) { if (!(*it).lower().startsWith("profile")) continue; config.setGroup(*it); - QString name = (type ? i18n("Thunderbird") : i18n("Firefox")) + " - " + config.readEntry("Name"); - QString path = config.readEntry("Path"); + TQString name = (type ? i18n("Thunderbird") : i18n("Firefox")) + " - " + config.readEntry("Name"); + TQString path = config.readEntry("Path"); if (!path.startsWith("/")) path = basePath + path; profiles.insert(name, path); @@ -531,65 +531,65 @@ void KcmGtk::getProfiles(const QString& basePath, int type) } } -void KcmGtk::fixProfile(const QString& path) +void KcmGtk::fixProfile(const TQString& path) { - if (!QFile::exists(path + "/chrome")) + if (!TQFile::exists(path + "/chrome")) { - QDir dir(path); + TQDir dir(path); dir.mkdir("chrome"); } - QString data = scrollBarCSS(); + TQString data = scrollBarCSS(); writeFirefoxCSS(path + "/chrome/userChrome.css", data); writeFirefoxCSS(path + "/chrome/userContent.css", data); } -QString KcmGtk::scrollBarCSS() +TQString KcmGtk::scrollBarCSS() { // The following code determines how many buttons are on a scrollbar // It works by looking at each pixel of the scrollbar's area not taken up by the groove, // and asking the style which subcontrol is at that location. - QScrollBar sbar(NULL); + TQScrollBar sbar(NULL); sbar.setOrientation(Qt::Horizontal); sbar.setValue(1); sbar.resize(200,25); - QRect rect = qApp->style().querySubControlMetrics(QStyle::CC_ScrollBar, &sbar, QStyle::SC_ScrollBarGroove); + TQRect rect = tqApp->tqstyle().querySubControlMetrics(TQStyle::CC_ScrollBar, &sbar, TQStyle::SC_ScrollBarGroove); bool back1 = false; bool forward1 = false; bool back2 = false; bool forward2 = false; - QStyle::SubControl sc = QStyle::SC_None; - for (QPoint pos(0,7) ; pos.x()<rect.x() ; pos.setX(pos.x()+1)) + TQStyle::SubControl sc = TQStyle::SC_None; + for (TQPoint pos(0,7) ; pos.x()<rect.x() ; pos.setX(pos.x()+1)) { - QStyle::SubControl sc2 = qApp->style().querySubControl(QStyle::CC_ScrollBar, &sbar, pos); + TQStyle::SubControl sc2 = tqApp->tqstyle().querySubControl(TQStyle::CC_ScrollBar, &sbar, pos); if (sc != sc2) { - if (sc2 == QStyle::SC_ScrollBarAddLine) forward1 = true; - if (sc2 == QStyle::SC_ScrollBarSubLine) back1 = true; + if (sc2 == TQStyle::SC_ScrollBarAddLine) forward1 = true; + if (sc2 == TQStyle::SC_ScrollBarSubLine) back1 = true; sc = sc2; } } - sc = QStyle::SC_None; - for (QPoint pos(rect.x()+rect.width(),7) ; pos.x()<200 ; pos.setX(pos.x()+1)) + sc = TQStyle::SC_None; + for (TQPoint pos(rect.x()+rect.width(),7) ; pos.x()<200 ; pos.setX(pos.x()+1)) { - QStyle::SubControl sc2 = qApp->style().querySubControl(QStyle::CC_ScrollBar, &sbar, pos); + TQStyle::SubControl sc2 = tqApp->tqstyle().querySubControl(TQStyle::CC_ScrollBar, &sbar, pos); if (sc != sc2) { - if (sc2 == QStyle::SC_ScrollBarAddLine) forward2 = true; - if (sc2 == QStyle::SC_ScrollBarSubLine) back2 = true; + if (sc2 == TQStyle::SC_ScrollBarAddLine) forward2 = true; + if (sc2 == TQStyle::SC_ScrollBarSubLine) back2 = true; sc = sc2; } } - QString upTop = (back1 ? "-moz-box" : "none"); - QString downTop = (forward1 ? "-moz-box" : "none"); - QString upBottom = (back2 ? "-moz-box" : "none"); - QString downBottom = (forward2 ? "-moz-box" : "none"); + TQString upTop = (back1 ? "-moz-box" : "none"); + TQString downTop = (forward1 ? "-moz-box" : "none"); + TQString upBottom = (back2 ? "-moz-box" : "none"); + TQString downBottom = (forward2 ? "-moz-box" : "none"); - QString data; + TQString data; data += "/* The following four lines were added by KDE */\n"; data += "scrollbarbutton[sbattr=\"scrollbar-up-top\"] { display: " + upTop + " !important; }\n"; data += "scrollbarbutton[sbattr=\"scrollbar-down-top\"] { display: " + downTop + " !important; }\n"; @@ -599,16 +599,16 @@ QString KcmGtk::scrollBarCSS() return data; } -void KcmGtk::writeFirefoxCSS(const QString& path, const QString& data) +void KcmGtk::writeFirefoxCSS(const TQString& path, const TQString& data) { - QString fileData; - QFile file(path); + TQString fileData; + TQFile file(path); if (file.open(IO_ReadOnly)) { - QTextStream stream(&file); + TQTextStream stream(&file); for (;;) { - QString line = stream.readLine(); + TQString line = stream.readLine(); if (line.isNull()) break; @@ -627,10 +627,10 @@ void KcmGtk::writeFirefoxCSS(const QString& path, const QString& data) if (!file.open(IO_WriteOnly | IO_Truncate)) { - KMessageBox::error(this, i18n("Could not write to %1").arg(path), i18n("Mozilla profile")); + KMessageBox::error(this, i18n("Could not write to %1").tqarg(path), i18n("Mozilla profile")); return; } - QTextStream stream(&file); + TQTextStream stream(&file); stream << fileData << data; file.close(); @@ -653,16 +653,16 @@ void KcmGtk::searchPathsClicked() if (searchPathsDialog == NULL) { searchPathsDialog = new SearchPaths(this); - connect(searchPathsDialog->okButton, SIGNAL(clicked()), SLOT(searchPathsOk())); - connect(searchPathsDialog->pathBox, SIGNAL(textChanged(const QString&)), SLOT(searchPathsTextChanged(const QString&))); - connect(searchPathsDialog->pathList, SIGNAL(currentChanged(QListBoxItem*)), SLOT(searchPathsCurrentChanged(QListBoxItem*))); - connect(searchPathsDialog->addButton, SIGNAL(clicked()), SLOT(searchPathsAddClicked())); - connect(searchPathsDialog->removeButton, SIGNAL(clicked()), SLOT(searchPathsRemoveClicked())); + connect(searchPathsDialog->okButton, TQT_SIGNAL(clicked()), TQT_SLOT(searchPathsOk())); + connect(searchPathsDialog->pathBox, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(searchPathsTextChanged(const TQString&))); + connect(searchPathsDialog->pathList, TQT_SIGNAL(currentChanged(TQListBoxItem*)), TQT_SLOT(searchPathsCurrentChanged(TQListBoxItem*))); + connect(searchPathsDialog->addButton, TQT_SIGNAL(clicked()), TQT_SLOT(searchPathsAddClicked())); + connect(searchPathsDialog->removeButton, TQT_SIGNAL(clicked()), TQT_SLOT(searchPathsRemoveClicked())); } searchPathsDialog->pathList->clear(); - for (QStringList::Iterator it = gtkSearchPaths.begin(); it != gtkSearchPaths.end(); ++it ) - new QListBoxText(searchPathsDialog->pathList, *it); + for (TQStringList::Iterator it = gtkSearchPaths.begin(); it != gtkSearchPaths.end(); ++it ) + new TQListBoxText(searchPathsDialog->pathList, *it); searchPathsDialog->show(); } @@ -671,7 +671,7 @@ void KcmGtk::searchPathsOk() { gtkSearchPaths.clear(); int i=0; - QListBoxItem* item = 0; + TQListBoxItem* item = 0; while ((item = searchPathsDialog->pathList->item(i++))) gtkSearchPaths.append(item->text()); @@ -679,19 +679,19 @@ void KcmGtk::searchPathsOk() getInstalledThemes(); } -void KcmGtk::searchPathsTextChanged(const QString& text) +void KcmGtk::searchPathsTextChanged(const TQString& text) { searchPathsDialog->addButton->setDisabled(text.isEmpty()); } -void KcmGtk::searchPathsCurrentChanged(QListBoxItem* item) +void KcmGtk::searchPathsCurrentChanged(TQListBoxItem* item) { searchPathsDialog->removeButton->setEnabled(item != NULL); } void KcmGtk::searchPathsAddClicked() { - new QListBoxText(searchPathsDialog->pathList, searchPathsDialog->pathBox->text()); + new TQListBoxText(searchPathsDialog->pathList, searchPathsDialog->pathBox->text()); searchPathsDialog->pathBox->clear(); } diff --git a/kcm_gtk/kcmgtk.h b/kcm_gtk/kcmgtk.h index 2f132ab..039e39a 100644 --- a/kcm_gtk/kcmgtk.h +++ b/kcm_gtk/kcmgtk.h @@ -34,35 +34,36 @@ public: GtkRcParser(); ~GtkRcParser() {} - void parse(QString fileName); + void parse(TQString fileName); - QFont font; - QString style; + TQFont font; + TQString style; bool emacs; private: - QFont parseFont(QString fontString); + TQFont parseFont(TQString fontString); }; class KcmGtk: public KCModule { Q_OBJECT + TQ_OBJECT // How to name the kde-specific gtk-rc-file - static const QString GTK_RC_FILE; + static const TQString GTK_RC_FILE; // Where to search for KDE's config files - static const QString KDE_RC_DIR; + static const TQString KDE_RC_DIR; // How to name qtk-qt-engines rc-file - static const QString GTK_QT_RC_FILE; + static const TQString GTK_TQT_RC_FILE; public: - KcmGtk( QWidget *parent=0, const char *name=0, const QStringList& = QStringList() ); + KcmGtk( TQWidget *tqparent=0, const char *name=0, const TQStringList& = TQStringList() ); ~KcmGtk(); virtual void load(); virtual void save(); virtual int buttons(); - virtual QString quickHelp() const; + virtual TQString quickHelp() const; virtual const KAboutData *aboutData()const { return myAboutData; }; @@ -76,27 +77,27 @@ public slots: void searchPathsOk(); void searchPathsAddClicked(); void searchPathsRemoveClicked(); - void searchPathsTextChanged(const QString& text); - void searchPathsCurrentChanged(QListBoxItem* item); + void searchPathsTextChanged(const TQString& text); + void searchPathsCurrentChanged(TQListBoxItem* item); private: void updateFontPreview(); - void getProfiles(const QString& basePath, int type); - void fixProfile(const QString& path); - QString scrollBarCSS(); - void writeFirefoxCSS(const QString& path, const QString& data); + void getProfiles(const TQString& basePath, int type); + void fixProfile(const TQString& path); + TQString scrollBarCSS(); + void writeFirefoxCSS(const TQString& path, const TQString& data); void getInstalledThemes(); - QString env(QString key); + TQString env(TQString key); KcmGtkWidget* widget; - QMap<QString,QString> themes; + TQMap<TQString,TQString> themes; GtkRcParser parser; KAboutData *myAboutData; - QFont font; - QMap<QString,QString> profiles; + TQFont font; + TQMap<TQString,TQString> profiles; EmacsDetails* emacsDetailsDialog; - QStringList gtkSearchPaths; + TQStringList gtkSearchPaths; SearchPaths* searchPathsDialog; KConfig* config; }; diff --git a/kcm_gtk/kcmgtkwidget.ui b/kcm_gtk/kcmgtkwidget.ui index 99107ed..29697ab 100644 --- a/kcm_gtk/kcmgtkwidget.ui +++ b/kcm_gtk/kcmgtkwidget.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KcmGtkWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KcmGtkWidget</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -22,7 +22,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>styleGroup</cstring> </property> @@ -41,15 +41,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout12</cstring> + <cstring>tqlayout12</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>styleIcon</cstring> </property> @@ -67,7 +67,7 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -76,9 +76,9 @@ </spacer> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout17</cstring> + <cstring>tqlayout17</cstring> </property> <grid> <property name="name"> @@ -94,22 +94,22 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>150</width> <height>21</height> </size> </property> </spacer> - <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>layout16</cstring> + <cstring>tqlayout16</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>warning3</cstring> </property> @@ -127,7 +127,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>176</width> <height>20</height> @@ -136,7 +136,7 @@ </spacer> </hbox> </widget> - <widget class="QRadioButton" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQRadioButton" row="0" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>styleKde</cstring> </property> @@ -144,7 +144,7 @@ <string>&Use my KDE style in GTK applications</string> </property> </widget> - <widget class="QComboBox" row="1" column="1"> + <widget class="TQComboBox" row="1" column="1"> <property name="name"> <cstring>styleBox</cstring> </property> @@ -160,7 +160,7 @@ <bool>false</bool> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>styleOther</cstring> </property> @@ -171,7 +171,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>warning1</cstring> </property> @@ -194,7 +194,7 @@ </widget> </hbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>fontGroup</cstring> </property> @@ -213,15 +213,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7_2</cstring> + <cstring>tqlayout7_2</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>fontIcon</cstring> </property> @@ -239,7 +239,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>31</height> @@ -248,15 +248,15 @@ </spacer> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton" row="1" column="1"> + <widget class="TQPushButton" row="1" column="1"> <property name="name"> <cstring>fontChange</cstring> </property> @@ -274,14 +274,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>238</width> <height>21</height> </size> </property> </spacer> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>fontOther</cstring> </property> @@ -289,9 +289,9 @@ <string>Use another font:</string> </property> </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> + <cstring>tqlayout10</cstring> </property> <hbox> <property name="name"> @@ -307,7 +307,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>10</height> @@ -324,7 +324,7 @@ </widget> </hbox> </widget> - <widget class="QRadioButton" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQRadioButton" row="0" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>fontKde</cstring> </property> @@ -335,9 +335,9 @@ <string>Alt+Y</string> </property> </widget> - <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <hbox> <property name="name"> @@ -353,7 +353,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -367,7 +367,7 @@ <property name="text"> <string>Preview line 1</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter</set> </property> </widget> @@ -377,7 +377,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -388,15 +388,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>keyboardIcon</cstring> </property> @@ -414,7 +414,7 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>10</height> @@ -423,15 +423,15 @@ </spacer> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout12</cstring> + <cstring>tqlayout12</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>emacsBox</cstring> </property> @@ -442,15 +442,15 @@ <string>Alt+B</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>emacsDetails</cstring> </property> @@ -468,7 +468,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>141</width> <height>21</height> @@ -481,7 +481,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -500,15 +500,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7_2_2</cstring> + <cstring>tqlayout7_2_2</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>firefoxIcon</cstring> </property> @@ -526,7 +526,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>31</height> @@ -535,34 +535,34 @@ </spacer> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout12</cstring> + <cstring>tqlayout12</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> <property name="text"> <string>Scrollbar buttons may sometimes be displayed incorrectly in Firefox and Thunderbird. This can be fixed by installing some files into your Mozilla profile.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>firefoxFix</cstring> </property> @@ -580,7 +580,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>101</width> <height>21</height> @@ -593,14 +593,14 @@ </widget> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> <property name="text"> <string>Note that changes made here will only affect GTK applications when KDE is running. To change the styles and fonts used by applications in GNOME, use the GNOME configuration tools.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> @@ -614,7 +614,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>51</width> <height>16</height> @@ -636,7 +636,7 @@ <tabstop>emacsDetails</tabstop> <tabstop>firefoxFix</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kurllabel.h</includehint> <includehint>ksqueezedtextlabel.h</includehint> diff --git a/kcm_gtk/mozillaprofile.ui b/kcm_gtk/mozillaprofile.ui index 0c56821..ec55b8b 100644 --- a/kcm_gtk/mozillaprofile.ui +++ b/kcm_gtk/mozillaprofile.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>MozillaProfileWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>MozillaProfileWidget</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -22,7 +22,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>label</cstring> </property> @@ -67,7 +67,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistview.h</includehint> </includehints> diff --git a/kcm_gtk/searchpaths.ui b/kcm_gtk/searchpaths.ui index 3785983..9a22c30 100644 --- a/kcm_gtk/searchpaths.ui +++ b/kcm_gtk/searchpaths.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SearchPaths</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SearchPaths</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,36 +19,36 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> <property name="text"> <string>The control center module could not find the GTK-Qt theme engine in its list of search paths. If you have installed it elsewhere, you will need to add the correct path to the list below.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> - <widget class="QListBox"> + <widget class="TQListBox"> <property name="name"> <cstring>pathList</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout31</cstring> + <cstring>tqlayout31</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>pathBox</cstring> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>addButton</cstring> </property> @@ -62,7 +62,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>removeButton</cstring> </property> @@ -89,9 +89,9 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout33</cstring> + <cstring>tqlayout33</cstring> </property> <hbox> <property name="name"> @@ -107,14 +107,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>51</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>okButton</cstring> </property> @@ -122,7 +122,7 @@ <string>Ok</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>cancelButton</cstring> </property> @@ -148,5 +148,5 @@ <slot>reject()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/src/qt_main.c b/src/qt_main.c index 4e9eb1b..fab6003 100644 --- a/src/qt_main.c +++ b/src/qt_main.c @@ -11,19 +11,19 @@ G_MODULE_EXPORT GtkRcStyle * theme_create_rc_style (void); G_MODULE_EXPORT void theme_init (GTypeModule *module) { - createQApp(); + createTQApp(); qtengine_rc_style_register_type (module); qtengine_style_register_type (module); } G_MODULE_EXPORT void theme_exit (void) { - destroyQApp(); + destroyTQApp(); } G_MODULE_EXPORT GtkRcStyle * theme_create_rc_style (void) { - void *ptr = GTK_RC_STYLE (g_object_new (QTENGINE_TYPE_RC_STYLE, NULL)); + void *ptr = GTK_RC_STYLE (g_object_new (TQTENGINE_TYPE_RC_STYLE, NULL)); return (GtkRcStyle *)ptr; } diff --git a/src/qt_qt_wrapper.cpp b/src/qt_qt_wrapper.cpp index 6ca87fb..9eb3c47 100644 --- a/src/qt_qt_wrapper.cpp +++ b/src/qt_qt_wrapper.cpp @@ -1,20 +1,20 @@ -#include <qstyle.h> -#include <qpainter.h> -#include <qpushbutton.h> -#include <qimage.h> -#include <qstylefactory.h> -#include <qtabbar.h> -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qscrollbar.h> -#include <qmenubar.h> -#include <qcombobox.h> -#include <qprogressbar.h> -#include <qslider.h> -#include <qtoolbutton.h> -#include <qapplication.h> -#include <qdir.h> -#include <qregexp.h> +#include <tqstyle.h> +#include <tqpainter.h> +#include <tqpushbutton.h> +#include <tqimage.h> +#include <tqstylefactory.h> +#include <tqtabbar.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> +#include <tqscrollbar.h> +#include <tqmenubar.h> +#include <tqcombobox.h> +#include <tqprogressbar.h> +#include <tqslider.h> +#include <tqtoolbutton.h> +#include <tqapplication.h> +#include <tqdir.h> +#include <tqregexp.h> #undef signals #include <gdk/gdkx.h> @@ -40,41 +40,41 @@ #include "qt_qt_wrapper.h" #include "qt_style.h" -#define RC_CACHE_VERSION QString("1") +#define RC_CACHE_VERSION TQString("1") -bool gtkQtEnable = false; +bool gtkTQtEnable = false; bool mozillaFix = false; -bool qAppOwner = false; +bool tqAppOwner = false; -QStringList appDirList; -typedef QMap<QString, QString> IconMap; +TQStringList appDirList; +typedef TQMap<TQString, TQString> IconMap; IconMap iconMap[4]; extern int errno; -QScrollBar* scrollBar = 0; -QWidget* meepWidget = 0; -QWidget* meepWidgetP = 0; -QSlider* meepSlider = 0; -QTabBar* meepTabBar = 0; +TQScrollBar* scrollBar = 0; +TQWidget* meepWidget = 0; +TQWidget* meepWidgetP = 0; +TQSlider* meepSlider = 0; +TQTabBar* meepTabBar = 0; GdkGC* altBackGC = 0; -QWidget* smw = 0; +TQWidget* smw = 0; GtkRcStyle* gtkRcStyle = 0; -QStringList kdeSearchPaths; -QString iconTheme; -QStringList iconThemeDirs; -QColor alternateBackgroundColour; +TQStringList kdeSearchPaths; +TQString iconTheme; +TQStringList iconThemeDirs; +TQColor alternateBackgroundColour; int showIconsOnButtons; int toolbarStyle; -const QPixmap* backgroundTile; +const TQPixmap* backgroundTile; GdkPixmap* backgroundTileGdk; -QPixmap* menuBackgroundPixmap; +TQPixmap* menuBackgroundPixmap; GdkPixmap* menuBackgroundPixmapGdk; -QPixmap* fillPixmap; +TQPixmap* fillPixmap; int scrollBarSpacingLeft = 0; int scrollBarSpacingRight = 0; @@ -86,14 +86,14 @@ int isDomino; int isPolyester; int eclipseFix; int openOfficeFix; -int gtkQtDebug; +int gtkTQtDebug; Atom kipcCommAtom; Atom desktopWindowAtom; void setFillPixmap(GdkPixbuf* buf) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; // This code isn't very robust. It doesn't handle depths other than 24 bits. @@ -106,7 +106,7 @@ void setFillPixmap(GdkPixbuf* buf) if (depth != 24) return; - QImage fillImage(width, height, 32); + TQImage fillImage(width, height, 32); uchar* source = gdk_pixbuf_get_pixels(buf); uchar* dest = fillImage.bits(); @@ -130,7 +130,7 @@ void setFillPixmap(GdkPixbuf* buf) if (fillPixmap) delete fillPixmap; fillPixmap = 0; - fillPixmap = new QPixmap(); + fillPixmap = new TQPixmap(); fillPixmap->convertFromImage(fillImage); return; } @@ -151,7 +151,7 @@ static int dummy_xio_errhandler( Display * ) return 0; } -void createQApp() +void createTQApp() { int argc = 1; char** argv; @@ -160,7 +160,7 @@ void createQApp() argv[0] = (char*) malloc(sizeof(char) * 19); strncpy(argv[0], "gtk-qt-application", 19); - QString cmdLine; + TQString cmdLine; #ifdef USE_FREEBSD /* @@ -205,7 +205,7 @@ void createQApp() } if (ret == -1) { - printf("Gtk-Qt theme engine warning:\n"); + printf("Gtk-TQt theme engine warning:\n"); printf(msg); printf(" This may cause problems for the GNOME window manager\n"); } @@ -289,18 +289,18 @@ void createQApp() if (ret == -1) { - printf("Gtk-Qt theme engine warning:\n"); + printf("Gtk-TQt theme engine warning:\n"); printf(msg); printf(" This may cause problems for the GNOME window manager\n"); } #else // USE_SOLARIS #ifndef USE_FREEBSD - QCString cmdlinePath; + TQCString cmdlinePath; cmdlinePath.sprintf("/proc/%d/cmdline", getpid()); int fd = open(cmdlinePath, O_RDONLY); if (fd == -1) { - printf("Gtk-Qt theme engine warning:\n"); + printf("Gtk-TQt theme engine warning:\n"); printf(" Could not open %s\n", (const char*)cmdlinePath); printf(" This may cause problems for the GNOME window manager\n"); } @@ -319,7 +319,7 @@ void createQApp() #endif // USE_FREEBSD #endif // USE_SOLARIS - mozillaFix = (cmdLine.contains("mozilla") || cmdLine.contains("firefox")); + mozillaFix = (cmdLine.tqcontains("mozilla") || cmdLine.tqcontains("firefox")); openOfficeFix = (cmdLine.endsWith("soffice.bin")) | (cmdLine.endsWith("swriter.bin")) @@ -328,17 +328,17 @@ void createQApp() | (cmdLine.endsWith("spadmin.bin")) | (cmdLine.endsWith("simpress.bin")); - eclipseFix = cmdLine.contains("eclipse"); + eclipseFix = cmdLine.tqcontains("eclipse"); - gtkQtDebug = (getenv("GTK_QT_ENGINE_DEBUG") != NULL) ? 1 : 0; + gtkTQtDebug = (getenv("GTK_TQT_ENGINE_DEBUG") != NULL) ? 1 : 0; - if (gtkQtDebug) - printf("createQApp()\n"); + if (gtkTQtDebug) + printf("createTQApp()\n"); char* sessionEnv = getenv("SESSION_MANAGER"); - if (QString(sessionEnv).endsWith(QString::number(getpid())) || cmdLine.contains("nspluginviewer") || cmdLine.contains("gnome-wm") || cmdLine.contains("metacity") || cmdLine.contains("xfwm4") || (getenv("GTK_QT_ENGINE_DISABLE") != NULL)) + if (TQString(sessionEnv).endsWith(TQString::number(getpid())) || cmdLine.tqcontains("nspluginviewer") || cmdLine.tqcontains("gnome-wm") || cmdLine.tqcontains("metacity") || cmdLine.tqcontains("xfwm4") || (getenv("GTK_TQT_ENGINE_DISABLE") != NULL)) { - printf("Not initializing the Gtk-Qt theme engine\n"); + printf("Not initializing the Gtk-TQt theme engine\n"); } else { @@ -355,10 +355,10 @@ void createQApp() initKdeSettings(); - if (!qApp) + if (!tqApp) { - new QApplication(gdk_x11_get_default_xdisplay()); - qAppOwner = true; + new TQApplication(gdk_x11_get_default_xdisplay()); + tqAppOwner = true; } #ifndef USE_SOLARIS @@ -372,29 +372,29 @@ void createQApp() XSetErrorHandler( original_x_errhandler ); XSetIOErrorHandler( original_xio_errhandler ); - gtkQtEnable = true; + gtkTQtEnable = true; } free(argv[0]); free(argv); - if (!gtkQtEnable) + if (!gtkTQtEnable) return; - isBaghira = (QString(qApp->style().name()).lower() == "baghira"); - isKeramik = (QString(qApp->style().name()).lower() == "keramik"); - isAlloy = (QString(qApp->style().name()).lower() == "alloy"); - isDomino = (QString(qApp->style().name()).lower() == "domino"); - isPolyester = (QString(qApp->style().name()).lower() == "polyester"); + isBaghira = (TQString(tqApp->tqstyle().name()).lower() == "baghira"); + isKeramik = (TQString(tqApp->tqstyle().name()).lower() == "keramik"); + isAlloy = (TQString(tqApp->tqstyle().name()).lower() == "alloy"); + isDomino = (TQString(tqApp->tqstyle().name()).lower() == "domino"); + isPolyester = (TQString(tqApp->tqstyle().name()).lower() == "polyester"); if (isDomino) { - QScrollBar sbar(NULL); + TQScrollBar sbar(NULL); sbar.setOrientation(Qt::Horizontal); sbar.setValue(1); sbar.resize(200,25); - QRect rect = qApp->style().querySubControlMetrics(QStyle::CC_ScrollBar, &sbar, QStyle::SC_ScrollBarGroove); + TQRect rect = tqApp->tqstyle().querySubControlMetrics(TQStyle::CC_ScrollBar, &sbar, TQStyle::SC_ScrollBarGroove); scrollBarSpacingLeft = rect.x(); scrollBarSpacingRight = 200 - rect.x() - rect.width(); } @@ -403,7 +403,7 @@ void createQApp() /*setGnomeFonts(); setGnomeIcons();*/ - if (!cmdLine.contains("xfce-mcs-manager")) + if (!cmdLine.tqcontains("xfce-mcs-manager")) { // Get KDE related atoms from the X server kipcCommAtom = XInternAtom ( gdk_x11_get_default_xdisplay() , "KIPC_COMM_ATOM" , false ); @@ -411,7 +411,7 @@ void createQApp() // Create a new window, and set the KDE_DESKTOP_WINDOW property on it // This window will then receive events from KDE when the style changes - smw = new QWidget(0,0); + smw = new TQWidget(0,0); long data = 1; XChangeProperty(gdk_x11_get_default_xdisplay(), smw->winId(), desktopWindowAtom, desktopWindowAtom, @@ -421,12 +421,12 @@ void createQApp() gdk_window_add_filter( NULL, gdkEventFilter, 0); } - meepWidgetP = new QWidget(0); - meepWidget = new QWidget(meepWidgetP); - meepSlider = new QSlider(meepWidget); + meepWidgetP = new TQWidget(0); + meepWidget = new TQWidget(meepWidgetP); + meepSlider = new TQSlider(meepWidget); meepWidget->polish(); - meepTabBar = new QTabBar(meepWidget); + meepTabBar = new TQTabBar(meepWidget); menuBackgroundPixmap = NULL; backgroundTile = meepWidget->paletteBackgroundPixmap(); @@ -434,18 +434,18 @@ void createQApp() backgroundTileGdk = gdk_pixmap_foreign_new(backgroundTile->handle()); } -void destroyQApp() +void destroyTQApp() { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; delete meepWidget; delete meepWidgetP; delete menuBackgroundPixmap; delete smw; - if (qAppOwner) + if (tqAppOwner) { - delete qApp; - qApp = 0; + delete tqApp; + tqApp = 0; } if (altBackGC != 0) gtk_gc_release(altBackGC); @@ -463,17 +463,17 @@ GdkFilterReturn gdkEventFilter(GdkXEvent *xevent, GdkEvent *gevent, gpointer dat if (event->xclient.data.l[0] != 2) return GDK_FILTER_REMOVE; - if (gtkQtDebug) + if (gtkTQtDebug) printf("StyleChanged IPC message\n"); // Find out the new widget style - QString styleName = kdeConfigValue("General", "widgetStyle", ""); - QStyle* style = QStyleFactory::create(styleName); + TQString styleName = kdeConfigValue("General", "widgetStyle", ""); + TQStyle* style = TQStyleFactory::create(styleName); if (!style) return GDK_FILTER_REMOVE; - // Tell the QApplication about this new style - qApp->setStyle(style); + // Tell the TQApplication about this new style + tqApp->setStyle(style); // Now we need to update GTK's properties setRcProperties(gtkRcStyle, 1); // Rewrite our cache file @@ -484,20 +484,20 @@ GdkFilterReturn gdkEventFilter(GdkXEvent *xevent, GdkEvent *gevent, gpointer dat return GDK_FILTER_CONTINUE; } -QString kdeConfigValue(const QString& section, const QString& name, const QString& def) +TQString kdeConfigValue(const TQString& section, const TQString& name, const TQString& def) { - for ( QStringList::Iterator it = kdeSearchPaths.begin(); it != kdeSearchPaths.end(); ++it ) + for ( TQStringList::Iterator it = kdeSearchPaths.begin(); it != kdeSearchPaths.end(); ++it ) { - if (!QFile::exists((*it) + "/share/config/kdeglobals")) + if (!TQFile::exists((*it) + "/share/config/kdeglobals")) continue; - QFile file((*it) + "/share/config/kdeglobals"); + TQFile file((*it) + "/share/config/kdeglobals"); if (!file.open( IO_ReadOnly )) continue; - QTextStream stream( &file ); - QString line; - QString sec; + TQTextStream stream( &file ); + TQString line; + TQString sec; int i = 1; while ( !stream.atEnd() ) { @@ -509,7 +509,7 @@ QString kdeConfigValue(const QString& section, const QString& name, const QStrin } if (sec != section) continue; - QRegExp parser("([\\S]*)\\s*=\\s*([\\S]*)"); + TQRegExp parser("([\\S]*)\\s*=\\s*([\\S]*)"); if (parser.search(line) == -1) continue; if (parser.cap(1) == name) @@ -520,23 +520,23 @@ QString kdeConfigValue(const QString& section, const QString& name, const QStrin return def; } -QString kdeFindDir(const QString& suffix, const QString& file1, const QString& file2) +TQString kdeFindDir(const TQString& suffix, const TQString& file1, const TQString& file2) { - for ( QStringList::Iterator it = kdeSearchPaths.begin(); it != kdeSearchPaths.end(); ++it ) + for ( TQStringList::Iterator it = kdeSearchPaths.begin(); it != kdeSearchPaths.end(); ++it ) { - if ((QFile::exists((*it) + suffix + file1)) || (QFile::exists((*it) + suffix + file2))) + if ((TQFile::exists((*it) + suffix + file1)) || (TQFile::exists((*it) + suffix + file2))) return (*it) + suffix; } - return QString::null; + return TQString(); } -QString runCommand(const QString& command) +TQString runCommand(const TQString& command) { FILE* p = popen(command.latin1(), "r"); if ((p == NULL) || (p < 0)) - return QString::null; + return TQString(); - QString ret; + TQString ret; while (!feof(p)) { char buffer[256]; @@ -553,28 +553,28 @@ void initKdeSettings() { kdeSearchPaths.clear(); - QString kdeHome = getenv("KDEHOME"); - QString kdeDirs = getenv("KDEDIRS"); - QString kdeDir = getenv("KDEDIR"); + TQString kdeHome = getenv("KDEHOME"); + TQString kdeDirs = getenv("KDEDIRS"); + TQString kdeDir = getenv("KDEDIR"); if (!kdeHome.isEmpty()) kdeSearchPaths.append(kdeHome); kdeSearchPaths.append(runCommand("kde-config --localprefix")); if (!kdeDirs.isEmpty()) - kdeSearchPaths += QStringList::split(':', kdeDirs); + kdeSearchPaths += TQStringList::split(':', kdeDirs); if (!kdeDir.isEmpty()) kdeSearchPaths.append(kdeDir); kdeSearchPaths.append(runCommand("kde-config --prefix")); iconTheme = kdeConfigValue("Icons", "Theme", "crystalsvg"); - QStringList back = QStringList::split(',', kdeConfigValue("General", "alternateBackground", "238,246,255")); + TQStringList back = TQStringList::split(',', kdeConfigValue("General", "alternateBackground", "238,246,255")); alternateBackgroundColour.setRgb(back[0].toInt(), back[1].toInt(), back[2].toInt()); showIconsOnButtons = (kdeConfigValue("KDE", "ShowIconsOnPushButtons", "true").lower() == "true"); - QString tmp = kdeConfigValue("Toolbar style", "IconText", "true").lower(); + TQString tmp = kdeConfigValue("Toolbar style", "IconText", "true").lower(); if (tmp == "icononly") toolbarStyle = 0; else if (tmp == "icontextright") @@ -587,64 +587,64 @@ void initKdeSettings() toolbarStyle = 0; } -QStyle::SFlags stateToSFlags(GtkStateType state) +TQStyle::SFlags stateToSFlags(GtkStateType state) { switch (state) { case GTK_STATE_ACTIVE: - return QStyle::Style_Enabled | QStyle::Style_Down; + return TQStyle::Style_Enabled | TQStyle::Style_Down; case GTK_STATE_PRELIGHT: - return QStyle::Style_Enabled | QStyle::Style_MouseOver | QStyle::Style_Raised; + return TQStyle::Style_Enabled | TQStyle::Style_MouseOver | TQStyle::Style_Raised; case GTK_STATE_SELECTED: - return QStyle::Style_Enabled | QStyle::Style_HasFocus | QStyle::Style_Raised; + return TQStyle::Style_Enabled | TQStyle::Style_HasFocus | TQStyle::Style_Raised; case GTK_STATE_INSENSITIVE: - return QStyle::Style_Default | QStyle::Style_Raised; + return TQStyle::Style_Default | TQStyle::Style_Raised; default: - return QStyle::Style_Enabled | QStyle::Style_Raised; + return TQStyle::Style_Enabled | TQStyle::Style_Raised; } } -QColor gdkColorToQColor(GdkColor* c) +TQColor gdkColorToTQColor(GdkColor* c) { - return QColor(c->red / 256, c->green / 256, c->blue / 256); + return TQColor(c->red / 256, c->green / 256, c->blue / 256); } // The drawing functions follow the same pattern: // * Set the appropriate flags // * Ask QT to paint the widget to a pixmap -// * Create a GdkPixmap that points to our QPixmap +// * Create a GdkPixmap that points to our TQPixmap // * Paint the pixmap on the window void drawButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int defaultButton, int x, int y, int w, int h) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; if ((w < 1) || (h < 1)) return; - QPixmap pixmap(w, h); - QPainter painter(&pixmap); - QPushButton button(meepWidget); - button.setBackgroundOrigin(QWidget::ParentOrigin); + TQPixmap pixmap(w, h); + TQPainter painter(&pixmap); + TQPushButton button(meepWidget); + button.setBackgroundOrigin(TQWidget::ParentOrigin); button.setGeometry(x, y, w, h); if (style->rc_style->bg[GTK_STATE_NORMAL].pixel != 0) - button.setPaletteBackgroundColor(gdkColorToQColor(&style->rc_style->bg[GTK_STATE_NORMAL])); - QPoint p = button.backgroundOffset(); - QPoint pos = button.pos(); + button.setPaletteBackgroundColor(gdkColorToTQColor(&style->rc_style->bg[GTK_STATE_NORMAL])); + TQPoint p = button.backgroundOffset(); + TQPoint pos = button.pos(); - QStyle::SFlags sflags = stateToSFlags(state); + TQStyle::SFlags sflags = stateToSFlags(state); if (defaultButton) - sflags |= QStyle::Style_ButtonDefault; + sflags |= TQStyle::Style_ButtonDefault; button.setDefault(defaultButton); - painter.fillRect(0, 0, w, h, qApp->palette().active().background()); + painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().background()); - qApp->style().drawControl(QStyle::CE_PushButton, &painter, &button, - QRect(0,0,w,h), button.palette().active(), sflags); + tqApp->tqstyle().tqdrawControl(TQStyle::CE_PushButton, &painter, &button, + TQRect(0,0,w,h), button.tqpalette().active(), sflags); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h); @@ -654,11 +654,11 @@ void drawButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int defa // Thanks Peter Hartshorn <[email protected]> void drawToolbar(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; int w1, h1; - QStyle::SFlags sflags = stateToSFlags(state) | QStyle::Style_Raised; + TQStyle::SFlags sflags = stateToSFlags(state) | TQStyle::Style_Raised; // Keramik hack... @@ -668,7 +668,7 @@ void drawToolbar(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, if (w > h) { - sflags |= QStyle::Style_Horizontal; + sflags |= TQStyle::Style_Horizontal; w1 = w * 3; h1 = h; } @@ -682,22 +682,22 @@ void drawToolbar(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, (w < 1) || (h < 1)) return; - QPixmap pixmap(w1, h1); - QPixmap p(w, h); - QPainter painter(&pixmap); + TQPixmap pixmap(w1, h1); + TQPixmap p(w, h); + TQPainter painter(&pixmap); if ((backgroundTile) && (!backgroundTile->isNull())) - painter.fillRect(0, 0, w1, h1, QBrush(QColor(255,255,255), *backgroundTile)); + painter.fillRect(0, 0, w1, h1, TQBrush(TQColor(255,255,255), *backgroundTile)); else - painter.fillRect(0, 0, w1, h1, qApp->palette().active().brush(QColorGroup::Background)); + painter.fillRect(0, 0, w1, h1, tqApp->tqpalette().active().brush(TQColorGroup::Background)); - qApp->style().drawPrimitive(QStyle::PE_PanelDockWindow, &painter, - QRect(0,0,w1,h1), qApp->palette().active(),sflags); + tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_PanelDockWindow, &painter, + TQRect(0,0,w1,h1), tqApp->tqpalette().active(),sflags); if (isKeramik) { - qApp->style().drawPrimitive(QStyle::PE_DockWindowSeparator, &painter, - QRect(0,0,w1,h1), qApp->palette().active(),sflags); + tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_DockWindowSeparator, &painter, + TQRect(0,0,w1,h1), tqApp->tqpalette().active(),sflags); } bitBlt(&p, 0, 0, &pixmap, 0, 0, w, h); @@ -709,11 +709,11 @@ void drawToolbar(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, void drawMenubar(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; int w1, h1; - QStyle::SFlags sflags = stateToSFlags(state); + TQStyle::SFlags sflags = stateToSFlags(state); // Keramik hack... @@ -723,7 +723,7 @@ void drawMenubar(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, if (w > h) { - sflags |= QStyle::Style_Horizontal; + sflags |= TQStyle::Style_Horizontal; w1 = w * 3; h1 = h; } @@ -737,17 +737,17 @@ void drawMenubar(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, (w < 1) || (h < 1)) return; - QPixmap pixmap(w1, h1); - QPixmap p(w, h); - QPainter painter(&pixmap); + TQPixmap pixmap(w1, h1); + TQPixmap p(w, h); + TQPainter painter(&pixmap); if ((backgroundTile) && (!backgroundTile->isNull())) - painter.fillRect(0, 0, w1, h1, QBrush(QColor(255,255,255), *backgroundTile)); + painter.fillRect(0, 0, w1, h1, TQBrush(TQColor(255,255,255), *backgroundTile)); else - painter.fillRect(0, 0, w1, h1, qApp->palette().active().brush(QColorGroup::Background)); + painter.fillRect(0, 0, w1, h1, tqApp->tqpalette().active().brush(TQColorGroup::Background)); - qApp->style().drawPrimitive(QStyle::PE_PanelMenuBar, &painter, - QRect(0,0,w1,h1), qApp->palette().active(),sflags); + tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_PanelMenuBar, &painter, + TQRect(0,0,w1,h1), tqApp->tqpalette().active(),sflags); bitBlt(&p, 0, 0, &pixmap, 0, 0, w, h); @@ -758,27 +758,27 @@ void drawMenubar(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, void drawTab(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; if ((w < 1) || (h < 1)) return; - QPixmap pixmap(w,h); - QPainter painter(&pixmap); + TQPixmap pixmap(w,h); + TQPainter painter(&pixmap); // GTK doesn't tell us if our tab is on the left, right, or middle of the tabbar // So, let's always assume it's in the middle - it looks pretty - QTab* tab = new QTab; + TQTab* tab = new TQTab; meepTabBar->insertTab(tab,1); - QStyle::SFlags sflags = stateToSFlags(state); + TQStyle::SFlags sflags = stateToSFlags(state); if (state != GTK_STATE_ACTIVE) - sflags = QStyle::Style_Selected; + sflags = TQStyle::Style_Selected; - painter.fillRect(0, 0, w, h, qApp->palette().active().brush(QColorGroup::Background)); - qApp->style().drawControl(QStyle::CE_TabBarTab, &painter, meepTabBar, QRect(0,0,w,h), qApp->palette().active(), sflags, QStyleOption(tab)); + painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background)); + tqApp->tqstyle().tqdrawControl(TQStyle::CE_TabBarTab, &painter, meepTabBar, TQRect(0,0,w,h), tqApp->tqpalette().active(), sflags, TQStyleOption(tab)); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h); @@ -789,7 +789,7 @@ void drawTab(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int void drawVLine(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int ySource, int yDest) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; int width = style->xthickness; @@ -800,13 +800,13 @@ void drawVLine(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, in if ((width < 1) || (height < 1)) return; - QPixmap pixmap(width, height); - QPainter painter(&pixmap); + TQPixmap pixmap(width, height); + TQPainter painter(&pixmap); - painter.fillRect(2, 0, width - 2, height, qApp->palette().active().brush(QColorGroup::Background)); - painter.setPen( qApp->palette().active().mid() ); + painter.fillRect(2, 0, width - 2, height, tqApp->tqpalette().active().brush(TQColorGroup::Background)); + painter.setPen( tqApp->tqpalette().active().mid() ); painter.drawLine( 0, 0, 0, height ); - painter.setPen( qApp->palette().active().light() ); + painter.setPen( tqApp->tqpalette().active().light() ); painter.drawLine( 1, 0, 1, height ); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); @@ -816,7 +816,7 @@ void drawVLine(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, in void drawHLine(GdkWindow* window, GtkStyle* style, GtkStateType state, int y, int xSource, int xDest) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; int width = abs(xSource-xDest); @@ -825,13 +825,13 @@ void drawHLine(GdkWindow* window, GtkStyle* style, GtkStateType state, int y, in if ((width < 1) || (height < 1)) return; - QPixmap pixmap(width, height); - QPainter painter(&pixmap); + TQPixmap pixmap(width, height); + TQPainter painter(&pixmap); - painter.fillRect(0, 2, width, height-2, qApp->palette().active().brush(QColorGroup::Background)); - painter.setPen(qApp->palette().active().mid() ); + painter.fillRect(0, 2, width, height-2, tqApp->tqpalette().active().brush(TQColorGroup::Background)); + painter.setPen(tqApp->tqpalette().active().mid() ); painter.drawLine(0, 0, width, 0); - painter.setPen(qApp->palette().active().light()); + painter.setPen(tqApp->tqpalette().active().light()); painter.drawLine(0, 1, width, 1); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); @@ -841,21 +841,21 @@ void drawHLine(GdkWindow* window, GtkStyle* style, GtkStateType state, int y, in void drawLineEdit(GdkWindow* window, GtkStyle* style, GtkStateType state, int hasFocus, int x, int y, int w, int h) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; if ((w < 1) || (h < 1)) return; - QPixmap pixmap(w, h); - QPainter painter(&pixmap); + TQPixmap pixmap(w, h); + TQPainter painter(&pixmap); - QStyle::SFlags sflags = stateToSFlags(state); + TQStyle::SFlags sflags = stateToSFlags(state); if (hasFocus) - sflags |= QStyle::Style_HasFocus; + sflags |= TQStyle::Style_HasFocus; - painter.fillRect(0, 0, w, h, qApp->palette().active().base()); - qApp->style().drawPrimitive(QStyle::PE_PanelLineEdit, &painter, QRect(0, 0, w, h), qApp->palette().active(), sflags, QStyleOption(1,1)); + painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().base()); + tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_PanelLineEdit, &painter, TQRect(0, 0, w, h), tqApp->tqpalette().active(), sflags, TQStyleOption(1,1)); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h); @@ -864,25 +864,25 @@ void drawLineEdit(GdkWindow* window, GtkStyle* style, GtkStateType state, int ha void drawFrame(GdkWindow* window, GtkStyle* style, GtkStateType state, GtkShadowType shadow_type, int x, int y, int w, int h) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; if ((w < 1) || (h < 1)) // Caused crash in gaim file transfers window return; - QPixmap pixmap(w, h); - QPainter painter(&pixmap); + TQPixmap pixmap(w, h); + TQPainter painter(&pixmap); - QStyle::SFlags sflags = stateToSFlags(state); + TQStyle::SFlags sflags = stateToSFlags(state); if ((shadow_type == GTK_SHADOW_IN) || (shadow_type == GTK_SHADOW_ETCHED_IN)) - sflags |= QStyle::Style_Sunken; + sflags |= TQStyle::Style_Sunken; if ((backgroundTile) && (!backgroundTile->isNull())) - painter.fillRect(0, 0, w, h, QBrush(QColor(255,255,255), *backgroundTile)); + painter.fillRect(0, 0, w, h, TQBrush(TQColor(255,255,255), *backgroundTile)); else - painter.fillRect(0, 0, w, h, qApp->palette().active().brush(QColorGroup::Background)); + painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background)); - qApp->style().drawPrimitive(QStyle::PE_Panel, &painter, QRect(0, 0, w, h), qApp->palette().active(), sflags, QStyleOption(2,2) ); + tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_Panel, &painter, TQRect(0, 0, w, h), tqApp->tqpalette().active(), sflags, TQStyleOption(2,2) ); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h); @@ -891,26 +891,26 @@ void drawFrame(GdkWindow* window, GtkStyle* style, GtkStateType state, GtkShadow void drawComboBox(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; if ((w < 1) || (h < 1)) return; - QPixmap pixmap(w,h); - QPainter painter(&pixmap); - QComboBox cb(false, 0); + TQPixmap pixmap(w,h); + TQPainter painter(&pixmap); + TQComboBox cb(false, 0); cb.resize(w,h); - QStyle::SFlags sflags = stateToSFlags(state); - QStyle::SCFlags scflags = QStyle::SC_ComboBoxArrow | QStyle::SC_ComboBoxFrame | QStyle::SC_ComboBoxListBoxPopup; - QStyle::SCFlags activeflags = QStyle::SC_None; + TQStyle::SFlags sflags = stateToSFlags(state); + TQStyle::SCFlags scflags = TQStyle::SC_ComboBoxArrow | TQStyle::SC_ComboBoxFrame | TQStyle::SC_ComboBoxListBoxPopup; + TQStyle::SCFlags activeflags = TQStyle::SC_None; if (state == GTK_STATE_PRELIGHT) - activeflags = QStyle::Style_MouseOver; + activeflags = TQStyle::Style_MouseOver; - painter.fillRect(0,0, w, h, qApp->palette().active().brush(QColorGroup::Background)); - qApp->style().drawComplexControl(QStyle::CC_ComboBox, &painter, &cb, QRect(0, 0, w, h), qApp->palette().active(), sflags, scflags, activeflags); + painter.fillRect(0,0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background)); + tqApp->tqstyle().tqdrawComplexControl(TQStyle::CC_ComboBox, &painter, &cb, TQRect(0, 0, w, h), tqApp->tqpalette().active(), sflags, scflags, activeflags); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h); @@ -919,26 +919,26 @@ void drawComboBox(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, void drawCheckBox(GdkWindow* window, GtkStyle* style, GtkStateType state, int checked, int x, int y, int w, int h) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; - int realH = qApp->style().pixelMetric(QStyle::PM_IndicatorHeight); - int realW = qApp->style().pixelMetric(QStyle::PM_IndicatorWidth); + int realH = tqApp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorHeight); + int realW = tqApp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorWidth); if ((realW < 1) || (realH < 1)) return; - QPixmap pixmap(realW, realH); - QPainter painter(&pixmap); - QCheckBox checkbox(0); + TQPixmap pixmap(realW, realH); + TQPainter painter(&pixmap); + TQCheckBox checkbox(0); - QStyle::SFlags sflags = stateToSFlags(state); - sflags |= (checked ? QStyle::Style_On : QStyle::Style_Off); + TQStyle::SFlags sflags = stateToSFlags(state); + sflags |= (checked ? TQStyle::Style_On : TQStyle::Style_Off); - painter.fillRect(0, 0, realW, realH, qApp->palette().active().brush(QColorGroup::Background)); - qApp->style().drawControl(QStyle::CE_CheckBox, &painter, &checkbox, QRect(0, 0, realW, realH), qApp->palette().active(), sflags); + painter.fillRect(0, 0, realW, realH, tqApp->tqpalette().active().brush(TQColorGroup::Background)); + tqApp->tqstyle().tqdrawControl(TQStyle::CE_CheckBox, &painter, &checkbox, TQRect(0, 0, realW, realH), tqApp->tqpalette().active(), sflags); - // Qt checkboxes are usually bigger than GTK wants. + // TQt checkboxes are usually bigger than GTK wants. // We cheat, and draw them over the expected area. int xOffset = (realW - w) / 2; int yOffset = (realH - h) / 2; @@ -950,33 +950,33 @@ void drawCheckBox(GdkWindow* window, GtkStyle* style, GtkStateType state, int ch void drawMenuCheck(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; - QCheckBox checkbox(0); + TQCheckBox checkbox(0); /* A previous version of the function followed the sizehints exclusively Now follow w and h provided by GTK, but if the checkmark is too big we might have to scale it */ /* - int w1 = checkbox.sizeHint().width(); - int h1 = checkbox.sizeHint().height(); */ + int w1 = checkbox.tqsizeHint().width(); + int h1 = checkbox.tqsizeHint().height(); */ if ((w < 1) || (h < 1)) return; - QPixmap pixmap(w,h); - QPainter painter(&pixmap); + TQPixmap pixmap(w,h); + TQPainter painter(&pixmap); - QStyle::SFlags sflags = stateToSFlags(state); - sflags |= QStyle::Style_On; + TQStyle::SFlags sflags = stateToSFlags(state); + sflags |= TQStyle::Style_On; if (fillPixmap && (!fillPixmap->isNull())) - painter.fillRect(0, 0, w, h, QBrush(QColor(255,255,255), *fillPixmap)); + painter.fillRect(0, 0, w, h, TQBrush(TQColor(255,255,255), *fillPixmap)); else if ((backgroundTile) && (!backgroundTile->isNull())) - painter.fillRect(0, 0, w, h, QBrush(QColor(255,255,255), *backgroundTile)); + painter.fillRect(0, 0, w, h, TQBrush(TQColor(255,255,255), *backgroundTile)); else - painter.fillRect(0, 0, w, h, qApp->palette().active().brush(QColorGroup::Background)); - qApp->style().drawPrimitive(QStyle::PE_CheckMark, &painter, QRect(0, 0, w, h), qApp->palette().active(), sflags); + painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background)); + tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_CheckMark, &painter, TQRect(0, 0, w, h), tqApp->tqpalette().active(), sflags); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h); @@ -985,32 +985,32 @@ void drawMenuCheck(GdkWindow* window, GtkStyle* style, GtkStateType state, int x void drawRadioButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int checked, int x, int y, int w, int h) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; - int realH = qApp->style().pixelMetric(QStyle::PM_IndicatorHeight); - int realW = qApp->style().pixelMetric(QStyle::PM_IndicatorWidth); + int realH = tqApp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorHeight); + int realW = tqApp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorWidth); if ((realW < 1) || (realH < 1)) return; - QPixmap pixmap(realH, realW); - QPainter painter(&pixmap); - QRadioButton radio(0); + TQPixmap pixmap(realH, realW); + TQPainter painter(&pixmap); + TQRadioButton radio(0); - QStyle::SFlags sflags = stateToSFlags(state); - sflags |= checked ? QStyle::Style_On : QStyle::Style_Off; + TQStyle::SFlags sflags = stateToSFlags(state); + sflags |= checked ? TQStyle::Style_On : TQStyle::Style_Off; if (fillPixmap && (!fillPixmap->isNull())) - painter.fillRect(0, 0, realW, realH, QBrush(QColor(255,255,255), *fillPixmap)); + painter.fillRect(0, 0, realW, realH, TQBrush(TQColor(255,255,255), *fillPixmap)); else if ((backgroundTile) && (!backgroundTile->isNull())) - painter.fillRect(0, 0, realW, realH, QBrush(QColor(255,255,255), *backgroundTile)); + painter.fillRect(0, 0, realW, realH, TQBrush(TQColor(255,255,255), *backgroundTile)); else - painter.fillRect(0, 0, realW, realH, qApp->palette().active().brush(QColorGroup::Background)); + painter.fillRect(0, 0, realW, realH, tqApp->tqpalette().active().brush(TQColorGroup::Background)); - qApp->style().drawControl(QStyle::CE_RadioButton, &painter, &radio, QRect(0,0,realH,realW), qApp->palette().active(), sflags); + tqApp->tqstyle().tqdrawControl(TQStyle::CE_RadioButton, &painter, &radio, TQRect(0,0,realH,realW), tqApp->tqpalette().active(), sflags); - // Qt checkboxes are usually bigger than GTK wants. + // TQt checkboxes are usually bigger than GTK wants. // We cheat, and draw them over the expected area. int xOffset = (realW - w) / 2; int yOffset = (realH - h) / 2; @@ -1023,7 +1023,7 @@ void drawRadioButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int void drawScrollBarSlider(GdkWindow* window, GtkStyle* style, GtkStateType state, int orientation, GtkAdjustment* adj, int x, int y, int w, int h, int offset, int totalExtent) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; if ((w < 1) || (h < 1)) @@ -1038,52 +1038,52 @@ void drawScrollBarSlider(GdkWindow* window, GtkStyle* style, GtkStateType state, else hCorrected = h + 14; } - QPixmap pixmap(wCorrected, hCorrected); - QPainter painter(&pixmap); + TQPixmap pixmap(wCorrected, hCorrected); + TQPainter painter(&pixmap); - QStyle::SFlags sflags = stateToSFlags(state); + TQStyle::SFlags sflags = stateToSFlags(state); if (orientation == GTK_ORIENTATION_HORIZONTAL) - sflags |= QStyle::Style_Horizontal; + sflags |= TQStyle::Style_Horizontal; - qApp->style().drawPrimitive(QStyle::PE_ScrollBarSlider, &painter, QRect(0,0,wCorrected,hCorrected), qApp->palette().active(), sflags); + tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_ScrollBarSlider, &painter, TQRect(0,0,wCorrected,hCorrected), tqApp->tqpalette().active(), sflags); // The domino style doesn't draw the entire slider in PE_ScrollBarSlider // We have to draw PE_ScrollBarAddPage and PE_ScrollBarSubPage and piece the bits together if (isDomino && !mozillaFix && !eclipseFix) { - QPixmap leftPix, rightPix; - QRect leftRect, rightRect; + TQPixmap leftPix, rightPix; + TQRect leftRect, rightRect; if (orientation == GTK_ORIENTATION_HORIZONTAL) { - leftRect = QRect(0, 0, offset-scrollBarSpacingLeft, h); - rightRect = QRect(6, 0, totalExtent-offset-w-scrollBarSpacingRight+2, h); + leftRect = TQRect(0, 0, offset-scrollBarSpacingLeft, h); + rightRect = TQRect(6, 0, totalExtent-offset-w-scrollBarSpacingRight+2, h); leftPix.resize(6 + leftRect.width(), h); rightPix.resize(6 + rightRect.width(), h); } else { - leftRect = QRect(0, 0, w, offset-scrollBarSpacingLeft); - rightRect = QRect(0, 6, w, totalExtent-offset-h-scrollBarSpacingRight+2); + leftRect = TQRect(0, 0, w, offset-scrollBarSpacingLeft); + rightRect = TQRect(0, 6, w, totalExtent-offset-h-scrollBarSpacingRight+2); leftPix.resize(w, 6 + leftRect.height()); rightPix.resize(w, 6 + rightRect.height()); } - QPainter dominoPainter(&leftPix); - qApp->style().drawPrimitive(QStyle::PE_ScrollBarSubPage, &dominoPainter, leftRect, qApp->palette().active(), sflags); + TQPainter dominoPainter(&leftPix); + tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_ScrollBarSubPage, &dominoPainter, leftRect, tqApp->tqpalette().active(), sflags); dominoPainter.end(); dominoPainter.begin(&rightPix); - qApp->style().drawPrimitive(QStyle::PE_ScrollBarAddPage, &dominoPainter, rightRect, qApp->palette().active(), sflags); + tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_ScrollBarAddPage, &dominoPainter, rightRect, tqApp->tqpalette().active(), sflags); if (orientation == GTK_ORIENTATION_HORIZONTAL) { - bitBlt(&pixmap, 1, 0, &leftPix, leftRect.width(), 0, 6, h, Qt::CopyROP, true); - bitBlt(&pixmap, w-7, 0, &rightPix, 0, 0, 7, h, Qt::CopyROP, true); + bitBlt(TQT_TQPAINTDEVICE(&pixmap), 1, 0, TQT_TQPAINTDEVICE(&leftPix), leftRect.width(), 0, 6, h, TQt::CopyROP, true); + bitBlt(TQT_TQPAINTDEVICE(&pixmap), w-7, 0, TQT_TQPAINTDEVICE(&rightPix), 0, 0, 7, h, TQt::CopyROP, true); } else { - bitBlt(&pixmap, 0, 1, &leftPix, 0, leftRect.height(), w, 6, Qt::CopyROP, true); - bitBlt(&pixmap, 0, h-7, &rightPix, 0, 0, w, 7, Qt::CopyROP, true); + bitBlt(TQT_TQPAINTDEVICE(&pixmap), 0, 1, TQT_TQPAINTDEVICE(&leftPix), 0, leftRect.height(), w, 6, TQt::CopyROP, true); + bitBlt(TQT_TQPAINTDEVICE(&pixmap), 0, h-7, TQT_TQPAINTDEVICE(&rightPix), 0, 0, w, 7, TQt::CopyROP, true); } } @@ -1104,7 +1104,7 @@ void drawScrollBarSlider(GdkWindow* window, GtkStyle* style, GtkStateType state, void drawScrollBar(GdkWindow* window, GtkStyle* style, GtkStateType state, int orientation, GtkAdjustment* adj, int x, int y, int w, int h) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; if ((w < 1) || (h < 1)) @@ -1112,7 +1112,7 @@ void drawScrollBar(GdkWindow* window, GtkStyle* style, GtkStateType state, int o if (scrollBar != 0) delete scrollBar; - scrollBar = new QScrollBar(NULL); + scrollBar = new TQScrollBar(NULL); scrollBar->resize(w,h); @@ -1129,11 +1129,11 @@ void drawScrollBar(GdkWindow* window, GtkStyle* style, GtkStateType state, int o scrollBar->setOrientation(orientation ? Qt::Vertical : Qt::Horizontal); - QStyle::SFlags sflags = stateToSFlags(state); - if (sflags |= QStyle::Style_Down) sflags = QStyle::Style_Enabled; - if (orientation == GTK_ORIENTATION_HORIZONTAL) sflags |= QStyle::Style_Horizontal; + TQStyle::SFlags sflags = stateToSFlags(state); + if (sflags |= TQStyle::Style_Down) sflags = TQStyle::Style_Enabled; + if (orientation == GTK_ORIENTATION_HORIZONTAL) sflags |= TQStyle::Style_Horizontal; - QPixmap pixmap(w,h); + TQPixmap pixmap(w,h); scrollBar->setMinValue(0); scrollBar->setMaxValue(65535); @@ -1145,9 +1145,9 @@ void drawScrollBar(GdkWindow* window, GtkStyle* style, GtkStateType state, int o if (orientation == GTK_ORIENTATION_VERTICAL) { - QRect r; - r = qApp->style().querySubControlMetrics(QStyle::CC_ScrollBar, - scrollBar, QStyle::SC_ScrollBarSlider); + TQRect r; + r = tqApp->tqstyle().querySubControlMetrics(TQStyle::CC_ScrollBar, + scrollBar, TQStyle::SC_ScrollBarSlider); offset = r.y(); thumbSize = r.height(); if (thumbSize < 0) @@ -1156,23 +1156,23 @@ void drawScrollBar(GdkWindow* window, GtkStyle* style, GtkStateType state, int o if (!r.isValid()) // Fix a crash bug in Eclipse where it was trying to draw tiny scrollbars. return; - QPixmap tmpPixmap(w, h + thumbSize); - QPainter painter2(&tmpPixmap); + TQPixmap tmpPixmap(w, h + thumbSize); + TQPainter painter2(&tmpPixmap); scrollBar->resize(w, h + thumbSize); painter2.fillRect(0, 0, w, h + thumbSize, - qApp->palette().active().brush(QColorGroup::Background)); - qApp->style().drawComplexControl(QStyle::CC_ScrollBar, - &painter2, scrollBar, QRect(0, 0, w, h+thumbSize), - qApp->palette().active(), sflags); + tqApp->tqpalette().active().brush(TQColorGroup::Background)); + tqApp->tqstyle().tqdrawComplexControl(TQStyle::CC_ScrollBar, + &painter2, scrollBar, TQRect(0, 0, w, h+thumbSize), + tqApp->tqpalette().active(), sflags); - bitBlt(&pixmap, 0, 0, &tmpPixmap, 0, 0, w, offset, Qt::CopyROP); + bitBlt(&pixmap, 0, 0, &tmpPixmap, 0, 0, w, offset, TQt::CopyROP); bitBlt(&pixmap, 0, offset, &tmpPixmap, 0, offset + thumbSize, - w, h - offset, Qt::CopyROP); + w, h - offset, TQt::CopyROP); } else { - QRect r; - r = qApp->style().querySubControlMetrics(QStyle::CC_ScrollBar, - scrollBar, QStyle::SC_ScrollBarSlider); + TQRect r; + r = tqApp->tqstyle().querySubControlMetrics(TQStyle::CC_ScrollBar, + scrollBar, TQStyle::SC_ScrollBarSlider); offset = r.x(); thumbSize = r.width(); if (thumbSize < 0) @@ -1181,19 +1181,19 @@ void drawScrollBar(GdkWindow* window, GtkStyle* style, GtkStateType state, int o if (!r.isValid()) // Fix a crash bug in Eclipse when it was trying to draw tiny scrollbars. return; - QPixmap tmpPixmap(w + thumbSize, h); - QPainter painter2(&tmpPixmap); + TQPixmap tmpPixmap(w + thumbSize, h); + TQPainter painter2(&tmpPixmap); scrollBar->resize(w + thumbSize, h); painter2.fillRect(0, 0, w + thumbSize, h, - qApp->palette().active().brush(QColorGroup::Background)); - qApp->style().drawComplexControl(QStyle::CC_ScrollBar, - &painter2, scrollBar, QRect(0, 0, w+thumbSize, h), - qApp->palette().active(), sflags); + tqApp->tqpalette().active().brush(TQColorGroup::Background)); + tqApp->tqstyle().tqdrawComplexControl(TQStyle::CC_ScrollBar, + &painter2, scrollBar, TQRect(0, 0, w+thumbSize, h), + tqApp->tqpalette().active(), sflags); - bitBlt(&pixmap, 0, 0, &tmpPixmap, 0, 0, offset, h, Qt::CopyROP); + bitBlt(&pixmap, 0, 0, &tmpPixmap, 0, 0, offset, h, TQt::CopyROP); bitBlt(&pixmap, offset, 0, &tmpPixmap, offset + thumbSize, 0, - w - offset, h, Qt::CopyROP); + w - offset, h, TQt::CopyROP); } GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); @@ -1203,37 +1203,37 @@ void drawScrollBar(GdkWindow* window, GtkStyle* style, GtkStateType state, int o void drawToolButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; if ((w < 1) || (h < 1)) return; - QToolButton button(NULL); + TQToolButton button(NULL); button.resize(w, h); /* - int realW = button.sizeHint().width(); - int realH = button.sizeHint().height(); */ + int realW = button.tqsizeHint().width(); + int realH = button.tqsizeHint().height(); */ - QStyle::SFlags sflags = stateToSFlags(state); - QStyle::SCFlags activeflags = QStyle::SC_None; + TQStyle::SFlags sflags = stateToSFlags(state); + TQStyle::SCFlags activeflags = TQStyle::SC_None; if (state == GTK_STATE_ACTIVE) { - sflags |= QStyle::Style_AutoRaise; - activeflags = QStyle::SC_ToolButton; + sflags |= TQStyle::Style_AutoRaise; + activeflags = TQStyle::SC_ToolButton; } else - sflags |= QStyle::Style_AutoRaise | QStyle::Style_Raised; + sflags |= TQStyle::Style_AutoRaise | TQStyle::Style_Raised; - QPixmap pixmap(w,h); - QPainter painter(&pixmap); + TQPixmap pixmap(w,h); + TQPainter painter(&pixmap); if ((backgroundTile) && (!backgroundTile->isNull())) - painter.fillRect(0, 0, w, h, QBrush(QColor(255,255,255), *backgroundTile)); + painter.fillRect(0, 0, w, h, TQBrush(TQColor(255,255,255), *backgroundTile)); else - painter.fillRect(0, 0, w, h, qApp->palette().active().brush(QColorGroup::Background)); - qApp->style().drawComplexControl(QStyle::CC_ToolButton, &painter, &button, QRect(0, 0, w, h), qApp->palette().active(), sflags, QStyle::SC_ToolButton, activeflags); + painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background)); + tqApp->tqstyle().tqdrawComplexControl(TQStyle::CC_ToolButton, &painter, &button, TQRect(0, 0, w, h), tqApp->tqpalette().active(), sflags, TQStyle::SC_ToolButton, activeflags); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h); @@ -1242,20 +1242,20 @@ void drawToolButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int void drawMenuBarItem(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; if ((w < 1) || (h < 1)) return; - QPixmap pixmap(w, h); - QPainter painter(&pixmap); - QMenuItem mi; - QMenuBar mb(0); + TQPixmap pixmap(w, h); + TQPainter painter(&pixmap); + TQMenuItem mi; + TQMenuBar mb(0); - QStyle::SFlags sflags = QStyle::Style_Down | QStyle::Style_Enabled | QStyle::Style_Active | QStyle::Style_HasFocus; + TQStyle::SFlags sflags = TQStyle::Style_Down | TQStyle::Style_Enabled | TQStyle::Style_Active | TQStyle::Style_HasFocus; - qApp->style().drawControl(QStyle::CE_MenuBarItem, &painter, &mb, QRect(0, 0, w, h), qApp->palette().active(), sflags, QStyleOption(&mi)); + tqApp->tqstyle().tqdrawControl(TQStyle::CE_MenuBarItem, &painter, &mb, TQRect(0, 0, w, h), tqApp->tqpalette().active(), sflags, TQStyleOption(&mi)); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h); @@ -1264,23 +1264,23 @@ void drawMenuBarItem(GdkWindow* window, GtkStyle* style, GtkStateType state, int void drawMenuItem(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; if ((w < 1) || (h < 1)) return; - QPixmap pixmap(w,h); - QPainter painter(&pixmap); - QPopupMenu pm; - QMenuData md; - QMenuItem* mi = md.findItem(md.insertItem("")); + TQPixmap pixmap(w,h); + TQPainter painter(&pixmap); + TQPopupMenu pm; + TQMenuData md; + TQMenuItem* mi = md.tqfindItem(md.insertItem("")); - QStyleOption opt(mi, 16, 16); - QStyle::SFlags sflags = QStyle::Style_Active | QStyle::Style_Enabled; + TQStyleOption opt(mi, 16, 16); + TQStyle::SFlags sflags = TQStyle::Style_Active | TQStyle::Style_Enabled; - painter.fillRect(0, 0, w, h, qApp->palette().active().brush(QColorGroup::Background)); - qApp->style().drawControl(QStyle::CE_PopupMenuItem, &painter, &pm, QRect(0,0,w,h), qApp->palette().active(), sflags, opt); + painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background)); + tqApp->tqstyle().tqdrawControl(TQStyle::CE_PopupMenuItem, &painter, &pm, TQRect(0,0,w,h), tqApp->tqpalette().active(), sflags, opt); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h); @@ -1289,21 +1289,21 @@ void drawMenuItem(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, void drawSplitter(GdkWindow* window, GtkStyle* style, GtkStateType state, int orientation, int x, int y, int w, int h) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; if ((w < 1) || (h < 1)) return; - QPixmap pixmap(w,h); - QPainter painter(&pixmap); + TQPixmap pixmap(w,h); + TQPainter painter(&pixmap); - QStyle::SFlags sflags = stateToSFlags(state); + TQStyle::SFlags sflags = stateToSFlags(state); // No idea why this works... - if (orientation != GTK_ORIENTATION_HORIZONTAL) sflags |= QStyle::Style_Horizontal; + if (orientation != GTK_ORIENTATION_HORIZONTAL) sflags |= TQStyle::Style_Horizontal; - painter.fillRect(0, 0, w, h, qApp->palette().active().brush(QColorGroup::Background)); - qApp->style().drawPrimitive(QStyle::PE_Splitter, &painter, QRect(0,0,w,h), qApp->palette().active(), sflags); + painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background)); + tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_Splitter, &painter, TQRect(0,0,w,h), tqApp->tqpalette().active(), sflags); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h); @@ -1312,79 +1312,79 @@ void drawSplitter(GdkWindow* window, GtkStyle* style, GtkStateType state, int or void drawTabFrame(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h, GtkPositionType pos) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; if ((w < 1) || (h < 1)) return; - QStyle::SFlags sflags = stateToSFlags(state); + TQStyle::SFlags sflags = stateToSFlags(state); - QPixmap pixmap(w, h); - QPainter painter(&pixmap); - QStyleOption opt(2, 2); // line width + TQPixmap pixmap(w, h); + TQPainter painter(&pixmap); + TQStyleOption opt(2, 2); // line width if ((backgroundTile) && (!backgroundTile->isNull())) - painter.fillRect(0, 0, w, h, QBrush(QColor(255,255,255), *backgroundTile)); + painter.fillRect(0, 0, w, h, TQBrush(TQColor(255,255,255), *backgroundTile)); else - painter.fillRect(0, 0, w, h, qApp->palette().active().brush(QColorGroup::Background)); - qApp->style().drawPrimitive(QStyle::PE_PanelTabWidget, &painter, QRect(0,0,w,h), qApp->palette().active(), sflags, opt); + painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background)); + tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_PanelTabWidget, &painter, TQRect(0,0,w,h), tqApp->tqpalette().active(), sflags, opt); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h); g_object_unref(pix); // Drawing tab base - int th = qApp->style().pixelMetric(QStyle::PM_TabBarBaseHeight, meepTabBar); + int th = tqApp->tqstyle().tqpixelMetric(TQStyle::PM_TabBarBaseHeight, meepTabBar); int tw = w; if ((tw < 1) || (th < 1)) return; - QPixmap pixmap1(tw,th); - QPainter painter1(&pixmap1); + TQPixmap pixmap1(tw,th); + TQPainter painter1(&pixmap1); if ((backgroundTile) && (!backgroundTile->isNull())) - painter1.fillRect(0, 0, tw, th, QBrush(QColor(255,255,255), *backgroundTile)); + painter1.fillRect(0, 0, tw, th, TQBrush(TQColor(255,255,255), *backgroundTile)); else - painter1.fillRect(0, 0, tw, th, qApp->palette().active().brush(QColorGroup::Background)); + painter1.fillRect(0, 0, tw, th, tqApp->tqpalette().active().brush(TQColorGroup::Background)); - qApp->style().drawPrimitive(QStyle::PE_TabBarBase, &painter1, QRect(0, 0, tw, th), qApp->palette().active(), sflags, QStyleOption(1,1)); + tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_TabBarBase, &painter1, TQRect(0, 0, tw, th), tqApp->tqpalette().active(), sflags, TQStyleOption(1,1)); if (pos == GTK_POS_BOTTOM) { - QWMatrix m; + TQWMatrix m; m.scale(1, -1); pixmap1 = pixmap1.xForm(m); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap1.handle()); - gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y+h+qApp->style().pixelMetric(QStyle::PM_TabBarBaseOverlap, meepTabBar), tw, th); + gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y+h+tqApp->tqstyle().tqpixelMetric(TQStyle::PM_TabBarBaseOverlap, meepTabBar), tw, th); g_object_unref(pix); } else { GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap1.handle()); - gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y-qApp->style().pixelMetric(QStyle::PM_TabBarBaseOverlap, meepTabBar), tw, th); + gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y-tqApp->tqstyle().tqpixelMetric(TQStyle::PM_TabBarBaseOverlap, meepTabBar), tw, th); g_object_unref(pix); } } void drawMenu(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; if ((w < 1) || (h < 1)) return; - QPixmap pixmap(w, h); - QPainter painter(&pixmap); - QStyle::SFlags sflags = stateToSFlags(state); + TQPixmap pixmap(w, h); + TQPainter painter(&pixmap); + TQStyle::SFlags sflags = stateToSFlags(state); if ((backgroundTile) && (!backgroundTile->isNull())) - painter.fillRect(0, 0, w, h, QBrush(QColor(255,255,255), *backgroundTile)); + painter.fillRect(0, 0, w, h, TQBrush(TQColor(255,255,255), *backgroundTile)); else - painter.fillRect(0, 0, w, h, qApp->palette().active().brush(QColorGroup::Background)); - qApp->style().drawPrimitive(QStyle::PE_PanelPopup, &painter, QRect(0,0,w,h), qApp->palette().active(), sflags); + painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background)); + tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_PanelPopup, &painter, TQRect(0,0,w,h), tqApp->tqpalette().active(), sflags); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h); @@ -1408,7 +1408,7 @@ void drawMenu(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int void drawProgressChunk(GdkWindow * window, GtkStyle * style, GtkStateType state, int x, int y, int w, int h) { // This is only for Mozilla/Firefox - if (!mozillaFix || !gtkQtEnable) + if (!mozillaFix || !gtkTQtEnable) return; if ((w<=1) || (h<=1)) @@ -1418,24 +1418,24 @@ void drawProgressChunk(GdkWindow * window, GtkStyle * style, GtkStateType state, int w2 = isAlloy ? w+4 : w; int h2 = isAlloy ? h+4 : h; - QProgressBar bar(100, NULL); + TQProgressBar bar(100, NULL); bar.resize(w2, h2); bar.setProgress(100); bar.setCenterIndicator(false); bar.setPercentageVisible(false); - bar.setFrameStyle(QFrame::NoFrame); + bar.setFrameStyle(TQFrame::NoFrame); if ((w2 < 1) || (h2 < 1)) return; - QPixmap pixmap(w2, h2); - QPainter painter(&pixmap); + TQPixmap pixmap(w2, h2); + TQPainter painter(&pixmap); - QStyle::SFlags sflags = stateToSFlags(state); + TQStyle::SFlags sflags = stateToSFlags(state); - painter.fillRect(0, 0, w, h, qApp->palette().active().brush(QColorGroup::Background)); + painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background)); - qApp->style().drawControl(QStyle::CE_ProgressBarContents, &painter, &bar, QRect(0,0,w2,h2), qApp->palette().active(), sflags); + tqApp->tqstyle().tqdrawControl(TQStyle::CE_ProgressBarContents, &painter, &bar, TQRect(0,0,w2,h2), tqApp->tqpalette().active(), sflags); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); if (isAlloy) @@ -1447,13 +1447,13 @@ void drawProgressChunk(GdkWindow * window, GtkStyle * style, GtkStateType state, void drawProgressBar(GdkWindow * window, GtkStyle * style, GtkStateType state, GtkProgressBarOrientation orientation, gfloat percentage, int x, int y, int w, int h) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; if ((w<=1) || (h<=1)) return; // Trying to draw something that small caused a segdault - QProgressBar bar(100, NULL); + TQProgressBar bar(100, NULL); if ((orientation == GTK_PROGRESS_BOTTOM_TO_TOP) || (orientation == GTK_PROGRESS_TOP_TO_BOTTOM)) bar.resize(h, w); else @@ -1462,9 +1462,9 @@ void drawProgressBar(GdkWindow * window, GtkStyle * style, GtkStateType state, G bar.setCenterIndicator(false); bar.setPercentageVisible(false); - QPixmap pixmap = QPixmap::grabWidget(&bar); + TQPixmap pixmap = TQPixmap::grabWidget(&bar); - QWMatrix matrix; + TQWMatrix matrix; switch (orientation) { case GTK_PROGRESS_RIGHT_TO_LEFT: matrix.rotate(180); break; @@ -1483,10 +1483,10 @@ void drawProgressBar(GdkWindow * window, GtkStyle * style, GtkStateType state, G void drawSlider(GdkWindow * window, GtkStyle * style, GtkStateType state, GtkAdjustment *adj, int x, int y, int w, int h, GtkOrientation orientation, int inverted) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; - meepSlider->setBackgroundOrigin(QWidget::ParentOrigin); + meepSlider->setBackgroundOrigin(TQWidget::ParentOrigin); meepSlider->setOrientation((orientation == GTK_ORIENTATION_HORIZONTAL) ? Qt::Horizontal : Qt::Vertical); meepSlider->setEnabled(state != GTK_STATE_INSENSITIVE); @@ -1500,7 +1500,7 @@ void drawSlider(GdkWindow * window, GtkStyle * style, GtkStateType state, GtkAdj else // Inverted sliders... where max is at the left/top and min is at the right/bottom meepSlider->setValue(100-(int)((adj->value-adj->lower)/(adj->upper-adj->lower)*100)); - QPixmap pixmap = QPixmap::grabWidget(meepSlider); + TQPixmap pixmap = TQPixmap::grabWidget(meepSlider); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h); g_object_unref(pix); @@ -1508,19 +1508,19 @@ void drawSlider(GdkWindow * window, GtkStyle * style, GtkStateType state, GtkAdj void drawSpinButton(GdkWindow * window, GtkStyle * style, GtkStateType state, int direction, int x, int y, int w, int h) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; if ((w < 1) || (h < 1)) return; - QPixmap pixmap(w, h); - QPainter painter(&pixmap); + TQPixmap pixmap(w, h); + TQPainter painter(&pixmap); - QStyle::SFlags sflags = stateToSFlags(state); + TQStyle::SFlags sflags = stateToSFlags(state); - painter.fillRect(0, 0, w, h, qApp->palette().active().brush(QColorGroup::Background)); - qApp->style().drawPrimitive((direction ? QStyle::PE_SpinWidgetDown : QStyle::PE_SpinWidgetUp), &painter, QRect(0,0,w,h), qApp->palette().active(), sflags); + painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background)); + tqApp->tqstyle().tqdrawPrimitive((direction ? TQStyle::PE_SpinWidgetDown : TQStyle::PE_SpinWidgetUp), &painter, TQRect(0,0,w,h), tqApp->tqpalette().active(), sflags); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h); @@ -1529,19 +1529,19 @@ void drawSpinButton(GdkWindow * window, GtkStyle * style, GtkStateType state, in void drawListHeader(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; if ((w < 1) || (h < 1)) return; - QPixmap pixmap(w,h); - QPainter painter(&pixmap); + TQPixmap pixmap(w,h); + TQPainter painter(&pixmap); - QStyle::SFlags sflags = stateToSFlags(state) | QStyle::Style_Horizontal; + TQStyle::SFlags sflags = stateToSFlags(state) | TQStyle::Style_Horizontal; - painter.fillRect(0, 0, w, h, qApp->palette().active().brush(QColorGroup::Background)); - qApp->style().drawPrimitive(QStyle::PE_HeaderSection, &painter, QRect(0,0,w,h), qApp->palette().active(), sflags); + painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background)); + tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_HeaderSection, &painter, TQRect(0,0,w,h), tqApp->tqpalette().active(), sflags); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h); @@ -1551,19 +1551,19 @@ void drawListHeader(GdkWindow* window, GtkStyle* style, GtkStateType state, int void drawListViewItem(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; if ((w < 1) || (h < 1)) return; - QPixmap pixmap(w, h); - QPainter painter(&pixmap); + TQPixmap pixmap(w, h); + TQPainter painter(&pixmap); /* Get the brush corresponding to highlight color */ - QBrush brush = qApp->palette().brush(QPalette::Active, QColorGroup::Highlight); + TQBrush brush = tqApp->palette().brush(TQPalette::Active, TQColorGroup::Highlight); painter.setBrush(brush); - painter.setPen(Qt::NoPen); + painter.setPen(TQt::NoPen); painter.drawRect(0, 0, w, h); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); @@ -1573,25 +1573,25 @@ void drawListViewItem(GdkWindow* window, GtkStyle* style, GtkStateType state, in void drawSquareButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; - QPixmap pixmap(20, 20); - QPainter painter(&pixmap); - QPushButton button(0); + TQPixmap pixmap(20, 20); + TQPainter painter(&pixmap); + TQPushButton button(0); - QStyle::SFlags sflags = stateToSFlags(state); + TQStyle::SFlags sflags = stateToSFlags(state); if (fillPixmap && (!fillPixmap->isNull())) - painter.fillRect(0, 0, 20, 20, QBrush(QColor(255,255,255), *fillPixmap)); + painter.fillRect(0, 0, 20, 20, TQBrush(TQColor(255,255,255), *fillPixmap)); else if ((backgroundTile) && (!backgroundTile->isNull())) - painter.fillRect(0, 0, 20, 20, QBrush(QColor(255,255,255), *backgroundTile)); + painter.fillRect(0, 0, 20, 20, TQBrush(TQColor(255,255,255), *backgroundTile)); else - painter.fillRect(0, 0, 20, 20, qApp->palette().active().brush(QColorGroup::Background)); + painter.fillRect(0, 0, 20, 20, tqApp->tqpalette().active().brush(TQColorGroup::Background)); - qApp->style().drawControl(QStyle::CE_PushButton, &painter, &button, - QRect(0,0,20,20), qApp->palette().active(), sflags); + tqApp->tqstyle().tqdrawControl(TQStyle::CE_PushButton, &painter, &button, + TQRect(0,0,20,20), tqApp->tqpalette().active(), sflags); - QImage image = pixmap.convertToImage().smoothScale(w,h); + TQImage image = pixmap.convertToImage().smoothScale(w,h); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h); @@ -1600,22 +1600,22 @@ void drawSquareButton(GdkWindow* window, GtkStyle* style, GtkStateType state, in void initDrawTabNG(int count) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; delete meepTabBar; meepTabBar = 0; - meepTabBar = new QTabBar(meepWidget); + meepTabBar = new TQTabBar(meepWidget); for ( int i = 0; i < count; i++ ) - meepTabBar->addTab(new QTab); + meepTabBar->addTab(new TQTab); return; } void drawTabNG(GdkWindow *window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h, GtkNotebook *notebook) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; GtkPositionType tpos = gtk_notebook_get_tab_pos(notebook); @@ -1632,7 +1632,7 @@ void drawTabNG(GdkWindow *window, GtkStyle* style, GtkStateType state, int x, in } } - QTab *tab = meepTabBar->tabAt(pos); + TQTab *tab = meepTabBar->tabAt(pos); if (!tab) { @@ -1644,11 +1644,11 @@ void drawTabNG(GdkWindow *window, GtkStyle* style, GtkStateType state, int x, in return; } - QStyle::SFlags sflags = stateToSFlags(state); + TQStyle::SFlags sflags = stateToSFlags(state); if (state != GTK_STATE_ACTIVE) { - sflags = QStyle::Style_Selected; + sflags = TQStyle::Style_Selected; if (tpos == GTK_POS_TOP) y += 3; h -= 3; @@ -1657,21 +1657,21 @@ void drawTabNG(GdkWindow *window, GtkStyle* style, GtkStateType state, int x, in if ((w < 1) || (h < 1)) return; - QPixmap pixmap(w,h); - QPainter painter(&pixmap); + TQPixmap pixmap(w,h); + TQPainter painter(&pixmap); if ((backgroundTile) && (!backgroundTile->isNull())) - painter.fillRect(0, 0, w, h, QBrush(QColor(255,255,255), *backgroundTile)); + painter.fillRect(0, 0, w, h, TQBrush(TQColor(255,255,255), *backgroundTile)); else - painter.fillRect(0, 0, w, h, qApp->palette().active().brush(QColorGroup::Background)); - qApp->style().drawControl(QStyle::CE_TabBarTab, &painter, (QTabBar *)meepTabBar, QRect(0,0,w,h), qApp->palette().active(), sflags, QStyleOption(tab)); + painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background)); + tqApp->tqstyle().tqdrawControl(TQStyle::CE_TabBarTab, &painter, (TQTabBar *)meepTabBar, TQRect(0,0,w,h), tqApp->tqpalette().active(), sflags, TQStyleOption(tab)); painter.end(); // So the pixmap assignment below won't give an error // Account for tab position -- if its in the bottom flip the image if (tpos == GTK_POS_BOTTOM) { - QWMatrix m; + TQWMatrix m; m.scale(1, -1); pixmap = pixmap.xForm(m); } @@ -1683,39 +1683,39 @@ void drawTabNG(GdkWindow *window, GtkStyle* style, GtkStateType state, int x, in void drawArrow(GdkWindow* window, GtkStyle* style, GtkStateType state, GtkArrowType direction, int x, int y, int w, int h) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; if ((w < 1) || (h < 1)) return; - QStyle::SFlags sflags = stateToSFlags(state); + TQStyle::SFlags sflags = stateToSFlags(state); if (state == GTK_STATE_INSENSITIVE) - sflags |= QStyle::Style_Off; + sflags |= TQStyle::Style_Off; else if (state == GTK_STATE_PRELIGHT) - sflags |= QStyle::Style_On; + sflags |= TQStyle::Style_On; - QStyle::PrimitiveElement element; + TQStyle::PrimitiveElement element; switch(direction) { - case GTK_ARROW_UP: element = QStyle::PE_ArrowUp; break; - case GTK_ARROW_DOWN: element = QStyle::PE_ArrowDown; break; - case GTK_ARROW_LEFT: element = QStyle::PE_ArrowLeft; break; - case GTK_ARROW_RIGHT: element = QStyle::PE_ArrowRight; break; + case GTK_ARROW_UP: element = TQStyle::PE_ArrowUp; break; + case GTK_ARROW_DOWN: element = TQStyle::PE_ArrowDown; break; + case GTK_ARROW_LEFT: element = TQStyle::PE_ArrowLeft; break; + case GTK_ARROW_RIGHT: element = TQStyle::PE_ArrowRight; break; } - QPixmap pixmap(w,h); - QPainter painter(&pixmap); + TQPixmap pixmap(w,h); + TQPainter painter(&pixmap); if (fillPixmap && (!fillPixmap->isNull())) - painter.fillRect(0, 0, w, h, QBrush(QColor(255,255,255), *fillPixmap)); + painter.fillRect(0, 0, w, h, TQBrush(TQColor(255,255,255), *fillPixmap)); else if ((backgroundTile) && (!backgroundTile->isNull())) - painter.fillRect(0, 0, w, h, QBrush(QColor(255,255,255), *backgroundTile)); + painter.fillRect(0, 0, w, h, TQBrush(TQColor(255,255,255), *backgroundTile)); else - painter.fillRect(0, 0, w, h, qApp->palette().active().brush(QColorGroup::Background)); + painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background)); - qApp->style().drawPrimitive(element, &painter, QRect(0,0,w,h), qApp->palette().active(), sflags); + tqApp->tqstyle().tqdrawPrimitive(element, &painter, TQRect(0,0,w,h), tqApp->tqpalette().active(), sflags); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h); @@ -1724,18 +1724,18 @@ void drawArrow(GdkWindow* window, GtkStyle* style, GtkStateType state, GtkArrowT void drawFocusRect(GdkWindow * window, GtkStyle * style, int x, int y, int w, int h) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; if ((w < 1) || (h < 1)) return; - QPixmap pixmap(w,h); - QPainter painter(&pixmap); - QColor bg(qApp->palette().active().background()); + TQPixmap pixmap(w,h); + TQPainter painter(&pixmap); + TQColor bg(tqApp->tqpalette().active().background()); painter.fillRect(0,0,w,h,bg); - qApp->style().drawPrimitive(QStyle::PE_FocusRect, &painter, QRect(0,0,w,h), qApp->palette().active(), QStyle::Style_Default, QStyleOption(bg)); + tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, &painter, TQRect(0,0,w,h), tqApp->tqpalette().active(), TQStyle::Style_Default, TQStyleOption(bg)); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); gdk_draw_drawable(window, style->bg_gc[GTK_STATE_NORMAL], pix, 0, 0, x, y, w, h); @@ -1756,31 +1756,31 @@ GdkGC* alternateBackgroundGc(GtkStyle* style) gdk_colormap_alloc_color(style->colormap, &altBackColor, FALSE, TRUE); GdkGCValues gc_values; - GdkGCValuesMask gc_values_mask; - gc_values_mask = GDK_GC_FOREGROUND; + GdkGCValuesMask gc_values_tqmask; + gc_values_tqmask = GDK_GC_FOREGROUND; gc_values.foreground = altBackColor; - altBackGC = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask); + altBackGC = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); return altBackGC; } // Thanks Martin Dvorak of metatheme -QString parse_rc_string(const QString& defs, const QString& pattern, bool widgetClass = true) +TQString parse_rc_string(const TQString& defs, const TQString& pattern, bool widgetClass = true) { static int dynamic_counter = 0; ++dynamic_counter; - return "style \"gtk-qt-dynamic-" + QString::number(dynamic_counter) + "\" { " + defs + " } " + (widgetClass ? "widget_class" : "widget") + " \"" + pattern + "\" style \"gtk-qt-dynamic-" + QString::number(dynamic_counter) + "\"\n"; + return "style \"gtk-qt-dynamic-" + TQString::number(dynamic_counter) + "\" { " + defs + " } " + (widgetClass ? "widget_class" : "widget") + " \"" + pattern + "\" style \"gtk-qt-dynamic-" + TQString::number(dynamic_counter) + "\"\n"; } -QString doIconMapping(const QString& stockName, const QString& path, int sizes) +TQString doIconMapping(const TQString& stockName, const TQString& path, int sizes) { - QString fullPath; + TQString fullPath; bool has16 = false, has22 = false, has32 = false; - for( QStringList::ConstIterator it = iconThemeDirs.begin(); + for( TQStringList::ConstIterator it = iconThemeDirs.begin(); it != iconThemeDirs.end(); ++it ) { @@ -1798,7 +1798,7 @@ QString doIconMapping(const QString& stockName, const QString& path, int sizes) if (!has16 && !has22 && !has32) return ""; // sizes is an addition of 1=16, 2=22 and 4=32 - QString ret = "stock[\"" + stockName + "\"]={\n"; + TQString ret = "stock[\"" + stockName + "\"]={\n"; if (has22) ret += "\t{ \"22x22/" + path +"\", *, *, \"gtk-large-toolbar\" },\n"; @@ -1827,102 +1827,102 @@ QString doIconMapping(const QString& stockName, const QString& path, int sizes) return ret; } -QString colorString(QColor color) +TQString colorString(TQColor color) { - QString ret = "{"; - ret += QString::number(color.red() * 257) + ", "; - ret += QString::number(color.green() * 257) + ", "; - ret += QString::number(color.blue() * 257) + "}"; + TQString ret = "{"; + ret += TQString::number(color.red() * 257) + ", "; + ret += TQString::number(color.green() * 257) + ", "; + ret += TQString::number(color.blue() * 257) + "}"; return ret; } -void setColour(QString name, QColor color) +void setColour(TQString name, TQColor color) { gtk_rc_parse_string(parse_rc_string(name + " = " + colorString(color), "*").latin1()); } -static QStringList iconInheritsDirs( const QString& icondir ) +static TQStringList iconInheritsDirs( const TQString& icondir ) { - QFile index; + TQFile index; index.setName( icondir + "index.theme" ); if( !index.open( IO_ReadOnly )) { index.setName( icondir + "index.desktop" ); if( !index.open( IO_ReadOnly )) - return QStringList(); + return TQStringList(); } char buf[ 1024 ]; - QRegExp reg( "^\\s*Inherits=([^\\n]*)" ); + TQRegExp reg( "^\\s*Inherits=([^\\n]*)" ); for(;;) { if( index.readLine( buf, 1023 ) <= 0 ) break; if( reg.search( buf, 0 ) >= 0 ) - return QStringList::split(",", reg.cap(1)); + return TQStringList::split(",", reg.cap(1)); } - return QStringList(); + return TQStringList(); } void setRcProperties(GtkRcStyle* rc_style, int forceRecreate) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; - if (gtkQtDebug) + if (gtkTQtDebug) printf("setRcProperties()\n"); gtkRcStyle = rc_style; // Set colors // Normal - setColour("fg[NORMAL]", qApp->palette().active().text()); - setColour("bg[NORMAL]", qApp->palette().active().background()); - setColour("text[NORMAL]", qApp->palette().active().text()); - setColour("base[NORMAL]", qApp->palette().active().base()); + setColour("fg[NORMAL]", tqApp->tqpalette().active().text()); + setColour("bg[NORMAL]", tqApp->tqpalette().active().background()); + setColour("text[NORMAL]", tqApp->tqpalette().active().text()); + setColour("base[NORMAL]", tqApp->tqpalette().active().base()); // Active (on) - setColour("fg[ACTIVE]", qApp->palette().active().text()); - setColour("bg[ACTIVE]", qApp->palette().active().background()); - setColour("text[ACTIVE]", qApp->palette().active().text()); - setColour("base[ACTIVE]", qApp->palette().active().base()); + setColour("fg[ACTIVE]", tqApp->tqpalette().active().text()); + setColour("bg[ACTIVE]", tqApp->tqpalette().active().background()); + setColour("text[ACTIVE]", tqApp->tqpalette().active().text()); + setColour("base[ACTIVE]", tqApp->tqpalette().active().base()); // Mouseover - setColour("fg[PRELIGHT]", qApp->palette().active().text()); // menu items - change? - setColour("bg[PRELIGHT]", qApp->palette().active().highlight()); - setColour("text[PRELIGHT]", qApp->palette().active().text()); - setColour("base[PRELIGHT]", qApp->palette().active().base()); + setColour("fg[PRELIGHT]", tqApp->tqpalette().active().text()); // menu items - change? + setColour("bg[PRELIGHT]", tqApp->tqpalette().active().highlight()); + setColour("text[PRELIGHT]", tqApp->tqpalette().active().text()); + setColour("base[PRELIGHT]", tqApp->tqpalette().active().base()); // Selected - setColour("fg[SELECTED]", qApp->palette().active().highlightedText()); - setColour("bg[SELECTED]", qApp->palette().active().highlight()); - setColour("text[SELECTED]", qApp->palette().active().highlightedText()); - setColour("base[SELECTED]", qApp->palette().active().highlight()); + setColour("fg[SELECTED]", tqApp->tqpalette().active().highlightedText()); + setColour("bg[SELECTED]", tqApp->tqpalette().active().highlight()); + setColour("text[SELECTED]", tqApp->tqpalette().active().highlightedText()); + setColour("base[SELECTED]", tqApp->tqpalette().active().highlight()); // Disabled - setColour("fg[INSENSITIVE]", qApp->palette().disabled().text()); - setColour("bg[INSENSITIVE]", qApp->palette().disabled().background()); - setColour("text[INSENSITIVE]", qApp->palette().disabled().text()); - setColour("base[INSENSITIVE]", qApp->palette().disabled().background()); + setColour("fg[INSENSITIVE]", tqApp->tqpalette().disabled().text()); + setColour("bg[INSENSITIVE]", tqApp->tqpalette().disabled().background()); + setColour("text[INSENSITIVE]", tqApp->tqpalette().disabled().text()); + setColour("base[INSENSITIVE]", tqApp->tqpalette().disabled().background()); - gtk_rc_parse_string(("gtk-button-images = " + QString::number(showIconsOnButtons)).latin1()); + gtk_rc_parse_string(("gtk-button-images = " + TQString::number(showIconsOnButtons)).latin1()); - gtk_rc_parse_string(("gtk-toolbar-style = " + QString::number(toolbarStyle)).latin1()); + gtk_rc_parse_string(("gtk-toolbar-style = " + TQString::number(toolbarStyle)).latin1()); // This function takes quite a long time to execute, and is run at the start of every app. // In order to speed it up, we can store the results in a file, along with the name of icon // theme and style. This file can then be regenerated when the icon theme or style change. - QString cacheFilePath = QDir::homeDirPath() + "/.gtk_qt_engine_rc"; - QFile cacheFile(cacheFilePath); - QTextStream stream; + TQString cacheFilePath = TQDir::homeDirPath() + "/.gtk_qt_engine_rc"; + TQFile cacheFile(cacheFilePath); + TQTextStream stream; if (!forceRecreate && cacheFile.exists()) { cacheFile.open(IO_ReadOnly); - stream.setDevice(&cacheFile); + stream.setDevice(TQT_TQIODEVICE(&cacheFile)); - if (stream.readLine() == "# " + iconTheme + ", " + qApp->style().name() + ", " + RC_CACHE_VERSION) + if (stream.readLine() == "# " + iconTheme + ", " + tqApp->tqstyle().name() + ", " + RC_CACHE_VERSION) { // This cache matches the current icon theme and style // Let's load it and return @@ -1935,13 +1935,13 @@ void setRcProperties(GtkRcStyle* rc_style, int forceRecreate) } cacheFile.open(IO_WriteOnly | IO_Truncate); - stream.setDevice(&cacheFile); + stream.setDevice(TQT_TQIODEVICE(&cacheFile)); - stream << "# " << iconTheme << ", " << qApp->style().name() << ", " << RC_CACHE_VERSION << "\n\n"; - stream << "# This file was generated by the Gtk Qt Theme Engine\n"; + stream << "# " << iconTheme << ", " << tqApp->tqstyle().name() << ", " << RC_CACHE_VERSION << "\n\n"; + stream << "# This file was generated by the Gtk TQt Theme Engine\n"; stream << "# It will be recreated when you change your KDE icon theme or widget style\n\n"; - QScrollBar sbar(NULL); + TQScrollBar sbar(NULL); sbar.setOrientation(Qt::Horizontal); sbar.setValue(1); sbar.resize(200,25); @@ -1949,53 +1949,53 @@ void setRcProperties(GtkRcStyle* rc_style, int forceRecreate) // The following code determines how many buttons are on a scrollbar // It works by looking at each pixel of the scrollbar's area not taken up by the groove, // and asking the style which subcontrol is at that location. - QRect rect = qApp->style().querySubControlMetrics(QStyle::CC_ScrollBar, &sbar, QStyle::SC_ScrollBarGroove); + TQRect rect = tqApp->tqstyle().querySubControlMetrics(TQStyle::CC_ScrollBar, &sbar, TQStyle::SC_ScrollBarGroove); bool back1 = false; bool forward1 = false; bool back2 = false; bool forward2 = false; - QStyle::SubControl sc = QStyle::SC_None; - for (QPoint pos(0,7) ; pos.x()<rect.x() ; pos.setX(pos.x()+1)) + TQStyle::SubControl sc = TQStyle::SC_None; + for (TQPoint pos(0,7) ; pos.x()<rect.x() ; pos.setX(pos.x()+1)) { - QStyle::SubControl sc2 = qApp->style().querySubControl(QStyle::CC_ScrollBar, &sbar, pos); + TQStyle::SubControl sc2 = tqApp->tqstyle().querySubControl(TQStyle::CC_ScrollBar, &sbar, pos); if (sc != sc2) { - if (sc2 == QStyle::SC_ScrollBarAddLine) forward1 = true; - if (sc2 == QStyle::SC_ScrollBarSubLine) back1 = true; + if (sc2 == TQStyle::SC_ScrollBarAddLine) forward1 = true; + if (sc2 == TQStyle::SC_ScrollBarSubLine) back1 = true; sc = sc2; } } - sc = QStyle::SC_None; - for (QPoint pos(rect.x()+rect.width(),7) ; pos.x()<200 ; pos.setX(pos.x()+1)) + sc = TQStyle::SC_None; + for (TQPoint pos(rect.x()+rect.width(),7) ; pos.x()<200 ; pos.setX(pos.x()+1)) { - QStyle::SubControl sc2 = qApp->style().querySubControl(QStyle::CC_ScrollBar, &sbar, pos); + TQStyle::SubControl sc2 = tqApp->tqstyle().querySubControl(TQStyle::CC_ScrollBar, &sbar, pos); if (sc != sc2) { - if (sc2 == QStyle::SC_ScrollBarAddLine) forward2 = true; - if (sc2 == QStyle::SC_ScrollBarSubLine) back2 = true; + if (sc2 == TQStyle::SC_ScrollBarAddLine) forward2 = true; + if (sc2 == TQStyle::SC_ScrollBarSubLine) back2 = true; sc = sc2; } } - stream << parse_rc_string(QString("GtkScrollbar::has-backward-stepper = ") + (back1 ? "1" : "0"), "*"); - stream << parse_rc_string(QString("GtkScrollbar::has-forward-stepper = ") + (forward2 ? "1" : "0"), "*"); - stream << parse_rc_string(QString("GtkScrollbar::has-secondary-forward-stepper = ") + (forward1 ? "1" : "0"), "*"); - stream << parse_rc_string(QString("GtkScrollbar::has-secondary-backward-stepper = ") + (back2 ? "1" : "0"), "*"); + stream << parse_rc_string(TQString("GtkScrollbar::has-backward-stepper = ") + (back1 ? "1" : "0"), "*"); + stream << parse_rc_string(TQString("GtkScrollbar::has-forward-stepper = ") + (forward2 ? "1" : "0"), "*"); + stream << parse_rc_string(TQString("GtkScrollbar::has-secondary-forward-stepper = ") + (forward1 ? "1" : "0"), "*"); + stream << parse_rc_string(TQString("GtkScrollbar::has-secondary-backward-stepper = ") + (back2 ? "1" : "0"), "*"); - stream << parse_rc_string("GtkScrollbar::stepper-size = " + QString::number(qApp->style().querySubControlMetrics(QStyle::CC_ScrollBar, &sbar, QStyle::SC_ScrollBarSubLine).width() - 1), "*"); + stream << parse_rc_string("GtkScrollbar::stepper-size = " + TQString::number(tqApp->tqstyle().querySubControlMetrics(TQStyle::CC_ScrollBar, &sbar, TQStyle::SC_ScrollBarSubLine).width() - 1), "*"); - stream << parse_rc_string("GtkScrollbar::min-slider-length = " + QString::number(qApp->style().pixelMetric(QStyle::PM_ScrollBarSliderMin)), "*"); - stream << parse_rc_string("GtkScrollbar::slider-width = " + QString::number(qApp->style().pixelMetric(QStyle::PM_ScrollBarExtent)-2), "*"); - stream << parse_rc_string("GtkButton::child-displacement-x = " + QString::number(qApp->style().pixelMetric(QStyle::PM_ButtonShiftHorizontal)), "*"); - stream << parse_rc_string("GtkButton::child-displacement-y = " + QString::number(qApp->style().pixelMetric(QStyle::PM_ButtonShiftVertical)), "*"); - QSlider slider(NULL); // To keep BlueCurve happy - stream << parse_rc_string("GtkScale::slider-length = " + QString::number(qApp->style().pixelMetric(QStyle::PM_SliderLength, &slider)), "*"); + stream << parse_rc_string("GtkScrollbar::min-slider-length = " + TQString::number(tqApp->tqstyle().tqpixelMetric(TQStyle::PM_ScrollBarSliderMin)), "*"); + stream << parse_rc_string("GtkScrollbar::slider-width = " + TQString::number(tqApp->tqstyle().tqpixelMetric(TQStyle::PM_ScrollBarExtent)-2), "*"); + stream << parse_rc_string("GtkButton::child-displacement-x = " + TQString::number(tqApp->tqstyle().tqpixelMetric(TQStyle::PM_ButtonShiftHorizontal)), "*"); + stream << parse_rc_string("GtkButton::child-displacement-y = " + TQString::number(tqApp->tqstyle().tqpixelMetric(TQStyle::PM_ButtonShiftVertical)), "*"); + TQSlider slider(NULL); // To keep BlueCurve happy + stream << parse_rc_string("GtkScale::slider-length = " + TQString::number(tqApp->tqstyle().tqpixelMetric(TQStyle::PM_SliderLength, &slider)), "*"); stream << parse_rc_string("GtkButton::default-border = { 0, 0, 0, 0 }", "*"); - stream << parse_rc_string("xthickness = " + QString::number(qApp->style().pixelMetric(QStyle::PM_DefaultFrameWidth)), "*.GtkMenu"); - stream << parse_rc_string("ythickness = " + QString::number(qApp->style().pixelMetric(QStyle::PM_DefaultFrameWidth)), "*.GtkMenu"); + stream << parse_rc_string("xthickness = " + TQString::number(tqApp->tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth)), "*.GtkMenu"); + stream << parse_rc_string("ythickness = " + TQString::number(tqApp->tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth)), "*.GtkMenu"); stream << parse_rc_string("xthickness = 5", "*.GtkMenu.Gtk*MenuItem"); stream << parse_rc_string("xthickness = 3", "*.GtkNotebook"); stream << parse_rc_string("ythickness = 3", "*.GtkNotebook"); @@ -2003,7 +2003,7 @@ void setRcProperties(GtkRcStyle* rc_style, int forceRecreate) stream << parse_rc_string("fg[NORMAL] = {0, 0, 0}", "gtk-tooltips.GtkLabel", false); // This one may not work... - //insertIntProperty(rc_style, "GtkCheckButton", "indicator-size", qApp->style().pixelMetric(QStyle::PM_IndicatorHeight) ); + //insertIntProperty(rc_style, "GtkCheckButton", "indicator-size", tqApp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorHeight) ); // For icons @@ -2047,8 +2047,8 @@ void setRcProperties(GtkRcStyle* rc_style, int forceRecreate) stream << doIconMapping("gtk-edit", "actions/gtk-edit.png"); //2.6 stream << doIconMapping("gtk-execute", "actions/exec.png"); stream << doIconMapping("gtk-file", "mimetypes/gtk-file.png"); - stream << doIconMapping("gtk-find", "actions/find.png"); - stream << doIconMapping("gtk-find-and-replace", "actions/gtk-find-and-replace.png"); + stream << doIconMapping("gtk-tqfind", "actions/find.png"); + stream << doIconMapping("gtk-tqfind-and-tqreplace", "actions/gtk-tqfind-and-tqreplace.png"); stream << doIconMapping("gtk-floppy", "devices/3floppy_unmount.png"); stream << doIconMapping("gtk-fullscreen", "actions/gtk-fullscreen.png"); stream << doIconMapping("gtk-goto-bottom", "actions/bottom.png"); @@ -2125,58 +2125,58 @@ void setRcProperties(GtkRcStyle* rc_style, int forceRecreate) gtk_rc_add_default_file(cacheFilePath.latin1()); } -void addIconThemeDir(const QString& theme) +void addIconThemeDir(const TQString& theme) { // Try to find this theme's directory - QString icondir = kdeFindDir("/share/icons/" + theme + "/", "index.theme", "index.desktop"); + TQString icondir = kdeFindDir("/share/icons/" + theme + "/", "index.theme", "index.desktop"); if(icondir.isEmpty()) return; - if (iconThemeDirs.contains(icondir)) + if (iconThemeDirs.tqcontains(icondir)) return; // Add this theme to the list iconThemeDirs.append(icondir); - // Do it again for any parent themes - QStringList parents = iconInheritsDirs(icondir); - for ( QStringList::Iterator it=parents.begin() ; it!=parents.end(); ++it) + // Do it again for any tqparent themes + TQStringList tqparents = iconInheritsDirs(icondir); + for ( TQStringList::Iterator it=tqparents.begin() ; it!=tqparents.end(); ++it) addIconThemeDir((*it).stripWhiteSpace()); } void setMenuBackground(GtkStyle* style) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; if (menuBackgroundPixmap == NULL) { // Get the menu background image - menuBackgroundPixmap = new QPixmap(1024, 25); // Meh - QPainter painter(menuBackgroundPixmap); - QPopupMenu pm; - QMenuData md; - QMenuItem* mi = md.findItem(md.insertItem("")); + menuBackgroundPixmap = new TQPixmap(1024, 25); // Meh + TQPainter painter(menuBackgroundPixmap); + TQPopupMenu pm; + TQMenuData md; + TQMenuItem* mi = md.tqfindItem(md.insertItem("")); - qApp->style().polish(&pm); + tqApp->tqstyle().polish(&pm); - QStyleOption opt(mi, 16, 16); - QStyle::SFlags sflags = QStyle::Style_Default; + TQStyleOption opt(mi, 16, 16); + TQStyle::SFlags sflags = TQStyle::Style_Default; if ((backgroundTile) && (!backgroundTile->isNull())) - painter.fillRect(0, 0, 1024, 25, QBrush(QColor(255,255,255), *backgroundTile)); + painter.fillRect(0, 0, 1024, 25, TQBrush(TQColor(255,255,255), *backgroundTile)); else - painter.fillRect(0, 0, 1024, 25, qApp->palette().active().brush(QColorGroup::Background)); - qApp->style().drawControl(QStyle::CE_PopupMenuItem, &painter, &pm, QRect(0,0,1024,25), qApp->palette().active(), sflags, opt); + painter.fillRect(0, 0, 1024, 25, tqApp->tqpalette().active().brush(TQColorGroup::Background)); + tqApp->tqstyle().tqdrawControl(TQStyle::CE_PopupMenuItem, &painter, &pm, TQRect(0,0,1024,25), tqApp->tqpalette().active(), sflags, opt); menuBackgroundPixmapGdk = gdk_pixmap_foreign_new(menuBackgroundPixmap->handle()); } - QTENGINE_STYLE(style)->menuBackground = menuBackgroundPixmapGdk; + TQTENGINE_STYLE(style)->menuBackground = menuBackgroundPixmapGdk; g_object_ref(menuBackgroundPixmapGdk); } // It has a 'u' damnit -void setColour(GdkColor* g, QColor q) +void setColour(GdkColor* g, TQColor q) { g->red = q.red() * 257; g->green = q.green() * 257; @@ -2185,10 +2185,10 @@ void setColour(GdkColor* g, QColor q) void setColors(GtkStyle* style) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; - if (gtkQtDebug) + if (gtkTQtDebug) printf("setColors()\n"); /*gtkStyle = style;*/ @@ -2206,13 +2206,13 @@ void setColors(GtkStyle* style) void getTextColor(GdkColor *color, GtkStateType state_type) { - if (!gtkQtEnable) + if (!gtkTQtEnable) return; if ((state_type == GTK_STATE_PRELIGHT) || (state_type == GTK_STATE_ACTIVE) || (state_type == GTK_STATE_SELECTED)) - setColour(color, qApp->palette().active().highlightedText()); + setColour(color, tqApp->tqpalette().active().highlightedText()); else if (state_type == GTK_STATE_NORMAL) - setColour(color, qApp->palette().active().text()); + setColour(color, tqApp->tqpalette().active().text()); else if (state_type == GTK_STATE_INSENSITIVE) - setColour(color, qApp->palette().disabled().text()); + setColour(color, tqApp->tqpalette().disabled().text()); } diff --git a/src/qt_qt_wrapper.h b/src/qt_qt_wrapper.h index d07ff9d..743f463 100644 --- a/src/qt_qt_wrapper.h +++ b/src/qt_qt_wrapper.h @@ -1,5 +1,5 @@ -#ifndef QTENGINE_QT_WRAPPER_H -#define QTENGINE_QT_WRAPPER_H +#ifndef TQTENGINE_TQT_WRAPPER_H +#define TQTENGINE_TQT_WRAPPER_H #include <gtk/gtknotebook.h> @@ -10,20 +10,20 @@ #ifdef __cplusplus extern "C" { -void mapColour(GdkColor* g, QColor q); -void addIconThemeDir(const QString& theme); -QString doIconMapping(const QString& stockName, const QString& path, int sizes = 7); +void mapColour(GdkColor* g, TQColor q); +void addIconThemeDir(const TQString& theme); +TQString doIconMapping(const TQString& stockName, const TQString& path, int sizes = 7); void initKdeSettings(); -QString kdeConfigValue(const QString& section, const QString& name, const QString& def); -QString kdeFindDir(const QString& suffix, const QString& file1, const QString& file2); +TQString kdeConfigValue(const TQString& section, const TQString& name, const TQString& def); +TQString kdeFindDir(const TQString& suffix, const TQString& file1, const TQString& file2); GdkFilterReturn gdkEventFilter(GdkXEvent *xevent, GdkEvent *event, gpointer data); #endif -void createQApp(); -void destroyQApp(); +void createTQApp(); +void destroyTQApp(); void setColors(GtkStyle* style); void setRcProperties(GtkRcStyle* rc_style, int forceRecreate); void drawButton(GdkWindow * window, GtkStyle * style, GtkStateType state, int defaultButton, int x, int y, int w, int h); @@ -70,7 +70,7 @@ extern int isAlloy; extern int isDomino; extern int isPolyester; extern int openOfficeFix; -extern int gtkQtDebug; +extern int gtkTQtDebug; #ifdef __cplusplus } diff --git a/src/qt_rc_style.c b/src/qt_rc_style.c index 0a9947a..ba03a7f 100644 --- a/src/qt_rc_style.c +++ b/src/qt_rc_style.c @@ -4,8 +4,8 @@ -static void qtengine_rc_style_init (QtEngineRcStyle *style); -static void qtengine_rc_style_class_init (QtEngineRcStyleClass *klass); +static void qtengine_rc_style_init (TQtEngineRcStyle *style); +static void qtengine_rc_style_class_init (TQtEngineRcStyleClass *klass); static void qtengine_rc_style_finalize (GObject *object); static guint qtengine_rc_style_parse (GtkRcStyle *rc_style, GtkSettings *settings, @@ -15,7 +15,7 @@ static void qtengine_rc_style_merge (GtkRcStyle *dest, static GtkStyle *qtengine_rc_style_create_style (GtkRcStyle *rc_style); -static GtkRcStyleClass *parent_class; +static GtkRcStyleClass *tqparent_class; GType qtengine_type_rc_style = 0; @@ -24,30 +24,30 @@ void qtengine_rc_style_register_type (GTypeModule *module) { static const GTypeInfo object_info = { - sizeof (QtEngineRcStyleClass), + sizeof (TQtEngineRcStyleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) qtengine_rc_style_class_init, NULL, /* class_finalize */ NULL, /* class_data */ - sizeof (QtEngineRcStyle), + sizeof (TQtEngineRcStyle), 0, /* n_preallocs */ (GInstanceInitFunc) qtengine_rc_style_init, }; - qtengine_type_rc_style = g_type_module_register_type (module, GTK_TYPE_RC_STYLE, "QtEngineRcStyle", &object_info, 0); + qtengine_type_rc_style = g_type_module_register_type (module, GTK_TYPE_RC_STYLE, "TQtEngineRcStyle", &object_info, 0); } -static void qtengine_rc_style_init (QtEngineRcStyle *style) +static void qtengine_rc_style_init (TQtEngineRcStyle *style) { } -static void qtengine_rc_style_class_init (QtEngineRcStyleClass *klass) +static void qtengine_rc_style_class_init (TQtEngineRcStyleClass *klass) { GtkRcStyleClass *rc_style_class = GTK_RC_STYLE_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS (klass); - parent_class = g_type_class_peek_parent (klass); + tqparent_class = g_type_class_peek_parent (klass); rc_style_class->parse = qtengine_rc_style_parse; rc_style_class->merge = qtengine_rc_style_merge; @@ -88,7 +88,7 @@ static void qtengine_rc_style_merge (GtkRcStyle * dest, GtkRcStyle * src) { - parent_class->merge(dest, src); + tqparent_class->merge(dest, src); } /* Create an empty style suitable to this RC style @@ -96,6 +96,6 @@ qtengine_rc_style_merge (GtkRcStyle * dest, static GtkStyle * qtengine_rc_style_create_style (GtkRcStyle *rc_style) { - void *ptr = GTK_STYLE (g_object_new (QTENGINE_TYPE_STYLE, NULL)); + void *ptr = GTK_STYLE (g_object_new (TQTENGINE_TYPE_STYLE, NULL)); return (GtkStyle *)ptr; } diff --git a/src/qt_rc_style.h b/src/qt_rc_style.h index 5235f09..e88a167 100644 --- a/src/qt_rc_style.h +++ b/src/qt_rc_style.h @@ -1,25 +1,25 @@ #include <gtk/gtkrc.h> -typedef struct _QtEngineRcStyle QtEngineRcStyle; -typedef struct _QtEngineRcStyleClass QtEngineRcStyleClass; +typedef struct _TQtEngineRcStyle TQtEngineRcStyle; +typedef struct _TQtEngineRcStyleClass TQtEngineRcStyleClass; extern GType qtengine_type_rc_style; -#define QTENGINE_TYPE_RC_STYLE qtengine_type_rc_style -#define QTENGINE_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), QTENGINE_TYPE_RC_STYLE, QtEngineRcStyle)) -#define QTENGINE_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), QTENGINE_TYPE_RC_STYLE, QtEngineRcStyleClass)) -#define QTENGINE_IS_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), QTENGINE_TYPE_RC_STYLE)) -#define QTENGINE_IS_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), QTENGINE_TYPE_RC_STYLE)) -#define QTENGINE_RC_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), QTENGINE_TYPE_RC_STYLE, QtEngineRcStyleClass)) +#define TQTENGINE_TYPE_RC_STYLE qtengine_type_rc_style +#define TQTENGINE_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), TQTENGINE_TYPE_RC_STYLE, TQtEngineRcStyle)) +#define TQTENGINE_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TQTENGINE_TYPE_RC_STYLE, TQtEngineRcStyleClass)) +#define TQTENGINE_IS_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), TQTENGINE_TYPE_RC_STYLE)) +#define TQTENGINE_IS_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TQTENGINE_TYPE_RC_STYLE)) +#define TQTENGINE_RC_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TQTENGINE_TYPE_RC_STYLE, TQtEngineRcStyleClass)) -struct _QtEngineRcStyle +struct _TQtEngineRcStyle { - GtkRcStyle parent_instance; + GtkRcStyle tqparent_instance; }; -struct _QtEngineRcStyleClass +struct _TQtEngineRcStyleClass { - GtkRcStyleClass parent_class; + GtkRcStyleClass tqparent_class; }; void qtengine_rc_style_register_type (GTypeModule *module); diff --git a/src/qt_style.h b/src/qt_style.h index 4a4bc78..425215f 100644 --- a/src/qt_style.h +++ b/src/qt_style.h @@ -1,27 +1,27 @@ #include <gtk/gtkstyle.h> -typedef struct _QtEngineStyle QtEngineStyle; -typedef struct _QtEngineStyleClass QtEngineStyleClass; +typedef struct _TQtEngineStyle TQtEngineStyle; +typedef struct _TQtEngineStyleClass TQtEngineStyleClass; extern GType qtengine_type_style; -#define QTENGINE_TYPE_STYLE qtengine_type_style -#define QTENGINE_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), QTENGINE_TYPE_STYLE, QtEngineStyle)) -#define QTENGINE_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), QTENGINE_TYPE_STYLE, QtEngineStyleClass)) -#define QTENGINE_IS_STYLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), QTENGINE_TYPE_STYLE)) -#define QTENGINE_IS_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), QTENGINE_TYPE_STYLE)) -#define QTENGINE_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), QTENGINE_TYPE_STYLE, QtEngineStyleClass)) +#define TQTENGINE_TYPE_STYLE qtengine_type_style +#define TQTENGINE_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), TQTENGINE_TYPE_STYLE, TQtEngineStyle)) +#define TQTENGINE_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TQTENGINE_TYPE_STYLE, TQtEngineStyleClass)) +#define TQTENGINE_IS_STYLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), TQTENGINE_TYPE_STYLE)) +#define TQTENGINE_IS_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TQTENGINE_TYPE_STYLE)) +#define TQTENGINE_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TQTENGINE_TYPE_STYLE, TQtEngineStyleClass)) -struct _QtEngineStyle +struct _TQtEngineStyle { - GtkStyle parent_instance; + GtkStyle tqparent_instance; GdkPixmap* menuBackground; }; -struct _QtEngineStyleClass +struct _TQtEngineStyleClass { - GtkStyleClass parent_class; + GtkStyleClass tqparent_class; }; void qtengine_style_register_type (GTypeModule *module); diff --git a/src/qt_theme_draw.c b/src/qt_theme_draw.c index c67016c..49a63ab 100644 --- a/src/qt_theme_draw.c +++ b/src/qt_theme_draw.c @@ -18,7 +18,7 @@ #define DETAIL(xx) ((detail) && (!strcmp(xx, detail))) #define DETAILHAS(xx) ((detail) && (strstr(detail, xx))) -#define PARENT(xx) ((parent) && (!strcmp(xx, gtk_widget_get_name(parent)))) +#define PARENT(xx) ((tqparent) && (!strcmp(xx, gtk_widget_get_name(tqparent)))) #ifndef max #define max(x,y) ((x)>=(y)?(x):(y)) #endif @@ -26,17 +26,17 @@ #define min(x,y) ((x)<=(y)?(x):(y)) #endif -static void qtengine_style_init (QtEngineStyle *style); -static void qtengine_style_class_init (QtEngineStyleClass *klass); +static void qtengine_style_init (TQtEngineStyle *style); +static void qtengine_style_class_init (TQtEngineStyleClass *klass); static GtkNotebook *notebook = NULL; static int nb_num_pages = 0; -static GtkStyleClass *parent_class = NULL; +static GtkStyleClass *tqparent_class = NULL; static PangoLayout* get_insensitive_layout (GdkDrawable *drawable, - PangoLayout *layout); + PangoLayout *tqlayout); static GtkShadowType @@ -81,7 +81,7 @@ draw_hline(GtkStyle* style, gint x2, gint y) { - if (gtkQtDebug) + if (gtkTQtDebug) printf("HLINE (%d,%d,%d) Widget: %s Detail: %s\n",x1,y1,y,gtk_widget_get_name(widget),detail); if (DETAIL("vscale")) @@ -102,7 +102,7 @@ draw_vline(GtkStyle* style, gint yDest, gint x) { - if (gtkQtDebug) + if (gtkTQtDebug) printf("VLINE (%d,%d,%d) Widget: %s Detail: %s\n",ySource ,yDest ,x,gtk_widget_get_name(widget),detail); @@ -135,7 +135,7 @@ draw_shadow(GtkStyle *style, sanitize_size(window, &width, &height); - if (gtkQtDebug) + if (gtkTQtDebug) printf("Shadow (%d,%d,%d,%d) Widget: %s Detail: %s\n",x,y,width,height,gtk_widget_get_name(widget),detail); @@ -159,9 +159,9 @@ draw_shadow(GtkStyle *style, } /* The remainder of this function was borrowed from the "Metal" theme/ - I don't really want to use Qt to draw these frames as there are too + I don't really want to use TQt to draw these frames as there are too many of them (it would slow down the theme engine even more). - TODO: Make them use the Qt color palette */ + TODO: Make them use the TQt color palette */ switch (shadow_type) { @@ -459,7 +459,7 @@ draw_arrow(GtkStyle* style, { sanitize_size(window, &width, &height); - if (gtkQtDebug) + if (gtkTQtDebug) printf("Arrow (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail); if (DETAIL("hscrollbar") || DETAIL("vscrollbar")) @@ -474,7 +474,7 @@ draw_arrow(GtkStyle* style, if (DETAIL("arrow")) { GdkPixbuf *gpix; - GtkWidget* parent; + GtkWidget* tqparent; if (gdk_window_is_viewable(gtk_widget_get_parent_window(widget))) { gpix = gdk_pixbuf_get_from_drawable(NULL, gtk_widget_get_parent_window(widget),NULL, x, y, 0, 0, width, height); @@ -482,8 +482,8 @@ draw_arrow(GtkStyle* style, g_object_unref(gpix); } - parent = gtk_widget_get_parent(widget); - drawArrow(window,style, GTK_WIDGET_STATE(parent), arrow_type, x, y, width, height); + tqparent = gtk_widget_get_parent(widget); + drawArrow(window,style, GTK_WIDGET_STATE(tqparent), arrow_type, x, y, width, height); return; } /* if (DETAIL("menuitem")) @@ -531,7 +531,7 @@ draw_arrow(GtkStyle* style, ay = y; aw = width; ah = height; - calculate_arrow_geometry (arrow_type, &ax, &ay, &aw, &ah); + calculate_arrow_tqgeometry (arrow_type, &ax, &ay, &aw, &ah); half_width = width / 2; half_height = height / 2; @@ -615,7 +615,7 @@ draw_box(GtkStyle * style, int nbpages; sanitize_size(window, &width, &height); - if (gtkQtDebug) + if (gtkTQtDebug) printf("Box (%d,%d,%d,%d) Widget: %s Detail: %s\n",x,y,width,height,gtk_widget_get_name(widget),detail); if (GTK_IS_SCROLLBAR(widget)) @@ -641,7 +641,7 @@ draw_box(GtkStyle * style, if (DETAIL("menubar")) { if (openOfficeFix == 1) - parent_class->draw_box (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height); + tqparent_class->draw_box (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height); else drawMenubar(window,style,state_type,x,y,width,height); return; @@ -649,7 +649,7 @@ draw_box(GtkStyle * style, if (DETAIL("menu")) { if (openOfficeFix == 1) - parent_class->draw_box (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height); + tqparent_class->draw_box (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height); else { if ((x >= 0) && (y >= 0)) /* Work around weirdness in firefox */ @@ -700,11 +700,11 @@ draw_box(GtkStyle * style, } if (DETAIL("button")) { - GtkWidget *parent; + GtkWidget *tqparent; int toolbutton = 0; - parent = gtk_widget_get_parent(widget); + tqparent = gtk_widget_get_parent(widget); - if (parent && (GTK_IS_CLIST(parent) || GTK_IS_LIST(parent) || GTK_IS_TREE_VIEW(parent))) + if (tqparent && (GTK_IS_CLIST(tqparent) || GTK_IS_LIST(tqparent) || GTK_IS_TREE_VIEW(tqparent))) { drawListHeader(window,style,state_type,x,y,width,height); return; @@ -714,12 +714,12 @@ draw_box(GtkStyle * style, * toolbar in gtk */ while (1) { - if (GTK_IS_WIDGET(parent)) + if (GTK_IS_WIDGET(tqparent)) { #ifdef HAVE_BONOBO - if (GTK_IS_TOOLBAR(parent) || BONOBO_IS_UI_TOOLBAR(parent)) + if (GTK_IS_TOOLBAR(tqparent) || BONOBO_IS_UI_TOOLBAR(tqparent)) #else - if (GTK_IS_TOOLBAR(parent)) + if (GTK_IS_TOOLBAR(tqparent)) #endif { toolbutton = 1; @@ -728,10 +728,10 @@ draw_box(GtkStyle * style, } else break; - parent = gtk_widget_get_parent(parent); + tqparent = gtk_widget_get_parent(tqparent); } - parent = gtk_widget_get_parent(widget); + tqparent = gtk_widget_get_parent(widget); if (toolbutton) drawToolButton(window,style,state_type,x,y,width,height); @@ -744,9 +744,9 @@ draw_box(GtkStyle * style, int defaultButton = GTK_WIDGET_HAS_FOCUS(widget); GtkWindow* toplevel; - if (isBaghira && GTK_IS_BOX(parent) && (g_list_length(GTK_BOX(parent)->children) == 2)) + if (isBaghira && GTK_IS_BOX(tqparent) && (g_list_length(GTK_BOX(tqparent)->children) == 2)) { - child1 = g_list_first((GTK_BOX(parent)->children)); + child1 = g_list_first((GTK_BOX(tqparent)->children)); child = ((GtkBoxChild *)child1->data)->widget; if (GTK_IS_ENTRY(child)) { @@ -754,7 +754,7 @@ draw_box(GtkStyle * style, return; } - child1 = g_list_last((GTK_BOX(parent)->children)); + child1 = g_list_last((GTK_BOX(tqparent)->children)); child = ((GtkBoxChild *)child1->data)->widget; if (GTK_IS_ENTRY(child)) { @@ -781,9 +781,9 @@ draw_box(GtkStyle * style, /* THIS IS WHAT WORKS NOW -- Tabs and tabbarbase will be drawn properly according to the QT style But the tabs won't be aligned according to QT. GTK+ does not have - an option for alignment of tabs. So if were to do this not only do we have to - calculate the x,y position of the tab ourselves, which is difficult in Qt unless - we are displaying the tab (can be done by subclassing QTabBar/QTabWidget) + an option for tqalignment of tabs. So if were to do this not only do we have to + calculate the x,y position of the tab ourselves, which is difficult in TQt unless + we are displaying the tab (can be done by subclassing TQTabBar/TQTabWidget) but also have to position the tab bar label ourselves in gtk. */ @@ -811,7 +811,7 @@ draw_box(GtkStyle * style, if (DETAIL("toolbar")) { if (openOfficeFix == 1) - parent_class->draw_box (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height); + tqparent_class->draw_box (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height); else drawToolbar(window,style,state_type,x,y,width,height); return; @@ -852,24 +852,24 @@ draw_flat_box(GtkStyle * style, { sanitize_size(window, &width, &height); - if (gtkQtDebug) + if (gtkTQtDebug) printf("Flat Box (%d,%d,%d,%d) Widget: %s Detail: %s %d %d\n",x,y,width,height,gtk_widget_get_name(widget),detail, state_type, GTK_STATE_SELECTED); if (DETAIL("tooltip")) { GdkColor tooltipColor; GdkGCValues gc_values; - GdkGCValuesMask gc_values_mask; + GdkGCValuesMask gc_values_tqmask; GdkGC* tooltipGc; tooltipColor.red = 255*257; tooltipColor.green = 255*257; tooltipColor.blue = 220*257; gdk_colormap_alloc_color(style->colormap, &tooltipColor, FALSE, TRUE); - gc_values_mask = GDK_GC_FOREGROUND; + gc_values_tqmask = GDK_GC_FOREGROUND; gc_values.foreground = tooltipColor; - tooltipGc = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask); + tooltipGc = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); gdk_draw_rectangle(window, tooltipGc, TRUE, x, y, width, height); gdk_draw_rectangle(window, style->black_gc, FALSE, x, y, width - 1, height - 1); @@ -908,7 +908,7 @@ draw_check(GtkStyle * style, gint width, gint height) { - if (gtkQtDebug) + if (gtkTQtDebug) printf("Check (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail); if (GTK_IS_MENU_ITEM(widget)) @@ -945,7 +945,7 @@ draw_option(GtkStyle * style, gint width, gint height) { - if (gtkQtDebug) + if (gtkTQtDebug) printf("Option (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail); if (gdk_window_is_viewable(gtk_widget_get_parent_window(widget))) @@ -979,7 +979,7 @@ draw_tab(GtkStyle * style, gint width, gint height) { - if (gtkQtDebug) + if (gtkTQtDebug) printf("Tab (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail); gtk_paint_box(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height); @@ -1011,7 +1011,7 @@ draw_shadow_gap(GtkStyle * style, sanitize_size (window, &width, &height); shadow_type = get_shadow_type (style, detail, shadow_type); - if (gtkQtDebug) + if (gtkTQtDebug) printf("Shadow_Gap (%d,%d,%d,%d) Widget: %s Detail: %s\n",x,y,width,height,gtk_widget_get_name(widget),detail); switch (shadow_type) { @@ -1154,7 +1154,7 @@ draw_box_gap(GtkStyle* style, if (width<0 || height<0) return; /* Eclipse really can be this stupid! */ - if (gtkQtDebug) + if (gtkTQtDebug) printf("Box_gap (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail); if (DETAIL("notebook")) @@ -1181,7 +1181,7 @@ draw_extension(GtkStyle * style, sanitize_size (window, &width, &height); - if (gtkQtDebug) + if (gtkTQtDebug) printf("Extension (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail); gtk_paint_box(style, window, state_type, shadow_type, area, widget, detail, @@ -1201,14 +1201,14 @@ draw_focus (GtkStyle *style, gint width, gint height) { - if (gtkQtDebug) + if (gtkTQtDebug) printf("Focus Rect (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail); - GtkWidget* parent = gtk_widget_get_parent(widget); + GtkWidget* tqparent = gtk_widget_get_parent(widget); if (GTK_IS_CHECK_BUTTON(widget) || GTK_IS_RADIO_BUTTON(widget) || - (parent && (GTK_IS_CLIST(parent) || GTK_IS_LIST(parent) || GTK_IS_TREE_VIEW(parent)))) + (tqparent && (GTK_IS_CLIST(tqparent) || GTK_IS_LIST(tqparent) || GTK_IS_TREE_VIEW(tqparent)))) { drawFocusRect(window, style, x, y, width, height); } @@ -1229,7 +1229,7 @@ draw_slider(GtkStyle * style, gint height, GtkOrientation orientation) { - if (gtkQtDebug) + if (gtkTQtDebug) printf("Slider (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail); if (DETAIL("slider")) @@ -1237,11 +1237,11 @@ draw_slider(GtkStyle * style, GtkAdjustment* adj = gtk_range_get_adjustment(GTK_RANGE(widget)); int widgetX, widgetY; - GtkWidget* parent = widget; - while (gtk_widget_get_parent(parent) != NULL) - parent = gtk_widget_get_parent(parent); + GtkWidget* tqparent = widget; + while (gtk_widget_get_parent(tqparent) != NULL) + tqparent = gtk_widget_get_parent(tqparent); - gtk_widget_translate_coordinates(widget, parent, 0, 0, &widgetX, &widgetY); + gtk_widget_translate_coordinates(widget, tqparent, 0, 0, &widgetX, &widgetY); if (orientation == GTK_ORIENTATION_VERTICAL) drawScrollBarSlider(window, style, state_type, orientation, adj, x-1, y, width+2, height, y-widgetY, widget->allocation.height); @@ -1270,7 +1270,7 @@ draw_handle(GtkStyle * style, sanitize_size(window, &width, &height); - if (gtkQtDebug) + if (gtkTQtDebug) printf("Handle (%d,%d,%d,%d) Widget: %s Detail: %s \n",x,y,width,height,gtk_widget_get_name(widget),detail, state_type); drawSplitter(window,style,state_type,orientation,x,y,width,height); @@ -1287,33 +1287,33 @@ void draw_layout (GtkStyle *style, const gchar *detail, gint x, gint y, - PangoLayout *layout) + PangoLayout *tqlayout) { GdkColor color; GdkGC *gc; getTextColor(&color, state_type); - if (gtkQtDebug) + if (gtkTQtDebug) printf("Layout (%d,%d) Widget: %s Detail: %s %d \n",x,y,gtk_widget_get_name(widget),detail, state_type); if (DETAIL("accellabel") || DETAIL("label") || DETAIL("cellrenderertext")) { - GtkWidget* parent = gtk_widget_get_parent(widget); - GtkWidget* parent1 = gtk_widget_get_parent(parent); + GtkWidget* tqparent = gtk_widget_get_parent(widget); + GtkWidget* tqparent1 = gtk_widget_get_parent(tqparent); - /* printf("parent's names are %s->%s->%s\n", gtk_widget_get_name(widget), gtk_widget_get_name(parent), gtk_widget_get_name(parent1)); */ + /* printf("tqparent's names are %s->%s->%s\n", gtk_widget_get_name(widget), gtk_widget_get_name(tqparent), gtk_widget_get_name(tqparent1)); */ /* In baghira -- even highlight the menu bar items */ - if ((GTK_IS_MENU_ITEM(parent) && (!GTK_IS_MENU_BAR(parent1) || isBaghira || isPolyester)) || GTK_IS_TREE_VIEW(widget)) + if ((GTK_IS_MENU_ITEM(tqparent) && (!GTK_IS_MENU_BAR(tqparent1) || isBaghira || isPolyester)) || GTK_IS_TREE_VIEW(widget)) { - PangoAttrList *layoutattr; + PangoAttrList *tqlayoutattr; const gchar *text; gint text_length = 0; gint text_bytelen = 0; - text = pango_layout_get_text (layout); + text = pango_layout_get_text (tqlayout); if (text != 0) { PangoAttribute *textcolorattr; @@ -1324,19 +1324,19 @@ void draw_layout (GtkStyle *style, textcolorattr->start_index = 0; textcolorattr->end_index = text_bytelen; - layoutattr = pango_layout_get_attributes(layout); + tqlayoutattr = pango_layout_get_attributes(tqlayout); - if (layoutattr == NULL) + if (tqlayoutattr == NULL) { - layoutattr = pango_attr_list_new(); - pango_attr_list_insert(layoutattr, pango_attribute_copy(textcolorattr)); - pango_layout_set_attributes(layout,layoutattr); - pango_attr_list_unref(layoutattr); + tqlayoutattr = pango_attr_list_new(); + pango_attr_list_insert(tqlayoutattr, pango_attribute_copy(textcolorattr)); + pango_layout_set_attributes(tqlayout,tqlayoutattr); + pango_attr_list_unref(tqlayoutattr); } else { - pango_attr_list_change(layoutattr, pango_attribute_copy(textcolorattr)); - pango_layout_set_attributes(layout,layoutattr); + pango_attr_list_change(tqlayoutattr, pango_attribute_copy(textcolorattr)); + pango_layout_set_attributes(tqlayout,tqlayoutattr); } pango_attribute_destroy(textcolorattr); } @@ -1355,13 +1355,13 @@ void draw_layout (GtkStyle *style, if (state_type == GTK_STATE_INSENSITIVE) { PangoLayout *ins; - ins = get_insensitive_layout (window, layout); + ins = get_insensitive_layout (window, tqlayout); gdk_draw_layout (window, gc, x, y, ins); g_object_unref (ins); } else { - gdk_draw_layout (window, gc, x, y, layout); + gdk_draw_layout (window, gc, x, y, tqlayout); } if (area) @@ -1390,7 +1390,7 @@ range_new (guint start, static PangoLayout* get_insensitive_layout (GdkDrawable *drawable, - PangoLayout *layout) + PangoLayout *tqlayout) { GSList *embossed_ranges = NULL; GSList *stippled_ranges = NULL; @@ -1400,7 +1400,7 @@ get_insensitive_layout (GdkDrawable *drawable, PangoAttrList *attrs; GdkBitmap *stipple = NULL; - iter = pango_layout_get_iter (layout); + iter = pango_layout_get_iter (tqlayout); do { @@ -1447,7 +1447,7 @@ get_insensitive_layout (GdkDrawable *drawable, pango_layout_iter_free (iter); - new_layout = pango_layout_copy (layout); + new_layout = pango_layout_copy (tqlayout); attrs = pango_layout_get_attributes (new_layout); @@ -1526,25 +1526,25 @@ qtengine_style_register_type (GTypeModule *module) { static const GTypeInfo object_info = { - sizeof (QtEngineStyleClass), + sizeof (TQtEngineStyleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) qtengine_style_class_init, NULL, /* class_finalize */ NULL, /* class_data */ - sizeof (QtEngineStyle), + sizeof (TQtEngineStyle), 0, /* n_preallocs */ (GInstanceInitFunc) qtengine_style_init, }; qtengine_type_style = g_type_module_register_type (module, GTK_TYPE_STYLE, - "QtEngineStyle", + "TQtEngineStyle", &object_info, 0); } static void -qtengine_style_init (QtEngineStyle *style) +qtengine_style_init (TQtEngineStyle *style) { } @@ -1743,7 +1743,7 @@ static void gtk_style_real_realize (GtkStyle *style) { GdkGCValues gc_values; - GdkGCValuesMask gc_values_mask; + GdkGCValuesMask gc_values_tqmask; gint i; @@ -1771,13 +1771,13 @@ gtk_style_real_realize (GtkStyle *style) style->white.blue = 0xffff; gdk_colormap_alloc_color (style->colormap, &style->white, FALSE, TRUE); - gc_values_mask = GDK_GC_FOREGROUND; + gc_values_tqmask = GDK_GC_FOREGROUND; gc_values.foreground = style->black; - style->black_gc = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask); + style->black_gc = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); gc_values.foreground = style->white; - style->white_gc = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask); + style->white_gc = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); for (i = 0; i < 5; i++) { @@ -1808,28 +1808,28 @@ gtk_style_real_realize (GtkStyle *style) style->text_aa[i].red, style->text_aa[i].green, style->text_aa[i].blue); gc_values.foreground = style->fg[i]; - style->fg_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask); + style->fg_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); gc_values.foreground = style->bg[i]; - style->bg_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask); + style->bg_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); gc_values.foreground = style->light[i]; - style->light_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask); + style->light_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); gc_values.foreground = style->dark[i]; - style->dark_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask); + style->dark_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); gc_values.foreground = style->mid[i]; - style->mid_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask); + style->mid_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); gc_values.foreground = style->text[i]; - style->text_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask); + style->text_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); gc_values.foreground = style->base[i]; - style->base_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask); + style->base_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); gc_values.foreground = style->text_aa[i]; - style->text_aa_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask); + style->text_aa_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); } } @@ -1845,15 +1845,15 @@ static void set_background (GtkStyle *style, GdkWindow *window, GtkStateType state_type) { GdkPixmap *pixmap; - gint parent_relative; + gint tqparent_relative; GdkPixmap* pix_test; /* What kind of horrible person would store a pointer to a widget here... */ - void* parent = 0; - gdk_window_get_user_data(window, &parent); - if (GTK_IS_MENU((GtkWidget*) parent)) + void* tqparent = 0; + gdk_window_get_user_data(window, &tqparent); + if (GTK_IS_MENU((GtkWidget*) tqparent)) { - pix_test = QTENGINE_STYLE(style)->menuBackground; + pix_test = TQTENGINE_STYLE(style)->menuBackground; } else pix_test = style->bg_pixmap[state_type]; @@ -1863,28 +1863,28 @@ set_background (GtkStyle *style, GdkWindow *window, GtkStateType state_type) if (pix_test == (GdkPixmap*) GDK_PARENT_RELATIVE) { pixmap = NULL; - parent_relative = TRUE; + tqparent_relative = TRUE; } else { pixmap = pix_test; - parent_relative = FALSE; + tqparent_relative = FALSE; gdk_drawable_set_colormap(pixmap, style->colormap); } if (pixmap && !gdk_drawable_get_colormap (pixmap)) gdk_drawable_set_colormap (pixmap, gdk_drawable_get_colormap (window)); - gdk_window_set_back_pixmap (window, pixmap, parent_relative); + gdk_window_set_back_pixmap (window, pixmap, tqparent_relative); } else gdk_window_set_background (window, &style->bg[state_type]); } static void -qtengine_style_class_init (QtEngineStyleClass *klass) +qtengine_style_class_init (TQtEngineStyleClass *klass) { GtkStyleClass *style_class = GTK_STYLE_CLASS (klass); - parent_class = g_type_class_peek_parent (klass); + tqparent_class = g_type_class_peek_parent (klass); style_class->draw_hline = draw_hline; style_class->draw_vline = draw_vline; |