From cfc2c336e83a4252abac4a9b31893f9a2c56fdc5 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 6 Apr 2024 16:44:42 +0900 Subject: [PATCH] Replace Qt with TQt Signed-off-by: Michele Calgaro --- kcm_gtk/kcmgtk.h | 2 +- src/qt_qt_wrapper.cpp | 10 +++++----- src/qt_rc_style.c | 2 +- src/qt_theme_draw.c | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/kcm_gtk/kcmgtk.h b/kcm_gtk/kcmgtk.h index 7f52856..6cbe715 100644 --- a/kcm_gtk/kcmgtk.h +++ b/kcm_gtk/kcmgtk.h @@ -53,7 +53,7 @@ class KcmGtk: public TDECModule static const TQString GTK_RC_FILE; // Where to search for KDE's config files static const TQString KDE_RC_DIR; - // How to name qtk-qt-engines rc-file + // How to name gtk-qt-engines rc-file static const TQString GTK_TQT_RC_FILE; static const TQString GTK3_INI_DIR; diff --git a/src/qt_qt_wrapper.cpp b/src/qt_qt_wrapper.cpp index 69f7a52..651aa80 100644 --- a/src/qt_qt_wrapper.cpp +++ b/src/qt_qt_wrapper.cpp @@ -655,7 +655,7 @@ TQColor gdkColorToTQColor(GdkColor* c) // The drawing functions follow the same pattern: // * Set the appropriate flags -// * Ask QT to paint the widget to a pixmap +// * Ask TQt to paint the widget to a pixmap // * Create a GdkPixmap that points to our TQPixmap // * Paint the pixmap on the window @@ -755,7 +755,7 @@ void drawButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int defa button.setDown(sflags&TQStyle::Style_Down); button.setOn(sflags&TQStyle::Style_On); - // This emulates ::drawButton() in the Qt qbutton.cpp file + // This emulates ::drawButton() in the TQt qbutton.cpp file tqApp->style().drawControl(TQStyle::CE_PushButton, &painter, &button, TQRect(0,0,w,h), button.palette().active(), sflags); tqApp->style().drawControl(TQStyle::CE_PushButtonLabel, &painter, &button, @@ -1079,7 +1079,7 @@ void drawCheckBox(GdkWindow* window, GtkStyle* style, GtkStateType state, int ch painter.fillRect(0, 0, realW, realH, tqApp->palette().active().brush(TQColorGroup::Background)); tqApp->style().drawControl(TQStyle::CE_CheckBox, &painter, &checkbox, TQRect(0, 0, realW, realH), tqApp->palette().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; @@ -1151,7 +1151,7 @@ void drawRadioButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int tqApp->style().drawControl(TQStyle::CE_RadioButton, &painter, &radio, TQRect(0,0,realH,realW), tqApp->palette().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; @@ -2177,7 +2177,7 @@ void setRcProperties(GtkRcStyle* rc_style, int forceRecreate) stream << parse_rc_string("GtkButton::inner-border = {0, 0, 0, 0}", "*GtkNotebook*GtkButton*"); stream << parse_rc_string("GtkButton::inner-border = {0, 0, 0, 0}", "*GtkNotebook*GtkToggleButton*"); - // Qt calls them tab boxes, GTK calls them notebooks (!??!?) Either way they are a pain... + // TQt calls them tab boxes, GTK calls them notebooks (!??!?) Either way they are a pain... stream << parse_rc_string("GtkNotebook::tab-overlap = " + TQString::number(tqApp->style().pixelMetric(TQStyle::PM_TabBarTabOverlap)), "*"); // This one may not work... diff --git a/src/qt_rc_style.c b/src/qt_rc_style.c index 776ecaa..ea1ecf9 100644 --- a/src/qt_rc_style.c +++ b/src/qt_rc_style.c @@ -62,7 +62,7 @@ qtengine_rc_style_parse (GtkRcStyle *rc_style, GtkSettings *settings, GScanner * guint old_scope; guint token; - /* Sets Rc properties from QT settings */ + /* Sets Rc properties from TQt settings */ #ifdef FORCE_RELOAD_THEMES_ON_STARTUP setRcProperties(rc_style, 1); #else diff --git a/src/qt_theme_draw.c b/src/qt_theme_draw.c index 6473c9c..7e20861 100644 --- a/src/qt_theme_draw.c +++ b/src/qt_theme_draw.c @@ -222,9 +222,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) { @@ -887,10 +887,10 @@ draw_box(GtkStyle * style, nb = (GtkNotebook *)widget; nbpages = g_list_length(nb->children); /* 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 + Tabs and tabbarbase will be drawn properly according to the TQt style + But the tabs won't be aligned according to TQt. 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 + 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. */