Rename a number of old tq methods that are no longer tq specific

pull/1/head
Timothy Pearson 13 years ago
parent db9e36b986
commit 7b745a9472

@ -64,7 +64,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>16</height> <height>16</height>
@ -90,7 +90,7 @@
<string></string> <string></string>
</property> </property>
<property name="whatsThis" stdset="0"> <property name="whatsThis" stdset="0">
<string>Use these buttons to set the tqalignment of the window title</string> <string>Use these buttons to set the alignment of the window title</string>
</property> </property>
<vbox> <vbox>
<property name="name"> <property name="name">
@ -236,7 +236,7 @@
<property name="title"> <property name="title">
<string>Round &amp;Corners</string> <string>Round &amp;Corners</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignHCenter</set> <set>AlignHCenter</set>
</property> </property>
<grid> <grid>
@ -253,7 +253,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>
@ -305,7 +305,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Preferred</enum> <enum>Preferred</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>10</width> <width>10</width>
<height>20</height> <height>20</height>
@ -357,7 +357,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Preferred</enum> <enum>Preferred</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>10</width> <width>10</width>
<height>20</height> <height>20</height>
@ -497,7 +497,7 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>80</width> <width>80</width>
<height>0</height> <height>0</height>
@ -580,7 +580,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>
@ -1300,7 +1300,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>16</height> <height>16</height>
@ -1429,7 +1429,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>50</height> <height>50</height>
@ -1588,7 +1588,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>16</height> <height>16</height>
@ -1697,7 +1697,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>
@ -1889,13 +1889,13 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>30</width> <width>30</width>
<height>30</height> <height>30</height>
</size> </size>
</property> </property>
<property name="tqmaximumSize"> <property name="maximumSize">
<size> <size>
<width>30</width> <width>30</width>
<height>30</height> <height>30</height>
@ -1939,7 +1939,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>30</height> <height>30</height>
@ -2047,7 +2047,7 @@
<property name="text"> <property name="text">
<string>Lets you put an transparent image on top of the title bar.</string> <string>Lets you put an transparent image on top of the title bar.</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>
@ -2066,7 +2066,7 @@
<property name="text"> <property name="text">
<string>User defined should be a transparent png file, i.e. 1x64px</string> <string>User defined should be a transparent png file, i.e. 1x64px</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>
@ -2080,7 +2080,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>40</height> <height>40</height>

@ -54,13 +54,13 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
<property name="tqmaximumSize"> <property name="maximumSize">
<size> <size>
<width>32767</width> <width>32767</width>
<height>20</height> <height>20</height>
@ -78,7 +78,7 @@
<property name="title"> <property name="title">
<string>About:</string> <string>About:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
<property name="flat"> <property name="flat">
@ -109,7 +109,7 @@ You may look for the most recent version at kde-look.org:</string>
<property name="textFormat"> <property name="textFormat">
<enum>PlainText</enum> <enum>PlainText</enum>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignTop|AlignLeft</set> <set>AlignTop|AlignLeft</set>
</property> </property>
</widget> </widget>
@ -158,13 +158,13 @@ You may look for the most recent version at kde-look.org:</string>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
<property name="tqmaximumSize"> <property name="maximumSize">
<size> <size>
<width>32767</width> <width>32767</width>
<height>20</height> <height>20</height>
@ -182,7 +182,7 @@ You may look for the most recent version at kde-look.org:</string>
<property name="title"> <property name="title">
<string>Usage:</string> <string>Usage:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
<property name="flat"> <property name="flat">
@ -216,7 +216,7 @@ You may look for the most recent version at kde-look.org:</string>
<property name="textFormat"> <property name="textFormat">
<enum>PlainText</enum> <enum>PlainText</enum>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignLeft</set> <set>AlignVCenter|AlignLeft</set>
</property> </property>
</widget> </widget>

@ -59,10 +59,10 @@ void CrystalButton::resetSize(bool FullSize)
void CrystalButton::setBitmap(ButtonImage *newimage) void CrystalButton::setBitmap(ButtonImage *newimage)
{ {
image=newimage; image=newimage;
tqrepaint(false); repaint(false);
} }
TQSize CrystalButton::tqsizeHint() const TQSize CrystalButton::sizeHint() const
{ {
return TQSize(buttonSizeH(),buttonSizeV()); return TQSize(buttonSizeH(),buttonSizeV());
} }
@ -88,7 +88,7 @@ int CrystalButton::buttonSizeV() const
void CrystalButton::enterEvent(TQEvent *e) void CrystalButton::enterEvent(TQEvent *e)
{ {
hover=true; hover=true;
if (factory->hovereffect)tqrepaint(false); if (factory->hovereffect)repaint(false);
if (factory->animateHover)animation_timer.start(60); if (factory->animateHover)animation_timer.start(60);
TQButton::enterEvent(e); TQButton::enterEvent(e);
} }
@ -96,7 +96,7 @@ void CrystalButton::enterEvent(TQEvent *e)
void CrystalButton::leaveEvent(TQEvent *e) void CrystalButton::leaveEvent(TQEvent *e)
{ {
hover=false; hover=false;
if (factory->hovereffect)tqrepaint(false); if (factory->hovereffect)repaint(false);
if (factory->animateHover)animation_timer.start(80); if (factory->animateHover)animation_timer.start(80);
TQButton::leaveEvent(e); TQButton::leaveEvent(e);
} }
@ -177,7 +177,7 @@ void CrystalButton::drawButton(TQPainter *painter)
pufferPainter.drawPixmap(TQPoint(0,0),*background,r); pufferPainter.drawPixmap(TQPoint(0,0),*background,r);
}else{ }else{
group = client_->options()->tqcolorGroup(KDecoration::ColorTitleBar, client_->isActive()); group = client_->options()->colorGroup(KDecoration::ColorTitleBar, client_->isActive());
pufferPainter.fillRect(rect(), group.background()); pufferPainter.fillRect(rect(), group.background());
} }
@ -331,7 +331,7 @@ void CrystalButton::animate()
animation_timer.stop(); animation_timer.stop();
} }
} }
tqrepaint(false); repaint(false);
} }
#include "crystalbutton.moc" #include "crystalbutton.moc"

@ -41,9 +41,9 @@ public:
virtual ~CrystalButton(); virtual ~CrystalButton();
void setBitmap(ButtonImage *newimage); void setBitmap(ButtonImage *newimage);
TQSize tqsizeHint() const; TQSize sizeHint() const;
int lastMousePress() const { return lastmouse_; } int lastMousePress() const { return lastmouse_; }
void reset() { tqrepaint(false); } void reset() { repaint(false); }
void setFirstLast(bool vfirst,bool vlast) { first|=vfirst; last|=vlast; } void setFirstLast(bool vfirst,bool vlast) { first|=vfirst; last|=vlast; }
void resetSize(bool FullSize); void resetSize(bool FullSize);
private: private:

@ -71,9 +71,9 @@ public:
CCrystalTooltip(TQWidget *widget,CrystalClient *vc):TQToolTip(widget),client(vc) {} CCrystalTooltip(TQWidget *widget,CrystalClient *vc):TQToolTip(widget),client(vc) {}
virtual void maybeTip(const TQPoint& p) virtual void maybeTip(const TQPoint& p)
{ {
if (client->titlebar_->tqgeometry().contains(p)) if (client->titlebar_->geometry().contains(p))
{ {
tip(client->titlebar_->tqgeometry(),client->caption()); tip(client->titlebar_->geometry(),client->caption());
} }
} }
}; };
@ -122,7 +122,7 @@ bool CrystalFactory::reset(unsigned long /*changed*/)
{ {
if (!image_holder)image_holder=new QImageHolder(active.userdefinedPicture,inactive.userdefinedPicture); if (!image_holder)image_holder=new QImageHolder(active.userdefinedPicture,inactive.userdefinedPicture);
image_holder->setUserdefinedPictures(active.userdefinedPicture,inactive.userdefinedPicture); image_holder->setUserdefinedPictures(active.userdefinedPicture,inactive.userdefinedPicture);
image_holder->tqrepaint(true); image_holder->repaint(true);
}else{ }else{
if (image_holder)delete image_holder; if (image_holder)delete image_holder;
image_holder=NULL; image_holder=NULL;
@ -762,40 +762,40 @@ void CrystalClient::init()
// for flicker-free redraws // for flicker-free redraws
widget()->setBackgroundMode(NoBackground); widget()->setBackgroundMode(NoBackground);
// setup tqlayout // setup layout
maintqlayout = new TQGridLayout(widget(), 4, 3); // 4x3 grid mainlayout = new TQGridLayout(widget(), 4, 3); // 4x3 grid
titletqlayout = new TQHBoxLayout(); titlelayout = new TQHBoxLayout();
titlebar_ = new TQSpacerItem(1, ::factory->titlesize-1, TQSizePolicy::Expanding, titlebar_ = new TQSpacerItem(1, ::factory->titlesize-1, TQSizePolicy::Expanding,
TQSizePolicy::Fixed); TQSizePolicy::Fixed);
maintqlayout->setResizeMode(TQLayout::FreeResize); mainlayout->setResizeMode(TQLayout::FreeResize);
maintqlayout->setRowSpacing(0, (::factory->buttontheme==5)?0:1); mainlayout->setRowSpacing(0, (::factory->buttontheme==5)?0:1);
maintqlayout->setRowSpacing(3, ::factory->borderwidth*1); mainlayout->setRowSpacing(3, ::factory->borderwidth*1);
maintqlayout->setColSpacing(2,borderSpacing()); mainlayout->setColSpacing(2,borderSpacing());
maintqlayout->setColSpacing(0,borderSpacing()); mainlayout->setColSpacing(0,borderSpacing());
maintqlayout->addLayout(titletqlayout, 1, 1); mainlayout->addLayout(titlelayout, 1, 1);
if (isPreview()) { if (isPreview()) {
char c[512]; char c[512];
sprintf(c,"<center><b>Crystal %s Preview</b><br>Built: %s</center>",VERSION,__DATE__); sprintf(c,"<center><b>Crystal %s Preview</b><br>Built: %s</center>",VERSION,__DATE__);
maintqlayout->addItem(new TQSpacerItem(1, 1,TQSizePolicy::Expanding,TQSizePolicy::Fixed), 0, 1); mainlayout->addItem(new TQSpacerItem(1, 1,TQSizePolicy::Expanding,TQSizePolicy::Fixed), 0, 1);
maintqlayout->addItem(new TQSpacerItem(1, ::factory->borderwidth,TQSizePolicy::Expanding,TQSizePolicy::Expanding), 3, 1); mainlayout->addItem(new TQSpacerItem(1, ::factory->borderwidth,TQSizePolicy::Expanding,TQSizePolicy::Expanding), 3, 1);
maintqlayout->addWidget(new TQLabel(i18n(c),widget()), 2, 1); mainlayout->addWidget(new TQLabel(i18n(c),widget()), 2, 1);
} else { } else {
maintqlayout->addItem(new TQSpacerItem(0, 0), 2, 1); mainlayout->addItem(new TQSpacerItem(0, 0), 2, 1);
} }
maintqlayout->setRowStretch(2, 10); mainlayout->setRowStretch(2, 10);
maintqlayout->setColStretch(1, 10); mainlayout->setColStretch(1, 10);
updateMask(); updateMask();
for (int n=0; n<ButtonTypeCount; n++) button[n] = 0; for (int n=0; n<ButtonTypeCount; n++) button[n] = 0;
addButtons(titletqlayout, options()->titleButtonsLeft()); addButtons(titlelayout, options()->titleButtonsLeft());
titletqlayout->addItem(titlebar_); titlelayout->addItem(titlebar_);
{ {
CrystalButton* lastbutton=addButtons(titletqlayout, options()->titleButtonsRight()); CrystalButton* lastbutton=addButtons(titlelayout, options()->titleButtonsRight());
if (lastbutton)lastbutton->setFirstLast(false,true); if (lastbutton)lastbutton->setFirstLast(false,true);
} }
@ -873,7 +873,7 @@ bool CrystalClient::isModalSystemNotification()
return FALSE; return FALSE;
} }
CrystalButton* CrystalClient::addButtons(TQBoxLayout *tqlayout, const TQString& s) CrystalButton* CrystalClient::addButtons(TQBoxLayout *layout, const TQString& s)
{ {
ButtonImage *bitmap; ButtonImage *bitmap;
TQString tip; TQString tip;
@ -976,15 +976,15 @@ CrystalButton* CrystalClient::addButtons(TQBoxLayout *tqlayout, const TQString&
break; break;
case '_': // Spacer item case '_': // Spacer item
tqlayout->addSpacing(4); layout->addSpacing(4);
current=NULL; current=NULL;
break; break;
} }
if (current) if (current)
{ {
tqlayout->addWidget(current); layout->addWidget(current);
if (tqlayout->findWidget(current)==0)current->setFirstLast(true,false); if (layout->findWidget(current)==0)current->setFirstLast(true,false);
} }
lastone=current; lastone=current;
} }
@ -1000,7 +1000,7 @@ void CrystalClient::activeChange()
void CrystalClient::captionChange() void CrystalClient::captionChange()
{ {
if (::factory->drawcaption) widget()->tqrepaint(titlebar_->tqgeometry(), false); if (::factory->drawcaption) widget()->repaint(titlebar_->geometry(), false);
} }
void CrystalClient::desktopChange() void CrystalClient::desktopChange()
@ -1041,17 +1041,17 @@ void CrystalClient::updateLayout()
{ {
if (FullMax) if (FullMax)
{ {
maintqlayout->setColSpacing(0,0); mainlayout->setColSpacing(0,0);
maintqlayout->setColSpacing(2,0); mainlayout->setColSpacing(2,0);
}else{ }else{
maintqlayout->setColSpacing(2,borderSpacing()); mainlayout->setColSpacing(2,borderSpacing());
maintqlayout->setColSpacing(0,borderSpacing()); mainlayout->setColSpacing(0,borderSpacing());
} }
maintqlayout->setRowSpacing(0, (FullMax||::factory->buttontheme==5)?0:1); mainlayout->setRowSpacing(0, (FullMax||::factory->buttontheme==5)?0:1);
for (int i=0;i<ButtonTypeCount;i++)if (button[i]) for (int i=0;i<ButtonTypeCount;i++)if (button[i])
button[i]->resetSize(FullMax); button[i]->resetSize(FullMax);
widget()->tqlayout()->activate(); widget()->layout()->activate();
} }
int CrystalClient::borderSpacing() int CrystalClient::borderSpacing()
@ -1095,9 +1095,9 @@ void CrystalClient::resize(const TQSize &size)
widget()->resize(size); widget()->resize(size);
} }
TQSize CrystalClient::tqminimumSize() const TQSize CrystalClient::minimumSize() const
{ {
return widget()->tqminimumSize(); return widget()->minimumSize();
} }
KDecoration::Position CrystalClient::mousePosition(const TQPoint &point) const KDecoration::Position CrystalClient::mousePosition(const TQPoint &point) const
@ -1170,34 +1170,34 @@ bool CrystalClient::eventFilter(TQObject *obj, TQEvent *e)
void CrystalClient::ClientWindows(Window* v_frame,Window* v_wrapper,Window *v_client) void CrystalClient::ClientWindows(Window* v_frame,Window* v_wrapper,Window *v_client)
{ {
Window root=0,frame=0,wrapper=0,client=0,parent=0,*tqchildren=NULL; Window root=0,frame=0,wrapper=0,client=0,parent=0,*children=NULL;
uint numc; uint numc;
if (v_frame) *v_frame=0; if (v_frame) *v_frame=0;
if (v_wrapper) *v_wrapper=0; if (v_wrapper) *v_wrapper=0;
if (v_client) *v_client=0; if (v_client) *v_client=0;
// Our Deco is the child of a frame, get our parent // Our Deco is the child of a frame, get our parent
if (XQueryTree(qt_xdisplay(),widget()->winId(),&root,&frame,&tqchildren,&numc) == 0) if (XQueryTree(qt_xdisplay(),widget()->winId(),&root,&frame,&children,&numc) == 0)
return; return;
if (tqchildren!=NULL)XFree(tqchildren); if (children!=NULL)XFree(children);
tqchildren=NULL; children=NULL;
// frame has two tqchildren, us and a wrapper, get the wrapper // frame has two children, us and a wrapper, get the wrapper
if (XQueryTree(qt_xdisplay(),frame,&root,&parent,&tqchildren,&numc)==0) if (XQueryTree(qt_xdisplay(),frame,&root,&parent,&children,&numc)==0)
return; return;
for (uint i=0;i<numc;i++) for (uint i=0;i<numc;i++)
{ {
if (tqchildren[i]!=widget()->winId())wrapper=tqchildren[i]; if (children[i]!=widget()->winId())wrapper=children[i];
} }
if (tqchildren!=NULL)XFree(tqchildren); if (children!=NULL)XFree(children);
tqchildren=NULL; children=NULL;
// wrapper has only one child, which is the client. We want this!! // wrapper has only one child, which is the client. We want this!!
if (XQueryTree(qt_xdisplay(),wrapper,&root,&parent,&tqchildren,&numc)==0) if (XQueryTree(qt_xdisplay(),wrapper,&root,&parent,&children,&numc)==0)
return; return;
if (numc==1)client=tqchildren[0]; if (numc==1)client=children[0];
if (tqchildren!=NULL)XFree(tqchildren); if (children!=NULL)XFree(children);
tqchildren=NULL; children=NULL;
if (v_client) *v_client=client; if (v_client) *v_client=client;
if (v_wrapper) *v_wrapper=wrapper; if (v_wrapper) *v_wrapper=wrapper;
if (v_frame) *v_frame=frame; if (v_frame) *v_frame=frame;
@ -1205,7 +1205,7 @@ void CrystalClient::ClientWindows(Window* v_frame,Window* v_wrapper,Window *v_cl
void CrystalClient::mouseDoubleClickEvent(TQMouseEvent *e) void CrystalClient::mouseDoubleClickEvent(TQMouseEvent *e)
{ {
if (/*(titlebar_->tqgeometry().contains(e->pos()))&&*/(e->button()==Qt::LeftButton)) titlebarDblClickOperation(); if (/*(titlebar_->geometry().contains(e->pos()))&&*/(e->button()==Qt::LeftButton)) titlebarDblClickOperation();
else { else {
TQMouseEvent me(TQEvent::MouseButtonPress,e->pos(),e->button(),e->state()); TQMouseEvent me(TQEvent::MouseButtonPress,e->pos(),e->button(),e->state());
processMousePressEvent(&me); processMousePressEvent(&me);
@ -1260,11 +1260,11 @@ void CrystalClient::paintEvent(TQPaintEvent*)
TQPainter painter(widget()); TQPainter painter(widget());
// draw the titlebar // draw the titlebar
group = options()->tqcolorGroup(KDecoration::ColorTitleBar, isActive()); group = options()->colorGroup(KDecoration::ColorTitleBar, isActive());
WND_CONFIG* wndcfg=(isActive()?&::factory->active:&::factory->inactive); WND_CONFIG* wndcfg=(isActive()?&::factory->active:&::factory->inactive);
if (::factory->transparency && ::factory->trackdesktop) if (::factory->transparency && ::factory->trackdesktop)
::factory->image_holder->tqrepaint(false); // If other desktop than the last, regrab the root image ::factory->image_holder->repaint(false); // If other desktop than the last, regrab the root image
TQPixmap *background=::factory->transparency?::factory->image_holder->image(isActive()):NULL; TQPixmap *background=::factory->transparency?::factory->image_holder->image(isActive()):NULL;
int drawFrame; int drawFrame;
@ -1295,7 +1295,7 @@ void CrystalClient::paintEvent(TQPaintEvent*)
pufferPainter.setFont(options()->font(isActive(), false)); pufferPainter.setFont(options()->font(isActive(), false));
TQColor color=options()->color(KDecoration::ColorFont, isActive()); TQColor color=options()->color(KDecoration::ColorFont, isActive());
r=titlebar_->tqgeometry(); r=titlebar_->geometry();
r.moveBy(0,-1); r.moveBy(0,-1);
int logowidth=::factory->logo.width()+::factory->logoDistance; int logowidth=::factory->logo.width()+::factory->logoDistance;
if (::factory->logoEnabled!=1 && (isActive()||!::factory->logoActive)) if (::factory->logoEnabled!=1 && (isActive()||!::factory->logoActive))
@ -1336,7 +1336,7 @@ void CrystalClient::paintEvent(TQPaintEvent*)
} }
}else if (::factory->logoEnabled!=1 && (isActive()||!::factory->logoActive)) { }else if (::factory->logoEnabled!=1 && (isActive()||!::factory->logoActive)) {
int x=0; int x=0;
r=titlebar_->tqgeometry(); r=titlebar_->geometry();
if (::factory->logoEnabled==0) x=r.left(); if (::factory->logoEnabled==0) x=r.left();
if (::factory->logoEnabled==2) x=r.right()-::factory->logo.width(); if (::factory->logoEnabled==2) x=r.right()-::factory->logo.width();
pufferPainter.drawPixmap(x,(::factory->titlesize-::factory->logo.height())/2,::factory->logo); pufferPainter.drawPixmap(x,(::factory->titlesize-::factory->logo.height())/2,::factory->logo);
@ -1485,7 +1485,7 @@ void CrystalClient::resizeEvent(TQResizeEvent *e)
if (!timer.isActive())timer.start(0,true); if (!timer.isActive())timer.start(0,true);
// Repaint(); // Repaint();
} }
// tqrepaint only every xxx ms // repaint only every xxx ms
else if (::factory->repaintMode==3 || !timer.isActive()) else if (::factory->repaintMode==3 || !timer.isActive())
{ {
// Repaint only, when mode!=fade || amount<100 // Repaint only, when mode!=fade || amount<100
@ -1509,7 +1509,7 @@ void CrystalClient::moveEvent(TQMoveEvent *)
{ {
Repaint(); Repaint();
} }
// tqrepaint every xxx ms, so constant moving does not take too much CPU // repaint every xxx ms, so constant moving does not take too much CPU
else if (::factory->repaintMode==3 || !timer.isActive()) else if (::factory->repaintMode==3 || !timer.isActive())
{ {
// Repaint only, when mode!=fade || value<100, because otherwise it is a plain color // Repaint only, when mode!=fade || value<100, because otherwise it is a plain color
@ -1528,7 +1528,7 @@ void CrystalClient::showEvent(TQShowEvent *)
void CrystalClient::Repaint() void CrystalClient::Repaint()
{ {
widget()->tqrepaint(false); widget()->repaint(false);
for (int n=0; n<ButtonTypeCount; n++) for (int n=0; n<ButtonTypeCount; n++)
if (button[n]) button[n]->reset(); if (button[n]) button[n]->reset();
} }

@ -27,7 +27,7 @@
#ifndef CRYSTALCLIENT_H #ifndef CRYSTALCLIENT_H
#define CRYSTALCLIENT_H #define CRYSTALCLIENT_H
#include <tqlayout.h> #include <layout.h>
#include <kdecoration.h> #include <kdecoration.h>
#include <kdecorationfactory.h> #include <kdecorationfactory.h>
#include <tqtimer.h> #include <tqtimer.h>
@ -161,12 +161,12 @@ public:
virtual void borders(int &l, int &r, int &t, int &b) const; virtual void borders(int &l, int &r, int &t, int &b) const;
virtual void resize(const TQSize &size); virtual void resize(const TQSize &size);
virtual TQSize tqminimumSize() const; virtual TQSize minimumSize() const;
virtual Position mousePosition(const TQPoint &point) const; virtual Position mousePosition(const TQPoint &point) const;
void ClientWindows(Window* frame,Window* wrapper,Window* client); void ClientWindows(Window* frame,Window* wrapper,Window* client);
private: private:
CrystalButton* addButtons(TQBoxLayout* tqlayout, const TQString& buttons); CrystalButton* addButtons(TQBoxLayout* layout, const TQString& buttons);
void updateMask(); void updateMask();
int borderSpacing(); int borderSpacing();
void updateLayout(); void updateLayout();
@ -195,8 +195,8 @@ private slots:
void menuPopUp(); void menuPopUp();
private: private:
CrystalButton *button[ButtonTypeCount]; CrystalButton *button[ButtonTypeCount];
TQGridLayout *maintqlayout; TQGridLayout *mainlayout;
TQHBoxLayout *titletqlayout; TQHBoxLayout *titlelayout;
TQTimer timer; TQTimer timer;
public: public:
bool FullMax; bool FullMax;

@ -63,12 +63,12 @@ void QImageHolder::setUserdefinedPictures( TQImage act,TQImage inact)
if (!act.isNull()) if (!act.isNull())
{ {
act=act.smoothScale(w,h); act=act.smoothScale(w,h);
img_active=ApplyEffect(act,&::factory->active,factory->options()->tqcolorGroup(KDecoration::ColorTitleBar, true)); img_active=ApplyEffect(act,&::factory->active,factory->options()->colorGroup(KDecoration::ColorTitleBar, true));
}else img_active=NULL; }else img_active=NULL;
if (!inact.isNull()) if (!inact.isNull())
{ {
inact=inact.smoothScale(w,h); inact=inact.smoothScale(w,h);
img_inactive=ApplyEffect(inact,&::factory->inactive,factory->options()->tqcolorGroup(KDecoration::ColorTitleBar, false)); img_inactive=ApplyEffect(inact,&::factory->inactive,factory->options()->colorGroup(KDecoration::ColorTitleBar, false));
}else img_inactive=NULL; }else img_inactive=NULL;
userdefinedActive=(img_active!=NULL); userdefinedActive=(img_active!=NULL);
@ -83,22 +83,22 @@ void QImageHolder::Init()
rootpixmap=new KMyRootPixmap(NULL/*,this*/); rootpixmap=new KMyRootPixmap(NULL/*,this*/);
rootpixmap->start(); rootpixmap->start();
rootpixmap->tqrepaint(true); rootpixmap->repaint(true);
connect( rootpixmap,TQT_SIGNAL(backgroundUpdated(const TQImage*)),this, TQT_SLOT(BackgroundUpdated(const TQImage*))); connect( rootpixmap,TQT_SIGNAL(backgroundUpdated(const TQImage*)),this, TQT_SLOT(BackgroundUpdated(const TQImage*)));
connect(kapp, TQT_SIGNAL(backgroundChanged(int)),TQT_SLOT(handleDesktopChanged(int))); connect(kapp, TQT_SIGNAL(backgroundChanged(int)),TQT_SLOT(handleDesktopChanged(int)));
initialized=true; initialized=true;
} }
void QImageHolder::tqrepaint(bool force) void QImageHolder::repaint(bool force)
{ {
Init(); Init();
if (rootpixmap)rootpixmap->tqrepaint(force); if (rootpixmap)rootpixmap->repaint(force);
} }
void QImageHolder::handleDesktopChanged(int) void QImageHolder::handleDesktopChanged(int)
{ {
tqrepaint(true); repaint(true);
} }
void QImageHolder::CheckSanity() void QImageHolder::CheckSanity()
@ -160,11 +160,11 @@ void QImageHolder::BackgroundUpdated(const TQImage *src)
TQImage tmp=src->copy(); TQImage tmp=src->copy();
if (!userdefinedInactive) if (!userdefinedInactive)
img_inactive=ApplyEffect(tmp,&::factory->inactive,factory->options()->tqcolorGroup(KDecoration::ColorTitleBar, false)); img_inactive=ApplyEffect(tmp,&::factory->inactive,factory->options()->colorGroup(KDecoration::ColorTitleBar, false));
tmp=src->copy(); tmp=src->copy();
if (!userdefinedActive) if (!userdefinedActive)
img_active=ApplyEffect(tmp,&::factory->active,factory->options()->tqcolorGroup(KDecoration::ColorTitleBar, true)); img_active=ApplyEffect(tmp,&::factory->active,factory->options()->colorGroup(KDecoration::ColorTitleBar, true));
} }
emit repaintNeeded(); emit repaintNeeded();

@ -38,7 +38,7 @@ public:
void Init(); void Init();
TQPixmap *image(bool active) { Init(); return active?img_active:img_inactive; } TQPixmap *image(bool active) { Init(); return active?img_active:img_inactive; }
void tqrepaint(bool force); void repaint(bool force);
void setUserdefinedPictures(TQImage act,TQImage inact); void setUserdefinedPictures(TQImage act,TQImage inact);

@ -57,9 +57,9 @@ void KMyRootPixmap::init()
// connect(kapp, TQT_SIGNAL(backgroundChanged(int)), TQT_SLOT(slotBackgroundChanged(int))); // connect(kapp, TQT_SIGNAL(backgroundChanged(int)), TQT_SLOT(slotBackgroundChanged(int)));
connect(m_pPixmap, TQT_SIGNAL(done(bool)), TQT_SLOT(slotDone(bool))); connect(m_pPixmap, TQT_SIGNAL(done(bool)), TQT_SLOT(slotDone(bool)));
// connect(m_pTimer, TQT_SIGNAL(timeout()), TQT_SLOT(tqrepaint())); // connect(m_pTimer, TQT_SIGNAL(timeout()), TQT_SLOT(repaint()));
// d->toplevel = m_pWidget->tqtopLevelWidget(); // d->toplevel = m_pWidget->topLevelWidget();
// d->toplevel->installEventFilter(this); // d->toplevel->installEventFilter(this);
} }
@ -85,7 +85,7 @@ void KMyRootPixmap::start()
enableExports(); enableExports();
return; return;
// if (m_bInit) // if (m_bInit)
// tqrepaint(true); // repaint(true);
} }
void KMyRootPixmap::stop() void KMyRootPixmap::stop()
@ -95,14 +95,14 @@ void KMyRootPixmap::stop()
} }
void KMyRootPixmap::tqrepaint() void KMyRootPixmap::repaint()
{ {
tqrepaint(false); repaint(false);
} }
void KMyRootPixmap::tqrepaint(bool force) void KMyRootPixmap::repaint(bool force)
{ {
// printf("KMyRootPixmap::tqrepaint(%s)\n",force?"true":"false"); // printf("KMyRootPixmap::repaint(%s)\n",force?"true":"false");
if ((!force) && (m_Desk==currentDesktop()))return; if ((!force) && (m_Desk==currentDesktop()))return;
m_Desk = currentDesktop(); m_Desk = currentDesktop();
@ -127,9 +127,9 @@ TQString KMyRootPixmap::pixmapName(int desk)
TQString pattern = TQString("DESKTOP%1"); TQString pattern = TQString("DESKTOP%1");
int screen_number = DefaultScreen(qt_xdisplay()); int screen_number = DefaultScreen(qt_xdisplay());
if (screen_number) { if (screen_number) {
pattern = TQString("SCREEN%1-DESKTOP").tqarg(screen_number) + "%1"; pattern = TQString("SCREEN%1-DESKTOP").arg(screen_number) + "%1";
} }
return pattern.tqarg( desk ); return pattern.arg( desk );
} }

@ -57,9 +57,9 @@ public slots:
// void setFadeEffect(double strength, const TQColor &color); // void setFadeEffect(double strength, const TQColor &color);
void tqrepaint( bool force ); void repaint( bool force );
void tqrepaint(); void repaint();
// void setCustomPainting( bool enable ) { m_bCustomPaint = enable; } // void setCustomPainting( bool enable ) { m_bCustomPaint = enable; }

@ -24,7 +24,7 @@
/* Taken from nVIDIA KWin sources and modified by Sascha Hlusiak, 2006 */ /* Taken from nVIDIA KWin sources and modified by Sascha Hlusiak, 2006 */
#include <tqimage.h> #include <tqimage.h>
#include <tqtextstream.h> #include <textstream.h>
#include <tqregexp.h> #include <tqregexp.h>
#include <tqfile.h> #include <tqfile.h>
#include <tqfileinfo.h> #include <tqfileinfo.h>
@ -64,7 +64,7 @@ private:
nVIDIAEmbedder::nVIDIAEmbedder() nVIDIAEmbedder::nVIDIAEmbedder()
{ {
TQDateTime date( TQDateTime::tqcurrentDateTime() ); TQDateTime date( TQDateTime::currentDateTime() );
TQString datestring( date.toString() ); TQString datestring( date.toString() );
// file = new TQFile( "tiles.h" ); // file = new TQFile( "tiles.h" );

Loading…
Cancel
Save