diff options
Diffstat (limited to 'src/SUSE2.cpp')
-rw-r--r-- | src/SUSE2.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/src/SUSE2.cpp b/src/SUSE2.cpp index 971d146..570309b 100644 --- a/src/SUSE2.cpp +++ b/src/SUSE2.cpp @@ -24,8 +24,8 @@ //#include <kdebug.h> -#include <qpainter.h> -#include <qbitmap.h> +#include <tqpainter.h> +#include <tqbitmap.h> #include <kconfig.h> #include <klocale.h> @@ -45,7 +45,7 @@ namespace KWinSUSE2 SUSE2Handler::SUSE2Handler() { - memset(m_pixmaps, 0, sizeof(QPixmap *) * NumButtonStatus * NumButtonIcons); // set elements to 0 + memset(m_pixmaps, 0, sizeof(TQPixmap *) * NumButtonStatus * NumButtonIcons); // set elements to 0 KGlobal::locale()->insertCatalogue("kwin_clients"); KGlobal::locale()->insertCatalogue("kwin_SUSE2"); @@ -92,7 +92,7 @@ bool SUSE2Handler::reset(unsigned long /*changed*/) } // check if we are in reverse layout mode - m_reverse = QApplication::reverseLayout(); + m_reverse = TQApplication::reverseLayout(); // read in the configuration readConfig(); @@ -144,12 +144,12 @@ void SUSE2Handler::readConfig() config.setGroup("General"); // grab settings - QString alignValue = config.readEntry("TitleAlignment", "AlignLeft"); - if (alignValue == "AlignLeft") m_titleAlign = Qt::AlignLeft; - else if (alignValue == "AlignHCenter") m_titleAlign = Qt::AlignHCenter; - else if (alignValue == "AlignRight") m_titleAlign = Qt::AlignRight; + TQString alignValue = config.readEntry("TitleAlignment", "AlignLeft"); + if (alignValue == "AlignLeft") m_titleAlign = TQt::AlignLeft; + else if (alignValue == "AlignHCenter") m_titleAlign = TQt::AlignHCenter; + else if (alignValue == "AlignRight") m_titleAlign = TQt::AlignRight; - QString roundValue = config.readEntry("RoundCorners", "NotMaximized"); + TQString roundValue = config.readEntry("RoundCorners", "NotMaximized"); if (roundValue == "RoundAlways") m_roundCorners = 1; else if (roundValue == "NotMaximized") m_roundCorners = 2; else if (roundValue == "RoundNever") m_roundCorners = 3; @@ -157,13 +157,13 @@ void SUSE2Handler::readConfig() m_menuClose = config.readBoolEntry("CloseOnMenuDoubleClick", true); m_titleShadow = config.readBoolEntry("TitleShadow", true); - QFontMetrics fm(m_titleFont); // active font = inactive font + TQFontMetrics fm(m_titleFont); // active font = inactive font int addSpace = config.readNumEntry("AddSpace", 4); // The title should stretch with bigger font sizes! - m_titleHeight = QMAX(16, fm.height() + addSpace); + m_titleHeight = TQMAX(16, fm.height() + addSpace); - fm = QFontMetrics(m_titleFontTool); // active font = inactive font - m_titleHeightTool = QMAX(13, fm.height() ); // don't care about the shadow etc. + fm = TQFontMetrics(m_titleFontTool); // active font = inactive font + m_titleHeightTool = TQMAX(13, fm.height() ); // don't care about the shadow etc. m_titlebarStyle = config.readNumEntry("TitleBarStyle", 0); @@ -174,13 +174,13 @@ void SUSE2Handler::readConfig() m_redCloseButton = config.readBoolEntry("RedCloseButton", false); m_iconSize = (config.readNumEntry("IconSize", 45))/100.0; m_customIconColors = config.readBoolEntry("CustomIconColors", false); - QColor afgcolor = QColor(10, 20, 40); + TQColor afgcolor = TQColor(10, 20, 40); m_aFgColor = config.readColorEntry("AFgColor", &afgcolor); - QColor abgcolor = QColor(210, 220, 240); + TQColor abgcolor = TQColor(210, 220, 240); m_aBgColor = config.readColorEntry("ABgColor", &abgcolor); - QColor ifgcolor = QColor(40, 40, 40); + TQColor ifgcolor = TQColor(40, 40, 40); m_iFgColor = config.readColorEntry("IFgColor", &ifgcolor); - QColor ibgcolor = QColor(240, 240, 240); + TQColor ibgcolor = TQColor(240, 240, 240); m_iBgColor = config.readColorEntry("IBgColor", &ibgcolor); m_iconShadow = config.readBoolEntry("IconShadow", false); @@ -189,7 +189,7 @@ void SUSE2Handler::readConfig() m_titleLogoURL = config.readEntry("TitleBarLogoURL", locate("data", "kwin/pics/titlebar_decor.png")); } -QColor SUSE2Handler::getColor(KWinSUSE2::ColorType type, const bool active) const +TQColor SUSE2Handler::getColor(KWinSUSE2::ColorType type, const bool active) const { switch (type) { case TitleGradientFrom: @@ -209,16 +209,16 @@ QColor SUSE2Handler::getColor(KWinSUSE2::ColorType type, const bool active) cons return KDecoration::options()->color(ColorButtonBg, active); break; default: - return Qt::black; + return TQt::black; } } const KPixmap &SUSE2Handler::buttonPixmap(ButtonIcon type, int size, ButtonStatus status) { if (m_pixmaps[status][type]) { - if (status != Shadow && m_pixmaps[status][type]->size() == QSize(size, size)) + if (status != Shadow && m_pixmaps[status][type]->size() == TQSize(size, size)) return *m_pixmaps[status][type]; - else if (status == Shadow && m_pixmaps[status][type]->size() == QSize(size+4, size+4)) + else if (status == Shadow && m_pixmaps[status][type]->size() == TQSize(size+4, size+4)) return *m_pixmaps[status][type]; } @@ -227,10 +227,10 @@ const KPixmap &SUSE2Handler::buttonPixmap(ButtonIcon type, int size, ButtonStatu delete m_pixmaps[status][type]; m_pixmaps[status][type] = 0; - QColor aDecoFgDark = alphaBlendColors(getColor(TitleGradientTo, true), Qt::black, 50); - QColor aDecoFgLight = alphaBlendColors(getColor(TitleGradientTo, true), Qt::white, 50); - QColor iDecoFgDark = alphaBlendColors(getColor(TitleGradientTo, false), Qt::black, 50); - QColor iDecoFgLight = alphaBlendColors(getColor(TitleGradientTo, false), Qt::white, 50); + TQColor aDecoFgDark = alphaBlendColors(getColor(TitleGradientTo, true), TQt::black, 50); + TQColor aDecoFgLight = alphaBlendColors(getColor(TitleGradientTo, true), TQt::white, 50); + TQColor iDecoFgDark = alphaBlendColors(getColor(TitleGradientTo, false), TQt::black, 50); + TQColor iDecoFgLight = alphaBlendColors(getColor(TitleGradientTo, false), TQt::white, 50); if (m_customIconColors && !m_useTitleProps) { aDecoFgDark = m_aFgColor; @@ -240,12 +240,12 @@ const KPixmap &SUSE2Handler::buttonPixmap(ButtonIcon type, int size, ButtonStatu } KPixmap icon = IconEngine::icon(type, size); - QImage img = icon.convertToImage(); + TQImage img = icon.convertToImage(); KPixmap *pixmap; - QImage tmpImage; + TQImage tmpImage; ShadowEngine se; - QPainter painter; + TQPainter painter; KPixmap tmpShadow; switch (status) { case ActiveUp: @@ -282,14 +282,14 @@ const KPixmap &SUSE2Handler::buttonPixmap(ButtonIcon type, int size, ButtonStatu break; case Shadow: // prepare shadow - tmpShadow = QPixmap(icon.width()+4, icon.height()+4); - tmpShadow.fill(QColor(0,0,0)); + tmpShadow = TQPixmap(icon.width()+4, icon.height()+4); + tmpShadow.fill(TQColor(0,0,0)); tmpShadow.setMask(tmpShadow.createHeuristicMask(true)); painter.begin(&tmpShadow); painter.setPen(white); painter.drawPixmap(0,0, icon); painter.end(); - tmpImage = se.makeShadow(tmpShadow, QColor(0, 0, 0)); + tmpImage = se.makeShadow(tmpShadow, TQColor(0, 0, 0)); pixmap = new KPixmap(tmpImage); break; default: @@ -300,11 +300,11 @@ const KPixmap &SUSE2Handler::buttonPixmap(ButtonIcon type, int size, ButtonStatu return *pixmap; } -QValueList< SUSE2Handler::BorderSize > +TQValueList< SUSE2Handler::BorderSize > SUSE2Handler::borderSizes() const { // the list must be sorted - return QValueList< BorderSize >() << BorderTiny << BorderNormal << + return TQValueList< BorderSize >() << BorderTiny << BorderNormal << BorderLarge << BorderVeryLarge << BorderHuge << BorderVeryHuge << BorderOversized; } |