summaryrefslogtreecommitdiffstats
path: root/src/qt_qt_wrapper.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-18 18:08:38 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-18 18:08:38 -0600
commit8b600a29ba4175eae4ef37518a317413d70eb3fe (patch)
tree61cde0644c4bed1a05565236efdf23fb5bab5590 /src/qt_qt_wrapper.cpp
parentca65994892904e63f7a6164a0d61d7c1a973c9d3 (diff)
downloadgtk-qt-engine-8b600a29ba4175eae4ef37518a317413d70eb3fe.tar.gz
gtk-qt-engine-8b600a29ba4175eae4ef37518a317413d70eb3fe.zip
Rename old tq methods that no longer need a unique name
Diffstat (limited to 'src/qt_qt_wrapper.cpp')
-rw-r--r--src/qt_qt_wrapper.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/src/qt_qt_wrapper.cpp b/src/qt_qt_wrapper.cpp
index e840058..a049f5e 100644
--- a/src/qt_qt_wrapper.cpp
+++ b/src/qt_qt_wrapper.cpp
@@ -710,9 +710,9 @@ void drawButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int defa
button.setOn(sflags&TQStyle::Style_On);
// This emulates ::drawButton() in the Qt qbutton.cpp file
- tqApp->tqstyle().tqdrawControl(TQStyle::CE_PushButton, &painter, &button,
+ tqApp->tqstyle().drawControl(TQStyle::CE_PushButton, &painter, &button,
TQRect(0,0,w,h), button.tqpalette().active(), sflags);
- tqApp->tqstyle().tqdrawControl(TQStyle::CE_PushButtonLabel, &painter, &button,
+ tqApp->tqstyle().drawControl(TQStyle::CE_PushButtonLabel, &painter, &button,
tqApp->tqstyle().subRect(TQStyle::SR_PushButtonContents, &button),
button.colorGroup(), sflags);
@@ -739,7 +739,7 @@ void drawButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int defa
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().background());
- tqApp->tqstyle().tqdrawControl(TQStyle::CE_PushButton, &painter, &button,
+ tqApp->tqstyle().drawControl(TQStyle::CE_PushButton, &painter, &button,
TQRect(0,0,w,h), button.tqpalette().active(), sflags);
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
@@ -875,7 +875,7 @@ void drawTab(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int
sflags = TQStyle::Style_Selected;
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));
+ tqApp->tqstyle().drawControl(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);
@@ -1007,7 +1007,7 @@ void drawComboBox(GdkWindow* window, GtkStyle* style, GtkStateType state, int x,
activeflags = TQStyle::Style_MouseOver;
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);
+ tqApp->tqstyle().drawComplexControl(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);
@@ -1019,8 +1019,8 @@ void drawCheckBox(GdkWindow* window, GtkStyle* style, GtkStateType state, int ch
if (!gtkQtEnable)
return;
- int realH = tqApp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorHeight);
- int realW = tqApp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorWidth);
+ int realH = tqApp->tqstyle().pixelMetric(TQStyle::PM_IndicatorHeight);
+ int realW = tqApp->tqstyle().pixelMetric(TQStyle::PM_IndicatorWidth);
if ((realW < 1) || (realH < 1))
return;
@@ -1033,7 +1033,7 @@ void drawCheckBox(GdkWindow* window, GtkStyle* style, GtkStateType state, int ch
sflags |= (checked ? TQStyle::Style_On : TQStyle::Style_Off);
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);
+ tqApp->tqstyle().drawControl(TQStyle::CE_CheckBox, &painter, &checkbox, TQRect(0, 0, realW, realH), tqApp->tqpalette().active(), sflags);
// Qt checkboxes are usually bigger than GTK wants.
// We cheat, and draw them over the expected area.
@@ -1055,8 +1055,8 @@ void drawMenuCheck(GdkWindow* window, GtkStyle* style, GtkStateType state, int x
/* 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.tqsizeHint().width();
- int h1 = checkbox.tqsizeHint().height(); */
+ int w1 = checkbox.sizeHint().width();
+ int h1 = checkbox.sizeHint().height(); */
if ((w < 1) || (h < 1))
return;
@@ -1085,8 +1085,8 @@ void drawRadioButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int
if (!gtkQtEnable)
return;
- int realH = tqApp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorHeight);
- int realW = tqApp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorWidth);
+ int realH = tqApp->tqstyle().pixelMetric(TQStyle::PM_IndicatorHeight);
+ int realW = tqApp->tqstyle().pixelMetric(TQStyle::PM_IndicatorWidth);
if ((realW < 1) || (realH < 1))
return;
@@ -1105,7 +1105,7 @@ void drawRadioButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int
else
painter.fillRect(0, 0, realW, realH, tqApp->tqpalette().active().brush(TQColorGroup::Background));
- tqApp->tqstyle().tqdrawControl(TQStyle::CE_RadioButton, &painter, &radio, TQRect(0,0,realH,realW), tqApp->tqpalette().active(), sflags);
+ tqApp->tqstyle().drawControl(TQStyle::CE_RadioButton, &painter, &radio, TQRect(0,0,realH,realW), tqApp->tqpalette().active(), sflags);
// Qt checkboxes are usually bigger than GTK wants.
// We cheat, and draw them over the expected area.
@@ -1259,7 +1259,7 @@ void drawScrollBar(GdkWindow* window, GtkStyle* style, GtkStateType state, int o
painter2.fillRect(0, 0, w, h + thumbSize,
tqApp->tqpalette().active().brush(TQColorGroup::Background));
- tqApp->tqstyle().tqdrawComplexControl(TQStyle::CC_ScrollBar,
+ tqApp->tqstyle().drawComplexControl(TQStyle::CC_ScrollBar,
&painter2, scrollBar, TQRect(0, 0, w, h+thumbSize),
tqApp->tqpalette().active(), sflags);
@@ -1284,7 +1284,7 @@ void drawScrollBar(GdkWindow* window, GtkStyle* style, GtkStateType state, int o
painter2.fillRect(0, 0, w + thumbSize, h,
tqApp->tqpalette().active().brush(TQColorGroup::Background));
- tqApp->tqstyle().tqdrawComplexControl(TQStyle::CC_ScrollBar,
+ tqApp->tqstyle().drawComplexControl(TQStyle::CC_ScrollBar,
&painter2, scrollBar, TQRect(0, 0, w+thumbSize, h),
tqApp->tqpalette().active(), sflags);
@@ -1310,8 +1310,8 @@ void drawToolButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int
button.resize(w, h);
/*
- int realW = button.tqsizeHint().width();
- int realH = button.tqsizeHint().height(); */
+ int realW = button.sizeHint().width();
+ int realH = button.sizeHint().height(); */
TQStyle::SFlags sflags = stateToSFlags(state);
TQStyle::SCFlags activeflags = TQStyle::SC_None;
@@ -1330,7 +1330,7 @@ void drawToolButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int
painter.fillRect(0, 0, w, h, TQBrush(TQColor(255,255,255), *backgroundTile));
else
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);
+ tqApp->tqstyle().drawComplexControl(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);
@@ -1352,7 +1352,7 @@ void drawMenuBarItem(GdkWindow* window, GtkStyle* style, GtkStateType state, int
TQStyle::SFlags sflags = TQStyle::Style_Down | TQStyle::Style_Enabled | TQStyle::Style_Active | TQStyle::Style_HasFocus;
- tqApp->tqstyle().tqdrawControl(TQStyle::CE_MenuBarItem, &painter, &mb, TQRect(0, 0, w, h), tqApp->tqpalette().active(), sflags, TQStyleOption(&mi));
+ tqApp->tqstyle().drawControl(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);
@@ -1377,7 +1377,7 @@ void drawMenuItem(GdkWindow* window, GtkStyle* style, GtkStateType state, int x,
TQStyle::SFlags sflags = TQStyle::Style_Active | TQStyle::Style_Enabled;
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);
+ tqApp->tqstyle().drawControl(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);
@@ -1432,7 +1432,7 @@ void drawTabFrame(GdkWindow* window, GtkStyle* style, GtkStateType state, int x,
g_object_unref(pix);
// Drawing tab base
- int th = tqApp->tqstyle().tqpixelMetric(TQStyle::PM_TabBarBaseHeight, meepTabBar);
+ int th = tqApp->tqstyle().pixelMetric(TQStyle::PM_TabBarBaseHeight, meepTabBar);
int tw = w;
if ((tw < 1) || (th < 1))
@@ -1454,13 +1454,13 @@ void drawTabFrame(GdkWindow* window, GtkStyle* style, GtkStateType state, int x,
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+tqApp->tqstyle().tqpixelMetric(TQStyle::PM_TabBarBaseOverlap, meepTabBar), tw, th);
+ gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y+h+tqApp->tqstyle().pixelMetric(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-tqApp->tqstyle().tqpixelMetric(TQStyle::PM_TabBarBaseOverlap, meepTabBar), tw, th);
+ gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y-tqApp->tqstyle().pixelMetric(TQStyle::PM_TabBarBaseOverlap, meepTabBar), tw, th);
g_object_unref(pix);
}
}
@@ -1532,7 +1532,7 @@ void drawProgressChunk(GdkWindow * window, GtkStyle * style, GtkStateType state,
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background));
- tqApp->tqstyle().tqdrawControl(TQStyle::CE_ProgressBarContents, &painter, &bar, TQRect(0,0,w2,h2), tqApp->tqpalette().active(), sflags);
+ tqApp->tqstyle().drawControl(TQStyle::CE_ProgressBarContents, &painter, &bar, TQRect(0,0,w2,h2), tqApp->tqpalette().active(), sflags);
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
if (isAlloy)
@@ -1685,7 +1685,7 @@ void drawSquareButton(GdkWindow* window, GtkStyle* style, GtkStateType state, in
else
painter.fillRect(0, 0, 20, 20, tqApp->tqpalette().active().brush(TQColorGroup::Background));
- tqApp->tqstyle().tqdrawControl(TQStyle::CE_PushButton, &painter, &button,
+ tqApp->tqstyle().drawControl(TQStyle::CE_PushButton, &painter, &button,
TQRect(0,0,20,20), tqApp->tqpalette().active(), sflags);
TQImage image = pixmap.convertToImage().smoothScale(w,h);
@@ -1762,7 +1762,7 @@ void drawTabNG(GdkWindow *window, GtkStyle* style, GtkStateType state, int x, in
else
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));
+ tqApp->tqstyle().drawControl(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
@@ -2084,11 +2084,11 @@ void setRcProperties(GtkRcStyle* rc_style, int forceRecreate)
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 = " + 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("GtkScrollbar::min-slider-length = " + TQString::number(tqApp->tqstyle().pixelMetric(TQStyle::PM_ScrollBarSliderMin)), "*");
+ stream << parse_rc_string("GtkScrollbar::slider-width = " + TQString::number(tqApp->tqstyle().pixelMetric(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)), "*");
+ stream << parse_rc_string("GtkButton::child-displacement-x = " + TQString::number(tqApp->tqstyle().pixelMetric(TQStyle::PM_ButtonShiftHorizontal)), "*");
+ stream << parse_rc_string("GtkButton::child-displacement-y = " + TQString::number(tqApp->tqstyle().pixelMetric(TQStyle::PM_ButtonShiftVertical)), "*");
stream << parse_rc_string("GtkButton::default-border = { 0, 0, 0, 0 }", "*");
stream << parse_rc_string("GtkButton::default-outside-border = {0, 0, 0, 0}", "*");
#ifdef USE_NATIVE_GTK_BUTTON_DRAWING
@@ -2107,10 +2107,10 @@ void setRcProperties(GtkRcStyle* rc_style, int forceRecreate)
stream << parse_rc_string("GtkButtonBox::child_internal_pad_y = 0", "*");
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("GtkScale::slider-length = " + TQString::number(tqApp->tqstyle().pixelMetric(TQStyle::PM_SliderLength, &slider)), "*");
- 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 = " + TQString::number(tqApp->tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth)), "*.GtkMenu");
+ stream << parse_rc_string("ythickness = " + TQString::number(tqApp->tqstyle().pixelMetric(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");
@@ -2134,7 +2134,7 @@ void setRcProperties(GtkRcStyle* rc_style, int forceRecreate)
stream << parse_rc_string("GtkNotebook::tab-overlap = 1", "*");
// This one may not work...
- //insertIntProperty(rc_style, "GtkCheckButton", "indicator-size", tqApp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorHeight) );
+ //insertIntProperty(rc_style, "GtkCheckButton", "indicator-size", tqApp->tqstyle().pixelMetric(TQStyle::PM_IndicatorHeight) );
// For icons
@@ -2302,7 +2302,7 @@ void setMenuBackground(GtkStyle* style)
painter.fillRect(0, 0, 1024, 25, TQBrush(TQColor(255,255,255), *backgroundTile));
else
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);
+ tqApp->tqstyle().drawControl(TQStyle::CE_PopupMenuItem, &painter, &pm, TQRect(0,0,1024,25), tqApp->tqpalette().active(), sflags, opt);
menuBackgroundPixmapGdk = gdk_pixmap_foreign_new(menuBackgroundPixmap->handle());
}