summaryrefslogtreecommitdiffstats
path: root/libtdegames/kcarddialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libtdegames/kcarddialog.cpp')
-rw-r--r--libtdegames/kcarddialog.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/libtdegames/kcarddialog.cpp b/libtdegames/kcarddialog.cpp
index fc73de22..c79a8d78 100644
--- a/libtdegames/kcarddialog.cpp
+++ b/libtdegames/kcarddialog.cpp
@@ -41,9 +41,9 @@
#include <tqpushbutton.h>
#include <kdebug.h>
-#define KCARD_DEFAULTDECK TQString::tqfromLatin1("deck0.png")
-#define KCARD_DEFAULTCARD TQString::tqfromLatin1("11.png")
-#define KCARD_DEFAULTCARDDIR TQString::tqfromLatin1("cards-default/")
+#define KCARD_DEFAULTDECK TQString::fromLatin1("deck0.png")
+#define KCARD_DEFAULTCARD TQString::fromLatin1("11.png")
+#define KCARD_DEFAULTCARDDIR TQString::fromLatin1("cards-default/")
// values for the resize slider
#define SLIDER_MIN 400
@@ -51,19 +51,19 @@
// KConfig entries
#define CONF_GROUP "KCardDialog"
-#define CONF_RANDOMDECK TQString::tqfromLatin1("RandomDeck")
-#define CONF_DECK TQString::tqfromLatin1("Deck")
-#define CONF_CARDDIR TQString::tqfromLatin1("CardDir")
-#define CONF_RANDOMCARDDIR TQString::tqfromLatin1("RandomCardDir")
-#define CONF_USEGLOBALDECK TQString::tqfromLatin1("GlobalDeck")
-#define CONF_USEGLOBALCARDDIR TQString::tqfromLatin1("GlobalCardDir")
-#define CONF_SCALE TQString::tqfromLatin1("Scale")
+#define CONF_RANDOMDECK TQString::fromLatin1("RandomDeck")
+#define CONF_DECK TQString::fromLatin1("Deck")
+#define CONF_CARDDIR TQString::fromLatin1("CardDir")
+#define CONF_RANDOMCARDDIR TQString::fromLatin1("RandomCardDir")
+#define CONF_USEGLOBALDECK TQString::fromLatin1("GlobalDeck")
+#define CONF_USEGLOBALCARDDIR TQString::fromLatin1("GlobalCardDir")
+#define CONF_SCALE TQString::fromLatin1("Scale")
-#define CONF_GLOBAL_GROUP TQString::tqfromLatin1("KCardDialog Settings")
-#define CONF_GLOBAL_DECK TQString::tqfromLatin1("GlobalDeck")
-#define CONF_GLOBAL_CARDDIR TQString::tqfromLatin1("GlobalCardDir")
-#define CONF_GLOBAL_RANDOMDECK TQString::tqfromLatin1("GlobalRandomDeck")
-#define CONF_GLOBAL_RANDOMCARDDIR TQString::tqfromLatin1("GlobalRandomCardDir")
+#define CONF_GLOBAL_GROUP TQString::fromLatin1("KCardDialog Settings")
+#define CONF_GLOBAL_DECK TQString::fromLatin1("GlobalDeck")
+#define CONF_GLOBAL_CARDDIR TQString::fromLatin1("GlobalCardDir")
+#define CONF_GLOBAL_RANDOMDECK TQString::fromLatin1("GlobalRandomDeck")
+#define CONF_GLOBAL_RANDOMCARDDIR TQString::fromLatin1("GlobalRandomCardDir")
class KCardDialogPrivate
@@ -128,9 +128,9 @@ int KCardDialog::getCardDeck(TQString &pDeck, TQString &pCardDir, TQWidget *pPar
// TODO check for global cards/decks!!!!
pDeck=dlg.deck();
pCardDir=dlg.cardDir();
- if (!pCardDir.isNull() && pCardDir.right(1)!=TQString::tqfromLatin1("/"))
+ if (!pCardDir.isNull() && pCardDir.right(1)!=TQString::fromLatin1("/"))
{
- pCardDir+=TQString::tqfromLatin1("/");
+ pCardDir+=TQString::fromLatin1("/");
}
if (pRandomDeck)
{
@@ -218,7 +218,7 @@ void KCardDialog::getConfigCardDeck(KConfig* conf, TQString &pDeck, TQString &pC
TQString KCardDialog::getDefaultDeck()
{
KCardDialog::init();
- return locate("cards", TQString::tqfromLatin1("decks/") + KCARD_DEFAULTDECK);
+ return locate("cards", TQString::fromLatin1("decks/") + KCARD_DEFAULTDECK);
}
TQString KCardDialog::getDefaultCardDir()
@@ -234,12 +234,12 @@ TQString KCardDialog::getCardPath(const TQString &carddir, int index)
KCardDialog::init();
TQString entry = carddir + TQString::number(index);
- if (KStandardDirs::exists(entry + TQString::tqfromLatin1(".png")))
- return entry + TQString::tqfromLatin1(".png");
+ if (KStandardDirs::exists(entry + TQString::fromLatin1(".png")))
+ return entry + TQString::fromLatin1(".png");
// rather theoretical
- if (KStandardDirs::exists(entry + TQString::tqfromLatin1(".xpm")))
- return entry + TQString::tqfromLatin1(".xpm");
+ if (KStandardDirs::exists(entry + TQString::fromLatin1(".xpm")))
+ return entry + TQString::fromLatin1(".xpm");
return TQString();
}
@@ -299,7 +299,7 @@ void KCardDialog::setupDialog(bool showResizeBox)
l->addWidget(grp3, 0, AlignTop|AlignHCenter);
d->deckLabel = new TQLabel(grp3);
d->deckLabel->setText(i18n("empty"));
- d->deckLabel->tqsetAlignment(AlignHCenter|AlignVCenter);
+ d->deckLabel->setAlignment(AlignHCenter|AlignVCenter);
d->deckLabel->setGeometry(10, 20, 80, 90);
d->randomDeck = new TQCheckBox(plainPage());
@@ -349,7 +349,7 @@ void KCardDialog::setupDialog(bool showResizeBox)
l->addWidget(grp4, 0, AlignTop|AlignHCenter);
d->cardLabel = new TQLabel(grp4);
d->cardLabel->setText(i18n("empty"));
- d->cardLabel->tqsetAlignment(AlignHCenter|AlignVCenter);
+ d->cardLabel->setAlignment(AlignHCenter|AlignVCenter);
d->cardLabel->setGeometry(10, 20, 80, 90 );
d->randomCardDir = new TQCheckBox(plainPage());
@@ -465,7 +465,7 @@ void KCardDialog::insertCardIcons()
for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it)
{
KSimpleConfig cfg(*it);
- cfg.setGroup(TQString::tqfromLatin1("KDE Backdeck"));
+ cfg.setGroup(TQString::fromLatin1("KDE Backdeck"));
TQString path = (*it).left((*it).findRev('/') + 1);
assert(path[path.length() - 1] == '/');
TQPixmap pixmap(path + cfg.readEntry("Preview", "12c.png"));
@@ -507,7 +507,7 @@ void KCardDialog::insertDeckIcons()
// pixmap=pixmap.xForm(m);
- cfg.setGroup(TQString::tqfromLatin1("KDE Cards"));
+ cfg.setGroup(TQString::fromLatin1("KDE Cards"));
TQString name=cfg.readEntry("Name", i18n("unnamed"));
TQIconViewItem *item= new TQIconViewItem(d->deckIconView,name, pixmap);
@@ -562,12 +562,12 @@ void KCardDialog::slotCardClicked(TQIconViewItem *item)
TQString KCardDialog::getDeckName(const TQString &desktop)
{
TQString entry = desktop.left(desktop.length() - strlen(".desktop"));
- if (KStandardDirs::exists(entry + TQString::tqfromLatin1(".png")))
- return entry + TQString::tqfromLatin1(".png");
+ if (KStandardDirs::exists(entry + TQString::fromLatin1(".png")))
+ return entry + TQString::fromLatin1(".png");
// rather theoretical
- if (KStandardDirs::exists(entry + TQString::tqfromLatin1(".xpm")))
- return entry + TQString::tqfromLatin1(".xpm");
+ if (KStandardDirs::exists(entry + TQString::fromLatin1(".xpm")))
+ return entry + TQString::fromLatin1(".xpm");
return TQString();
}
@@ -634,8 +634,8 @@ void KCardDialog::slotRandomCardDirToggled(bool on)
if (on) {
d->cardLabel->setText("random");
setCardDir(getRandomCardDir());
- if (cardDir().length()>0 && cardDir().right(1)!=TQString::tqfromLatin1("/")) {
- setCardDir(cardDir() + TQString::tqfromLatin1("/"));
+ if (cardDir().length()>0 && cardDir().right(1)!=TQString::fromLatin1("/")) {
+ setCardDir(cardDir() + TQString::fromLatin1("/"));
}
} else {
d->cardLabel->setText("empty");
@@ -742,7 +742,7 @@ void KCardDialog::saveConfig(KConfig* conf)
void KCardDialog::slotSetGlobalDeck()
{
- KSimpleConfig* conf = new KSimpleConfig(TQString::tqfromLatin1("kdeglobals"), false);
+ KSimpleConfig* conf = new KSimpleConfig(TQString::fromLatin1("kdeglobals"), false);
conf->setGroup(CONF_GLOBAL_GROUP);
conf->writeEntry(CONF_GLOBAL_DECK, deck());
@@ -753,7 +753,7 @@ void KCardDialog::slotSetGlobalDeck()
void KCardDialog::slotSetGlobalCardDir()
{
- KSimpleConfig* conf = new KSimpleConfig(TQString::tqfromLatin1("kdeglobals"), false);
+ KSimpleConfig* conf = new KSimpleConfig(TQString::fromLatin1("kdeglobals"), false);
conf->setGroup(CONF_GLOBAL_GROUP);
conf->writePathEntry(CONF_GLOBAL_CARDDIR, cardDir());
@@ -764,7 +764,7 @@ void KCardDialog::slotSetGlobalCardDir()
void KCardDialog::getGlobalDeck(TQString& deck, bool& random)
{
- KSimpleConfig* conf = new KSimpleConfig(TQString::tqfromLatin1("kdeglobals"), true);
+ KSimpleConfig* conf = new KSimpleConfig(TQString::fromLatin1("kdeglobals"), true);
conf->setGroup(CONF_GLOBAL_GROUP);
if (!conf->hasKey(CONF_GLOBAL_DECK) || conf->readBoolEntry(CONF_GLOBAL_RANDOMDECK, false)) {
@@ -780,7 +780,7 @@ void KCardDialog::getGlobalDeck(TQString& deck, bool& random)
void KCardDialog::getGlobalCardDir(TQString& dir, bool& random)
{
- KSimpleConfig* conf = new KSimpleConfig(TQString::tqfromLatin1("kdeglobals"), true);
+ KSimpleConfig* conf = new KSimpleConfig(TQString::fromLatin1("kdeglobals"), true);
conf->setGroup(CONF_GLOBAL_GROUP);
if (!conf->hasKey(CONF_GLOBAL_CARDDIR) || conf->readBoolEntry(CONF_GLOBAL_RANDOMCARDDIR, false)) {
@@ -799,7 +799,7 @@ void KCardDialog::init()
static bool _inited = false;
if (_inited)
return;
- KGlobal::dirs()->addResourceType("cards", KStandardDirs::kde_default("data") + TQString::tqfromLatin1("carddecks/"));
+ KGlobal::dirs()->addResourceType("cards", KStandardDirs::kde_default("data") + TQString::fromLatin1("carddecks/"));
KGlobal::locale()->insertCatalogue("libtdegames");
_inited = true;