diff options
Diffstat (limited to 'kruler')
| -rw-r--r-- | kruler/Makefile.am | 2 | ||||
| -rw-r--r-- | kruler/klineal.cpp | 62 | ||||
| -rw-r--r-- | kruler/klineal.h | 2 | 
3 files changed, 33 insertions, 33 deletions
| diff --git a/kruler/Makefile.am b/kruler/Makefile.am index 2a061f3c..4a0142bc 100644 --- a/kruler/Makefile.am +++ b/kruler/Makefile.am @@ -4,7 +4,7 @@ INCLUDES= $(all_includes)  bin_PROGRAMS = kruler  kruler_METASOURCES = AUTO -kruler_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor +kruler_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_TQT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor  kruler_LDADD   = $(LIB_TDEUI)  kruler_SOURCES = klineal.cpp main.cpp  diff --git a/kruler/klineal.cpp b/kruler/klineal.cpp index 7041fea1..65e7370d 100644 --- a/kruler/klineal.cpp +++ b/kruler/klineal.cpp @@ -28,7 +28,7 @@  #include <tdemainwindow.h>  #include <knotifyclient.h>  #include <tdepopupmenu.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h>  #include <twin.h>  #include <kstdguiitem.h> @@ -94,7 +94,7 @@ KLineal::KLineal(TQWidget*parent,const char* name):TDEMainWindow(parent,name){    mCurrentCursor = mNorthCursor;    setMinimumSize(60,60);    setMaximumSize(8000,8000); -  TDEConfig *cfg = kapp->config(); +  TDEConfig *cfg = tdeApp->config();    TQColor defaultColor = DEFAULT_RULER_COLOR;    TQFont defaultFont(TDEGlobalSettings::generalFont().family(), 8);    defaultFont.setPixelSize(8); @@ -137,8 +137,8 @@ KLineal::KLineal(TQWidget*parent,const char* name):TDEMainWindow(parent,name){    	));    resize(TQSize(mLongEdgeLen, mShortEdgeLen)); -  setMouseTracking(TRUE); -  mDragging = FALSE; +  setMouseTracking(true); +  mDragging = false;    mOrientation = South;    _clicked = false;    setOrientation(South); @@ -146,25 +146,25 @@ KLineal::KLineal(TQWidget*parent,const char* name):TDEMainWindow(parent,name){    mMenu = new TDEPopupMenu(this);    mMenu->insertTitle(i18n("KRuler"));    TDEPopupMenu *oriMenu = new TDEPopupMenu(this); -  oriMenu->insertItem(UserIconSet("kruler-north"), i18n("&North"), this, TQT_SLOT(setNorth()), Key_N); -  oriMenu->insertItem(UserIconSet("kruler-east"), i18n("&East"), this, TQT_SLOT(setEast()), Key_E); -  oriMenu->insertItem(UserIconSet("kruler-south"), i18n("&South"), this, TQT_SLOT(setSouth()), Key_S); -  oriMenu->insertItem(UserIconSet("kruler-west"), i18n("&West"), this, TQT_SLOT(setWest()), Key_W); -  oriMenu->insertItem(i18n("&Turn Right"), this, TQT_SLOT(turnRight()), Key_R); -  oriMenu->insertItem(i18n("Turn &Left"), this, TQT_SLOT(turnLeft()), Key_L); +  oriMenu->insertItem(UserIconSet("kruler-north"), i18n("&North"), this, TQ_SLOT(setNorth()), Key_N); +  oriMenu->insertItem(UserIconSet("kruler-east"), i18n("&East"), this, TQ_SLOT(setEast()), Key_E); +  oriMenu->insertItem(UserIconSet("kruler-south"), i18n("&South"), this, TQ_SLOT(setSouth()), Key_S); +  oriMenu->insertItem(UserIconSet("kruler-west"), i18n("&West"), this, TQ_SLOT(setWest()), Key_W); +  oriMenu->insertItem(i18n("&Turn Right"), this, TQ_SLOT(turnRight()), Key_R); +  oriMenu->insertItem(i18n("Turn &Left"), this, TQ_SLOT(turnLeft()), Key_L);    mMenu->insertItem(i18n("&Orientation"), oriMenu);    mLenMenu = new TDEPopupMenu(this); -  mLenMenu->insertItem(i18n("&Short"), this, TQT_SLOT(setShortLength()), CTRL+Key_S); -  mLenMenu->insertItem(i18n("&Medium"), this, TQT_SLOT(setMediumLength()), CTRL+Key_M); -  mLenMenu->insertItem(i18n("&Tall"), this, TQT_SLOT(setTallLength()), CTRL+Key_T); -  mLenMenu->insertItem(i18n("&Full Screen Width"), this, TQT_SLOT(setFullLength()), CTRL+Key_F, FULLSCREENID); +  mLenMenu->insertItem(i18n("&Short"), this, TQ_SLOT(setShortLength()), CTRL+Key_S); +  mLenMenu->insertItem(i18n("&Medium"), this, TQ_SLOT(setMediumLength()), CTRL+Key_M); +  mLenMenu->insertItem(i18n("&Tall"), this, TQ_SLOT(setTallLength()), CTRL+Key_T); +  mLenMenu->insertItem(i18n("&Full Screen Width"), this, TQ_SLOT(setFullLength()), CTRL+Key_F, FULLSCREENID);    mMenu->insertItem(i18n("&Length"), mLenMenu); -  mMenu->insertItem(SmallIcon("application-x-kcsrc"), i18n("&Choose Color..."), this, TQT_SLOT(choseColor()), CTRL+Key_C); -  mMenu->insertItem(SmallIcon("font-x-generic"), i18n("Choose &Font..."), this, TQT_SLOT(choseFont()), Key_F); +  mMenu->insertItem(SmallIcon("application-x-kcsrc"), i18n("&Choose Color..."), this, TQ_SLOT(choseColor()), CTRL+Key_C); +  mMenu->insertItem(SmallIcon("font-x-generic"), i18n("Choose &Font..."), this, TQ_SLOT(choseFont()), Key_F);    mMenu->insertSeparator();    mMenu->insertItem(SmallIcon( "help" ), KStdGuiItem::help().text(), helpMenu());    mMenu->insertSeparator(); -  mMenu->insertItem(SmallIcon( "system-log-out" ), KStdGuiItem::quit().text(), kapp, TQT_SLOT(quit()), CTRL+Key_Q); +  mMenu->insertItem(SmallIcon( "system-log-out" ), KStdGuiItem::quit().text(), tdeApp, TQ_SLOT(quit()), CTRL+Key_Q);    mLastClickPos = geometry().topLeft()+TQPoint(width()/2, height()/2);  } @@ -366,14 +366,14 @@ void KLineal::choseColor() {    mColorSelector.setDefaultColor( DEFAULT_RULER_COLOR );    mColorSelector.show(); -  connect(&mColorSelector, TQT_SIGNAL(okClicked()), this, TQT_SLOT(setColor())); -  connect(&mColorSelector, TQT_SIGNAL(yesClicked()), this, TQT_SLOT(setColor())); -  connect(&mColorSelector, TQT_SIGNAL(closeClicked()), this, TQT_SLOT(setColor())); -  connect(&mColorSelector, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(setColor())); -  connect(&mColorSelector, TQT_SIGNAL(colorSelected(const TQColor&)), this, TQT_SLOT(setColor(const TQColor&))); +  connect(&mColorSelector, TQ_SIGNAL(okClicked()), this, TQ_SLOT(setColor())); +  connect(&mColorSelector, TQ_SIGNAL(yesClicked()), this, TQ_SLOT(setColor())); +  connect(&mColorSelector, TQ_SIGNAL(closeClicked()), this, TQ_SLOT(setColor())); +  connect(&mColorSelector, TQ_SIGNAL(defaultClicked()), this, TQ_SLOT(setColor())); +  connect(&mColorSelector, TQ_SIGNAL(colorSelected(const TQColor&)), this, TQ_SLOT(setColor(const TQColor&)));  	/* -  connect(&mColorSelector, TQT_SIGNAL(cancelPressed()), this, TQT_SLOT(restoreColor())); -  connect(&mColorSelector, TQT_SIGNAL(okPressed()), this, TQT_SLOT(saveColor())); +  connect(&mColorSelector, TQ_SIGNAL(cancelPressed()), this, TQ_SLOT(restoreColor())); +  connect(&mColorSelector, TQ_SIGNAL(okPressed()), this, TQ_SLOT(saveColor()));    */  } @@ -420,7 +420,7 @@ void KLineal::setColor(const TQColor &color) {  * save the ruler color to the config file  */  void KLineal::saveSettings() { -  TDEConfig *cfg = kapp->config(); // new TDEConfig(locateLocal("config", kapp->name()+"rc")); +  TDEConfig *cfg = tdeApp->config(); // new TDEConfig(locateLocal("config", tdeApp->name()+"rc"));    if (cfg) {        TQColor color = mColor;        cfg->setGroup(CFG_GROUP_SETTINGS); @@ -500,7 +500,7 @@ void KLineal::keyPressEvent(TQKeyEvent *e) {  	TQPoint dist(0,0);  	switch (e->key()) {  	case Key_F1: -    	kapp->invokeHelp(); +    	tdeApp->invokeHelp();   			break;    	case Key_Left:      	dist.setX(-1); @@ -575,15 +575,15 @@ void KLineal::mousePressEvent(TQMouseEvent *inEvent) {    TQRect gr = geometry();    mDragOffset = mLastClickPos - TQPoint(gr.left(), gr.top()); -  if (inEvent->button() == Qt::LeftButton) { +  if (inEvent->button() == TQt::LeftButton) {      if (!mDragging) {        grabMouse(KCursor::sizeAllCursor()); -      mDragging = TRUE; +      mDragging = true;      } -  } else if (inEvent->button() == Qt::MidButton) { +  } else if (inEvent->button() == TQt::MidButton) {  		_clicked = true;      turnLeft(); -  } else if (inEvent->button() == Qt::RightButton) { +  } else if (inEvent->button() == TQt::RightButton) {      showMenu();    }  } @@ -592,7 +592,7 @@ void KLineal::mousePressEvent(TQMouseEvent *inEvent) {  */  void KLineal::mouseReleaseEvent(TQMouseEvent * /*inEvent*/) {    if (mDragging) { -    mDragging = FALSE; +    mDragging = false;      releaseMouse();    }    showLabel(); diff --git a/kruler/klineal.h b/kruler/klineal.h index f9c7f8af..0c2001cb 100644 --- a/kruler/klineal.h +++ b/kruler/klineal.h @@ -31,7 +31,7 @@  #include <tqcursor.h>  class KLineal : public TDEMainWindow { -  Q_OBJECT +  TQ_OBJECT  public:    enum { North=0, West=1, South=2, East=3 }; | 
