summaryrefslogtreecommitdiffstats
path: root/kalarm/lib/messagebox.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kalarm/lib/messagebox.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kalarm/lib/messagebox.cpp')
-rw-r--r--kalarm/lib/messagebox.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/kalarm/lib/messagebox.cpp b/kalarm/lib/messagebox.cpp
index 514b45bc2..48c18f1cd 100644
--- a/kalarm/lib/messagebox.cpp
+++ b/kalarm/lib/messagebox.cpp
@@ -24,14 +24,14 @@
KConfig* MessageBox::mConfig = 0;
-QMap<QString, KMessageBox::ButtonCode> MessageBox::mContinueDefaults;
+TQMap<TQString, KMessageBox::ButtonCode> MessageBox::mContinueDefaults;
/******************************************************************************
* Set the default button for continue/cancel message boxes with the specified
* 'dontAskAgainName'.
*/
-void MessageBox::setContinueDefault(const QString& dontAskAgainName, ButtonCode defaultButton)
+void MessageBox::setContinueDefault(const TQString& dontAskAgainName, ButtonCode defaultButton)
{
mContinueDefaults[dontAskAgainName] = (defaultButton == Cancel ? Cancel : Continue);
}
@@ -40,12 +40,12 @@ void MessageBox::setContinueDefault(const QString& dontAskAgainName, ButtonCode
* Get the default button for continue/cancel message boxes with the specified
* 'dontAskAgainName'.
*/
-KMessageBox::ButtonCode MessageBox::getContinueDefault(const QString& dontAskAgainName)
+KMessageBox::ButtonCode MessageBox::getContinueDefault(const TQString& dontAskAgainName)
{
ButtonCode defaultButton = Continue;
if (!dontAskAgainName.isEmpty())
{
- QMap<QString, ButtonCode>::ConstIterator it = mContinueDefaults.find(dontAskAgainName);
+ TQMap<TQString, ButtonCode>::ConstIterator it = mContinueDefaults.find(dontAskAgainName);
if (it != mContinueDefaults.end())
defaultButton = it.data();
}
@@ -60,8 +60,8 @@ KMessageBox::ButtonCode MessageBox::getContinueDefault(const QString& dontAskAga
* warningContinueCancel() for that 'dontAskAgainName' value. If neither method
* has set a default button, Continue is the default.
*/
-int MessageBox::warningContinueCancel(QWidget* parent, const QString& text, const QString& caption,
- const KGuiItem& buttonContinue, const QString& dontAskAgainName)
+int MessageBox::warningContinueCancel(TQWidget* parent, const TQString& text, const TQString& caption,
+ const KGuiItem& buttonContinue, const TQString& dontAskAgainName)
{
ButtonCode defaultButton = getContinueDefault(dontAskAgainName);
return warningContinueCancel(parent, defaultButton, text, caption, buttonContinue, dontAskAgainName);
@@ -72,9 +72,9 @@ int MessageBox::warningContinueCancel(QWidget* parent, const QString& text, cons
* If 'dontAskAgainName' is specified, the message box will only be suppressed
* if the user chose Continue last time.
*/
-int MessageBox::warningContinueCancel(QWidget* parent, ButtonCode defaultButton, const QString& text,
- const QString& caption, const KGuiItem& buttonContinue,
- const QString& dontAskAgainName)
+int MessageBox::warningContinueCancel(TQWidget* parent, ButtonCode defaultButton, const TQString& text,
+ const TQString& caption, const KGuiItem& buttonContinue,
+ const TQString& dontAskAgainName)
{
setContinueDefault(dontAskAgainName, defaultButton);
if (defaultButton != Cancel)
@@ -103,13 +103,13 @@ int MessageBox::warningContinueCancel(QWidget* parent, ButtonCode defaultButton,
* previously to set this for this 'dontShowAgainName' value.
* Reply = true if 'defaultShow' was written.
*/
-bool MessageBox::setDefaultShouldBeShownContinue(const QString& dontShowAgainName, bool defaultShow)
+bool MessageBox::setDefaultShouldBeShownContinue(const TQString& dontShowAgainName, bool defaultShow)
{
if (dontShowAgainName.isEmpty())
return false;
// First check whether there is an existing setting
KConfig* config = mConfig ? mConfig : KGlobal::config();
- config->setGroup(QString::fromLatin1("Notification Messages"));
+ config->setGroup(TQString::fromLatin1("Notification Messages"));
if (config->hasKey(dontShowAgainName))
return false;
@@ -124,7 +124,7 @@ bool MessageBox::setDefaultShouldBeShownContinue(const QString& dontShowAgainNam
* or warningContinueCancel() must have been called previously to set this for this
* 'dontShowAgainName' value.
*/
-bool MessageBox::shouldBeShownContinue(const QString& dontShowAgainName)
+bool MessageBox::shouldBeShownContinue(const TQString& dontShowAgainName)
{
if (getContinueDefault(dontShowAgainName) != Cancel)
return KMessageBox::shouldBeShownContinue(dontShowAgainName);
@@ -139,7 +139,7 @@ bool MessageBox::shouldBeShownContinue(const QString& dontShowAgainName)
* If 'dontShow' is true, the message box will be suppressed and it will return
* 'result'.
*/
-void MessageBox::saveDontShowAgainYesNo(const QString& dontShowAgainName, bool dontShow, ButtonCode result)
+void MessageBox::saveDontShowAgainYesNo(const TQString& dontShowAgainName, bool dontShow, ButtonCode result)
{
saveDontShowAgain(dontShowAgainName, true, dontShow, (result == Yes ? "yes" : "no"));
}
@@ -152,7 +152,7 @@ void MessageBox::saveDontShowAgainYesNo(const QString& dontShowAgainName, bool d
* or warningContinueCancel() must have been called previously to set this for this
* 'dontShowAgainName' value.
*/
-void MessageBox::saveDontShowAgainContinue(const QString& dontShowAgainName, bool dontShow)
+void MessageBox::saveDontShowAgainContinue(const TQString& dontShowAgainName, bool dontShow)
{
if (getContinueDefault(dontShowAgainName) == Cancel)
saveDontShowAgainYesNo(dontShowAgainName, dontShow, Yes);
@@ -163,15 +163,15 @@ void MessageBox::saveDontShowAgainContinue(const QString& dontShowAgainName, boo
/******************************************************************************
* Save whether the message box should not be shown again.
*/
-void MessageBox::saveDontShowAgain(const QString& dontShowAgainName, bool yesno, bool dontShow, const char* yesnoResult)
+void MessageBox::saveDontShowAgain(const TQString& dontShowAgainName, bool yesno, bool dontShow, const char* yesnoResult)
{
if (dontShowAgainName.isEmpty())
return;
KConfig* config = mConfig ? mConfig : KGlobal::config();
- config->setGroup(QString::fromLatin1("Notification Messages"));
+ config->setGroup(TQString::fromLatin1("Notification Messages"));
bool global = (dontShowAgainName[0] == ':');
if (yesno)
- config->writeEntry(dontShowAgainName, QString::fromLatin1(dontShow ? yesnoResult : ""), true, global);
+ config->writeEntry(dontShowAgainName, TQString::fromLatin1(dontShow ? yesnoResult : ""), true, global);
else
config->writeEntry(dontShowAgainName, !dontShow, true, global);
config->sync();