summaryrefslogtreecommitdiffstats
path: root/style/qtcurve.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2012-09-01 17:04:20 +0200
committerSlávek Banko <slavek.banko@axis.cz>2012-09-01 17:04:20 +0200
commit821d7de7dfeba296893708dd702445dfa8f6477f (patch)
tree5589091d777395421040283a2a6be2770a1bbbe6 /style/qtcurve.cpp
parent9d466f4825e4d70f9d531b8dccd9c7e856307ede (diff)
downloadtde-style-qtcurve-821d7de7dfeba296893708dd702445dfa8f6477f.tar.gz
tde-style-qtcurve-821d7de7dfeba296893708dd702445dfa8f6477f.zip
Revert style and class names to QtCurve
Fix FTBFS on Qt3
Diffstat (limited to 'style/qtcurve.cpp')
-rw-r--r--style/qtcurve.cpp172
1 files changed, 88 insertions, 84 deletions
diff --git a/style/qtcurve.cpp b/style/qtcurve.cpp
index 8314397..8941a54 100644
--- a/style/qtcurve.cpp
+++ b/style/qtcurve.cpp
@@ -1,5 +1,5 @@
/*
- TQtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com
+ QtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com
----
@@ -125,6 +125,10 @@ dimension, so as to draw the scrollbar at the correct size.
#include <X11/Xatom.h>
#include "qtc_fixx11h.h"
+#ifndef HAVE_REAL_TQT
+#define TQTitleBar QTitleBar
+#endif
+
static const Atom constNetMoveResize = XInternAtom(tqt_xdisplay(), "_NET_WM_MOVERESIZE", False);
static const TQWidget * getTopLevel(const TQWidget *widget)
{
@@ -338,16 +342,16 @@ static TQString themeFile(const TQString &dir, const TQString &n, bool trinity=t
}
#endif
-class TQtCurveStylePlugin : public TQStylePlugin
+class QtCurveStylePlugin : public TQStylePlugin
{
public:
- TQtCurveStylePlugin() : TQStylePlugin() { }
+ QtCurveStylePlugin() : TQStylePlugin() { }
TQStringList keys() const
{
TQStringList list;
- list << "TQtCurve";
+ list << "QtCurve";
#ifdef TQTC_STYLE_SUPPORT
getStyles(kdeHome(useTQt3Settings()), list);
@@ -362,16 +366,16 @@ class TQtCurveStylePlugin : public TQStylePlugin
TQStyle * create(const TQString &s)
{
return "qtcurve"==s.lower()
- ? new TQtCurveStyle
+ ? new QtCurveStyle
#ifdef TQTC_STYLE_SUPPORT
: 0==s.find(THEME_PREFIX)
- ? new TQtCurveStyle(s)
+ ? new QtCurveStyle(s)
#endif
: 0;
}
};
-TQ_EXPORT_PLUGIN(TQtCurveStylePlugin)
+TQ_EXPORT_PLUGIN(QtCurveStylePlugin)
#define SKIP_TASKBAR (APP_SKIP_TASKBAR==itsThemedApp || APP_KPRINTER==itsThemedApp || APP_KDIALOG==itsThemedApp)
@@ -806,9 +810,9 @@ static void drawArrow(TQPainter *p, const TQRect &r, const TQColor &col, TQStyle
}
#ifdef TQTC_STYLE_SUPPORT
-TQtCurveStyle::TQtCurveStyle(const TQString &name)
+QtCurveStyle::QtCurveStyle(const TQString &name)
#else
-TQtCurveStyle::TQtCurveStyle()
+QtCurveStyle::QtCurveStyle()
#endif
: BASE_STYLE(AllowMenuTransparency, WindowsStyleScrollBar),
itsSliderCols(0L),
@@ -1111,7 +1115,7 @@ TQtCurveStyle::TQtCurveStyle()
setSbType();
}
-TQtCurveStyle::~TQtCurveStyle()
+QtCurveStyle::~QtCurveStyle()
{
if(itsSidebarButtonsCols!=itsSliderCols &&
itsSidebarButtonsCols!=itsDefBtnCols)
@@ -1154,7 +1158,7 @@ static TQString getFile(const TQString &f)
return d;
}
-void TQtCurveStyle::applicationPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr)
+void QtCurveStyle::applicationPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr)
{
if (ceData.widgetObjectTypes.contains(TQAPPLICATION_OBJECT_NAME_STRING)) {
TQApplication *app = reinterpret_cast<TQApplication*>(ptr);
@@ -1162,7 +1166,7 @@ void TQtCurveStyle::applicationPolish(TQStyleControlElementData ceData, ControlE
TQString appName(getFile(app->argv()[0]));
if(NULL!=getenv("QTCURVE_DEBUG"))
- std::cout << "TQtCurve: Application name: \"" << appName.latin1() << "\"\n";
+ std::cout << "QtCurve: Application name: \"" << appName.latin1() << "\"\n";
if ("kicker"==appName || "appletproxy"==appName)
{
@@ -1249,7 +1253,7 @@ void TQtCurveStyle::applicationPolish(TQStyleControlElementData ceData, ControlE
}
}
-void TQtCurveStyle::polish(TQPalette &pal)
+void QtCurveStyle::polish(TQPalette &pal)
{
if(APP_MACTOR==itsThemedApp && itsMactorPal &&
pal.active().background()!=itsMactorPal->active().background())
@@ -1431,7 +1435,7 @@ static TQColor disable(const TQColor &col, const TQColor &bgnd)
return c;
}
-TQColorGroup TQtCurveStyle::setColorGroup(const TQColorGroup &old, const TQColorGroup &act, bool dis)
+TQColorGroup QtCurveStyle::setColorGroup(const TQColorGroup &old, const TQColorGroup &act, bool dis)
{
TQColor mid(old.mid());
@@ -1462,7 +1466,7 @@ TQColorGroup TQtCurveStyle::setColorGroup(const TQColorGroup &old, const TQColor
static const char * kdeToolbarWidget="kde toolbar widget";
-void TQtCurveStyle::polish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr)
+void QtCurveStyle::polish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr)
{
if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
@@ -1847,7 +1851,7 @@ void TQtCurveStyle::polish(TQStyleControlElementData ceData, ControlElementFlags
BASE_STYLE::polish(ceData, elementFlags, ptr);
}
-void TQtCurveStyle::unPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr)
+void QtCurveStyle::unPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr)
{
if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
@@ -1992,7 +1996,7 @@ static void sendXEvent(TQDialog *dlg, const char *msg)
SubstructureRedirectMask | SubstructureNotifyMask, &xev);
}
-bool TQtCurveStyle::appIsNotEmbedded(TQDialog *dlg)
+bool QtCurveStyle::appIsNotEmbedded(TQDialog *dlg)
{
Window win;
@@ -2004,7 +2008,7 @@ bool TQtCurveStyle::appIsNotEmbedded(TQDialog *dlg)
return false;
}
-bool TQtCurveStyle::objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQEvent *event )
+bool QtCurveStyle::objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQEvent *event )
{
if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) {
TQObject* object = reinterpret_cast<TQObject*>(source);
@@ -2467,7 +2471,7 @@ bool TQtCurveStyle::objectEventHandler( TQStyleControlElementData ceData, Contro
return BASE_STYLE::objectEventHandler(ceData, elementFlags, source, event);
}
-void TQtCurveStyle::drawLightBevel(const TQColor &bgnd, TQPainter *p, const TQRect &rOrig,
+void QtCurveStyle::drawLightBevel(const TQColor &bgnd, TQPainter *p, const TQRect &rOrig,
const TQColorGroup &cg, SFlags flags,
int round, const TQColor &fill, const TQColor *custom,
bool doBorder, bool doCorners, EWidget w) const
@@ -2690,7 +2694,7 @@ void TQtCurveStyle::drawLightBevel(const TQColor &bgnd, TQPainter *p, const TQRe
p->restore();
}
-void TQtCurveStyle::drawGlow(TQPainter *p, const TQRect &r, const TQColorGroup &cg, EWidget w, const TQColor *cols) const
+void QtCurveStyle::drawGlow(TQPainter *p, const TQRect &r, const TQColorGroup &cg, EWidget w, const TQColor *cols) const
{
if(itsMouseOverCols || itsDefBtnCols || cols)
{
@@ -2725,7 +2729,7 @@ void TQtCurveStyle::drawGlow(TQPainter *p, const TQRect &r, const TQColorGroup &
}
}
-void TQtCurveStyle::drawEtch(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool raised, bool square) const
+void QtCurveStyle::drawEtch(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool raised, bool square) const
{
square=square || ROUND_NONE==opts.round;
@@ -2762,7 +2766,7 @@ void TQtCurveStyle::drawEtch(TQPainter *p, const TQRect &r, const TQColorGroup &
}
}
-void TQtCurveStyle::drawBorder(const TQColor &bgnd, TQPainter *p, const TQRect &r, const TQColorGroup &cg,
+void QtCurveStyle::drawBorder(const TQColor &bgnd, TQPainter *p, const TQRect &r, const TQColorGroup &cg,
SFlags flags, int round, const TQColor *custom, EWidget w, bool doCorners,
EBorder borderProfile, bool blendBorderColors, int borderVal) const
{
@@ -3016,7 +3020,7 @@ void TQtCurveStyle::drawBorder(const TQColor &bgnd, TQPainter *p, const TQRect &
}
}
-void TQtCurveStyle::drawMdiIcon(TQPainter *painter, const TQColor &color, const TQColor &shadow, const TQRect &r, bool sunken, int margin,
+void QtCurveStyle::drawMdiIcon(TQPainter *painter, const TQColor &color, const TQColor &shadow, const TQRect &r, bool sunken, int margin,
SubControl button) const
{
if(!sunken)
@@ -3024,7 +3028,7 @@ void TQtCurveStyle::drawMdiIcon(TQPainter *painter, const TQColor &color, const
drawWindowIcon(painter, color, r, sunken, margin, button);
}
-void TQtCurveStyle::drawWindowIcon(TQPainter *painter, const TQColor &color, const TQRect &r, bool sunken, int margin, SubControl button) const
+void QtCurveStyle::drawWindowIcon(TQPainter *painter, const TQColor &color, const TQRect &r, bool sunken, int margin, SubControl button) const
{
TQRect rect(r);
@@ -3107,7 +3111,7 @@ void TQtCurveStyle::drawWindowIcon(TQPainter *painter, const TQColor &color, con
}
}
-void TQtCurveStyle::drawEntryField(TQPainter *p, const TQRect &rx, const TQColorGroup &cg,
+void QtCurveStyle::drawEntryField(TQPainter *p, const TQRect &rx, const TQColorGroup &cg,
SFlags flags, EntryColor coloration, int round, EWidget w) const
{
const TQColor *use(ENTRY_MOUSE_OVER==coloration && itsMouseOverCols
@@ -3169,7 +3173,7 @@ void TQtCurveStyle::drawEntryField(TQPainter *p, const TQRect &rx, const TQColor
}
}
-void TQtCurveStyle::drawArrow(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags,
+void QtCurveStyle::drawArrow(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags,
TQ_PrimitiveElement pe, bool small, bool checkActive) const
{
const TQColor &col(flags&Style_Enabled
@@ -3181,7 +3185,7 @@ void TQtCurveStyle::drawArrow(TQPainter *p, const TQRect &r, const TQColorGroup
::drawArrow(p, r, p->pen().style()==TQPen::NoPen ? col : TQColor(p->pen().color()), pe, opts, small);
}
-void TQtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &r,
+void QtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &r,
const TQColorGroup &cg, SFlags flags, const TQStyleOption &data) const
{
switch(pe)
@@ -4125,7 +4129,7 @@ void TQtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, TQStyleC
widget->parentWidget() && ::tqqt_cast<TQListBox *>(widget->parentWidget()) &&
widget->parentWidget()->parentWidget() && ::tqqt_cast<TQComboBox *>(widget->parentWidget()->parentWidget()))
{
- struct TQtCurveListBoxItem : public TQListBoxItem
+ struct QtCurveListBoxItem : public TQListBoxItem
{
void paintContents(TQPainter *p)
{
@@ -4134,7 +4138,7 @@ void TQtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, TQStyleC
};
TQListBox *box=(TQListBox *)widget->parentWidget();
- TQtCurveListBoxItem *item=(TQtCurveListBoxItem *)(box->item(box->currentItem()));
+ QtCurveListBoxItem *item=(QtCurveListBoxItem *)(box->item(box->currentItem()));
if(item)
{
@@ -4353,7 +4357,7 @@ static TQString elliditide(const TQString &text, const TQFontMetrics &fontMetric
return title;
}
-void TQtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
+void QtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
const TQRect &r, const TQColorGroup &cg, SFlags flags,
const TQStyleOption &opt, const TQWidget *widget) const
{
@@ -4510,7 +4514,7 @@ void TQtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, TQPainter *p, TQSty
}
}
-void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
+void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
const TQRect &r, const TQColorGroup &cg, SFlags flags,
const TQStyleOption &data, const TQWidget *widget) const
{
@@ -5432,7 +5436,7 @@ void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, TQStyleCon
}
}
-void TQtCurveStyle::drawControlMask(ControlElement control, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
+void QtCurveStyle::drawControlMask(ControlElement control, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
const TQRect &r, const TQStyleOption &data, const TQWidget *widget) const
{
switch(control)
@@ -5458,7 +5462,7 @@ void TQtCurveStyle::drawControlMask(ControlElement control, TQPainter *p, TQStyl
}
}
-void TQtCurveStyle::drawComplexControlMask(ComplexControl control, TQPainter *p, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags,
+void QtCurveStyle::drawComplexControlMask(ComplexControl control, TQPainter *p, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags,
const TQRect &r, const TQStyleOption &data, const TQWidget *widget) const
{
switch (control)
@@ -5473,7 +5477,7 @@ void TQtCurveStyle::drawComplexControlMask(ComplexControl control, TQPainter *p,
}
}
-TQRect TQtCurveStyle::subRect(SubRect subrect, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQWidget *widget)const
+TQRect QtCurveStyle::subRect(SubRect subrect, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQWidget *widget)const
{
TQRect rect,
wrect(widget->rect());
@@ -5530,7 +5534,7 @@ class TQTitleBar : public TQWidget
TQWidget *window() const;
};
-void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
+void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
const TQRect &r, const TQColorGroup &cg, SFlags flags,
SCFlags controls, SCFlags active,
const TQStyleOption &data, const TQWidget *widget) const
@@ -6344,7 +6348,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, TQS
case CC_Slider:
//
// Note: Can't use KStyle's drawing routine, as this doesnt work for sliders on gradient
- // toolbars. It also draws groove, focus, slider - wherease TQtCurve needs groove,
+ // toolbars. It also draws groove, focus, slider - wherease QtCurve needs groove,
// slider, focus. We also ony double-buffer if not on a toolbar, as we dont know
// the background, etc, if on a toolbar - and that is handled in eventFilter
{
@@ -6520,7 +6524,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, TQS
}
}
-TQRect TQtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
+TQRect QtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
SubControl sc, const TQStyleOption &data, const TQWidget *widget) const
{
bool reverse(TQApplication::reverseLayout());
@@ -6815,7 +6819,7 @@ TQRect TQtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, TQStyleC
return BASE_STYLE::querySubControlMetrics(control, ceData, elementFlags, sc, data, widget);
}
-int TQtCurveStyle::pixelMetric(PixelMetric metric, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget) const
+int QtCurveStyle::pixelMetric(PixelMetric metric, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget) const
{
switch(metric)
{
@@ -6905,7 +6909,7 @@ int TQtCurveStyle::pixelMetric(PixelMetric metric, TQStyleControlElementData ceD
}
}
-int TQtCurveStyle::kPixelMetric(KStylePixelMetric kpm, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget) const
+int QtCurveStyle::kPixelMetric(KStylePixelMetric kpm, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget) const
{
switch(kpm)
{
@@ -6916,7 +6920,7 @@ int TQtCurveStyle::kPixelMetric(KStylePixelMetric kpm, TQStyleControlElementData
}
}
-TQSize TQtCurveStyle::sizeFromContents(ContentsType contents, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
+TQSize QtCurveStyle::sizeFromContents(ContentsType contents, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
const TQSize &contentsSize, const TQStyleOption &data, const TQWidget *widget) const
{
switch(contents)
@@ -7028,7 +7032,7 @@ TQSize TQtCurveStyle::sizeFromContents(ContentsType contents, TQStyleControlElem
return BASE_STYLE::sizeFromContents(contents, ceData, elementFlags, contentsSize, data, widget);
}
-int TQtCurveStyle::styleHint(StyleHint stylehint, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQStyleOption &option,
+int QtCurveStyle::styleHint(StyleHint stylehint, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQStyleOption &option,
TQStyleHintReturn *returnData, const TQWidget *widget) const
{
switch(stylehint)
@@ -7075,7 +7079,7 @@ int TQtCurveStyle::styleHint(StyleHint stylehint, TQStyleControlElementData ceDa
}
}
-void TQtCurveStyle::drawItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg, bool enabled,
+void QtCurveStyle::drawItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg, bool enabled,
const TQPixmap *pixmap, const TQString &text, int len, const TQColor *penColor) const
{
TQRect r2(r);
@@ -7189,7 +7193,7 @@ void TQtCurveStyle::drawItem(TQPainter *p, const TQRect &r, int flags, const TQC
}
}
-void TQtCurveStyle::drawMenuItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg,
+void QtCurveStyle::drawMenuItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg,
bool mbi, int round, const TQColor &bgnd, const TQColor *cols) const
{
int fill=opts.useHighlightForMenu && (!mbi || itsHighlightCols==cols) ? ORIGINAL_SHADE : 4,
@@ -7246,7 +7250,7 @@ void TQtCurveStyle::drawMenuItem(TQPainter *p, const TQRect &r, int flags, const
drawBevelGradient(cols[fill], p, r, true, false, opts.menuitemAppearance, WIDGET_MENU_ITEM);
}
-void TQtCurveStyle::drawProgress(TQPainter *p, const TQRect &rx, const TQColorGroup &cg, SFlags flags,
+void QtCurveStyle::drawProgress(TQPainter *p, const TQRect &rx, const TQColorGroup &cg, SFlags flags,
int round, const TQWidget *widget) const
{
if(rx.width()<1)
@@ -7339,7 +7343,7 @@ void TQtCurveStyle::drawProgress(TQPainter *p, const TQRect &rx, const TQColorGr
}
}
-void TQtCurveStyle::drawBevelGradient(const TQColor &base, TQPainter *p, const TQRect &origRect, bool horiz, bool sel, EAppearance bevApp, EWidget w) const
+void QtCurveStyle::drawBevelGradient(const TQColor &base, TQPainter *p, const TQRect &origRect, bool horiz, bool sel, EAppearance bevApp, EWidget w) const
{
if(IS_FLAT(bevApp) && opts.colorSelTab && sel)
bevApp=APPEARANCE_GRADIENT;
@@ -7387,7 +7391,7 @@ void TQtCurveStyle::drawBevelGradient(const TQColor &base, TQPainter *p, const T
}
}
-void TQtCurveStyle::drawBevelGradientReal(const TQColor &base, TQPainter *p, const TQRect &r, bool horiz, bool sel, EAppearance app, EWidget w) const
+void QtCurveStyle::drawBevelGradientReal(const TQColor &base, TQPainter *p, const TQRect &r, bool horiz, bool sel, EAppearance app, EWidget w) const
{
const Gradient *grad=getGradient(app, &opts);
@@ -7456,7 +7460,7 @@ void TQtCurveStyle::drawBevelGradientReal(const TQColor &base, TQPainter *p, con
}
}
-void TQtCurveStyle::drawGradient(const TQColor &top, const TQColor &bot,
+void QtCurveStyle::drawGradient(const TQColor &top, const TQColor &bot,
TQPainter *p, TQRect const &r, bool horiz) const
{
if(r.width()>0 && r.height()>0)
@@ -7505,7 +7509,7 @@ void TQtCurveStyle::drawGradient(const TQColor &top, const TQColor &bot,
}
}
-void TQtCurveStyle::drawSbSliderHandle(TQPainter *p, const TQRect &orig, const TQColorGroup &cg,
+void QtCurveStyle::drawSbSliderHandle(TQPainter *p, const TQRect &orig, const TQColorGroup &cg,
SFlags flags, bool slider) const
{
int min(MIN_SLIDER_SIZE(opts.sliderThumbs));
@@ -7560,7 +7564,7 @@ void TQtCurveStyle::drawSbSliderHandle(TQPainter *p, const TQRect &orig, const T
}
}
-void TQtCurveStyle::drawSliderHandle(TQPainter *p, const TQRect &r, const TQColorGroup &cg,
+void QtCurveStyle::drawSliderHandle(TQPainter *p, const TQRect &r, const TQColorGroup &cg,
SFlags flags, TQSlider *slider, bool tb) const
{
bool horiz(SLIDER_TRIANGULAR==opts.sliderStyle ? r.height()>r.width() : r.width()>r.height());
@@ -7751,7 +7755,7 @@ void TQtCurveStyle::drawSliderHandle(TQPainter *p, const TQRect &r, const TQColo
}
}
-void TQtCurveStyle::drawSliderGroove(TQPainter *p, const TQRect &r, const TQColorGroup &cg,
+void QtCurveStyle::drawSliderGroove(TQPainter *p, const TQRect &r, const TQColorGroup &cg,
SFlags flags, const TQWidget *widget) const
{
const TQSlider *sliderWidget((const TQSlider *)widget);
@@ -7813,7 +7817,7 @@ void TQtCurveStyle::drawSliderGroove(TQPainter *p, const TQRect &r, const TQColo
}
}
-void TQtCurveStyle::drawMenuOrToolBarBackground(TQPainter *p, const TQRect &r, const TQColorGroup &cg,
+void QtCurveStyle::drawMenuOrToolBarBackground(TQPainter *p, const TQRect &r, const TQColorGroup &cg,
bool menu, bool horiz) const
{
if(menu && APPEARANCE_STRIPED==opts.bgndAppearance && IS_FLAT(opts.menubarAppearance) && SHADE_NONE==opts.shadeMenubars)
@@ -7829,7 +7833,7 @@ void TQtCurveStyle::drawMenuOrToolBarBackground(TQPainter *p, const TQRect &r, c
drawBevelGradient(color, p, rx, horiz, false, app);
}
-void TQtCurveStyle::drawHandleMarkers(TQPainter *p, const TQRect &r, SFlags flags, bool tb,
+void QtCurveStyle::drawHandleMarkers(TQPainter *p, const TQRect &r, SFlags flags, bool tb,
ELine handles) const
{
if(r.width()<2 || r.height()<2)
@@ -7881,7 +7885,7 @@ void TQtCurveStyle::drawHandleMarkers(TQPainter *p, const TQRect &r, SFlags flag
}
}
-void TQtCurveStyle::drawHighlight(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool horiz, bool inc) const
+void QtCurveStyle::drawHighlight(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool horiz, bool inc) const
{
TQColor col1(midColor(cg.background(), itsMouseOverCols[ORIGINAL_SHADE]));
TQRect r2(r);
@@ -7893,7 +7897,7 @@ void TQtCurveStyle::drawHighlight(TQPainter *p, const TQRect &r, const TQColorGr
p->drawLine(r2.x(), r2.y(), r2.x()+(horiz ? r2.width()-1 : 0), r2.y()+(horiz ? 0 : r2.height()-1));
}
-void TQtCurveStyle::shadeColors(const TQColor &base, TQColor *vals) const
+void QtCurveStyle::shadeColors(const TQColor &base, TQColor *vals) const
{
SHADES
@@ -7909,7 +7913,7 @@ void TQtCurveStyle::shadeColors(const TQColor &base, TQColor *vals) const
vals[ORIGINAL_SHADE]=base;
}
-const TQColor * TQtCurveStyle::buttonColors(const TQColorGroup &cg) const
+const TQColor * QtCurveStyle::buttonColors(const TQColorGroup &cg) const
{
if(cg.button()!=itsButtonCols[ORIGINAL_SHADE])
{
@@ -7920,14 +7924,14 @@ const TQColor * TQtCurveStyle::buttonColors(const TQColorGroup &cg) const
return itsButtonCols;
}
-const TQColor * TQtCurveStyle::checkRadioColors(const TQColorGroup &cg, SFlags flags) const
+const TQColor * QtCurveStyle::checkRadioColors(const TQColorGroup &cg, SFlags flags) const
{
return opts.crColor && flags&Style_Enabled && (flags&Style_On || !(flags&Style_Off))
? itsCheckRadioSelCols
: buttonColors(cg);
}
-const TQColor * TQtCurveStyle::sliderColors(/*const TQColorGroup &cg, */ SFlags flags) const
+const TQColor * QtCurveStyle::sliderColors(/*const TQColorGroup &cg, */ SFlags flags) const
{
return (flags&Style_Enabled)
? SHADE_NONE!=opts.shadeSliders &&itsSliderCols && (!opts.colorSliderMouseOver || flags&Style_MouseOver)
@@ -7936,7 +7940,7 @@ const TQColor * TQtCurveStyle::sliderColors(/*const TQColorGroup &cg, */ SFlags
: itsBackgroundCols;
}
-const TQColor * TQtCurveStyle::backgroundColors(const TQColor &c) const
+const TQColor * QtCurveStyle::backgroundColors(const TQColor &c) const
{
if(c!=itsBackgroundCols[ORIGINAL_SHADE])
{
@@ -7947,13 +7951,13 @@ const TQColor * TQtCurveStyle::backgroundColors(const TQColor &c) const
return itsBackgroundCols;
}
-const TQColor * TQtCurveStyle::borderColors(SFlags flags, const TQColor *use) const
+const TQColor * QtCurveStyle::borderColors(SFlags flags, const TQColor *use) const
{
return itsMouseOverCols && opts.coloredMouseOver && flags&Style_MouseOver
? itsMouseOverCols : use;
}
-const TQColor * TQtCurveStyle::getSidebarButtons() const
+const TQColor * QtCurveStyle::getSidebarButtons() const
{
if(!itsSidebarButtonsCols)
{
@@ -7972,7 +7976,7 @@ const TQColor * TQtCurveStyle::getSidebarButtons() const
return itsSidebarButtonsCols;
}
-void TQtCurveStyle::setMenuColors(const TQColorGroup &cg)
+void QtCurveStyle::setMenuColors(const TQColorGroup &cg)
{
switch(opts.shadeMenubars)
{
@@ -7999,7 +8003,7 @@ void TQtCurveStyle::setMenuColors(const TQColorGroup &cg)
}
}
-const TQColor * TQtCurveStyle::menuColors(const TQColorGroup &cg, bool active) const
+const TQColor * QtCurveStyle::menuColors(const TQColorGroup &cg, bool active) const
{
return SHADE_WINDOW_BORDER==opts.shadeMenubars
? getMdiColors(cg, active)
@@ -8008,7 +8012,7 @@ const TQColor * TQtCurveStyle::menuColors(const TQColorGroup &cg, bool active) c
: itsMenubarCols;
}
-void TQtCurveStyle::setDecorationColors(bool init)
+void QtCurveStyle::setDecorationColors(bool init)
{
if(!readKdeGlobals() && !init)
return;
@@ -8022,7 +8026,7 @@ void TQtCurveStyle::setDecorationColors(bool init)
shadeColors(kdeSettings.focus, itsFocusCols);
}
-const TQColor * TQtCurveStyle::getMdiColors(const TQColorGroup &cg, bool active) const
+const TQColor * QtCurveStyle::getMdiColors(const TQColorGroup &cg, bool active) const
{
if(!itsActiveMdiColors)
{
@@ -8147,7 +8151,7 @@ const TQColor * TQtCurveStyle::getMdiColors(const TQColorGroup &cg, bool active)
}
#ifdef SET_MDI_WINDOW_BUTTON_POSITIONS
-void TQtCurveStyle::readMdiPositions() const
+void QtCurveStyle::readMdiPositions() const
{
if(0==itsMdiButtons[0].size() && 0==itsMdiButtons[1].size())
{
@@ -8220,7 +8224,7 @@ void TQtCurveStyle::readMdiPositions() const
}
#endif
-bool TQtCurveStyle::redrawHoverWidget(const TQPoint &pos)
+bool QtCurveStyle::redrawHoverWidget(const TQPoint &pos)
{
if(!itsHoverWidget || !itsHoverWidget->isShown() || !itsHoverWidget->isVisible())
return false;
@@ -8446,7 +8450,7 @@ bool TQtCurveStyle::redrawHoverWidget(const TQPoint &pos)
return false;
}
-const TQColor & TQtCurveStyle::getFill(SFlags flags, const TQColor *use, bool cr, bool darker) const
+const TQColor & QtCurveStyle::getFill(SFlags flags, const TQColor *use, bool cr, bool darker) const
{
return !(flags&Style_Enabled)
? use[darker ? 2 : ORIGINAL_SHADE]
@@ -8461,7 +8465,7 @@ const TQColor & TQtCurveStyle::getFill(SFlags flags, const TQColor *use, bool cr
: use[darker ? 2 : ORIGINAL_SHADE];
}
-const TQColor & TQtCurveStyle::getTabFill(bool current, bool highlight, const TQColor *use) const
+const TQColor & QtCurveStyle::getTabFill(bool current, bool highlight, const TQColor *use) const
{
return current
? use[ORIGINAL_SHADE]
@@ -8470,7 +8474,7 @@ const TQColor & TQtCurveStyle::getTabFill(bool current, bool highlight, const TQ
: use[2];
}
-const TQColor & TQtCurveStyle::menuStripeCol() const
+const TQColor & QtCurveStyle::menuStripeCol() const
{
switch(opts.menuStripe)
{
@@ -8496,7 +8500,7 @@ const TQColor & TQtCurveStyle::menuStripeCol() const
}
}
-const TQColor & TQtCurveStyle::checkRadioCol(SFlags flags, const TQColorGroup &cg) const
+const TQColor & QtCurveStyle::checkRadioCol(SFlags flags, const TQColorGroup &cg) const
{
if(flags&MENU_ITEM)
return flags&Style_Enabled && flags&Style_Active && opts.useHighlightForMenu
@@ -8510,7 +8514,7 @@ const TQColor & TQtCurveStyle::checkRadioCol(SFlags flags, const TQColorGroup &c
: cg.text();
}
-TQColor TQtCurveStyle::shade(const TQColor &a, float k) const
+TQColor QtCurveStyle::shade(const TQColor &a, float k) const
{
TQColor mod;
@@ -8518,12 +8522,12 @@ TQColor TQtCurveStyle::shade(const TQColor &a, float k) const
return mod;
}
-void TQtCurveStyle::shade(const color &ca, color *cb, double k) const
+void QtCurveStyle::shade(const color &ca, color *cb, double k) const
{
::shade(&opts, ca, cb, k);
}
-TQPixmap * TQtCurveStyle::getPixelPixmap(const TQColor col) const
+TQPixmap * QtCurveStyle::getPixelPixmap(const TQColor col) const
{
TQRgb rgb(col.rgb());
TQString key(createKey(rgb));
@@ -8545,7 +8549,7 @@ TQPixmap * TQtCurveStyle::getPixelPixmap(const TQColor col) const
return pix;
}
-TQPixmap * TQtCurveStyle::createStripePixmap(const TQColor &col, bool forWindow) const
+TQPixmap * QtCurveStyle::createStripePixmap(const TQColor &col, bool forWindow) const
{
TQRgb rgb(col.rgb());
TQString key(createKey(rgb, forWindow ? 'S' : 's'));
@@ -8601,13 +8605,13 @@ static void recolour(TQImage &img, const TQColor &col, double shade)
adjustPix(img.bits(), 4, img.width(), img.height(), img.bytesPerLine(), col.red(), col.green(), col.blue(), shade);
}
-void TQtCurveStyle::drawDot(TQPainter *p, const TQRect &r, const TQColor *cols) const
+void QtCurveStyle::drawDot(TQPainter *p, const TQRect &r, const TQColor *cols) const
{
TQPixmap *pix=getPixmap(cols[STD_BORDER], PIX_DOT, 0.9);
p->drawPixmap(r.x()+((r.width()-pix->width())>>1), r.y()+((r.height()-pix->height())>>1), *pix);
}
-TQPixmap * TQtCurveStyle::getPixmap(const TQColor col, EPixmap p, double shade) const
+TQPixmap * QtCurveStyle::getPixmap(const TQColor col, EPixmap p, double shade) const
{
TQRgb rgb(col.rgb());
TQString key(createKey(rgb, p));
@@ -8668,7 +8672,7 @@ TQPixmap * TQtCurveStyle::getPixmap(const TQColor col, EPixmap p, double shade)
return pix;
}
-void TQtCurveStyle::setSbType()
+void QtCurveStyle::setSbType()
{
switch(opts.scrollbarType)
{
@@ -8688,7 +8692,7 @@ void TQtCurveStyle::setSbType()
}
}
-void TQtCurveStyle::resetHover()
+void QtCurveStyle::resetHover()
{
itsIsSpecialHover=false;
itsOldPos.setX(-1);
@@ -8707,7 +8711,7 @@ struct TQtcMenuBar : public TQMenuBar
}
};
-bool TQtCurveStyle::isWindowDragWidget(TQObject *o, const TQPoint &pos)
+bool QtCurveStyle::isWindowDragWidget(TQObject *o, const TQPoint &pos)
{
return opts.windowDrag &&
(//qobject_cast<TQDialog*>(o) ||
@@ -8725,7 +8729,7 @@ bool TQtCurveStyle::isWindowDragWidget(TQObject *o, const TQPoint &pos)
);
}
-void TQtCurveStyle::updateProgressPos()
+void QtCurveStyle::updateProgressPos()
{
// Taken from lipstik!
TQMap<TQWidget*, int>::iterator it(itsProgAnimWidgets.begin()),
@@ -8752,12 +8756,12 @@ void TQtCurveStyle::updateProgressPos()
itsAnimationTimer->stop();
}
-void TQtCurveStyle::progressBarDestroyed(TQObject *bar)
+void QtCurveStyle::progressBarDestroyed(TQObject *bar)
{
itsProgAnimWidgets.remove(TQT_TQWIDGET(bar));
}
-void TQtCurveStyle::sliderThumbMoved(int)
+void QtCurveStyle::sliderThumbMoved(int)
{
TQSlider *slider(::tqqt_cast<TQSlider*>(sender()));
@@ -8765,12 +8769,12 @@ void TQtCurveStyle::sliderThumbMoved(int)
slider->update();
}
-void TQtCurveStyle::khtmlWidgetDestroyed(TQObject *o)
+void QtCurveStyle::khtmlWidgetDestroyed(TQObject *o)
{
itsKhtmlWidgets.remove(TQT_TQWIDGET_CONST(o));
}
-void TQtCurveStyle::hoverWidgetDestroyed(TQObject *o)
+void QtCurveStyle::hoverWidgetDestroyed(TQObject *o)
{
if(TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(itsHoverWidget))
resetHover();