diff options
Diffstat (limited to 'twin/clients/b2')
| -rw-r--r-- | twin/clients/b2/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | twin/clients/b2/Makefile.am | 8 | ||||
| -rw-r--r-- | twin/clients/b2/b2.desktop | 2 | ||||
| -rw-r--r-- | twin/clients/b2/b2client.cpp | 95 | ||||
| -rw-r--r-- | twin/clients/b2/b2client.h | 4 | ||||
| -rw-r--r-- | twin/clients/b2/config/config.cpp | 15 | ||||
| -rw-r--r-- | twin/clients/b2/config/config.h | 4 | 
7 files changed, 63 insertions, 69 deletions
diff --git a/twin/clients/b2/CMakeLists.txt b/twin/clients/b2/CMakeLists.txt index cd08f4d99..ba946ba75 100644 --- a/twin/clients/b2/CMakeLists.txt +++ b/twin/clients/b2/CMakeLists.txt @@ -32,9 +32,9 @@ tde_create_translated_desktop(  ) -##### twin3_b2 (module) ######################### +##### twin_b2 (module) ######################### -tde_add_kpart( twin3_b2 AUTOMOC +tde_add_kpart( twin_b2 AUTOMOC    SOURCES b2client.cpp    LINK tdecorations-shared    DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/twin/clients/b2/Makefile.am b/twin/clients/b2/Makefile.am index ccd7f39fa..71bbbb556 100644 --- a/twin/clients/b2/Makefile.am +++ b/twin/clients/b2/Makefile.am @@ -3,12 +3,12 @@ INCLUDES = -I$(srcdir)/../../lib $(all_includes)  SUBDIRS = . config -kde_module_LTLIBRARIES = twin3_b2.la +kde_module_LTLIBRARIES = twin_b2.la -twin3_b2_la_SOURCES = b2client.cpp -twin3_b2_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module +twin_b2_la_SOURCES = b2client.cpp +twin_b2_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module  # twin_b2_la_LDFLAGS = $(all_libraries) -avoid-version -module $(KDE_RPATH) $(KDE_MT_LDFLAGS) -twin3_b2_la_LIBADD  = ../../lib/libtdecorations.la +twin_b2_la_LIBADD  = ../../lib/libtdecorations.la  METASOURCES = AUTO  noinst_HEADERS = b2client.h diff --git a/twin/clients/b2/b2.desktop b/twin/clients/b2/b2.desktop index b5eacefa9..767e9bfc4 100644 --- a/twin/clients/b2/b2.desktop +++ b/twin/clients/b2/b2.desktop @@ -1,3 +1,3 @@  [Desktop Entry]  Name=B II -X-TDE-Library=twin3_b2 +X-TDE-Library=twin_b2 diff --git a/twin/clients/b2/b2client.cpp b/twin/clients/b2/b2client.cpp index 6a7a8296e..571b16909 100644 --- a/twin/clients/b2/b2client.cpp +++ b/twin/clients/b2/b2client.cpp @@ -82,7 +82,7 @@ static bool drawSmallBorders = false;  // ===================================== -extern "C" KDE_EXPORT KDecorationFactory* create_factory() +extern "C" TDE_EXPORT KDecorationFactory* create_factory()  {      return new B2::B2ClientFactory();  } @@ -221,7 +221,7 @@ static void create_pixmaps()      TQPainter mask;      mask.begin(&normalizeMask); -    TQBrush one(Qt::color1); +    TQBrush one(TQt::color1);      mask.fillRect(normalizeMask.width() - 12, normalizeMask.height() - 12,   		  12, 12, one);      mask.fillRect(0, 0, 10, 10, one); @@ -444,9 +444,9 @@ bool B2Client::isModalSystemNotification()      result = XGetWindowProperty(tqt_xdisplay(), windowId(), kde_wm_system_modal_notification, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, /*(unsigned char **)*/ &data);      if (result == Success && data != None && format == 32 )          { -        return TRUE; +        return true;          } -    return FALSE; +    return false;  }  void B2Client::addButtons(const TQString& s, const TQString tips[], @@ -461,11 +461,11 @@ void B2Client::addButtons(const TQString& s, const TQString tips[],  	  if (!isModalSystemNotification()) {  	    if (!button[BtnMenu]) {  		button[BtnMenu] = new B2Button(this, tb, tips[BtnMenu],  -			Qt::LeftButton | Qt::RightButton); +			TQt::LeftButton | TQt::RightButton);  		button[BtnMenu]->setPixmaps(P_MENU);  		button[BtnMenu]->setUseMiniIcon(); -		connect(button[BtnMenu], TQT_SIGNAL(pressed()), -			this, TQT_SLOT(menuButtonPressed())); +		connect(button[BtnMenu], TQ_SIGNAL(pressed()), +			this, TQ_SLOT(menuButtonPressed()));  		titleLayout->addWidget(button[BtnMenu]);  	    }  	  } @@ -477,8 +477,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[],  		button[BtnSticky]->setPixmaps(P_PINUP);  		button[BtnSticky]->setToggle();  		button[BtnSticky]->setDown(isOnAllDesktops()); -		connect(button[BtnSticky], TQT_SIGNAL(clicked()), -			this, TQT_SLOT(toggleOnAllDesktops())); +		connect(button[BtnSticky], TQ_SIGNAL(clicked()), +			this, TQ_SLOT(toggleOnAllDesktops()));  		titleLayout->addWidget(button[BtnSticky]);  	    }  	  } @@ -487,8 +487,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[],  	    if (providesContextHelp() && (!button[BtnHelp])) {  		button[BtnHelp] = new B2Button(this, tb, tips[BtnHelp]);  		button[BtnHelp]->setPixmaps(P_HELP); -		connect(button[BtnHelp], TQT_SIGNAL(clicked()), -			this, TQT_SLOT(showContextHelp())); +		connect(button[BtnHelp], TQ_SIGNAL(clicked()), +			this, TQ_SLOT(showContextHelp()));  		titleLayout->addWidget(button[BtnHelp]);  	    }  	    break; @@ -496,19 +496,19 @@ void B2Client::addButtons(const TQString& s, const TQString tips[],  	    if (isMinimizable() && (!button[BtnIconify])) {  		button[BtnIconify] = new B2Button(this, tb,tips[BtnIconify]);  		button[BtnIconify]->setPixmaps(P_ICONIFY); -		connect(button[BtnIconify], TQT_SIGNAL(clicked()), -			this, TQT_SLOT(minimize())); +		connect(button[BtnIconify], TQ_SIGNAL(clicked()), +			this, TQ_SLOT(minimize()));  		titleLayout->addWidget(button[BtnIconify]);  	    }  	    break;  	case 'A':  // Maximize button  	    if (isMaximizable() && (!button[BtnMax])) {  		button[BtnMax] = new B2Button(this, tb, tips[BtnMax],  -			Qt::LeftButton | Qt::MidButton | Qt::RightButton); +			TQt::LeftButton | TQt::MidButton | TQt::RightButton);  		button[BtnMax]->setPixmaps(maximizeMode() == MaximizeFull ?  			P_NORMALIZE : P_MAX); -		connect(button[BtnMax], TQT_SIGNAL(clicked()), -			this, TQT_SLOT(maxButtonClicked())); +		connect(button[BtnMax], TQ_SIGNAL(clicked()), +			this, TQ_SLOT(maxButtonClicked()));  		titleLayout->addWidget(button[BtnMax]);  	    }  	    break; @@ -516,8 +516,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[],  	    if (isCloseable() && !button[BtnClose]) {  		button[BtnClose] = new B2Button(this, tb, tips[BtnClose]);  		button[BtnClose]->setPixmaps(P_CLOSE); -		connect(button[BtnClose], TQT_SIGNAL(clicked()), -			this, TQT_SLOT(closeWindow())); +		connect(button[BtnClose], TQ_SIGNAL(clicked()), +			this, TQ_SLOT(closeWindow()));  		titleLayout->addWidget(button[BtnClose]);  	    }  	    break; @@ -525,8 +525,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[],  	    if (isShadeable() && !button[BtnShade]) {  		button[BtnShade] = new B2Button(this, tb, tips[BtnShade]);  		button[BtnShade]->setPixmaps(P_SHADE); -		connect(button[BtnShade], TQT_SIGNAL(clicked()), -			this, TQT_SLOT(shadeButtonClicked())); +		connect(button[BtnShade], TQ_SIGNAL(clicked()), +			this, TQ_SLOT(shadeButtonClicked()));  		titleLayout->addWidget(button[BtnShade]);  	    }  	    break; @@ -534,8 +534,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[],  	    if (resizable && !button[BtnResize]) {  		button[BtnResize] = new B2Button(this, tb, tips[BtnResize]);  		button[BtnResize]->setPixmaps(P_RESIZE); -		connect(button[BtnResize], TQT_SIGNAL(pressed()), -			this, TQT_SLOT(resizeButtonPressed())); +		connect(button[BtnResize], TQ_SIGNAL(pressed()), +			this, TQ_SLOT(resizeButtonPressed()));  		titleLayout->addWidget(button[BtnResize]);  	    }  	    break; @@ -676,7 +676,7 @@ void B2Client::paintEvent(TQPaintEvent* e)      // bottom handle rect      if (mustDrawHandle()) { -        p.setPen(Qt::black); +        p.setPen(TQt::black);  	int hx = width() - 40;  	int hw = 40; @@ -981,8 +981,8 @@ static void redraw_pixmaps()  	KPixmap *pix = pixmap[P_SHADE * NumStates + i];  	TQColor color = is_act ? aGrp.button() : iGrp.button();  	drawB2Rect(&thinBox, color, is_down); -	pix->fill(Qt::black); -	bitBlt(TQT_TQPAINTDEVICE(pix), 0, 0, TQT_TQPAINTDEVICE(&thinBox),  +	pix->fill(TQt::black); +	bitBlt(pix, 0, 0, &thinBox,   		0, 0, thinBox.width(), thinBox.height(), TQt::CopyROP, true);      } @@ -1005,12 +1005,12 @@ static void redraw_pixmaps()  	drawB2Rect(&smallBox, is_act ? aGrp.button() : iGrp.button(), is_down);  	drawB2Rect(&largeBox, is_act ? aGrp.button() : iGrp.button(), is_down);  	pix->fill(options()->color(KDecoration::ColorTitleBar, is_act)); -	bitBlt(TQT_TQPAINTDEVICE(pix), pix->width() - 12, pix->width() - 12, TQT_TQPAINTDEVICE(&largeBox), +	bitBlt(pix, pix->width() - 12, pix->width() - 12, &largeBox,  	       0, 0, 12, 12, TQt::CopyROP, true); -	bitBlt(TQT_TQPAINTDEVICE(pix), 0, 0, TQT_TQPAINTDEVICE(&smallBox), 0, 0, 10, 10, TQt::CopyROP, true); +	bitBlt(pix, 0, 0, &smallBox, 0, 0, 10, 10, TQt::CopyROP, true); -	bitBlt(TQT_TQPAINTDEVICE(pixmap[P_ICONIFY * NumStates + i]), 0, 0, -	       TQT_TQPAINTDEVICE(&smallBox), 0, 0, 10, 10, TQt::CopyROP, true); +	bitBlt(pixmap[P_ICONIFY * NumStates + i], 0, 0, +	       &smallBox, 0, 0, 10, 10, TQt::CopyROP, true);      }      // resize @@ -1020,8 +1020,8 @@ static void redraw_pixmaps()  	*pixmap[P_RESIZE * NumStates + i] = *pixmap[P_CLOSE * NumStates + i];  	pixmap[P_RESIZE * NumStates + i]->detach();  	drawB2Rect(&smallBox, is_act ? aGrp.button() : iGrp.button(), is_down); -	bitBlt(TQT_TQPAINTDEVICE(pixmap[P_RESIZE * NumStates + i]),  -		0, 0, TQT_TQPAINTDEVICE(&smallBox), 0, 0, 10, 10, TQt::CopyROP, true); +	bitBlt(pixmap[P_RESIZE * NumStates + i],  +		0, 0, &smallBox, 0, 0, 10, 10, TQt::CopyROP, true);      } @@ -1166,7 +1166,7 @@ bool B2Client::drawbound(const TQRect& geom, bool clear)  	*visible_bound = geom;      }      TQPainter p(workspaceWidget()); -    p.setPen(TQPen(Qt::white, 5)); +    p.setPen(TQPen(TQt::white, 5));      p.setRasterOp(TQt::XorROP);      p.drawPolygon(bound_shape); @@ -1179,26 +1179,26 @@ bool B2Client::drawbound(const TQRect& geom, bool clear)  bool B2Client::eventFilter(TQObject *o, TQEvent *e)  { -    if (TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(widget())) +    if (o != widget())  	return false;      switch (e->type()) {      case TQEvent::Resize: -	resizeEvent(TQT_TQRESIZEEVENT(e)); +	resizeEvent(static_cast<TQResizeEvent*>(e));  	return true;      case TQEvent::Paint: -	paintEvent(TQT_TQPAINTEVENT(e)); +	paintEvent(static_cast<TQPaintEvent*>(e));  	return true;      case TQEvent::MouseButtonDblClick: -	titlebar->mouseDoubleClickEvent(TQT_TQMOUSEEVENT(e)); +	titlebar->mouseDoubleClickEvent(static_cast<TQMouseEvent*>(e));  	return true;      case TQEvent::Wheel: -	titlebar->wheelEvent(TQT_TQWHEELEVENT(e)); +	titlebar->wheelEvent(static_cast<TQWheelEvent*>(e));  	return true;      case TQEvent::MouseButtonPress: -	processMousePressEvent(TQT_TQMOUSEEVENT(e)); +	processMousePressEvent(static_cast<TQMouseEvent*>(e));  	return true;      case TQEvent::Show: -	showEvent(TQT_TQSHOWEVENT(e)); +	showEvent(static_cast<TQShowEvent*>(e));  	return true;      default:  	break; @@ -1213,7 +1213,7 @@ B2Button::B2Button(B2Client *_client, TQWidget *parent,     : TQButton(parent, 0), hover(false)  {      setBackgroundMode(NoBackground); -    setCursor(tqarrowCursor); +    setCursor(TQt::arrowCursor);      realizeButtons = realizeBtns;      client = _client;      useMiniIcon = false; @@ -1280,7 +1280,7 @@ void B2Button::mousePressEvent(TQMouseEvent * e)  {      last_button = e->button();      TQMouseEvent me(e->type(), e->pos(), e->globalPos(),  -	    (e->button() & realizeButtons) ? Qt::LeftButton : Qt::NoButton,  +	    (e->button() & realizeButtons) ? TQt::LeftButton : TQt::NoButton,   	    e->state());      TQButton::mousePressEvent(&me);  } @@ -1289,7 +1289,7 @@ void B2Button::mouseReleaseEvent(TQMouseEvent * e)  {      last_button = e->button();      TQMouseEvent me(e->type(), e->pos(), e->globalPos(),  -	    (e->button() & realizeButtons) ? Qt::LeftButton : Qt::NoButton,  +	    (e->button() & realizeButtons) ? TQt::LeftButton : TQt::NoButton,   	    e->state());      TQButton::mouseReleaseEvent(&me);  } @@ -1356,7 +1356,7 @@ void B2Titlebar::drawTitlebar(TQPainter &p, bool state)      TQRect t = rect();      // black titlebar frame -    p.setPen(Qt::black); +    p.setPen(TQt::black);      p.drawLine(0, 0, 0, t.bottom());      p.drawLine(0, 0, t.right(), 0);      p.drawLine(t.right(), 0, t.right(), t.bottom()); @@ -1395,7 +1395,7 @@ void B2Titlebar::resizeEvent(TQResizeEvent *)  void B2Titlebar::paintEvent(TQPaintEvent *)  {      if(client->isActive()) -        bitBlt(TQT_TQPAINTDEVICE(this), 0, 0, TQT_TQPAINTDEVICE(&titleBuffer), 0, 0, titleBuffer.width(), +        bitBlt(this, 0, 0, &titleBuffer, 0, 0, titleBuffer.width(),                 titleBuffer.height(), TQt::CopyROP, true);      else {          TQPainter p(this); @@ -1405,14 +1405,14 @@ void B2Titlebar::paintEvent(TQPaintEvent *)  void B2Titlebar::mouseDoubleClickEvent(TQMouseEvent *e)  { -    if (e->button() == Qt::LeftButton && e->y() < height()) { +    if (e->button() == TQt::LeftButton && e->y() < height()) {  	client->titlebarDblClickOperation();      }  }  void B2Titlebar::wheelEvent(TQWheelEvent *e)  { -    if (client->isSetShade() || TQT_TQRECT_OBJECT(rect()).contains(e->pos()))  +    if (client->isSetShade() || rect().contains(e->pos()))   	client->titlebarMouseWheelOperation( e->delta());  } @@ -1449,6 +1449,3 @@ void B2Titlebar::mouseMoveEvent(TQMouseEvent * e)  } // namespace B2  #include "b2client.moc" - -// vim: sw=4 - diff --git a/twin/clients/b2/b2client.h b/twin/clients/b2/b2client.h index 30220b175..c9748ccd6 100644 --- a/twin/clients/b2/b2client.h +++ b/twin/clients/b2/b2client.h @@ -28,7 +28,7 @@ class B2Client;  class B2Button : public TQButton  {  public: -    B2Button(B2Client *_client=0, TQWidget *parent=0, const TQString& tip=NULL, const int realizeBtns = Qt::LeftButton); +    B2Button(B2Client *_client=0, TQWidget *parent=0, const TQString& tip=NULL, const int realizeBtns = TQt::LeftButton);      ~B2Button() {};      void setBg(const TQColor &c){bg = c;} @@ -93,7 +93,7 @@ private:  class B2Client : public KDecoration  { -    Q_OBJECT +    TQ_OBJECT      friend class B2Titlebar;  public:      B2Client(KDecorationBridge *b, KDecorationFactory *f); diff --git a/twin/clients/b2/config/config.cpp b/twin/clients/b2/config/config.cpp index 77ca65338..70942bce1 100644 --- a/twin/clients/b2/config/config.cpp +++ b/twin/clients/b2/config/config.cpp @@ -15,7 +15,7 @@  extern "C"  { -	KDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent ) +	TDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent )  	{  		return(new B2Config(conf, parent));  	} @@ -70,12 +70,12 @@ B2Config::B2Config( TDEConfig* conf, TQWidget* parent )  	load(conf);  	// Ensure we track user changes properly -	connect(cbColorBorder, TQT_SIGNAL(clicked()), -			this, TQT_SLOT(slotSelectionChanged())); -    connect(showGrabHandleCb, TQT_SIGNAL(clicked()), -		    this, TQT_SLOT(slotSelectionChanged())); -    connect(menuDblClickOp, TQT_SIGNAL(activated(int)), -		    this, TQT_SLOT(slotSelectionChanged())); +	connect(cbColorBorder, TQ_SIGNAL(clicked()), +			this, TQ_SLOT(slotSelectionChanged())); +    connect(showGrabHandleCb, TQ_SIGNAL(clicked()), +		    this, TQ_SLOT(slotSelectionChanged())); +    connect(menuDblClickOp, TQ_SIGNAL(activated(int)), +		    this, TQ_SLOT(slotSelectionChanged()));  	// Make the widgets visible in twindecoration  	gb->show();  } @@ -162,4 +162,3 @@ void B2Config::defaults()  }  #include "config.moc" -// vim: ts=4 diff --git a/twin/clients/b2/config/config.h b/twin/clients/b2/config/config.h index a1ca8ebdd..0a3e7c9ec 100644 --- a/twin/clients/b2/config/config.h +++ b/twin/clients/b2/config/config.h @@ -18,7 +18,7 @@  class B2Config: public TQObject  { -	Q_OBJECT +	TQ_OBJECT  	public:  		B2Config( TDEConfig* conf, TQWidget* parent ); @@ -46,5 +46,3 @@ class B2Config: public TQObject  };  #endif - -// vim: ts=4  | 
