diff options
Diffstat (limited to 'tdeui/ktip.cpp')
| -rw-r--r-- | tdeui/ktip.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/tdeui/ktip.cpp b/tdeui/ktip.cpp index 1cc520640..7152e18bb 100644 --- a/tdeui/ktip.cpp +++ b/tdeui/ktip.cpp @@ -42,13 +42,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tdelocale.h> #include <kpushbutton.h> #include <kseparator.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kstdguiitem.h> #include <ktextbrowser.h> #include <kiconeffect.h> #include <tdeglobalsettings.h> -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #include <twin.h> #endif @@ -64,7 +64,7 @@ KTipDatabase::KTipDatabase(const TQString &_tipFile) loadTips(tipFile); if (!mTips.isEmpty()) - mCurrent = kapp->random() % mTips.count(); + mCurrent = tdeApp->random() % mTips.count(); } @@ -80,7 +80,7 @@ KTipDatabase::KTipDatabase( const TQStringList& tipsFiles ) addTips( *it ); } if (!mTips.isEmpty()) - mCurrent = kapp->random() % mTips.count(); + mCurrent = tdeApp->random() % mTips.count(); } @@ -189,7 +189,7 @@ KTipDialog::KTipDialog(KTipDatabase *db, TQWidget *parent, const char *name) img = TQImage(locate("data", "tdewizard/pics/wizard_small.png")); // colorize and check to figure the correct color TDEIconEffect::colorize(img, mBlendedColor, 1.0); - QRgb colPixel( img.pixel(0,0) ); + TQRgb colPixel( img.pixel(0,0) ); mBlendedColor = TQColor(tqRed(colPixel),tqGreen(colPixel),tqBlue(colPixel)); } @@ -204,7 +204,7 @@ KTipDialog::KTipDialog(KTipDatabase *db, TQWidget *parent, const char *name) mDatabase = db; setCaption(i18n("Tip of the Day")); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 KWin::setIcons( winId(), TDEGlobal::iconLoader()->loadIcon( "idea", TDEIcon::NoGroup, 32 ), TDEGlobal::iconLoader()->loadIcon( "idea", TDEIcon::NoGroup, 16 ) ); @@ -268,7 +268,7 @@ KTipDialog::KTipDialog(KTipDatabase *db, TQWidget *parent, const char *name) TQLabel *l = new TQLabel(hbox); l->setPixmap(img); l->setBackgroundColor(mBlendedColor); - l->setAlignment(Qt::AlignRight | Qt::AlignBottom); + l->setAlignment(TQt::AlignRight | TQt::AlignBottom); resize(550, 230); TQSize sh = size(); @@ -301,13 +301,13 @@ KTipDialog::KTipDialog(KTipDatabase *db, TQWidget *parent, const char *name) ok->setDefault(true); hbox2->addWidget(ok); - TDEConfigGroup config(kapp->config(), "TipOfDay"); + TDEConfigGroup config(tdeApp->config(), "TipOfDay"); mTipOnStart->setChecked(config.readBoolEntry("RunOnStart", true)); - connect(next, TQT_SIGNAL(clicked()), this, TQT_SLOT(nextTip())); - connect(prev, TQT_SIGNAL(clicked()), this, TQT_SLOT(prevTip())); - connect(ok, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept())); - connect(mTipOnStart, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(showOnStart(bool))); + connect(next, TQ_SIGNAL(clicked()), this, TQ_SLOT(nextTip())); + connect(prev, TQ_SIGNAL(clicked()), this, TQ_SLOT(prevTip())); + connect(ok, TQ_SIGNAL(clicked()), this, TQ_SLOT(accept())); + connect(mTipOnStart, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(showOnStart(bool))); ok->setFocus(); @@ -322,7 +322,7 @@ KTipDialog::~KTipDialog() void KTipDialog::showTip(const TQString &tipFile, bool force) { - showTip(kapp->mainWidget(), tipFile, force); + showTip(tdeApp->mainWidget(), tipFile, force); } void KTipDialog::showTip(TQWidget *parent, const TQString &tipFile, bool force) @@ -332,7 +332,7 @@ void KTipDialog::showTip(TQWidget *parent, const TQString &tipFile, bool force) void KTipDialog::showMultiTip(TQWidget *parent, const TQStringList &tipFiles, bool force) { - TDEConfigGroup configGroup(kapp->config(), "TipOfDay"); + TDEConfigGroup configGroup(tdeApp->config(), "TipOfDay"); const bool runOnStart = configGroup.readBoolEntry("RunOnStart", true); @@ -347,11 +347,11 @@ void KTipDialog::showMultiTip(TQWidget *parent, const TQStringList &tipFiles, bo const int oneDay = 24*60*60; TQDateTime lastShown = configGroup.readDateTimeEntry("TipLastShown"); // Show tip roughly once a week - if (lastShown.secsTo(TQDateTime::currentDateTime()) < (oneDay + (kapp->random() % (10*oneDay)))) + if (lastShown.secsTo(TQDateTime::currentDateTime()) < (oneDay + (tdeApp->random() % (10*oneDay)))) return; } configGroup.writeEntry("TipLastShown", TQDateTime::currentDateTime()); - kapp->config()->sync(); + tdeApp->config()->sync(); if (!hasLastShown) return; // Don't show tip on first start } @@ -418,14 +418,14 @@ static TQString fixTip(TQString tip) void KTipDialog::setShowOnStart(bool on) { - TDEConfigGroup config(kapp->config(), "TipOfDay"); + TDEConfigGroup config(tdeApp->config(), "TipOfDay"); config.writeEntry("RunOnStart", on); config.sync(); } bool KTipDialog::eventFilter(TQObject *o, TQEvent *e) { - if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(mTipText) && e->type()== TQEvent::KeyPress && + if (o == mTipText && e->type()== TQEvent::KeyPress && (((TQKeyEvent *)e)->key() == Key_Return || ((TQKeyEvent *)e)->key() == Key_Space )) accept(); |
