diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-01 21:17:46 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-01 21:17:46 +0000 |
commit | 21a1d3cffb820b001b0901f8e82d4c8bfc5e1683 (patch) | |
tree | ad9d08bc725d963acafab219a33699ae2d6e723c /client | |
parent | 424422475d6f30da2b84041dcb2b13b425126f04 (diff) | |
download | twin-style-crystal-21a1d3cffb820b001b0901f8e82d4c8bfc5e1683.tar.gz twin-style-crystal-21a1d3cffb820b001b0901f8e82d4c8bfc5e1683.zip |
TQt4 port kwin-style-crystal
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kwin-style-crystal@1239032 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'client')
-rw-r--r-- | client/buttonimage.cpp | 98 | ||||
-rw-r--r-- | client/buttonimage.h | 28 | ||||
-rw-r--r-- | client/config/configdialog.ui | 208 | ||||
-rw-r--r-- | client/config/crystalconfig.cc | 194 | ||||
-rw-r--r-- | client/config/crystalconfig.h | 13 | ||||
-rw-r--r-- | client/config/infodialog.ui | 36 | ||||
-rw-r--r-- | client/crystalbutton.cpp | 126 | ||||
-rw-r--r-- | client/crystalbutton.h | 27 | ||||
-rw-r--r-- | client/crystalclient.cc | 408 | ||||
-rw-r--r-- | client/crystalclient.h | 69 | ||||
-rw-r--r-- | client/imageholder.cpp | 58 | ||||
-rw-r--r-- | client/imageholder.h | 21 | ||||
-rw-r--r-- | client/myrootpixmap.cc | 66 | ||||
-rw-r--r-- | client/myrootpixmap.h | 41 |
14 files changed, 699 insertions, 694 deletions
diff --git a/client/buttonimage.cpp b/client/buttonimage.cpp index c195eed..a55d29e 100644 --- a/client/buttonimage.cpp +++ b/client/buttonimage.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ -#include <qimage.h> +#include <tqimage.h> #include <math.h> #include <kimageeffect.h> @@ -29,14 +29,14 @@ -ButtonImage::ButtonImage(const QRgb *d_normal,int w,int h) +ButtonImage::ButtonImage(const TQRgb *d_normal,int w,int h) { normal=hovered=pressed=animated=NULL; image_width=w; image_height=h; normal_data=hovered_data=animated_data=pressed_data=NULL; org_normal_data=org_hovered_data=NULL; - normal_color=hovered_color=pressed_color=QColor(255,255,255); + normal_color=hovered_color=pressed_color=TQColor(255,255,255); reset(); if (d_normal)SetNormal(d_normal,w,h); } @@ -55,10 +55,10 @@ ButtonImage::~ButtonImage() if (org_hovered_data)delete[] org_hovered_data; } -QImage ButtonImage::CreateImage(QRgb *data,QColor color) +TQImage ButtonImage::CreateImage(TQRgb *data,TQColor color) { tint(data,color); - QImage img=QImage((uchar*)data,image_width,image_height,32,NULL,0,QImage::LittleEndian),img2; + TQImage img=TQImage((uchar*)data,image_width,image_height,32,NULL,0,TQImage::LittleEndian),img2; img.setAlphaBuffer(true); return img; @@ -86,7 +86,7 @@ void ButtonImage::reset() drawMode=0; } -void ButtonImage::SetNormal(const QRgb *d_normal,int w,int h) +void ButtonImage::SetNormal(const TQRgb *d_normal,int w,int h) { image_width=w; image_height=h; @@ -101,25 +101,25 @@ void ButtonImage::SetNormal(const QRgb *d_normal,int w,int h) pressed_data=NULL; if (normal_data)delete[] normal_data; - org_normal_data=new QRgb[image_width*image_height]; - memcpy(org_normal_data,d_normal,sizeof(QRgb)*image_width*image_height); - normal_data=new QRgb[image_width*image_height]; - memcpy(normal_data,d_normal,sizeof(QRgb)*image_width*image_height); - normal=new QImage(CreateImage(normal_data,normal_color)); + org_normal_data=new TQRgb[image_width*image_height]; + memcpy(org_normal_data,d_normal,sizeof(TQRgb)*image_width*image_height); + normal_data=new TQRgb[image_width*image_height]; + memcpy(normal_data,d_normal,sizeof(TQRgb)*image_width*image_height); + normal=new TQImage(CreateImage(normal_data,normal_color)); } -void ButtonImage::SetHovered(const QRgb *d_hovered) +void ButtonImage::SetHovered(const TQRgb *d_hovered) { if (hovered)delete hovered; if (hovered_data)delete[] hovered_data; if (org_hovered_data)delete[] org_hovered_data; if (d_hovered) { - org_hovered_data=new QRgb[image_width*image_height]; - hovered_data=new QRgb[image_width*image_height]; - memcpy(hovered_data,d_hovered,sizeof(QRgb)*image_width*image_height); - memcpy(org_hovered_data,d_hovered,sizeof(QRgb)*image_width*image_height); - hovered=new QImage(CreateImage(hovered_data,hovered_color)); + org_hovered_data=new TQRgb[image_width*image_height]; + hovered_data=new TQRgb[image_width*image_height]; + memcpy(hovered_data,d_hovered,sizeof(TQRgb)*image_width*image_height); + memcpy(org_hovered_data,d_hovered,sizeof(TQRgb)*image_width*image_height); + hovered=new TQImage(CreateImage(hovered_data,hovered_color)); }else{ hovered=NULL; hovered_data=NULL; @@ -127,15 +127,15 @@ void ButtonImage::SetHovered(const QRgb *d_hovered) } } -void ButtonImage::SetPressed(const QRgb *d_pressed) +void ButtonImage::SetPressed(const TQRgb *d_pressed) { if (pressed)delete pressed; if (pressed_data)delete[] pressed_data; if (d_pressed) { - pressed_data=new QRgb[image_width*image_height]; - memcpy(pressed_data,d_pressed,sizeof(QRgb)*image_width*image_height); - pressed=new QImage(CreateImage(pressed_data,pressed_color)); + pressed_data=new TQRgb[image_width*image_height]; + memcpy(pressed_data,d_pressed,sizeof(TQRgb)*image_width*image_height); + pressed=new TQImage(CreateImage(pressed_data,pressed_color)); }else{ pressed=NULL; pressed_data=NULL; @@ -156,22 +156,22 @@ void ButtonImage::finish() } if (!hovered_data){ - hovered_data=new QRgb[image_width*image_height]; + hovered_data=new TQRgb[image_width*image_height]; float faktor=::factory->hovereffect?0.5:1.0; for (int i=0;i<image_width*image_height;i++) { - hovered_data[i]=qRgba(qRed(org_normal_data[i]),qGreen(org_normal_data[i]),qBlue(org_normal_data[i]), - (int)(255.0*pow((float)qAlpha(org_normal_data[i])/255.0,faktor))); + hovered_data[i]=tqRgba(tqRed(org_normal_data[i]),tqGreen(org_normal_data[i]),tqBlue(org_normal_data[i]), + (int)(255.0*pow((float)tqAlpha(org_normal_data[i])/255.0,faktor))); } if (org_hovered_data)delete[] org_hovered_data; - org_hovered_data=new QRgb[image_width*image_height]; - memcpy(org_hovered_data,hovered_data,sizeof(QRgb)*image_width*image_height); - hovered=new QImage(CreateImage(hovered_data,hovered_color)); + org_hovered_data=new TQRgb[image_width*image_height]; + memcpy(org_hovered_data,hovered_data,sizeof(TQRgb)*image_width*image_height); + hovered=new TQImage(CreateImage(hovered_data,hovered_color)); } if (!pressed_data){ float faktor=::factory->hovereffect?0.5:0.4; - pressed_data=new QRgb[image_width*image_height]; + pressed_data=new TQRgb[image_width*image_height]; if (!org_hovered_data) { org_hovered_data=hovered_data; @@ -180,37 +180,37 @@ void ButtonImage::finish() for (int i=0;i<image_width*image_height;i++) { - pressed_data[i]=qRgba(qRed(org_hovered_data[i]),qGreen(org_hovered_data[i]),qBlue(org_hovered_data[i]), - (int)(255.0*pow((float)qAlpha(org_hovered_data[i])/255.0,faktor))); + pressed_data[i]=tqRgba(tqRed(org_hovered_data[i]),tqGreen(org_hovered_data[i]),tqBlue(org_hovered_data[i]), + (int)(255.0*pow((float)tqAlpha(org_hovered_data[i])/255.0,faktor))); } - pressed=new QImage(CreateImage(pressed_data,pressed_color)); + pressed=new TQImage(CreateImage(pressed_data,pressed_color)); } - if (!animated_data)animated_data=new QRgb[image_width*image_height]; + if (!animated_data)animated_data=new TQRgb[image_width*image_height]; if (!animated) { - animated=new QImage((uchar*)animated_data,image_width,image_height,32,NULL,0,QImage::LittleEndian); + animated=new TQImage((uchar*)animated_data,image_width,image_height,32,NULL,0,TQImage::LittleEndian); animated->setAlphaBuffer(true); } } -QImage* ButtonImage::getAnimated( float anim) +TQImage* ButtonImage::getAnimated( float anim) { if (!normal_data)return NULL; if (!animated_data)return NULL; for (int i=0;i<image_width*image_height;i++) { - const float r1=(float)qRed(normal_data[i])/255.0f; - const float r2=(float)qRed(hovered_data[i])/255.0f; - const float g1=(float)qGreen(normal_data[i])/255.0f; - const float g2=(float)qGreen(hovered_data[i])/255.0f; - const float b1=(float)qBlue(normal_data[i])/255.0f; - const float b2=(float)qBlue(hovered_data[i])/255.0f; - const float a1=(float)qAlpha(normal_data[i])/255.0f; - const float a2=(float)qAlpha(hovered_data[i])/255.0f; + const float r1=(float)tqRed(normal_data[i])/255.0f; + const float r2=(float)tqRed(hovered_data[i])/255.0f; + const float g1=(float)tqGreen(normal_data[i])/255.0f; + const float g2=(float)tqGreen(hovered_data[i])/255.0f; + const float b1=(float)tqBlue(normal_data[i])/255.0f; + const float b2=(float)tqBlue(hovered_data[i])/255.0f; + const float a1=(float)tqAlpha(normal_data[i])/255.0f; + const float a2=(float)tqAlpha(hovered_data[i])/255.0f; - animated_data[i]=qRgba( + animated_data[i]=tqRgba( (int)((r1*(1.0f-anim)+r2*anim)*255.0f), (int)((g1*(1.0f-anim)+g2*anim)*255.0f), (int)((b1*(1.0f-anim)+b2*anim)*255.0f), @@ -220,25 +220,25 @@ QImage* ButtonImage::getAnimated( float anim) return animated; } -void ButtonImage::tint(QRgb *data,QColor color) +void ButtonImage::tint(TQRgb *data,TQColor color) { float f_r=(float)color.red()/255.0; float f_g=(float)color.green()/255.0; float f_b=(float)color.blue()/255.0; for (int i=0;i<image_width*image_height;i++) { - float r=(float)qRed(data[i])/255.0; - float g=(float)qGreen(data[i])/255.0; - float b=(float)qBlue(data[i])/255.0; + float r=(float)tqRed(data[i])/255.0; + float g=(float)tqGreen(data[i])/255.0; + float b=(float)tqBlue(data[i])/255.0; r*=f_r; g*=f_g; b*=f_b; - data[i]=qRgba( + data[i]=tqRgba( (int)(r*255.0), (int)(g*255.0), (int)(b*255.0), - qAlpha(data[i])); + tqAlpha(data[i])); } } diff --git a/client/buttonimage.h b/client/buttonimage.h index 32284f6..79026c3 100644 --- a/client/buttonimage.h +++ b/client/buttonimage.h @@ -23,7 +23,7 @@ #ifndef _BUTTON_IMAGE_INCLUDED_ #define _BUTTON_IMAGE_INCLUDED_ -#include <qimage.h> +#include <tqimage.h> #include "crystalclient.h" #define DEFAULT_IMAGE_SIZE 14 @@ -32,35 +32,35 @@ class ButtonImage { public: - QImage *normal,*hovered,*pressed; + TQImage *normal,*hovered,*pressed; int image_width,image_height; int hSpace,vSpace; int drawMode; - QColor normal_color,hovered_color,pressed_color; + TQColor normal_color,hovered_color,pressed_color; - QImage *animated; - QRgb *normal_data,*hovered_data,*animated_data,*pressed_data; - QRgb *org_normal_data,*org_hovered_data; + TQImage *animated; + TQRgb *normal_data,*hovered_data,*animated_data,*pressed_data; + TQRgb *org_normal_data,*org_hovered_data; - ButtonImage(const QRgb *d_normal=NULL,int w=DEFAULT_IMAGE_SIZE,int h=DEFAULT_IMAGE_SIZE); + ButtonImage(const TQRgb *d_normal=NULL,int w=DEFAULT_IMAGE_SIZE,int h=DEFAULT_IMAGE_SIZE); virtual ~ButtonImage(); - void SetNormal(const QRgb *d_normal,int w=DEFAULT_IMAGE_SIZE,int h=DEFAULT_IMAGE_SIZE); - void SetHovered(const QRgb *d_hovered=NULL); - void SetPressed(const QRgb *d_pressed=NULL); + void SetNormal(const TQRgb *d_normal,int w=DEFAULT_IMAGE_SIZE,int h=DEFAULT_IMAGE_SIZE); + void SetHovered(const TQRgb *d_hovered=NULL); + void SetPressed(const TQRgb *d_pressed=NULL); void reset(); void finish(); bool initialized(); void setSpace(int hS,int vS) { hSpace=hS; vSpace=vS; } void setDrawMode(int dm) { drawMode=dm; } - void setColors(QColor n,QColor h,QColor p) { normal_color=n; hovered_color=h; pressed_color=p; } + void setColors(TQColor n,TQColor h,TQColor p) { normal_color=n; hovered_color=h; pressed_color=p; } - QImage* getAnimated(float anim); + TQImage* getAnimated(float anim); private: - QImage CreateImage(QRgb *data,QColor color); - void tint(QRgb *data,QColor color); + TQImage CreateImage(TQRgb *data,TQColor color); + void tint(TQRgb *data,TQColor color); }; #endif diff --git a/client/config/configdialog.ui b/client/config/configdialog.ui index 29025b8..5699b3a 100644 --- a/client/config/configdialog.ui +++ b/client/config/configdialog.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>ConfigDialog</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ConfigDialog</cstring> </property> @@ -22,14 +22,14 @@ <property name="margin"> <number>0</number> </property> - <widget class="QTabWidget" row="0" column="0"> + <widget class="TQTabWidget" row="0" column="0"> <property name="name"> <cstring>tabWidget2</cstring> </property> <property name="tabShape"> <enum>Rounded</enum> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -40,7 +40,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>tooltip</cstring> </property> @@ -64,14 +64,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> </size> </property> </spacer> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>titlealign</cstring> </property> @@ -90,13 +90,13 @@ <string></string> </property> <property name="whatsThis" stdset="0"> - <string>Use these buttons to set the alignment of the window title</string> + <string>Use these buttons to set the tqalignment of the window title</string> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>AlignLeft</cstring> </property> @@ -110,7 +110,7 @@ <string></string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>AlignHCenter</cstring> </property> @@ -127,7 +127,7 @@ <string></string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>AlignRight</cstring> </property> @@ -143,9 +143,9 @@ </widget> </vbox> </widget> - <widget class="QButtonGroup" row="0" column="1"> + <widget class="TQButtonGroup" row="0" column="1"> <property name="name"> - <cstring>repaintMode</cstring> + <cstring>tqrepaintMode</cstring> </property> <property name="sizePolicy"> <sizepolicy> @@ -156,13 +156,13 @@ </sizepolicy> </property> <property name="title"> - <string>Moving &repaints window</string> + <string>Moving &tqrepaints window</string> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQRadioButton" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>radioButton6</cstring> </property> @@ -176,7 +176,7 @@ <number>3</number> </property> </widget> - <widget class="QRadioButton" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQRadioButton" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>radioButton4</cstring> </property> @@ -190,7 +190,7 @@ <number>1</number> </property> </widget> - <widget class="QSpinBox" row="1" column="1"> + <widget class="TQSpinBox" row="1" column="1"> <property name="name"> <cstring>updateTime</cstring> </property> @@ -210,7 +210,7 @@ <number>200</number> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radioButton5</cstring> </property> @@ -229,14 +229,14 @@ </widget> </grid> </widget> - <widget class="QGroupBox" row="0" column="2" rowspan="1" colspan="2"> + <widget class="TQGroupBox" row="0" column="2" rowspan="1" colspan="2"> <property name="name"> <cstring>roundCorners</cstring> </property> <property name="title"> <string>Round &Corners</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignHCenter</set> </property> <grid> @@ -253,14 +253,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QCheckBox" row="0" column="2"> + <widget class="TQCheckBox" row="0" column="2"> <property name="name"> <cstring>trc</cstring> </property> @@ -279,7 +279,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>blc</cstring> </property> @@ -305,14 +305,14 @@ <property name="sizeType"> <enum>Preferred</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>10</width> <height>20</height> </size> </property> </spacer> - <widget class="QCheckBox" row="2" column="2"> + <widget class="TQCheckBox" row="2" column="2"> <property name="name"> <cstring>brc</cstring> </property> @@ -328,7 +328,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>tlc</cstring> </property> @@ -357,7 +357,7 @@ <property name="sizeType"> <enum>Preferred</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>10</width> <height>20</height> @@ -366,7 +366,7 @@ </spacer> </grid> </widget> - <widget class="QLabel" row="1" column="2"> + <widget class="TQLabel" row="1" column="2"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -385,7 +385,7 @@ <cstring>borderwidth</cstring> </property> </widget> - <widget class="QLabel" row="2" column="2"> + <widget class="TQLabel" row="2" column="2"> <property name="name"> <cstring>textLabel2_2_2</cstring> </property> @@ -404,7 +404,7 @@ <cstring>titlebarheight</cstring> </property> </widget> - <widget class="QSpinBox" row="1" column="3"> + <widget class="TQSpinBox" row="1" column="3"> <property name="name"> <cstring>borderwidth</cstring> </property> @@ -418,7 +418,7 @@ <string>Width of the borders</string> </property> </widget> - <widget class="QSpinBox" row="2" column="3"> + <widget class="TQSpinBox" row="2" column="3"> <property name="name"> <cstring>titlebarheight</cstring> </property> @@ -435,7 +435,7 @@ <string>Height of the title par (independend to border width)</string> </property> </widget> - <widget class="QCheckBox" row="1" column="1"> + <widget class="TQCheckBox" row="1" column="1"> <property name="name"> <cstring>textshadow</cstring> </property> @@ -449,7 +449,7 @@ <string>Draws a nice shadowed title bar text to improve visibility.</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>drawCaption</cstring> </property> @@ -463,7 +463,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>wheelTask</cstring> </property> @@ -485,7 +485,7 @@ <string>Wheel on titlebar cycles through visible windows. Does NOT work in compiz. Overrides settings in KDE.</string> </property> </widget> - <widget class="QPushButton" row="3" column="2" rowspan="1" colspan="2"> + <widget class="TQPushButton" row="3" column="2" rowspan="1" colspan="2"> <property name="name"> <cstring>infoButton</cstring> </property> @@ -497,7 +497,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>80</width> <height>0</height> @@ -512,7 +512,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -523,7 +523,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="1" column="1"> + <widget class="TQCheckBox" row="1" column="1"> <property name="name"> <cstring>animateHover</cstring> </property> @@ -548,7 +548,7 @@ <string>Smoothly animate the hover effect of the buttons</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>hover</cstring> </property> @@ -580,14 +580,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QGroupBox" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQGroupBox" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>tintButtons</cstring> </property> @@ -645,7 +645,7 @@ <string>The semi transparent buttons of the titlebar will be shaded in this color</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -653,7 +653,7 @@ <string>Minimize Button</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -777,7 +777,7 @@ <string>The semi transparent buttons of the titlebar will be shaded in this color</string> </property> </widget> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -785,7 +785,7 @@ <string>Hovered</string> </property> </widget> - <widget class="QLabel" row="0" column="3"> + <widget class="TQLabel" row="0" column="3"> <property name="name"> <cstring>textLabel4_2</cstring> </property> @@ -793,7 +793,7 @@ <string>Pressed</string> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textLabel2_4</cstring> </property> @@ -888,7 +888,7 @@ <string>The semi transparent buttons of the titlebar will be shaded in this color</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel1_4</cstring> </property> @@ -925,7 +925,7 @@ <string>The semi transparent buttons of the titlebar will be shaded in this color</string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -1022,7 +1022,7 @@ </widget> </grid> </widget> - <widget class="QComboBox" row="0" column="0"> + <widget class="TQComboBox" row="0" column="0"> <item> <property name="text"> <string>Crystal Default</string> @@ -1118,7 +1118,7 @@ <string>Select your favourite button theme here</string> </property> </widget> - <widget class="QCheckBox" row="0" column="1"> + <widget class="TQCheckBox" row="0" column="1"> <property name="name"> <cstring>menuimage</cstring> </property> @@ -1137,7 +1137,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -1148,11 +1148,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTabWidget" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQTabWidget" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>tabWidget4</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -1163,7 +1163,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>frame3</cstring> </property> @@ -1177,7 +1177,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSpinBox" row="3" column="1"> + <widget class="TQSpinBox" row="3" column="1"> <property name="name"> <cstring>shade1</cstring> </property> @@ -1205,7 +1205,7 @@ <string>Amount of effect</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -1232,7 +1232,7 @@ <string>The color of the outline frame</string> </property> </widget> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>userPicture1</cstring> </property> @@ -1249,7 +1249,7 @@ <string>Use userdefined picture for background instead of current wallpaper</string> </property> </widget> - <widget class="QComboBox" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQComboBox" row="1" column="0" rowspan="1" colspan="2"> <item> <property name="text"> <string>Fade</string> @@ -1300,14 +1300,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> </size> </property> </spacer> - <widget class="QComboBox" row="4" column="0"> + <widget class="TQComboBox" row="4" column="0"> <item> <property name="text"> <string>No outline</string> @@ -1337,7 +1337,7 @@ </widget> </grid> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>frame4</cstring> </property> @@ -1351,7 +1351,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1_5</cstring> </property> @@ -1359,7 +1359,7 @@ <string>Blur Image:</string> </property> </widget> - <widget class="QSpinBox" row="2" column="1"> + <widget class="TQSpinBox" row="2" column="1"> <property name="name"> <cstring>active_blur</cstring> </property> @@ -1391,7 +1391,7 @@ <string>The color of the inline frame</string> </property> </widget> - <widget class="QComboBox" row="3" column="0"> + <widget class="TQComboBox" row="3" column="0"> <item> <property name="text"> <string>No inline</string> @@ -1429,7 +1429,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>50</height> @@ -1448,7 +1448,7 @@ </widget> </hbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -1459,7 +1459,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>frame3_2</cstring> </property> @@ -1473,7 +1473,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QComboBox" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQComboBox" row="1" column="0" rowspan="1" colspan="2"> <item> <property name="text"> <string>Fade</string> @@ -1533,7 +1533,7 @@ <string>The color of the outline frame</string> </property> </widget> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>userPicture2</cstring> </property> @@ -1550,7 +1550,7 @@ <string>Use userdefined picture for background instead of current wallpaper</string> </property> </widget> - <widget class="QSpinBox" row="3" column="1"> + <widget class="TQSpinBox" row="3" column="1"> <property name="name"> <cstring>shade2</cstring> </property> @@ -1588,14 +1588,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> </size> </property> </spacer> - <widget class="QComboBox" row="4" column="0"> + <widget class="TQComboBox" row="4" column="0"> <item> <property name="text"> <string>No outline</string> @@ -1623,7 +1623,7 @@ <string>Draw outline frame</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel1_2_3</cstring> </property> @@ -1633,7 +1633,7 @@ </widget> </grid> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>frame4_2</cstring> </property> @@ -1647,7 +1647,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1_5_2</cstring> </property> @@ -1655,7 +1655,7 @@ <string>Blur Image:</string> </property> </widget> - <widget class="QSpinBox" row="2" column="1"> + <widget class="TQSpinBox" row="2" column="1"> <property name="name"> <cstring>inactive_blur</cstring> </property> @@ -1697,14 +1697,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QComboBox" row="3" column="0"> + <widget class="TQComboBox" row="3" column="0"> <item> <property name="text"> <string>No inline</string> @@ -1745,7 +1745,7 @@ </hbox> </widget> </widget> - <widget class="QCheckBox" row="0" column="1"> + <widget class="TQCheckBox" row="0" column="1"> <property name="name"> <cstring>trackdesktop</cstring> </property> @@ -1770,7 +1770,7 @@ <string>Check, if you have different wallpapers set on multiple desktops. Uncheck, when you just have one wallpaper for all desktops.</string> </property> </widget> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>enableTransparency</cstring> </property> @@ -1800,7 +1800,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -1811,7 +1811,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup" row="0" column="0" rowspan="2" colspan="2"> + <widget class="TQButtonGroup" row="0" column="0" rowspan="2" colspan="2"> <property name="name"> <cstring>logoEnabled</cstring> </property> @@ -1836,7 +1836,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioButton13</cstring> </property> @@ -1853,7 +1853,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton" row="0" column="1"> + <widget class="TQRadioButton" row="0" column="1"> <property name="name"> <cstring>radioButton14_3</cstring> </property> @@ -1864,7 +1864,7 @@ <string></string> </property> </widget> - <widget class="QRadioButton" row="0" column="2"> + <widget class="TQRadioButton" row="0" column="2"> <property name="name"> <cstring>radioButton15</cstring> </property> @@ -1877,7 +1877,7 @@ </widget> </grid> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>logoPreview</cstring> </property> @@ -1889,13 +1889,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>30</width> <height>30</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>30</height> @@ -1914,7 +1914,7 @@ <string>Little preview</string> </property> </widget> - <widget class="QComboBox" row="2" column="3"> + <widget class="TQComboBox" row="2" column="3"> <item> <property name="text"> <string>Stretch</string> @@ -1939,7 +1939,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>30</height> @@ -1959,7 +1959,7 @@ </sizepolicy> </property> </widget> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>textLabel1_6</cstring> </property> @@ -1975,7 +1975,7 @@ <string>Distance to the text:</string> </property> </widget> - <widget class="QSpinBox" row="0" column="3"> + <widget class="TQSpinBox" row="0" column="3"> <property name="name"> <cstring>logoDistance</cstring> </property> @@ -1997,7 +1997,7 @@ <number>5</number> </property> </widget> - <widget class="QCheckBox" row="1" column="2" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="1" column="2" rowspan="1" colspan="2"> <property name="name"> <cstring>logoActive</cstring> </property> @@ -2021,7 +2021,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -2032,7 +2032,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -2047,11 +2047,11 @@ <property name="text"> <string>Lets you put an transparent image on top of the title bar.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> - <widget class="QLabel" row="4" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="4" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -2066,7 +2066,7 @@ <property name="text"> <string>User defined should be a transparent png file, i.e. 1x64px</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> @@ -2080,14 +2080,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> </size> </property> </spacer> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_7</cstring> </property> @@ -2095,7 +2095,7 @@ <string>Overlay for active window:</string> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>textLabel1_7_2</cstring> </property> @@ -2103,7 +2103,7 @@ <string>Overlay for inactive window:</string> </property> </widget> - <widget class="QComboBox" row="2" column="0"> + <widget class="TQComboBox" row="2" column="0"> <item> <property name="text"> <string>Disabled</string> @@ -2149,7 +2149,7 @@ <bool>false</bool> </property> </widget> - <widget class="QComboBox" row="2" column="1"> + <widget class="TQComboBox" row="2" column="1"> <item> <property name="text"> <string>Disabled</string> @@ -2256,7 +2256,7 @@ <connection> <sender>enableTransparency</sender> <signal>toggled(bool)</signal> - <receiver>repaintMode</receiver> + <receiver>tqrepaintMode</receiver> <slot>setEnabled(bool)</slot> </connection> <connection> @@ -2380,7 +2380,7 @@ <slot>setEnabled(bool)</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="5"/> +<tqlayoutdefaults spacing="6" margin="5"/> <includehints> <includehint>kcolorbutton.h</includehint> <includehint>kcolorbutton.h</includehint> diff --git a/client/config/crystalconfig.cc b/client/config/crystalconfig.cc index dedf8ec..9ccf5f5 100644 --- a/client/config/crystalconfig.cc +++ b/client/config/crystalconfig.cc @@ -21,22 +21,22 @@ #include <kconfig.h> #include <klocale.h> #include <kglobal.h> -#include <qbuttongroup.h> -#include <qlabel.h> -#include <qgroupbox.h> -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qwhatsthis.h> -#include <qspinbox.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qwidgetstack.h> -#include <qlineedit.h> -#include <qfiledialog.h> +#include <tqbuttongroup.h> +#include <tqlabel.h> +#include <tqgroupbox.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> +#include <tqwhatsthis.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqwidgetstack.h> +#include <tqlineedit.h> +#include <tqfiledialog.h> #include <kcolorbutton.h> #include <kfiledialog.h> -#include <qpicture.h> +#include <tqpicture.h> #include <kapplication.h> #include <kurlrequester.h> @@ -45,94 +45,94 @@ #include "crystalconfig.h" -CrystalConfig::CrystalConfig(KConfig*, QWidget* parent) - : QObject(parent), config_(0), dialog_(0) +CrystalConfig::CrystalConfig(KConfig*, TQWidget* tqparent) + : TQObject(tqparent), config_(0), dialog_(0) { config_ = new KConfig("kwincrystalrc"); - dialog_ = new ConfigDialog(parent); + dialog_ = new ConfigDialog(tqparent); dialog_->show(); - connect(dialog_->titlealign, SIGNAL(clicked(int)),this, SLOT(selectionChanged(int))); + connect(dialog_->titlealign, TQT_SIGNAL(clicked(int)),this, TQT_SLOT(selectionChanged(int))); - connect(dialog_->drawCaption, SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int))); - connect(dialog_->textshadow, SIGNAL(stateChanged(int)),this, SLOT(selectionChanged(int))); - connect(dialog_->tooltip,SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int))); - connect(dialog_->wheelTask,SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int))); + connect(dialog_->drawCaption, TQT_SIGNAL(stateChanged(int)),this,TQT_SLOT(selectionChanged(int))); + connect(dialog_->textshadow, TQT_SIGNAL(stateChanged(int)),this, TQT_SLOT(selectionChanged(int))); + connect(dialog_->tooltip,TQT_SIGNAL(stateChanged(int)),this,TQT_SLOT(selectionChanged(int))); + connect(dialog_->wheelTask,TQT_SIGNAL(stateChanged(int)),this,TQT_SLOT(selectionChanged(int))); - connect(dialog_->trackdesktop, SIGNAL(stateChanged(int)),this, SLOT(selectionChanged(int))); + connect(dialog_->trackdesktop, TQT_SIGNAL(stateChanged(int)),this, TQT_SLOT(selectionChanged(int))); - connect(dialog_->shade1, SIGNAL(valueChanged(int)),this, SLOT(selectionChanged(int))); - connect(dialog_->shade2, SIGNAL(valueChanged(int)),this, SLOT(selectionChanged(int))); + connect(dialog_->shade1, TQT_SIGNAL(valueChanged(int)),this, TQT_SLOT(selectionChanged(int))); + connect(dialog_->shade2, TQT_SIGNAL(valueChanged(int)),this, TQT_SLOT(selectionChanged(int))); - connect(dialog_->frame1, SIGNAL(activated(int)),this, SLOT(selectionChanged(int))); - connect(dialog_->frame2, SIGNAL(activated(int)),this, SLOT(selectionChanged(int))); - connect(dialog_->frameColor1, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&))); - connect(dialog_->frameColor2, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&))); + connect(dialog_->frame1, TQT_SIGNAL(activated(int)),this, TQT_SLOT(selectionChanged(int))); + connect(dialog_->frame2, TQT_SIGNAL(activated(int)),this, TQT_SLOT(selectionChanged(int))); + connect(dialog_->frameColor1, TQT_SIGNAL(changed(const TQColor&)),this,TQT_SLOT(colorChanged(const TQColor&))); + connect(dialog_->frameColor2, TQT_SIGNAL(changed(const TQColor&)),this,TQT_SLOT(colorChanged(const TQColor&))); - connect(dialog_->inline1, SIGNAL(activated(int)),this, SLOT(selectionChanged(int))); - connect(dialog_->inline2, SIGNAL(activated(int)),this, SLOT(selectionChanged(int))); - connect(dialog_->inlineColor1, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&))); - connect(dialog_->inlineColor2, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&))); + connect(dialog_->inline1, TQT_SIGNAL(activated(int)),this, TQT_SLOT(selectionChanged(int))); + connect(dialog_->inline2, TQT_SIGNAL(activated(int)),this, TQT_SLOT(selectionChanged(int))); + connect(dialog_->inlineColor1, TQT_SIGNAL(changed(const TQColor&)),this,TQT_SLOT(colorChanged(const TQColor&))); + connect(dialog_->inlineColor2, TQT_SIGNAL(changed(const TQColor&)),this,TQT_SLOT(colorChanged(const TQColor&))); - connect(dialog_->type1,SIGNAL(activated(int)),this,SLOT(selectionChanged(int))); - connect(dialog_->type2,SIGNAL(activated(int)),this,SLOT(selectionChanged(int))); + connect(dialog_->type1,TQT_SIGNAL(activated(int)),this,TQT_SLOT(selectionChanged(int))); + connect(dialog_->type2,TQT_SIGNAL(activated(int)),this,TQT_SLOT(selectionChanged(int))); - connect(dialog_->enableTransparency,SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int))); + connect(dialog_->enableTransparency,TQT_SIGNAL(stateChanged(int)),this,TQT_SLOT(selectionChanged(int))); - connect(dialog_->borderwidth, SIGNAL(valueChanged(int)),this, SLOT(selectionChanged(int))); - connect(dialog_->titlebarheight, SIGNAL(valueChanged(int)),this, SLOT(selectionChanged(int))); + connect(dialog_->borderwidth, TQT_SIGNAL(valueChanged(int)),this, TQT_SLOT(selectionChanged(int))); + connect(dialog_->titlebarheight, TQT_SIGNAL(valueChanged(int)),this, TQT_SLOT(selectionChanged(int))); - connect(dialog_->tlc, SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int))); - connect(dialog_->trc, SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int))); - connect(dialog_->blc, SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int))); - connect(dialog_->brc, SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int))); - connect(dialog_->buttonColor1, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&))); - connect(dialog_->buttonColor2, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&))); - connect(dialog_->buttonColor3, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&))); - connect(dialog_->minColor1, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&))); - connect(dialog_->minColor2, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&))); - connect(dialog_->minColor3, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&))); - connect(dialog_->maxColor1, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&))); - connect(dialog_->maxColor2, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&))); - connect(dialog_->maxColor3, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&))); - connect(dialog_->closeColor1, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&))); - connect(dialog_->closeColor2, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&))); - connect(dialog_->closeColor3, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&))); + connect(dialog_->tlc, TQT_SIGNAL(stateChanged(int)),this,TQT_SLOT(selectionChanged(int))); + connect(dialog_->trc, TQT_SIGNAL(stateChanged(int)),this,TQT_SLOT(selectionChanged(int))); + connect(dialog_->blc, TQT_SIGNAL(stateChanged(int)),this,TQT_SLOT(selectionChanged(int))); + connect(dialog_->brc, TQT_SIGNAL(stateChanged(int)),this,TQT_SLOT(selectionChanged(int))); + connect(dialog_->buttonColor1, TQT_SIGNAL(changed(const TQColor&)),this,TQT_SLOT(colorChanged(const TQColor&))); + connect(dialog_->buttonColor2, TQT_SIGNAL(changed(const TQColor&)),this,TQT_SLOT(colorChanged(const TQColor&))); + connect(dialog_->buttonColor3, TQT_SIGNAL(changed(const TQColor&)),this,TQT_SLOT(colorChanged(const TQColor&))); + connect(dialog_->minColor1, TQT_SIGNAL(changed(const TQColor&)),this,TQT_SLOT(colorChanged(const TQColor&))); + connect(dialog_->minColor2, TQT_SIGNAL(changed(const TQColor&)),this,TQT_SLOT(colorChanged(const TQColor&))); + connect(dialog_->minColor3, TQT_SIGNAL(changed(const TQColor&)),this,TQT_SLOT(colorChanged(const TQColor&))); + connect(dialog_->maxColor1, TQT_SIGNAL(changed(const TQColor&)),this,TQT_SLOT(colorChanged(const TQColor&))); + connect(dialog_->maxColor2, TQT_SIGNAL(changed(const TQColor&)),this,TQT_SLOT(colorChanged(const TQColor&))); + connect(dialog_->maxColor3, TQT_SIGNAL(changed(const TQColor&)),this,TQT_SLOT(colorChanged(const TQColor&))); + connect(dialog_->closeColor1, TQT_SIGNAL(changed(const TQColor&)),this,TQT_SLOT(colorChanged(const TQColor&))); + connect(dialog_->closeColor2, TQT_SIGNAL(changed(const TQColor&)),this,TQT_SLOT(colorChanged(const TQColor&))); + connect(dialog_->closeColor3, TQT_SIGNAL(changed(const TQColor&)),this,TQT_SLOT(colorChanged(const TQColor&))); - connect(dialog_->hover, SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int))); - connect(dialog_->animateHover, SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int))); - connect(dialog_->buttonTheme, SIGNAL(activated(int)),this,SLOT(selectionChanged(int))); - connect(dialog_->tintButtons, SIGNAL(toggled(bool)),this,SLOT(boolChanged(bool))); - connect(dialog_->menuimage, SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int))); + connect(dialog_->hover, TQT_SIGNAL(stateChanged(int)),this,TQT_SLOT(selectionChanged(int))); + connect(dialog_->animateHover, TQT_SIGNAL(stateChanged(int)),this,TQT_SLOT(selectionChanged(int))); + connect(dialog_->buttonTheme, TQT_SIGNAL(activated(int)),this,TQT_SLOT(selectionChanged(int))); + connect(dialog_->tintButtons, TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(boolChanged(bool))); + connect(dialog_->menuimage, TQT_SIGNAL(stateChanged(int)),this,TQT_SLOT(selectionChanged(int))); - connect(dialog_->repaintMode, SIGNAL(clicked(int)),this, SLOT(selectionChanged(int))); + connect(dialog_->tqrepaintMode, TQT_SIGNAL(clicked(int)),this, TQT_SLOT(selectionChanged(int))); - connect(dialog_->updateTime, SIGNAL(valueChanged(int)),this, SLOT(selectionChanged(int))); + connect(dialog_->updateTime, TQT_SIGNAL(valueChanged(int)),this, TQT_SLOT(selectionChanged(int))); - connect(dialog_->infoButton, SIGNAL(clicked(void)),this,SLOT(infoDialog(void))); + connect(dialog_->infoButton, TQT_SIGNAL(clicked(void)),this,TQT_SLOT(infoDialog(void))); - connect(dialog_->active_blur, SIGNAL(valueChanged(int)),this,SLOT(selectionChanged(int))); - connect(dialog_->inactive_blur, SIGNAL(valueChanged(int)),this,SLOT(selectionChanged(int))); + connect(dialog_->active_blur, TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(selectionChanged(int))); + connect(dialog_->inactive_blur, TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(selectionChanged(int))); - connect(dialog_->userPicture1, SIGNAL(stateChanged(int)),this, SLOT(selectionChanged(int))); - connect(dialog_->userPicture2, SIGNAL(stateChanged(int)),this, SLOT(selectionChanged(int))); - connect(dialog_->activeFile,SIGNAL(textChanged(const QString&)),this,SLOT(textChanged( const QString& ))); - connect(dialog_->inactiveFile,SIGNAL(textChanged(const QString&)),this,SLOT(textChanged( const QString& ))); + connect(dialog_->userPicture1, TQT_SIGNAL(stateChanged(int)),this, TQT_SLOT(selectionChanged(int))); + connect(dialog_->userPicture2, TQT_SIGNAL(stateChanged(int)),this, TQT_SLOT(selectionChanged(int))); + connect(dialog_->activeFile,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(textChanged( const TQString& ))); + connect(dialog_->inactiveFile,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(textChanged( const TQString& ))); - connect(dialog_->overlay_active, SIGNAL(activated(int)),this, SLOT(overlay_active_changed(int))); - connect(dialog_->overlay_inactive, SIGNAL(activated(int)),this, SLOT(overlay_inactive_changed(int))); + connect(dialog_->overlay_active, TQT_SIGNAL(activated(int)),this, TQT_SLOT(overlay_active_changed(int))); + connect(dialog_->overlay_inactive, TQT_SIGNAL(activated(int)),this, TQT_SLOT(overlay_inactive_changed(int))); - connect(dialog_->overlay_active_file,SIGNAL(textChanged(const QString&)),this,SLOT(textChanged(const QString &))); - connect(dialog_->overlay_inactive_file,SIGNAL(textChanged(const QString&)),this,SLOT(textChanged(const QString &))); + connect(dialog_->overlay_active_file,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(textChanged(const TQString &))); + connect(dialog_->overlay_inactive_file,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(textChanged(const TQString &))); - connect(dialog_->logoEnabled, SIGNAL(clicked(int)),this, SLOT(selectionChanged(int))); - connect(dialog_->logoFile, SIGNAL(textChanged(const QString &)),this, SLOT(logoTextChanged(const QString&))); - connect(dialog_->logoStretch, SIGNAL(activated(int)),this, SLOT(selectionChanged(int))); - connect(dialog_->logoActive, SIGNAL(stateChanged(int)),this, SLOT(selectionChanged(int))); - connect(dialog_->logoDistance,SIGNAL(valueChanged(int)),this,SLOT(selectionChanged(int))); + connect(dialog_->logoEnabled, TQT_SIGNAL(clicked(int)),this, TQT_SLOT(selectionChanged(int))); + connect(dialog_->logoFile, TQT_SIGNAL(textChanged(const TQString &)),this, TQT_SLOT(logoTextChanged(const TQString&))); + connect(dialog_->logoStretch, TQT_SIGNAL(activated(int)),this, TQT_SLOT(selectionChanged(int))); + connect(dialog_->logoActive, TQT_SIGNAL(stateChanged(int)),this, TQT_SLOT(selectionChanged(int))); + connect(dialog_->logoDistance,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(selectionChanged(int))); load(config_); } @@ -150,12 +150,12 @@ void CrystalConfig::selectionChanged(int) void CrystalConfig::load(KConfig*) { - QColor color(255,255,255); + TQColor color(255,255,255); config_->setGroup("General"); - QString value = config_->readEntry("TitleAlignment", "AlignHCenter"); - QRadioButton *button = (QRadioButton*)dialog_->titlealign->child(value); + TQString value = config_->readEntry("TitleAlignment", "AlignHCenter"); + TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->child(value); if (button) button->setChecked(true); dialog_->drawCaption->setChecked(config_->readBoolEntry("DrawCaption",true)); @@ -167,17 +167,17 @@ void CrystalConfig::load(KConfig*) dialog_->trackdesktop->setChecked(config_->readBoolEntry("TrackDesktop",false)); dialog_->frame1->setCurrentItem(config_->readNumEntry("ActiveFrame",1)); - color=QColor(192,192,192); + color=TQColor(192,192,192); dialog_->frameColor1->setColor(config_->readColorEntry("FrameColor1",&color)); dialog_->frame2->setCurrentItem(config_->readNumEntry("InactiveFrame",1)); - color=QColor(192,192,192); + color=TQColor(192,192,192); dialog_->frameColor2->setColor(config_->readColorEntry("FrameColor2",&color)); dialog_->inline1->setCurrentItem(config_->readNumEntry("ActiveInline",0)); - color=QColor(192,192,192); + color=TQColor(192,192,192); dialog_->inlineColor1->setColor(config_->readColorEntry("InlineColor1",&color)); dialog_->inline2->setCurrentItem(config_->readNumEntry("InactiveInline",0)); - color=QColor(192,192,192); + color=TQColor(192,192,192); dialog_->inlineColor2->setColor(config_->readColorEntry("InlineColor2",&color)); @@ -203,7 +203,7 @@ void CrystalConfig::load(KConfig*) dialog_->animateHover->setChecked(config_->readBoolEntry("AnimateHover",true)); dialog_->menuimage->setChecked(config_->readBoolEntry("MenuImage",true)); - color=QColor(255,255,255); + color=TQColor(255,255,255); dialog_->buttonColor1->setColor(config_->readColorEntry("ButtonColor",&color)); dialog_->buttonColor2->setColor(config_->readColorEntry("ButtonColor2",&color)); dialog_->buttonColor3->setColor(config_->readColorEntry("ButtonColor3",&color)); @@ -217,12 +217,12 @@ void CrystalConfig::load(KConfig*) dialog_->closeColor2->setColor(config_->readColorEntry("CloseColor2",&color)); dialog_->closeColor3->setColor(config_->readColorEntry("CloseColor3",&color)); - dialog_->tintButtons->setChecked(config_->readBoolEntry("TintButtons",dialog_->buttonColor1->color()!=QColor(255,255,255))); + dialog_->tintButtons->setChecked(config_->readBoolEntry("TintButtons",dialog_->buttonColor1->color()!=TQColor(255,255,255))); dialog_->buttonTheme->setCurrentItem(config_->readNumEntry("ButtonTheme",8)); dialog_->updateTime->setValue(config_->readNumEntry("RepaintTime",200)); - button=(QRadioButton*)dialog_->repaintMode->find(config_->readNumEntry("RepaintMode",1)); + button=(TQRadioButton*)dialog_->tqrepaintMode->tqfind(config_->readNumEntry("RepaintMode",1)); if (button)button->setChecked(true); dialog_->active_blur->setValue(config_->readNumEntry("ActiveBlur",0)); @@ -255,8 +255,8 @@ void CrystalConfig::save(KConfig*) { config_->setGroup("General"); - QRadioButton *button = (QRadioButton*)dialog_->titlealign->selected(); - if (button) config_->writeEntry("TitleAlignment", QString(button->name())); + TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->selected(); + if (button) config_->writeEntry("TitleAlignment", TQString(button->name())); config_->writeEntry("DrawCaption",dialog_->drawCaption->isChecked()); config_->writeEntry("TextShadow",dialog_->textshadow->isChecked()); config_->writeEntry("CaptionTooltip",dialog_->tooltip->isChecked()); @@ -308,7 +308,7 @@ void CrystalConfig::save(KConfig*) config_->writeEntry("MenuImage",dialog_->menuimage->isChecked()); config_->writeEntry("ButtonTheme",dialog_->buttonTheme->currentItem()); - config_->writeEntry("RepaintMode",dialog_->repaintMode->selectedId()); + config_->writeEntry("RepaintMode",dialog_->tqrepaintMode->selectedId()); config_->writeEntry("RepaintTime",dialog_->updateTime->value()); config_->writeEntry("ActiveBlur",dialog_->active_blur->value()); @@ -336,11 +336,11 @@ void CrystalConfig::save(KConfig*) void CrystalConfig::infoDialog() { InfoDialog d(dialog_); - connect((QLabel*)(d.kURLLabel1),SIGNAL(leftClickedURL(const QString&)),KApplication::kApplication(),SLOT(invokeBrowser(const QString &))); + connect((TQLabel*)(d.kURLLabel1),TQT_SIGNAL(leftClickedURL(const TQString&)),KApplication::kApplication(),TQT_SLOT(invokeBrowser(const TQString &))); d.exec(); } -void CrystalConfig::logoTextChanged(const QString&) +void CrystalConfig::logoTextChanged(const TQString&) { updateLogo(); emit changed(); @@ -360,15 +360,15 @@ void CrystalConfig::overlay_inactive_changed(int a) void CrystalConfig::updateLogo() { - QPixmap pic; + TQPixmap pic; pic.load(dialog_->logoFile->url()); dialog_->logoPreview->setPixmap(pic); } void CrystalConfig::defaults() { - QRadioButton *button = - (QRadioButton*)dialog_->titlealign->child("AlignHCenter"); + TQRadioButton *button = + (TQRadioButton*)dialog_->titlealign->child("AlignHCenter"); if (button) button->setChecked(true); dialog_->shade1->setValue(50); dialog_->shade2->setValue(50); @@ -376,8 +376,8 @@ void CrystalConfig::defaults() extern "C" { - QObject* allocate_config(KConfig* config, QWidget* parent) { - return (new CrystalConfig(config, parent)); + TQObject* allocate_config(KConfig* config, TQWidget* tqparent) { + return (new CrystalConfig(config, tqparent)); } } diff --git a/client/config/crystalconfig.h b/client/config/crystalconfig.h index 5bdc0fb..24e496e 100644 --- a/client/config/crystalconfig.h +++ b/client/config/crystalconfig.h @@ -22,7 +22,7 @@ #ifndef CRYSTALCONFIG_H #define CRYSTALCONFIG_H -#include <qobject.h> +#include <tqobject.h> #define TOP_LEFT 1 #define TOP_RIGHT 2 @@ -32,11 +32,12 @@ class KConfig; class ConfigDialog; -class CrystalConfig : public QObject +class CrystalConfig : public TQObject { Q_OBJECT + TQ_OBJECT public: - CrystalConfig(KConfig* config, QWidget* parent); + CrystalConfig(KConfig* config, TQWidget* tqparent); ~CrystalConfig(); signals: @@ -53,9 +54,9 @@ protected slots: void overlay_active_changed(int); void overlay_inactive_changed(int); void boolChanged(bool) { selectionChanged(0); } - void colorChanged(const QColor&) { selectionChanged(0); } - void textChanged(const QString&) { selectionChanged(0); } - void logoTextChanged(const QString&); + void colorChanged(const TQColor&) { selectionChanged(0); } + void textChanged(const TQString&) { selectionChanged(0); } + void logoTextChanged(const TQString&); private: KConfig *config_; diff --git a/client/config/infodialog.ui b/client/config/infodialog.ui index f73a21c..eb7f13f 100644 --- a/client/config/infodialog.ui +++ b/client/config/infodialog.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>InfoDialog</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>InfoDialog</cstring> </property> @@ -39,7 +39,7 @@ <property name="resizeMode"> <enum>Minimum</enum> </property> - <widget class="QGroupBox" row="0" column="0" rowspan="2" colspan="2"> + <widget class="TQGroupBox" row="0" column="0" rowspan="2" colspan="2"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -54,13 +54,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>20</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>20</height> @@ -78,14 +78,14 @@ <property name="title"> <string>About:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> <property name="flat"> <bool>true</bool> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -109,11 +109,11 @@ You may look for the most recent version at kde-look.org:</string> <property name="textFormat"> <enum>PlainText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignLeft</set> </property> </widget> - <widget class="QLabel" row="1" column="1" rowspan="2" colspan="1"> + <widget class="TQLabel" row="1" column="1" rowspan="2" colspan="1"> <property name="name"> <cstring>pixmapLabel2</cstring> </property> @@ -143,7 +143,7 @@ You may look for the most recent version at kde-look.org:</string> <string>http://www.kde-look.org/content/show.php?content=13969</string> </property> </widget> - <widget class="QGroupBox" row="4" column="0" rowspan="1" colspan="2"> + <widget class="TQGroupBox" row="4" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>groupBox3_2</cstring> </property> @@ -158,13 +158,13 @@ You may look for the most recent version at kde-look.org:</string> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>20</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>20</height> @@ -182,14 +182,14 @@ You may look for the most recent version at kde-look.org:</string> <property name="title"> <string>Usage:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> <property name="flat"> <bool>true</bool> </property> </widget> - <widget class="QLabel" row="5" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="5" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -216,7 +216,7 @@ You may look for the most recent version at kde-look.org:</string> <property name="textFormat"> <enum>PlainText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignLeft</set> </property> </widget> @@ -234,7 +234,7 @@ You may look for the most recent version at kde-look.org:</string> <enum>Horizontal</enum> </property> </widget> - <widget class="QPushButton" row="7" column="0" rowspan="1" colspan="2"> + <widget class="TQPushButton" row="7" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>pushButton1</cstring> </property> @@ -274,10 +274,10 @@ You may look for the most recent version at kde-look.org:</string> <slot>close()</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot>kURLLabel1_leftURL()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kurllabel.h</includehint> </includehints> diff --git a/client/crystalbutton.cpp b/client/crystalbutton.cpp index 8566e41..d38cbee 100644 --- a/client/crystalbutton.cpp +++ b/client/crystalbutton.cpp @@ -19,9 +19,9 @@ ***************************************************************************/ -#include <qimage.h> -#include <qtooltip.h> -#include <qpainter.h> +#include <tqimage.h> +#include <tqtooltip.h> +#include <tqpainter.h> #include "crystalclient.h" #include "crystalbutton.h" @@ -29,10 +29,10 @@ #include "imageholder.h" -CrystalButton::CrystalButton(CrystalClient *parent, const char *name, - const QString& tip, ButtonType type, +CrystalButton::CrystalButton(CrystalClient *tqparent, const char *name, + const TQString& tip, ButtonType type, ButtonImage *vimage) -: QButton(parent->widget(), name), client_(parent), type_(type), image(vimage), lastmouse_(0) +: TQButton(tqparent->widget(), name), client_(tqparent), type_(type), image(vimage), lastmouse_(0) { setBackgroundMode(NoBackground); resetSize(false); @@ -40,8 +40,8 @@ CrystalButton::CrystalButton(CrystalClient *parent, const char *name, hover=first=last=false; animation=0.0; - QToolTip::add(this, tip); - connect ( &animation_timer,SIGNAL(timeout()),this,SLOT(animate())); + TQToolTip::add(this, tip); + connect ( &animation_timer,TQT_SIGNAL(timeout()),this,TQT_SLOT(animate())); } CrystalButton::~CrystalButton() @@ -59,12 +59,12 @@ void CrystalButton::resetSize(bool FullSize) void CrystalButton::setBitmap(ButtonImage *newimage) { image=newimage; - repaint(false); + tqrepaint(false); } -QSize CrystalButton::sizeHint() const +TQSize CrystalButton::tqsizeHint() const { - return QSize(buttonSizeH(),buttonSizeV()); + return TQSize(buttonSizeH(),buttonSizeV()); } int CrystalButton::buttonSizeH() const @@ -85,105 +85,105 @@ int CrystalButton::buttonSizeV() const return (factory->titlesize-1-vS>h)?h:factory->titlesize-1-vS; } -void CrystalButton::enterEvent(QEvent *e) +void CrystalButton::enterEvent(TQEvent *e) { hover=true; - if (factory->hovereffect)repaint(false); + if (factory->hovereffect)tqrepaint(false); if (factory->animateHover)animation_timer.start(60); - QButton::enterEvent(e); + TQButton::enterEvent(e); } -void CrystalButton::leaveEvent(QEvent *e) +void CrystalButton::leaveEvent(TQEvent *e) { hover=false; - if (factory->hovereffect)repaint(false); + if (factory->hovereffect)tqrepaint(false); if (factory->animateHover)animation_timer.start(80); - QButton::leaveEvent(e); + TQButton::leaveEvent(e); } -void CrystalButton::mousePressEvent(QMouseEvent* e) +void CrystalButton::mousePressEvent(TQMouseEvent* e) { lastmouse_ = e->button(); int button; switch(e->button()) { - case LeftButton: - button=LeftButton; + case Qt::LeftButton: + button=Qt::LeftButton; break; - case RightButton: + case Qt::RightButton: if ((type_ == ButtonMax) || (type_ == ButtonMin) || (type_ == ButtonMenu) || (type_ == ButtonClose)) - button=LeftButton; else button=NoButton; + button=Qt::LeftButton; else button=Qt::NoButton; break; - case MidButton: + case Qt::MidButton: if ((type_ == ButtonMax) || (type_ == ButtonMin)) - button=LeftButton; else button=NoButton; + button=Qt::LeftButton; else button=Qt::NoButton; break; - default:button=NoButton; + default:button=Qt::NoButton; break; } - QMouseEvent me(e->type(), e->pos(), e->globalPos(),button, e->state()); - QButton::mousePressEvent(&me); + TQMouseEvent me(e->type(), e->pos(), e->globalPos(),button, e->state()); + TQButton::mousePressEvent(&me); } -void CrystalButton::mouseReleaseEvent(QMouseEvent* e) +void CrystalButton::mouseReleaseEvent(TQMouseEvent* e) { lastmouse_ = e->button(); int button; switch(e->button()) { - case LeftButton: - button=LeftButton; + case Qt::LeftButton: + button=Qt::LeftButton; break; - case RightButton: + case Qt::RightButton: if ((type_ == ButtonMax) || (type_ == ButtonMin) || (type_ == ButtonMenu) || (type_==ButtonClose)) - button=LeftButton; else button=NoButton; + button=Qt::LeftButton; else button=Qt::NoButton; break; - case MidButton: + case Qt::MidButton: if ((type_ == ButtonMax) || (type_ == ButtonMin)) - button=LeftButton; else button=NoButton; + button=Qt::LeftButton; else button=Qt::NoButton; break; - default:button=NoButton; + default:button=Qt::NoButton; break; } - QMouseEvent me(e->type(), e->pos(), e->globalPos(), button, e->state()); - QButton::mouseReleaseEvent(&me); + TQMouseEvent me(e->type(), e->pos(), e->globalPos(), button, e->state()); + TQButton::mouseReleaseEvent(&me); } -void CrystalButton::drawButton(QPainter *painter) +void CrystalButton::drawButton(TQPainter *painter) { if (!CrystalFactory::initialized()) return; - QColorGroup group; + TQColorGroup group; float dx, dy; int dm=0; - QPixmap pufferPixmap; + TQPixmap pufferPixmap; pufferPixmap.resize(width(), height()); - QPainter pufferPainter(&pufferPixmap); + TQPainter pufferPainter(&pufferPixmap); CrystalFactory *f=((CrystalFactory*)client_->factory()); - QPixmap *background; + TQPixmap *background; if (f->transparency)background=f->image_holder->image(client_->isActive()); else background=NULL; WND_CONFIG *wndcfg=client_->isActive()?&f->active:&f->inactive; if (background && !background->isNull()) { - QRect r=rect(); - QPoint p=mapToGlobal(QPoint(0,0)); + TQRect r=rect(); + TQPoint p=mapToGlobal(TQPoint(0,0)); r.moveBy(p.x(),p.y()); - pufferPainter.drawPixmap(QPoint(0,0),*background,r); + pufferPainter.drawPixmap(TQPoint(0,0),*background,r); }else{ - group = client_->options()->colorGroup(KDecoration::ColorTitleBar, client_->isActive()); + group = client_->options()->tqcolorGroup(KDecoration::ColorTitleBar, client_->isActive()); pufferPainter.fillRect(rect(), group.background()); } if (!wndcfg->overlay.isNull()) { - pufferPainter.drawTiledPixmap(rect(),wndcfg->overlay,QPoint(x(),y())); + pufferPainter.drawTiledPixmap(rect(),wndcfg->overlay,TQPoint(x(),y())); } dm=0; @@ -228,21 +228,21 @@ void CrystalButton::drawButton(QPainter *painter) if (dx<1 || dy<=1) { int m=(rect().width()-2<rect().height())?rect().width()-2:rect().height(); - QRect r((rect().width()-m)/2,(rect().height()-m)/2,m,m); + TQRect r((rect().width()-m)/2,(rect().height()-m)/2,m,m); // if (isDown()) { r.moveBy(1,1); } - pufferPainter.drawPixmap(r, client_->icon().pixmap(QIconSet::Small, - QIconSet::Normal)); + pufferPainter.drawPixmap(r, client_->icon().pixmap(TQIconSet::Small, + TQIconSet::Normal)); }else{ // if (isDown()) { dx++; dy++; } - pufferPainter.drawPixmap((int)dx, (int)dy, client_->icon().pixmap(QIconSet::Small, - QIconSet::Normal)); + pufferPainter.drawPixmap((int)dx, (int)dy, client_->icon().pixmap(TQIconSet::Small, + TQIconSet::Normal)); } } else if (image && image->initialized()) { // otherwise we paint the deco dx = float(width() - image->image_width) / 2.0; dy = float(height() - image->image_height) / 2.0; - QImage *img=image->normal; + TQImage *img=image->normal; if (::factory->hovereffect) { @@ -274,17 +274,17 @@ void CrystalButton::drawButton(QPainter *painter) w=(int)((float)h*(float)image->image_width/(float)image->image_height); } - QRect r((rect().width()-w)/2,(rect().height()-h)/2,w,h); + TQRect r((rect().width()-w)/2,(rect().height()-h)/2,w,h); pufferPainter.drawImage(r,*img); if (type_ == ButtonMenu) drawMenuImage(&pufferPainter, r); }else{ // Otherwise we just paint it if (image->drawMode==1)dy=0; - pufferPainter.drawImage(QPoint((int)dx,(int)dy),*img); + pufferPainter.drawImage(TQPoint((int)dx,(int)dy),*img); if (type_ == ButtonMenu) drawMenuImage(&pufferPainter, - QRect((int)dx,(int)dy,image->image_width,image->image_height)); + TQRect((int)dx,(int)dy,image->image_width,image->image_height)); } } @@ -292,7 +292,7 @@ void CrystalButton::drawButton(QPainter *painter) painter->drawPixmap(0,0, pufferPixmap); } -void CrystalButton::drawMenuImage(QPainter* painter, QRect r) +void CrystalButton::drawMenuImage(TQPainter* painter, TQRect r) { if (type_ != ButtonMenu) return; // we paint the mini icon (which is 16 pixels high) @@ -304,12 +304,12 @@ void CrystalButton::drawMenuImage(QPainter* painter, QRect r) if (dx<1 || dy<=1) { int m=(r.width()-2<r.height())?r.width()-2:r.height(); - QRect r2(r.left()+(r.width()-m)/2,r.top()+(r.height()-m)/2,m,m); - painter->drawPixmap(r2, client_->icon().pixmap(QIconSet::Small, - QIconSet::Normal)); + TQRect r2(r.left()+(r.width()-m)/2,r.top()+(r.height()-m)/2,m,m); + painter->drawPixmap(r2, client_->icon().pixmap(TQIconSet::Small, + TQIconSet::Normal)); }else{ - painter->drawPixmap(r.left()+(int)dx, r.top()+(int)dy, client_->icon().pixmap(QIconSet::Small, - QIconSet::Normal)); + painter->drawPixmap(r.left()+(int)dx, r.top()+(int)dy, client_->icon().pixmap(TQIconSet::Small, + TQIconSet::Normal)); } } @@ -331,7 +331,7 @@ void CrystalButton::animate() animation_timer.stop(); } } - repaint(false); + tqrepaint(false); } #include "crystalbutton.moc" diff --git a/client/crystalbutton.h b/client/crystalbutton.h index c1f55c5..ad2cb95 100644 --- a/client/crystalbutton.h +++ b/client/crystalbutton.h @@ -23,35 +23,36 @@ #ifndef _CRYSTALBUTTON_INCLUDED_ #define _CRYSTALBUTTON_INCLUDED_ -#include <qbutton.h> +#include <tqbutton.h> class CrystalClient; class ButtonImage; -class CrystalButton : public QButton +class CrystalButton : public TQButton { Q_OBJECT + TQ_OBJECT public: - CrystalButton(CrystalClient *parent=0, const char *name=0, - const QString &tip=NULL, + CrystalButton(CrystalClient *tqparent=0, const char *name=0, + const TQString &tip=NULL, ButtonType type=ButtonHelp, ButtonImage *vimage=NULL); virtual ~CrystalButton(); void setBitmap(ButtonImage *newimage); - QSize sizeHint() const; + TQSize tqsizeHint() const; int lastMousePress() const { return lastmouse_; } - void reset() { repaint(false); } + void reset() { tqrepaint(false); } void setFirstLast(bool vfirst,bool vlast) { first|=vfirst; last|=vlast; } void resetSize(bool FullSize); private: - void enterEvent(QEvent *e); - void leaveEvent(QEvent *e); - void mousePressEvent(QMouseEvent *e); - void mouseReleaseEvent(QMouseEvent *e); - void drawButton(QPainter *painter); - void drawMenuImage(QPainter *painter, QRect r); + void enterEvent(TQEvent *e); + void leaveEvent(TQEvent *e); + void mousePressEvent(TQMouseEvent *e); + void mouseReleaseEvent(TQMouseEvent *e); + void drawButton(TQPainter *painter); + void drawMenuImage(TQPainter *painter, TQRect r); int buttonSizeH() const; int buttonSizeV() const; @@ -60,7 +61,7 @@ private slots: void animate(); private: - QTimer animation_timer; + TQTimer animation_timer; bool first,last; bool hover; float animation; diff --git a/client/crystalclient.cc b/client/crystalclient.cc index 5e8e533..d81db20 100644 --- a/client/crystalclient.cc +++ b/client/crystalclient.cc @@ -25,13 +25,13 @@ #include <klocale.h> #include <kdebug.h> -#include <qbitmap.h> -#include <qlabel.h> -#include <qpainter.h> -#include <qtooltip.h> -#include <qapplication.h> -#include <qimage.h> -#include <qpopupmenu.h> +#include <tqbitmap.h> +#include <tqlabel.h> +#include <tqpainter.h> +#include <tqtooltip.h> +#include <tqapplication.h> +#include <tqimage.h> +#include <tqpopupmenu.h> #include <kwin.h> #include <kprocess.h> @@ -48,7 +48,7 @@ CrystalFactory* factory=NULL; bool CrystalFactory::initialized_ = false; -Qt::AlignmentFlags CrystalFactory::titlealign_ = Qt::AlignHCenter; +TQt::AlignmentFlags CrystalFactory::titlealign_ = TQt::AlignHCenter; extern "C" KDecorationFactory* create_factory() @@ -60,17 +60,17 @@ extern "C" KDecorationFactory* create_factory() /***************** * Tooltip class for the titlebar **/ -class CCrystalTooltip:public QToolTip +class CCrystalTooltip:public TQToolTip { private: CrystalClient *client; public: - CCrystalTooltip(QWidget *widget,CrystalClient *vc):QToolTip(widget),client(vc) {} - virtual void maybeTip(const QPoint& p) + CCrystalTooltip(TQWidget *widget,CrystalClient *vc):TQToolTip(widget),client(vc) {} + virtual void maybeTip(const TQPoint& p) { - if (client->titlebar_->geometry().contains(p)) + if (client->titlebar_->tqgeometry().tqcontains(p)) { - tip(client->titlebar_->geometry(),client->caption()); + tip(client->titlebar_->tqgeometry(),client->caption()); } } }; @@ -87,7 +87,7 @@ CrystalFactory::CrystalFactory() readConfig(); initialized_ = true; - if (transparency)image_holder=new QImageHolder(active.userdefinedPicture,inactive.userdefinedPicture); + if (transparency)image_holder=new TQImageHolder(active.userdefinedPicture,inactive.userdefinedPicture); else image_holder=NULL; CreateButtonImages(); } @@ -117,9 +117,9 @@ bool CrystalFactory::reset(unsigned long /*changed*/) if (transparency) { - if (!image_holder)image_holder=new QImageHolder(active.userdefinedPicture,inactive.userdefinedPicture); + if (!image_holder)image_holder=new TQImageHolder(active.userdefinedPicture,inactive.userdefinedPicture); image_holder->setUserdefinedPictures(active.userdefinedPicture,inactive.userdefinedPicture); - image_holder->repaint(true); + image_holder->tqrepaint(true); }else{ if (image_holder)delete image_holder; image_holder=NULL; @@ -141,7 +141,7 @@ bool CrystalFactory::supports(Ability ability) } } -void setupOverlay(WND_CONFIG *cfg,int mode,QString filename) +void setupOverlay(WND_CONFIG *cfg,int mode,TQString filename) { cfg->overlay.resize(0,0); switch(mode) @@ -149,27 +149,27 @@ void setupOverlay(WND_CONFIG *cfg,int mode,QString filename) case 0: break; case 1:{ cfg->overlay.resize(0,0); - QImage img=QImage((uchar*)lighting_overlay_data,1,60,32,NULL,0,QImage::LittleEndian); + TQImage img=TQImage((uchar*)lighting_overlay_data,1,60,32,NULL,0,TQImage::LittleEndian); img.setAlphaBuffer(true); cfg->overlay.convertFromImage(img.smoothScale(256,::factory->titlesize)); break; } case 2:{ cfg->overlay.resize(0,0); - QImage img=QImage((uchar*)glass_overlay_data,20,64,32,NULL,0,QImage::LittleEndian); + TQImage img=TQImage((uchar*)glass_overlay_data,20,64,32,NULL,0,TQImage::LittleEndian); img.setAlphaBuffer(true); cfg->overlay.convertFromImage(img.smoothScale(256,::factory->titlesize)); break; } case 3:{ cfg->overlay.resize(0,0); - QImage img=QImage((uchar*)steel_overlay_data,28,64,32,NULL,0,QImage::LittleEndian); + TQImage img=TQImage((uchar*)steel_overlay_data,28,64,32,NULL,0,TQImage::LittleEndian); img.setAlphaBuffer(true); cfg->overlay.convertFromImage(img.smoothScale(256,::factory->titlesize)); break; } case 4:{ - QImage img; + TQImage img; if (img.load(filename)) { img.setAlphaBuffer(true); @@ -185,12 +185,12 @@ bool CrystalFactory::readConfig() // create a config object KConfig config("kwincrystalrc"); config.setGroup("General"); - QColor c; + TQColor c; - QString value = config.readEntry("TitleAlignment", "AlignHCenter"); - if (value == "AlignLeft") titlealign_ = Qt::AlignLeft; - else if (value == "AlignHCenter") titlealign_ = Qt::AlignHCenter; - else if (value == "AlignRight") titlealign_ = Qt::AlignRight; + TQString value = config.readEntry("TitleAlignment", "AlignHCenter"); + if (value == "AlignLeft") titlealign_ = TQt::AlignLeft; + else if (value == "AlignHCenter") titlealign_ = TQt::AlignHCenter; + else if (value == "AlignRight") titlealign_ = TQt::AlignRight; drawcaption=(bool)config.readBoolEntry("DrawCaption",true); textshadow=(bool)config.readBoolEntry("TextShadow",true); @@ -205,23 +205,23 @@ bool CrystalFactory::readConfig() inactive.amount=(double)config.readNumEntry("InactiveShade",-30)/100.0; active.outlineMode=(int)config.readNumEntry("ActiveFrame",1); inactive.outlineMode=(int)config.readNumEntry("InactiveFrame",1); - c=QColor(160,160,160); + c=TQColor(160,160,160); active.frameColor=config.readColorEntry("FrameColor1",&c); - c=QColor(128,128,128); + c=TQColor(128,128,128); inactive.frameColor=config.readColorEntry("FrameColor2",&c); active.inlineMode=(int)config.readNumEntry("ActiveInline",0); inactive.inlineMode=(int)config.readNumEntry("InactiveInline",0); - c=QColor(160,160,160); + c=TQColor(160,160,160); active.inlineColor=config.readColorEntry("InlineColor1",&c); - c=QColor(160,160,160); + c=TQColor(160,160,160); inactive.inlineColor=config.readColorEntry("InlineColor2",&c); active.blur=config.readNumEntry("ActiveBlur",0); inactive.blur=config.readNumEntry("InactiveBlur",0); - active.userdefinedPicture=QImage(); - inactive.userdefinedPicture=QImage(); + active.userdefinedPicture=TQImage(); + inactive.userdefinedPicture=TQImage(); if ((bool)config.readBoolEntry("ActiveUserdefined",false)) { active.userdefinedPicture.load(config.readEntry("ActiveUserdefinedPicture")); @@ -234,19 +234,19 @@ bool CrystalFactory::readConfig() borderwidth=config.readNumEntry("Borderwidth",5); titlesize=config.readNumEntry("Titlebarheight",21); - buttonColor_normal=QColor(255,255,255); + buttonColor_normal=TQColor(255,255,255); buttonColor_normal=config.readColorEntry("ButtonColor",&buttonColor_normal); buttonColor_hovered=config.readColorEntry("ButtonColor2",&buttonColor_normal); buttonColor_pressed=config.readColorEntry("ButtonColor3",&buttonColor_normal); - minColor_normal=QColor(255,255,255); + minColor_normal=TQColor(255,255,255); minColor_normal=config.readColorEntry("MinColor",&buttonColor_normal); minColor_hovered=config.readColorEntry("MinColor2",&buttonColor_normal); minColor_pressed=config.readColorEntry("MinColor3",&buttonColor_normal); - maxColor_normal=QColor(255,255,255); + maxColor_normal=TQColor(255,255,255); maxColor_normal=config.readColorEntry("MaxColor",&buttonColor_normal); maxColor_hovered=config.readColorEntry("MaxColor2",&buttonColor_normal); maxColor_pressed=config.readColorEntry("MaxColor3",&buttonColor_normal); - closeColor_normal=QColor(255,255,255); + closeColor_normal=TQColor(255,255,255); closeColor_normal=config.readColorEntry("CloseColor",&closeColor_normal); closeColor_hovered=config.readColorEntry("CloseColor2",&closeColor_normal); closeColor_pressed=config.readColorEntry("CloseColor3",&closeColor_normal); @@ -257,8 +257,8 @@ bool CrystalFactory::readConfig() animateHover=config.readBoolEntry("AnimateHover",true); tintButtons=config.readBoolEntry("TintButtons",false); menuImage=config.readBoolEntry("MenuImage",true); - repaintMode=config.readNumEntry("RepaintMode",1); - repaintTime=config.readNumEntry("RepaintTime",200); + tqrepaintMode=config.readNumEntry("RepaintMode",1); + tqrepaintTime=config.readNumEntry("RepaintTime",200); buttontheme=config.readNumEntry("ButtonTheme",8); @@ -269,7 +269,7 @@ bool CrystalFactory::readConfig() logoStretch=config.readNumEntry("LogoStretch",0); logoActive=config.readBoolEntry("LogoActive",0); logoDistance=config.readNumEntry("LogoDistance",0); - QString filename=config.readEntry("LogoFile",""); + TQString filename=config.readEntry("LogoFile",""); if (!filename.isNull() && logoEnabled!=1) { if (logo.load(filename)) @@ -289,7 +289,7 @@ void CrystalFactory::CreateButtonImages() { if (buttonImages[i])buttonImages[i]->reset(); else buttonImages[i]=new ButtonImage; - if (!tintButtons)buttonImages[i]->setColors(Qt::white,Qt::white,Qt::white); + if (!tintButtons)buttonImages[i]->setColors(TQt::white,TQt::white,TQt::white); else switch(i) { case ButtonImageMin: @@ -759,50 +759,50 @@ void CrystalClient::init() // for flicker-free redraws widget()->setBackgroundMode(NoBackground); - // setup layout - mainlayout = new QGridLayout(widget(), 4, 3); // 4x3 grid - titlelayout = new QHBoxLayout(); - titlebar_ = new QSpacerItem(1, ::factory->titlesize-1, QSizePolicy::Expanding, - QSizePolicy::Fixed); + // setup tqlayout + maintqlayout = new TQGridLayout(widget(), 4, 3); // 4x3 grid + titletqlayout = new TQHBoxLayout(); + titlebar_ = new TQSpacerItem(1, ::factory->titlesize-1, TQSizePolicy::Expanding, + TQSizePolicy::Fixed); - mainlayout->setResizeMode(QLayout::FreeResize); - mainlayout->setRowSpacing(0, (::factory->buttontheme==5)?0:1); - mainlayout->setRowSpacing(3, ::factory->borderwidth*1); + maintqlayout->setResizeMode(TQLayout::FreeResize); + maintqlayout->setRowSpacing(0, (::factory->buttontheme==5)?0:1); + maintqlayout->setRowSpacing(3, ::factory->borderwidth*1); - mainlayout->setColSpacing(2,borderSpacing()); - mainlayout->setColSpacing(0,borderSpacing()); - mainlayout->addLayout(titlelayout, 1, 1); + maintqlayout->setColSpacing(2,borderSpacing()); + maintqlayout->setColSpacing(0,borderSpacing()); + maintqlayout->addLayout(titletqlayout, 1, 1); if (isPreview()) { char c[512]; sprintf(c,"<center><b>Crystal %s Preview</b><br>Built: %s</center>",VERSION,__DATE__); - mainlayout->addItem(new QSpacerItem(1, 1,QSizePolicy::Expanding,QSizePolicy::Fixed), 0, 1); - mainlayout->addItem(new QSpacerItem(1, ::factory->borderwidth,QSizePolicy::Expanding,QSizePolicy::Expanding), 3, 1); - mainlayout->addWidget(new QLabel(i18n(c),widget()), 2, 1); + maintqlayout->addItem(new TQSpacerItem(1, 1,TQSizePolicy::Expanding,TQSizePolicy::Fixed), 0, 1); + maintqlayout->addItem(new TQSpacerItem(1, ::factory->borderwidth,TQSizePolicy::Expanding,TQSizePolicy::Expanding), 3, 1); + maintqlayout->addWidget(new TQLabel(i18n(c),widget()), 2, 1); } else { - mainlayout->addItem(new QSpacerItem(0, 0), 2, 1); + maintqlayout->addItem(new TQSpacerItem(0, 0), 2, 1); } - mainlayout->setRowStretch(2, 10); - mainlayout->setColStretch(1, 10); + maintqlayout->setRowStretch(2, 10); + maintqlayout->setColStretch(1, 10); updateMask(); for (int n=0; n<ButtonTypeCount; n++) button[n] = 0; - addButtons(titlelayout, options()->titleButtonsLeft()); - titlelayout->addItem(titlebar_); + addButtons(titletqlayout, options()->titleButtonsLeft()); + titletqlayout->addItem(titlebar_); { - CrystalButton* lastbutton=addButtons(titlelayout, options()->titleButtonsRight()); + CrystalButton* lastbutton=addButtons(titletqlayout, options()->titleButtonsRight()); if (lastbutton)lastbutton->setFirstLast(false,true); } if (::factory->captiontooltip) new CCrystalTooltip(widget(),this); - connect( this, SIGNAL( keepAboveChanged( bool )), SLOT( keepAboveChange( bool ))); - connect( this, SIGNAL( keepBelowChanged( bool )), SLOT( keepBelowChange( bool ))); + connect( this, TQT_SIGNAL( keepAboveChanged( bool )), TQT_SLOT( keepAboveChange( bool ))); + connect( this, TQT_SIGNAL( keepBelowChanged( bool )), TQT_SLOT( keepBelowChange( bool ))); - if (::factory->transparency)connect ( ::factory->image_holder,SIGNAL(repaintNeeded()),this,SLOT(Repaint())); - if (::factory->transparency)connect ( &timer,SIGNAL(timeout()),this,SLOT(Repaint())); + if (::factory->transparency)connect ( ::factory->image_holder,TQT_SIGNAL(tqrepaintNeeded()),this,TQT_SLOT(Repaint())); + if (::factory->transparency)connect ( &timer,TQT_SIGNAL(timeout()),this,TQT_SLOT(Repaint())); updateLayout(); } @@ -811,53 +811,53 @@ void CrystalClient::updateMask() { if ((::factory->roundCorners==0)|| (!options()->moveResizeMaximizedWindows() && maximizeMode() & MaximizeFull ) ) { - setMask(QRegion(widget()->rect())); + setMask(TQRegion(widget()->rect())); return; } int cornersFlag = ::factory->roundCorners; int r(width()); int b(height()); - QRegion mask; + TQRegion tqmask; - mask=QRegion(widget()->rect()); + tqmask=TQRegion(widget()->rect()); // Remove top-left corner. if(cornersFlag & TOP_LEFT) { - mask -= QRegion(0, 0, 5, 1); - mask -= QRegion(0, 1, 3, 1); - mask -= QRegion(0, 2, 2, 1); - mask -= QRegion(0, 3, 1, 2); + tqmask -= TQRegion(0, 0, 5, 1); + tqmask -= TQRegion(0, 1, 3, 1); + tqmask -= TQRegion(0, 2, 2, 1); + tqmask -= TQRegion(0, 3, 1, 2); } // Remove top-right corner. if(cornersFlag & TOP_RIGHT) { - mask -= QRegion(r - 5, 0, 5, 1); - mask -= QRegion(r - 3, 1, 3, 1); - mask -= QRegion(r - 2, 2, 2, 1); - mask -= QRegion(r - 1, 3, 1, 2); + tqmask -= TQRegion(r - 5, 0, 5, 1); + tqmask -= TQRegion(r - 3, 1, 3, 1); + tqmask -= TQRegion(r - 2, 2, 2, 1); + tqmask -= TQRegion(r - 1, 3, 1, 2); } // Remove bottom-left corner. if(cornersFlag & BOT_LEFT) { - mask -= QRegion(0, b - 5, 1, 3); - mask -= QRegion(0, b - 3, 2, 1); - mask -= QRegion(0, b - 2, 3, 1); - mask -= QRegion(0, b - 1, 5, 1); + tqmask -= TQRegion(0, b - 5, 1, 3); + tqmask -= TQRegion(0, b - 3, 2, 1); + tqmask -= TQRegion(0, b - 2, 3, 1); + tqmask -= TQRegion(0, b - 1, 5, 1); } // Remove bottom-right corner. if(cornersFlag & BOT_RIGHT) { - mask -= QRegion(r - 5, b - 1, 5, 1); - mask -= QRegion(r - 3, b - 2, 3, 1); - mask -= QRegion(r - 2, b - 3, 2, 1); - mask -= QRegion(r - 1, b - 5, 1, 2); + tqmask -= TQRegion(r - 5, b - 1, 5, 1); + tqmask -= TQRegion(r - 3, b - 2, 3, 1); + tqmask -= TQRegion(r - 2, b - 3, 2, 1); + tqmask -= TQRegion(r - 1, b - 5, 1, 2); } - setMask(mask); + setMask(tqmask); } -CrystalButton* CrystalClient::addButtons(QBoxLayout *layout, const QString& s) +CrystalButton* CrystalClient::addButtons(TQBoxLayout *tqlayout, const TQString& s) { ButtonImage *bitmap; - QString tip; + TQString tip; CrystalButton *lastone=NULL; if (s.length() > 0) @@ -869,7 +869,7 @@ CrystalButton* CrystalClient::addButtons(QBoxLayout *layout, const QString& s) case 'M': // Menu button if (!button[ButtonMenu]) { button[ButtonMenu] = current = new CrystalButton(this, "menu", i18n("Menu"), ButtonMenu, ::factory->buttonImages[ButtonImageMenu]); - connect(button[ButtonMenu], SIGNAL(pressed()), this, SLOT(menuButtonPressed())); + connect(button[ButtonMenu], TQT_SIGNAL(pressed()), this, TQT_SLOT(menuButtonPressed())); } break; @@ -883,7 +883,7 @@ CrystalButton* CrystalClient::addButtons(QBoxLayout *layout, const QString& s) tip = i18n("On All Desktops"); } button[ButtonSticky] =current=new CrystalButton(this, "sticky", tip,ButtonSticky, bitmap); - connect(button[ButtonSticky], SIGNAL(clicked()),this, SLOT(toggleOnAllDesktops())); + connect(button[ButtonSticky], TQT_SIGNAL(clicked()),this, TQT_SLOT(toggleOnAllDesktops())); } break; @@ -891,7 +891,7 @@ CrystalButton* CrystalClient::addButtons(QBoxLayout *layout, const QString& s) if (providesContextHelp()) { button[ButtonHelp] =current= new CrystalButton(this, "help", i18n("Help"),ButtonHelp, ::factory->buttonImages[ButtonImageHelp]); - connect(button[ButtonHelp], SIGNAL(clicked()),this, SLOT(showContextHelp())); + connect(button[ButtonHelp], TQT_SIGNAL(clicked()),this, TQT_SLOT(showContextHelp())); } break; @@ -899,7 +899,7 @@ CrystalButton* CrystalClient::addButtons(QBoxLayout *layout, const QString& s) if ((!button[ButtonMin]) && isMinimizable()) { button[ButtonMin] =current= new CrystalButton(this, "iconify", i18n("Minimize"),ButtonMin, ::factory->buttonImages[ButtonImageMin]); - connect(button[ButtonMin], SIGNAL(clicked()),this, SLOT(minButtonPressed())); + connect(button[ButtonMin], TQT_SIGNAL(clicked()),this, TQT_SLOT(minButtonPressed())); } break; @@ -907,7 +907,7 @@ CrystalButton* CrystalClient::addButtons(QBoxLayout *layout, const QString& s) if (!button[ButtonAbove]) { button[ButtonAbove] =current= new CrystalButton(this, "above", i18n("Keep Above Others"),ButtonAbove, ::factory->buttonImages[keepAbove()?ButtonImageUnAbove:ButtonImageAbove]); - connect(button[ButtonAbove], SIGNAL(clicked()),this, SLOT(aboveButtonPressed())); + connect(button[ButtonAbove], TQT_SIGNAL(clicked()),this, TQT_SLOT(aboveButtonPressed())); } break; @@ -915,7 +915,7 @@ CrystalButton* CrystalClient::addButtons(QBoxLayout *layout, const QString& s) if ((!button[ButtonBelow])) { button[ButtonBelow] =current= new CrystalButton(this, "below", i18n("Keep Below Others"),ButtonBelow, ::factory->buttonImages[keepBelow()?ButtonImageUnBelow:ButtonImageBelow]); - connect(button[ButtonBelow], SIGNAL(clicked()),this, SLOT(belowButtonPressed())); + connect(button[ButtonBelow], TQT_SIGNAL(clicked()),this, TQT_SLOT(belowButtonPressed())); } break; @@ -923,7 +923,7 @@ CrystalButton* CrystalClient::addButtons(QBoxLayout *layout, const QString& s) if ((!button[ButtonShade]) && isShadeable()) { button[ButtonShade] =current= new CrystalButton(this, "shade", i18n("Shade"),ButtonShade, ::factory->buttonImages[ButtonImageShade]); - connect(button[ButtonShade], SIGNAL(clicked()),this, SLOT(shadeButtonPressed())); + connect(button[ButtonShade], TQT_SIGNAL(clicked()),this, TQT_SLOT(shadeButtonPressed())); } break; @@ -940,7 +940,7 @@ CrystalButton* CrystalClient::addButtons(QBoxLayout *layout, const QString& s) } button[ButtonMax] =current= new CrystalButton(this, "maximize", tip,ButtonMax, bitmap); - connect(button[ButtonMax], SIGNAL(clicked()),this, SLOT(maxButtonPressed())); + connect(button[ButtonMax], TQT_SIGNAL(clicked()),this, TQT_SLOT(maxButtonPressed())); } break; @@ -948,20 +948,20 @@ CrystalButton* CrystalClient::addButtons(QBoxLayout *layout, const QString& s) if (isCloseable()) { button[ButtonClose] =current= new CrystalButton(this, "close", i18n("Close"),ButtonClose, ::factory->buttonImages[ButtonImageClose]); - connect(button[ButtonClose], SIGNAL(clicked()),this, SLOT(closeButtonPressed())); + connect(button[ButtonClose], TQT_SIGNAL(clicked()),this, TQT_SLOT(closeButtonPressed())); } break; case '_': // Spacer item - layout->addSpacing(4); + tqlayout->addSpacing(4); current=NULL; break; } if (current) { - layout->addWidget(current); - if (layout->findWidget(current)==0)current->setFirstLast(true,false); + tqlayout->addWidget(current); + if (tqlayout->tqfindWidget(current)==0)current->setFirstLast(true,false); } lastone=current; } @@ -972,12 +972,12 @@ CrystalButton* CrystalClient::addButtons(QBoxLayout *layout, const QString& s) void CrystalClient::activeChange() { Repaint(); - if (isActive()) ::factory->clients.at(::factory->clients.find(this)); + if (isActive()) ::factory->clients.at(::factory->clients.tqfind(this)); } void CrystalClient::captionChange() { - if (::factory->drawcaption) widget()->repaint(titlebar_->geometry(), false); + if (::factory->drawcaption) widget()->tqrepaint(titlebar_->tqgeometry(), false); } void CrystalClient::desktopChange() @@ -985,8 +985,8 @@ void CrystalClient::desktopChange() bool d = isOnAllDesktops(); if (button[ButtonSticky]) { button[ButtonSticky]->setBitmap(::factory->buttonImages[d ? ButtonImageSticky : ButtonImageUnSticky ]); - QToolTip::remove(button[ButtonSticky]); - QToolTip::add(button[ButtonSticky], d ? i18n("Not on all desktops") : i18n("On All Desktops")); + TQToolTip::remove(button[ButtonSticky]); + TQToolTip::add(button[ButtonSticky], d ? i18n("Not on all desktops") : i18n("On All Desktops")); } } @@ -1002,8 +1002,8 @@ void CrystalClient::maximizeChange() bool m = (maximizeMode() == MaximizeFull); if (button[ButtonMax]) { button[ButtonMax]->setBitmap(::factory->buttonImages[ m ? ButtonImageRestore : ButtonImageMax ]); - QToolTip::remove(button[ButtonMax]); - QToolTip::add(button[ButtonMax], m ? i18n("Restore") : i18n("Maximize")); + TQToolTip::remove(button[ButtonMax]); + TQToolTip::add(button[ButtonMax], m ? i18n("Restore") : i18n("Maximize")); } if (!options()->moveResizeMaximizedWindows()) @@ -1018,17 +1018,17 @@ void CrystalClient::updateLayout() { if (FullMax) { - mainlayout->setColSpacing(0,0); - mainlayout->setColSpacing(2,0); + maintqlayout->setColSpacing(0,0); + maintqlayout->setColSpacing(2,0); }else{ - mainlayout->setColSpacing(2,borderSpacing()); - mainlayout->setColSpacing(0,borderSpacing()); + maintqlayout->setColSpacing(2,borderSpacing()); + maintqlayout->setColSpacing(0,borderSpacing()); } - mainlayout->setRowSpacing(0, (FullMax||::factory->buttontheme==5)?0:1); + maintqlayout->setRowSpacing(0, (FullMax||::factory->buttontheme==5)?0:1); for (int i=0;i<ButtonTypeCount;i++)if (button[i]) button[i]->resetSize(FullMax); - widget()->layout()->activate(); + widget()->tqlayout()->activate(); } int CrystalClient::borderSpacing() @@ -1067,17 +1067,17 @@ void CrystalClient::borders(int &l, int &r, int &t, int &b) const } } -void CrystalClient::resize(const QSize &size) +void CrystalClient::resize(const TQSize &size) { widget()->resize(size); } -QSize CrystalClient::minimumSize() const +TQSize CrystalClient::tqminimumSize() const { - return widget()->minimumSize(); + return widget()->tqminimumSize(); } -KDecoration::Position CrystalClient::mousePosition(const QPoint &point) const +KDecoration::Position CrystalClient::mousePosition(const TQPoint &point) const { const int corner = 20; Position pos; @@ -1111,33 +1111,33 @@ KDecoration::Position CrystalClient::mousePosition(const QPoint &point) const return pos; } -bool CrystalClient::eventFilter(QObject *obj, QEvent *e) +bool CrystalClient::eventFilter(TQObject *obj, TQEvent *e) { - if (obj != widget()) return false; + if (TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(widget())) return false; switch (e->type()) { - case QEvent::MouseButtonDblClick: - mouseDoubleClickEvent(static_cast<QMouseEvent *>(e)); + case TQEvent::MouseButtonDblClick: + mouseDoubleClickEvent(TQT_TQMOUSEEVENT(e)); return true; - case QEvent::MouseButtonPress: - processMousePressEvent(static_cast<QMouseEvent *>(e)); + case TQEvent::MouseButtonPress: + processMousePressEvent(TQT_TQMOUSEEVENT(e)); return true; - case QEvent::Paint: - paintEvent(static_cast<QPaintEvent *>(e)); + case TQEvent::Paint: + paintEvent(TQT_TQPAINTEVENT(e)); return true; - case QEvent::Wheel: - mouseWheelEvent(static_cast<QWheelEvent *>(e)); + case TQEvent::Wheel: + mouseWheelEvent(TQT_TQWHEELEVENT(e)); return true; - case QEvent::Resize: - resizeEvent(static_cast<QResizeEvent *>(e)); + case TQEvent::Resize: + resizeEvent(TQT_TQRESIZEEVENT(e)); return true; - case QEvent::Show: - showEvent(static_cast<QShowEvent *>(e)); + case TQEvent::Show: + showEvent(TQT_TQSHOWEVENT(e)); return true; - case QEvent::Move: - moveEvent(static_cast<QMoveEvent *>(e)); + case TQEvent::Move: + moveEvent(TQT_TQMOVEEVENT(e)); return true; default:return false; } @@ -1147,53 +1147,53 @@ bool CrystalClient::eventFilter(QObject *obj, QEvent *e) void CrystalClient::ClientWindows(Window* v_frame,Window* v_wrapper,Window *v_client) { - Window root=0,frame=0,wrapper=0,client=0,parent=0,*children=NULL; + Window root=0,frame=0,wrapper=0,client=0,tqparent=0,*tqchildren=NULL; uint numc; if (v_frame) *v_frame=0; if (v_wrapper) *v_wrapper=0; if (v_client) *v_client=0; - // Our Deco is the child of a frame, get our parent - if (XQueryTree(qt_xdisplay(),widget()->winId(),&root,&frame,&children,&numc) == 0) + // Our Deco is the child of a frame, get our tqparent + if (XQueryTree(qt_xdisplay(),widget()->winId(),&root,&frame,&tqchildren,&numc) == 0) return; - if (children!=NULL)XFree(children); - children=NULL; + if (tqchildren!=NULL)XFree(tqchildren); + tqchildren=NULL; - // frame has two children, us and a wrapper, get the wrapper - if (XQueryTree(qt_xdisplay(),frame,&root,&parent,&children,&numc)==0) + // frame has two tqchildren, us and a wrapper, get the wrapper + if (XQueryTree(qt_xdisplay(),frame,&root,&tqparent,&tqchildren,&numc)==0) return; for (uint i=0;i<numc;i++) { - if (children[i]!=widget()->winId())wrapper=children[i]; + if (tqchildren[i]!=widget()->winId())wrapper=tqchildren[i]; } - if (children!=NULL)XFree(children); - children=NULL; + if (tqchildren!=NULL)XFree(tqchildren); + tqchildren=NULL; // wrapper has only one child, which is the client. We want this!! - if (XQueryTree(qt_xdisplay(),wrapper,&root,&parent,&children,&numc)==0) + if (XQueryTree(qt_xdisplay(),wrapper,&root,&tqparent,&tqchildren,&numc)==0) return; - if (numc==1)client=children[0]; - if (children!=NULL)XFree(children); - children=NULL; + if (numc==1)client=tqchildren[0]; + if (tqchildren!=NULL)XFree(tqchildren); + tqchildren=NULL; if (v_client) *v_client=client; if (v_wrapper) *v_wrapper=wrapper; if (v_frame) *v_frame=frame; } -void CrystalClient::mouseDoubleClickEvent(QMouseEvent *e) +void CrystalClient::mouseDoubleClickEvent(TQMouseEvent *e) { - if (/*(titlebar_->geometry().contains(e->pos()))&&*/(e->button()==LeftButton)) titlebarDblClickOperation(); + if (/*(titlebar_->tqgeometry().tqcontains(e->pos()))&&*/(e->button()==Qt::LeftButton)) titlebarDblClickOperation(); else { - QMouseEvent me(QEvent::MouseButtonPress,e->pos(),e->button(),e->state()); + TQMouseEvent me(TQEvent::MouseButtonPress,e->pos(),e->button(),e->state()); processMousePressEvent(&me); } } -void CrystalClient::mouseWheelEvent(QWheelEvent *e) +void CrystalClient::mouseWheelEvent(TQWheelEvent *e) { if (::factory->wheelTask) { - QPtrList <CrystalClient> *l=&(::factory->clients); + TQPtrList <CrystalClient> *l=&(::factory->clients); if (l->current()==NULL) for (unsigned int i=0;i<l->count();i++) if ((l->at(i))->isActive()) break; @@ -1229,34 +1229,34 @@ void CrystalClient::mouseWheelEvent(QWheelEvent *e) } } -void CrystalClient::paintEvent(QPaintEvent*) +void CrystalClient::paintEvent(TQPaintEvent*) { if (!CrystalFactory::initialized()) return; - QColorGroup group; - QPainter painter(widget()); + TQColorGroup group; + TQPainter painter(widget()); // draw the titlebar - group = options()->colorGroup(KDecoration::ColorTitleBar, isActive()); + group = options()->tqcolorGroup(KDecoration::ColorTitleBar, isActive()); WND_CONFIG* wndcfg=(isActive()?&::factory->active:&::factory->inactive); if (::factory->transparency && ::factory->trackdesktop) - ::factory->image_holder->repaint(false); // If other desktop than the last, regrab the root image - QPixmap *background=::factory->transparency?::factory->image_holder->image(isActive()):NULL; + ::factory->image_holder->tqrepaint(false); // If other desktop than the last, regrab the root image + TQPixmap *background=::factory->transparency?::factory->image_holder->image(isActive()):NULL; int drawFrame; { - QRect r; - QPoint p=widget()->mapToGlobal(QPoint(0,0)); + TQRect r; + TQPoint p=widget()->mapToGlobal(TQPoint(0,0)); int bl,br,bt,bb; borders(bl,br,bt,bb); - QPixmap pufferPixmap; + TQPixmap pufferPixmap; pufferPixmap.resize(widget()->width(), bt); - QPainter pufferPainter(&pufferPixmap); + TQPainter pufferPainter(&pufferPixmap); - r=QRect(p.x(),p.y(),widget()->width(),bt); - if (background && !background->isNull())pufferPainter.drawPixmap(QPoint(0,0),*background,r); + r=TQRect(p.x(),p.y(),widget()->width(),bt); + if (background && !background->isNull())pufferPainter.drawPixmap(TQPoint(0,0),*background,r); else { pufferPainter.fillRect(widget()->rect(),group.background()); @@ -1271,8 +1271,8 @@ void CrystalClient::paintEvent(QPaintEvent*) // draw title text pufferPainter.setFont(options()->font(isActive(), false)); - QColor color=options()->color(KDecoration::ColorFont, isActive()); - r=titlebar_->geometry(); + TQColor color=options()->color(KDecoration::ColorFont, isActive()); + r=titlebar_->tqgeometry(); r.moveBy(0,-1); int logowidth=::factory->logo.width()+::factory->logoDistance; if (::factory->logoEnabled!=1 && (isActive()||!::factory->logoActive)) @@ -1280,7 +1280,7 @@ void CrystalClient::paintEvent(QPaintEvent*) r.setWidth(r.width()-logowidth); if (::factory->logoEnabled==0)r.moveLeft(r.left()+logowidth); } - QFontMetrics metrics(options()->font(isActive(), false)); + TQFontMetrics metrics(options()->font(isActive(), false)); int textwidth=metrics.width(caption()); int textalign=CrystalFactory::titleAlign(); if (textwidth>r.width()) @@ -1313,7 +1313,7 @@ void CrystalClient::paintEvent(QPaintEvent*) } }else if (::factory->logoEnabled!=1 && (isActive()||!::factory->logoActive)) { int x=0; - r=titlebar_->geometry(); + r=titlebar_->tqgeometry(); if (::factory->logoEnabled==0) x=r.left(); if (::factory->logoEnabled==2) x=r.right()-::factory->logo.width(); pufferPainter.drawPixmap(x,(::factory->titlesize-::factory->logo.height())/2,::factory->logo); @@ -1332,24 +1332,24 @@ void CrystalClient::paintEvent(QPaintEvent*) if (background && !background->isNull()) { // Draw the side and bottom of the window with transparency // Left - r=QRect(p.x()+drawFrame,p.y()+bt,bl-drawFrame,widget()->height()-bt-drawFrame); - painter.drawPixmap(QPoint(drawFrame,bt),*background,r); + r=TQRect(p.x()+drawFrame,p.y()+bt,bl-drawFrame,widget()->height()-bt-drawFrame); + painter.drawPixmap(TQPoint(drawFrame,bt),*background,r); // Right - r=QRect(widget()->width()-br+p.x(),p.y()+bt,br-drawFrame,widget()->height()-bt-drawFrame); - painter.drawPixmap(QPoint(widget()->width()-br,bt),*background,r); + r=TQRect(widget()->width()-br+p.x(),p.y()+bt,br-drawFrame,widget()->height()-bt-drawFrame); + painter.drawPixmap(TQPoint(widget()->width()-br,bt),*background,r); // Bottom - r=QRect(p.x()+bl,p.y()+widget()->height()-bb,widget()->width()-bl-br,bb-drawFrame); - painter.drawPixmap(QPoint(bl,widget()->height()-bb),*background,r); + r=TQRect(p.x()+bl,p.y()+widget()->height()-bb,widget()->width()-bl-br,bb-drawFrame); + painter.drawPixmap(TQPoint(bl,widget()->height()-bb),*background,r); }else{ - r=QRect(drawFrame,bt,bl-drawFrame,widget()->height()-bt-drawFrame); + r=TQRect(drawFrame,bt,bl-drawFrame,widget()->height()-bt-drawFrame); painter.fillRect(r,group.background()); - r=QRect(widget()->width()-br,bt,br-drawFrame,widget()->height()-bt-drawFrame); + r=TQRect(widget()->width()-br,bt,br-drawFrame,widget()->height()-bt-drawFrame); painter.fillRect(r,group.background()); - r=QRect(bl,widget()->height()-bb,widget()->width()-bl-br,bb-drawFrame); + r=TQRect(bl,widget()->height()-bb,widget()->width()-bl-br,bb-drawFrame); painter.fillRect(r,group.background()); } } @@ -1383,14 +1383,14 @@ void CrystalClient::paintEvent(QPaintEvent*) // And notify image_holder that we need an update asap if (::factory)if (::factory->image_holder) // UnInit image_holder, on next Repaint it will be Init'ed again. - QTimer::singleShot(500,::factory->image_holder,SLOT(CheckSanity())); + TQTimer::singleShot(500,::factory->image_holder,TQT_SLOT(CheckSanity())); } if (drawFrame) { // outline the frame - QRect r=widget()->rect(); - QColor c1,c2; + TQRect r=widget()->rect(); + TQColor c1,c2; c1=c2=wndcfg->frameColor; if (wndcfg->outlineMode==2)c1=c1.dark(140),c2=c2.light(140); if (wndcfg->outlineMode==3)c1=c1.light(140),c2=c2.dark(140); @@ -1409,7 +1409,7 @@ void CrystalClient::paintEvent(QPaintEvent*) int r=(width()); int b=(height()); - // Draw edge of top-left corner inside the area removed by the mask. + // Draw edge of top-left corner inside the area removed by the tqmask. if(cornersFlag & TOP_LEFT) { painter.setPen(c1); painter.drawPoint(3, 1); @@ -1419,7 +1419,7 @@ void CrystalClient::paintEvent(QPaintEvent*) painter.drawPoint(1, 4); } - // Draw edge of top-right corner inside the area removed by the mask. + // Draw edge of top-right corner inside the area removed by the tqmask. if(cornersFlag & TOP_RIGHT) { painter.setPen(c1); painter.drawPoint(r - 5, 1); @@ -1429,7 +1429,7 @@ void CrystalClient::paintEvent(QPaintEvent*) painter.drawPoint(r - 2, 4); } - // Draw edge of bottom-left corner inside the area removed by the mask. + // Draw edge of bottom-left corner inside the area removed by the tqmask. if(cornersFlag & BOT_LEFT) { painter.setPen(c2); painter.drawPoint(1, b - 5); @@ -1439,7 +1439,7 @@ void CrystalClient::paintEvent(QPaintEvent*) painter.drawPoint(4, b - 2); } - // Draw edge of bottom-right corner inside the area removed by the mask. + // Draw edge of bottom-right corner inside the area removed by the tqmask. if(cornersFlag & BOT_RIGHT) { painter.setPen(c2); painter.drawPoint(r - 2, b - 5); @@ -1452,23 +1452,23 @@ void CrystalClient::paintEvent(QPaintEvent*) } } -void CrystalClient::resizeEvent(QResizeEvent *e) +void CrystalClient::resizeEvent(TQResizeEvent *e) { if (widget()->isShown()) { if (!::factory->transparency) ; - else if (::factory->repaintMode==1) + else if (::factory->tqrepaintMode==1) { if (!timer.isActive())timer.start(0,true); // Repaint(); } - // repaint only every xxx ms - else if (::factory->repaintMode==3 || !timer.isActive()) + // tqrepaint only every xxx ms + else if (::factory->tqrepaintMode==3 || !timer.isActive()) { // Repaint only, when mode!=fade || amount<100 WND_CONFIG* wnd=isActive()?&::factory->active:&::factory->inactive; if (wnd->mode!=0 || wnd->amount<100) - timer.start(::factory->repaintTime,true); + timer.start(::factory->tqrepaintTime,true); } } if (e->size()!=e->oldSize()) @@ -1477,27 +1477,27 @@ void CrystalClient::resizeEvent(QResizeEvent *e) } } -void CrystalClient::moveEvent(QMoveEvent *) +void CrystalClient::moveEvent(TQMoveEvent *) { if (widget()->isShown()) { if (!::factory->transparency) return; - else if (::factory->repaintMode==1) + else if (::factory->tqrepaintMode==1) { Repaint(); } - // repaint every xxx ms, so constant moving does not take too much CPU - else if (::factory->repaintMode==3 || !timer.isActive()) + // tqrepaint every xxx ms, so constant moving does not take too much CPU + else if (::factory->tqrepaintMode==3 || !timer.isActive()) { // Repaint only, when mode!=fade || value<100, because otherwise it is a plain color WND_CONFIG* wnd=isActive()?&::factory->active:&::factory->inactive; if (wnd->mode!=0 || wnd->amount<100) - timer.start(::factory->repaintTime,true); + timer.start(::factory->tqrepaintTime,true); } } } -void CrystalClient::showEvent(QShowEvent *) +void CrystalClient::showEvent(TQShowEvent *) { if (widget()->isShown()) Repaint(); @@ -1505,7 +1505,7 @@ void CrystalClient::showEvent(QShowEvent *) void CrystalClient::Repaint() { - widget()->repaint(false); + widget()->tqrepaint(false); for (int n=0; n<ButtonTypeCount; n++) if (button[n]) button[n]->reset(); } @@ -1516,10 +1516,10 @@ void CrystalClient::maxButtonPressed() { switch (button[ButtonMax]->lastMousePress()) { - case MidButton: + case Qt::MidButton: maximize(maximizeMode() ^ MaximizeVertical); break; - case RightButton: + case Qt::RightButton: maximize(maximizeMode() ^ MaximizeHorizontal); break; default: @@ -1532,11 +1532,11 @@ void CrystalClient::minButtonPressed() { if (button[ButtonMin]) { switch (button[ButtonMin]->lastMousePress()) { - case MidButton:{ + case Qt::MidButton:{ performWindowOperation(LowerOp); break; } - case RightButton: + case Qt::RightButton: if (isShadeable()) setShade(!isShade()); break; default: @@ -1575,7 +1575,7 @@ void CrystalClient::closeButtonPressed() { if (button[ButtonClose]) switch (button[ButtonClose]->lastMousePress()) { - case RightButton: + case Qt::RightButton: { Window frame,wrapper,client; char param[20]; @@ -1600,8 +1600,8 @@ void CrystalClient::shadeButtonPressed() { if (button[ButtonShade]) { switch (button[ButtonShade]->lastMousePress()) { - case MidButton: - case RightButton: + case Qt::MidButton: + case Qt::RightButton: break; default: if (isShadeable()) setShade(!isShade()); @@ -1613,11 +1613,11 @@ void CrystalClient::menuButtonPressed() { if (!button[ButtonMenu])return; - static QTime* t = 0; + static TQTime* t = 0; static CrystalClient* lastClient = 0; if (t == 0) - t = new QTime; - bool dbl = (lastClient == this && t->elapsed() <= QApplication::doubleClickInterval()); + t = new TQTime; + bool dbl = (lastClient == this && t->elapsed() <= TQApplication::doubleClickInterval()); lastClient = this; t->start(); @@ -1632,7 +1632,7 @@ void CrystalClient::menuButtonPressed() void CrystalClient::menuPopUp() { - QPoint p(button[ButtonMenu]->rect().bottomLeft().x(), + TQPoint p(button[ButtonMenu]->rect().bottomLeft().x(), button[ButtonMenu]->rect().bottomLeft().y()+2); KDecorationFactory* f = factory(); showWindowMenu(button[ButtonMenu]->mapToGlobal(p)); diff --git a/client/crystalclient.h b/client/crystalclient.h index 12b2bab..403a22f 100644 --- a/client/crystalclient.h +++ b/client/crystalclient.h @@ -27,22 +27,22 @@ #ifndef CRYSTALCLIENT_H #define CRYSTALCLIENT_H -#include <qlayout.h> +#include <tqlayout.h> #include <kdecoration.h> #include <kdecorationfactory.h> -#include <qtimer.h> -#include <qptrlist.h> +#include <tqtimer.h> +#include <tqptrlist.h> #include <X11/Xlib.h> -class QSpacerItem; -class QPoint; +class TQSpacerItem; +class TQPoint; class CrystalClient; class CrystalFactory; class CrystalButton; class CrystalTray; -class QImageHolder; +class TQImageHolder; class ButtonImage; extern CrystalFactory *factory; @@ -58,9 +58,9 @@ struct WND_CONFIG double amount; int outlineMode,inlineMode; - QColor frameColor,inlineColor; - QPixmap overlay; - QImage userdefinedPicture; // Userdefined background image, instead of wallpaper + TQColor frameColor,inlineColor; + TQPixmap overlay; + TQImage userdefinedPicture; // Userdefined background image, instead of wallpaper int blur; }; @@ -108,43 +108,44 @@ public: virtual bool supports(Ability ability); static bool initialized() { return initialized_; } - static Qt::AlignmentFlags titleAlign() { return titlealign_; } + static TQt::AlignmentFlags titleAlign() { return titlealign_; } public: - QImageHolder *image_holder; + TQImageHolder *image_holder; - QPixmap logo; + TQPixmap logo; int logoEnabled,logoStretch,logoActive,logoDistance; int titlesize; bool hovereffect,tintButtons,animateHover,menuImage,wheelTask; - QColor buttonColor_normal,buttonColor_hovered,buttonColor_pressed; - QColor minColor_normal,minColor_hovered,minColor_pressed; - QColor maxColor_normal,maxColor_hovered,maxColor_pressed; - QColor closeColor_normal,closeColor_hovered,closeColor_pressed; + TQColor buttonColor_normal,buttonColor_hovered,buttonColor_pressed; + TQColor minColor_normal,minColor_hovered,minColor_pressed; + TQColor maxColor_normal,maxColor_hovered,maxColor_pressed; + TQColor closeColor_normal,closeColor_hovered,closeColor_pressed; int borderwidth; bool drawcaption,textshadow,captiontooltip; bool trackdesktop,transparency; int roundCorners; - int repaintMode,repaintTime; + int tqrepaintMode,tqrepaintTime; WND_CONFIG active,inactive; int buttontheme; ButtonImage *buttonImages[ButtonImageCount]; - QPtrList <CrystalClient> clients; + TQPtrList <CrystalClient> clients; private: bool readConfig(); void CreateButtonImages(); private: static bool initialized_; - static Qt::AlignmentFlags titlealign_; + static TQt::AlignmentFlags titlealign_; }; class CrystalClient : public KDecoration { Q_OBJECT + TQ_OBJECT public: CrystalClient(KDecorationBridge *b,CrystalFactory *f); virtual ~CrystalClient(); @@ -159,24 +160,24 @@ public: virtual void shadeChange(); virtual void borders(int &l, int &r, int &t, int &b) const; - virtual void resize(const QSize &size); - virtual QSize minimumSize() const; - virtual Position mousePosition(const QPoint &point) const; + virtual void resize(const TQSize &size); + virtual TQSize tqminimumSize() const; + virtual Position mousePosition(const TQPoint &point) const; void ClientWindows(Window* frame,Window* wrapper,Window* client); private: - CrystalButton* addButtons(QBoxLayout* layout, const QString& buttons); + CrystalButton* addButtons(TQBoxLayout* tqlayout, const TQString& buttons); void updateMask(); int borderSpacing(); void updateLayout(); - bool eventFilter(QObject *obj, QEvent *e); - void mouseDoubleClickEvent(QMouseEvent *e); - void paintEvent(QPaintEvent *e); - void resizeEvent(QResizeEvent *); - void moveEvent(QMoveEvent *); - void showEvent(QShowEvent *); - void mouseWheelEvent(QWheelEvent *e); + bool eventFilter(TQObject *obj, TQEvent *e); + void mouseDoubleClickEvent(TQMouseEvent *e); + void paintEvent(TQPaintEvent *e); + void resizeEvent(TQResizeEvent *); + void moveEvent(TQMoveEvent *); + void showEvent(TQShowEvent *); + void mouseWheelEvent(TQWheelEvent *e); private slots: void Repaint(); @@ -193,12 +194,12 @@ private slots: void menuPopUp(); private: CrystalButton *button[ButtonTypeCount]; - QGridLayout *mainlayout; - QHBoxLayout *titlelayout; - QTimer timer; + TQGridLayout *maintqlayout; + TQHBoxLayout *titletqlayout; + TQTimer timer; public: bool FullMax; - QSpacerItem *titlebar_; + TQSpacerItem *titlebar_; }; #endif diff --git a/client/imageholder.cpp b/client/imageholder.cpp index c24844e..5b1007a 100644 --- a/client/imageholder.cpp +++ b/client/imageholder.cpp @@ -20,35 +20,35 @@ #include <kapp.h> -#include <qimage.h> +#include <tqimage.h> #include <kimageeffect.h> -#include <qapplication.h> -#include <qdesktopwidget.h> +#include <tqapplication.h> +#include <tqdesktopwidget.h> #include "imageholder.h" #include "crystalclient.h" -QImageHolder::QImageHolder(QImage act,QImage inact) +TQImageHolder::TQImageHolder(TQImage act,TQImage inact) :img_active(NULL),img_inactive(NULL) { rootpixmap=NULL; setUserdefinedPictures( act,inact); initialized=userdefinedActive && userdefinedInactive; - emit repaintNeeded(); + emit tqrepaintNeeded(); } -QImageHolder::~QImageHolder() +TQImageHolder::~TQImageHolder() { if (rootpixmap)delete rootpixmap; if (img_active && !userdefinedActive)delete img_active; if (img_inactive && !userdefinedInactive)delete img_inactive; } -void QImageHolder::setUserdefinedPictures( QImage act,QImage inact) +void TQImageHolder::setUserdefinedPictures( TQImage act,TQImage inact) { - int w=QApplication::desktop()->width(); - int h=QApplication::desktop()->height(); + int w=TQApplication::desktop()->width(); + int h=TQApplication::desktop()->height(); if (img_active && !userdefinedActive) { delete img_active; @@ -63,12 +63,12 @@ void QImageHolder::setUserdefinedPictures( QImage act,QImage inact) if (!act.isNull()) { act=act.smoothScale(w,h); - img_active=ApplyEffect(act,&::factory->active,factory->options()->colorGroup(KDecoration::ColorTitleBar, true)); + img_active=ApplyEffect(act,&::factory->active,factory->options()->tqcolorGroup(KDecoration::ColorTitleBar, true)); }else img_active=NULL; if (!inact.isNull()) { inact=inact.smoothScale(w,h); - img_inactive=ApplyEffect(inact,&::factory->inactive,factory->options()->colorGroup(KDecoration::ColorTitleBar, false)); + img_inactive=ApplyEffect(inact,&::factory->inactive,factory->options()->tqcolorGroup(KDecoration::ColorTitleBar, false)); }else img_inactive=NULL; userdefinedActive=(img_active!=NULL); @@ -77,31 +77,31 @@ void QImageHolder::setUserdefinedPictures( QImage act,QImage inact) CheckSanity(); } -void QImageHolder::Init() +void TQImageHolder::Init() { if (initialized)return; rootpixmap=new KMyRootPixmap(NULL/*,this*/); rootpixmap->start(); - rootpixmap->repaint(true); - connect( rootpixmap,SIGNAL(backgroundUpdated(const QImage*)),this, SLOT(BackgroundUpdated(const QImage*))); - connect(kapp, SIGNAL(backgroundChanged(int)),SLOT(handleDesktopChanged(int))); + rootpixmap->tqrepaint(true); + connect( rootpixmap,TQT_SIGNAL(backgroundUpdated(const TQImage*)),this, TQT_SLOT(BackgroundUpdated(const TQImage*))); + connect(kapp, TQT_SIGNAL(backgroundChanged(int)),TQT_SLOT(handleDesktopChanged(int))); initialized=true; } -void QImageHolder::repaint(bool force) +void TQImageHolder::tqrepaint(bool force) { Init(); - if (rootpixmap)rootpixmap->repaint(force); + if (rootpixmap)rootpixmap->tqrepaint(force); } -void QImageHolder::handleDesktopChanged(int) +void TQImageHolder::handleDesktopChanged(int) { - repaint(true); + tqrepaint(true); } -void QImageHolder::CheckSanity() +void TQImageHolder::CheckSanity() { if (!initialized)return; if (userdefinedActive && userdefinedInactive)return; @@ -114,13 +114,13 @@ void QImageHolder::CheckSanity() initialized=false; } -QPixmap* QImageHolder::ApplyEffect(QImage &src,WND_CONFIG* cfg,QColorGroup colorgroup) +TQPixmap* TQImageHolder::ApplyEffect(TQImage &src,WND_CONFIG* cfg,TQColorGroup colorgroup) { - QImage dst; + TQImage dst; switch(cfg->mode) { - case 0: if (cfg->amount>0.99)return new QPixmap(); + case 0: if (cfg->amount>0.99)return new TQPixmap(); dst=KImageEffect::fade(src, cfg->amount, colorgroup.background()); break; case 1:dst=KImageEffect::channelIntensity(src,cfg->amount,KImageEffect::All); @@ -139,10 +139,10 @@ QPixmap* QImageHolder::ApplyEffect(QImage &src,WND_CONFIG* cfg,QColorGroup color if (cfg->blur>0)dst=KImageEffect::blur(dst,0,cfg->blur); - return new QPixmap(dst); + return new TQPixmap(dst); } -void QImageHolder::BackgroundUpdated(const QImage *src) +void TQImageHolder::BackgroundUpdated(const TQImage *src) { if (img_active && !userdefinedActive) { @@ -157,15 +157,15 @@ void QImageHolder::BackgroundUpdated(const QImage *src) if (src && !src->isNull()) { - QImage tmp=src->copy(); + TQImage tmp=src->copy(); if (!userdefinedInactive) - img_inactive=ApplyEffect(tmp,&::factory->inactive,factory->options()->colorGroup(KDecoration::ColorTitleBar, false)); + img_inactive=ApplyEffect(tmp,&::factory->inactive,factory->options()->tqcolorGroup(KDecoration::ColorTitleBar, false)); tmp=src->copy(); if (!userdefinedActive) - img_active=ApplyEffect(tmp,&::factory->active,factory->options()->colorGroup(KDecoration::ColorTitleBar, true)); + img_active=ApplyEffect(tmp,&::factory->active,factory->options()->tqcolorGroup(KDecoration::ColorTitleBar, true)); } - emit repaintNeeded(); + emit tqrepaintNeeded(); } diff --git a/client/imageholder.h b/client/imageholder.h index b88ac87..e41e000 100644 --- a/client/imageholder.h +++ b/client/imageholder.h @@ -28,34 +28,35 @@ struct WND_CONFIG; -class QImageHolder:public QObject +class TQImageHolder:public TQObject { Q_OBJECT + TQ_OBJECT public: - QImageHolder(QImage act,QImage inact); - virtual ~QImageHolder(); + TQImageHolder(TQImage act,TQImage inact); + virtual ~TQImageHolder(); void Init(); - QPixmap *image(bool active) { Init(); return active?img_active:img_inactive; } - void repaint(bool force); + TQPixmap *image(bool active) { Init(); return active?img_active:img_inactive; } + void tqrepaint(bool force); - void setUserdefinedPictures(QImage act,QImage inact); + void setUserdefinedPictures(TQImage act,TQImage inact); private: bool initialized; KMyRootPixmap *rootpixmap; - QPixmap *img_active,*img_inactive; + TQPixmap *img_active,*img_inactive; bool userdefinedActive,userdefinedInactive; - QPixmap* ApplyEffect(QImage &src,WND_CONFIG* cfg,QColorGroup colorgroup); + TQPixmap* ApplyEffect(TQImage &src,WND_CONFIG* cfg,TQColorGroup colorgroup); public slots: - void BackgroundUpdated(const QImage *); + void BackgroundUpdated(const TQImage *); void handleDesktopChanged(int desk); void CheckSanity(); signals: - void repaintNeeded(); + void tqrepaintNeeded(); }; diff --git a/client/myrootpixmap.cc b/client/myrootpixmap.cc index 9412256..792e474 100644 --- a/client/myrootpixmap.cc +++ b/client/myrootpixmap.cc @@ -12,12 +12,12 @@ /* Modified by Sascha Hlusiak */ -#include <qwidget.h> -#include <qtimer.h> -#include <qrect.h> -#include <qimage.h> +#include <tqwidget.h> +#include <tqtimer.h> +#include <tqrect.h> +#include <tqimage.h> -#ifndef Q_WS_QWS //FIXME +#ifndef TQ_WS_TQWS //FIXME #include <kapplication.h> #include <kimageeffect.h> #include <kpixmapio.h> @@ -25,21 +25,21 @@ #include <kdebug.h> #include <netwm.h> #include <dcopclient.h> -#include <qpainter.h> +#include <tqpainter.h> #include <ksharedpixmap.h> #include "myrootpixmap.h" -KMyRootPixmap::KMyRootPixmap( QWidget * widget, const char *name ) - : QObject(widget, name ? name : "KMyRootPixmap" ) +KMyRootPixmap::KMyRootPixmap( TQWidget * widget, const char *name ) + : TQObject(widget, name ? name : "KMyRootPixmap" ) { init(); } -KMyRootPixmap::KMyRootPixmap( QWidget *, QObject *parent, const char *name ) - : QObject( parent, name ? name : "KMyRootPixmap" ) +KMyRootPixmap::KMyRootPixmap( TQWidget *, TQObject *tqparent, const char *name ) + : TQObject( tqparent, name ? name : "KMyRootPixmap" ) { init(); } @@ -49,17 +49,17 @@ void KMyRootPixmap::init() // d = new KMyRootPixmapData; // m_Fade = 0; m_pPixmap = new KSharedPixmap; -// m_pTimer = new QTimer( this ); +// m_pTimer = new TQTimer( this ); m_bInit = false; m_bActive = false; m_Desk=-1; // m_bCustomPaint = false; -// connect(kapp, SIGNAL(backgroundChanged(int)), SLOT(slotBackgroundChanged(int))); - connect(m_pPixmap, SIGNAL(done(bool)), SLOT(slotDone(bool))); -// connect(m_pTimer, SIGNAL(timeout()), SLOT(repaint())); +// connect(kapp, TQT_SIGNAL(backgroundChanged(int)), TQT_SLOT(slotBackgroundChanged(int))); + connect(m_pPixmap, TQT_SIGNAL(done(bool)), TQT_SLOT(slotDone(bool))); +// connect(m_pTimer, TQT_SIGNAL(timeout()), TQT_SLOT(tqrepaint())); -// d->toplevel = m_pWidget->topLevelWidget(); +// d->toplevel = m_pWidget->tqtopLevelWidget(); // d->toplevel->installEventFilter(this); } @@ -85,7 +85,7 @@ void KMyRootPixmap::start() enableExports(); return; // if (m_bInit) -// repaint(true); +// tqrepaint(true); } void KMyRootPixmap::stop() @@ -95,14 +95,14 @@ void KMyRootPixmap::stop() } -void KMyRootPixmap::repaint() +void KMyRootPixmap::tqrepaint() { - repaint(false); + tqrepaint(false); } -void KMyRootPixmap::repaint(bool force) +void KMyRootPixmap::tqrepaint(bool force) { -// printf("KMyRootPixmap::repaint(%s)\n",force?"true":"false"); +// printf("KMyRootPixmap::tqrepaint(%s)\n",force?"true":"false"); if ((!force) && (m_Desk==currentDesktop()))return; m_Desk = currentDesktop(); @@ -122,14 +122,14 @@ bool KMyRootPixmap::isAvailable() return m_pPixmap->isAvailable(pixmapName(m_Desk)); } -QString KMyRootPixmap::pixmapName(int desk) +TQString KMyRootPixmap::pixmapName(int desk) { - QString pattern = QString("DESKTOP%1"); + TQString pattern = TQString("DESKTOP%1"); int screen_number = DefaultScreen(qt_xdisplay()); if (screen_number) { - pattern = QString("SCREEN%1-DESKTOP").arg(screen_number) + "%1"; + pattern = TQString("SCREEN%1-DESKTOP").tqarg(screen_number) + "%1"; } - return pattern.arg( desk ); + return pattern.tqarg( desk ); } @@ -139,11 +139,11 @@ void KMyRootPixmap::enableExports() DCOPClient *client = kapp->dcopClient(); if (!client->isAttached()) client->attach(); - QByteArray data; - QDataStream args( data, IO_WriteOnly ); + TQByteArray data; + TQDataStream args( data, IO_WriteOnly ); args << 1; - QCString appname( "kdesktop" ); + TQCString appname( "kdesktop" ); int screen_number = DefaultScreen(qt_xdisplay()); if ( screen_number ) appname.sprintf("kdesktop-screen-%d", screen_number ); @@ -169,29 +169,29 @@ void KMyRootPixmap::slotDone(bool success) void KMyRootPixmap::updateBackground( KSharedPixmap *spm ) { // printf("KMyRootPixmap::updateBackground(%p)\n",spm); - QPixmap *px=spm; + TQPixmap *px=spm; if (px->isNull() || px->width()==0 || px->height()==0) { // This is NOT an image, something went wrong, update to plain emit backgroundUpdated(NULL); return; } KPixmapIO io; - QSize desktopsize(QApplication::desktop()->width(),QApplication::desktop()->height()); + TQSize desktopsize(TQApplication::desktop()->width(),TQApplication::desktop()->height()); if (px->rect().size()==desktopsize) { // Image has already the right dimension, make a quick update - QImage img = io.convertToImage(*spm); + TQImage img = io.convertToImage(*spm); emit backgroundUpdated(&img); return; }else{ // we need to create a tiled pixmap and then the image to update - QPixmap pix(desktopsize,spm->depth()); - QPainter pufferPainter(&pix); + TQPixmap pix(desktopsize,spm->TQPixmap::depth()); + TQPainter pufferPainter(&pix); pufferPainter.drawTiledPixmap(pix.rect(),*spm); pufferPainter.end(); - QImage img=io.convertToImage(pix); + TQImage img=io.convertToImage(pix); emit backgroundUpdated(&img); } } diff --git a/client/myrootpixmap.h b/client/myrootpixmap.h index dc0b72c..9f3ac6f 100644 --- a/client/myrootpixmap.h +++ b/client/myrootpixmap.h @@ -14,25 +14,26 @@ #ifndef __KRootPixmap_h_Included__ #define __KRootPixmap_h_Included__ -#include <qobject.h> -#include <qcolor.h> +#include <tqobject.h> +#include <tqcolor.h> -#ifndef Q_WS_QWS //FIXME +#ifndef TQ_WS_TQWS //FIXME -class QRect; -class QWidget; -class QTimer; +class TQRect; +class TQWidget; +class TQTimer; class KSharedPixmap; class KMyRootPixmapData; -class KMyRootPixmap: public QObject +class KMyRootPixmap: public TQObject { Q_OBJECT + TQ_OBJECT public: - KMyRootPixmap( QWidget *target=NULL, const char *name=0 ); + KMyRootPixmap( TQWidget *target=NULL, const char *name=0 ); - KMyRootPixmap( QWidget *target, QObject *parent, const char *name=0 ); + KMyRootPixmap( TQWidget *target, TQObject *tqparent, const char *name=0 ); virtual ~KMyRootPixmap(); @@ -54,23 +55,23 @@ public slots: virtual void stop(); -// void setFadeEffect(double strength, const QColor &color); +// void setFadeEffect(double strength, const TQColor &color); - void repaint( bool force ); + void tqrepaint( bool force ); - void repaint(); + void tqrepaint(); // void setCustomPainting( bool enable ) { m_bCustomPaint = enable; } void enableExports(); - static QString pixmapName(int desk); + static TQString pixmapName(int desk); signals: - void backgroundUpdated( const QImage *pm ); + void backgroundUpdated( const TQImage *pm ); protected: -// virtual bool eventFilter(QObject *, QEvent *); +// virtual bool eventFilter(TQObject *, TQEvent *); virtual void updateBackground( KSharedPixmap * ); @@ -83,16 +84,16 @@ private: int m_Desk; // double m_Fade; -// QColor m_FadeColor; +// TQColor m_FadeColor; - QRect m_Rect; -// QWidget *m_pWidget; -// QTimer *m_pTimer; + TQRect m_Rect; +// TQWidget *m_pWidget; +// TQTimer *m_pTimer; KSharedPixmap *m_pPixmap; // KMyRootPixmapData *d; void init(); }; -#endif // ! Q_WS_QWS +#endif // ! TQ_WS_TQWS #endif // __KRootPixmap_h_Included__ |