diff options
author | Timothy Pearson <[email protected]> | 2011-12-16 09:58:53 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-16 09:58:53 -0600 |
commit | 84ace1135cac57993b72fee7105b92def1638d32 (patch) | |
tree | b8871eb76e3db4a062731b0ce7c99c24fac119e8 /libtdegames/kcarddialog.cpp | |
parent | 97d1732e257f8700488d7ca1660ae7eba8fc6065 (diff) | |
download | tdegames-84ace1135cac57993b72fee7105b92def1638d32.tar.gz tdegames-84ace1135cac57993b72fee7105b92def1638d32.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 97d1732e257f8700488d7ca1660ae7eba8fc6065.
Diffstat (limited to 'libtdegames/kcarddialog.cpp')
-rw-r--r-- | libtdegames/kcarddialog.cpp | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/libtdegames/kcarddialog.cpp b/libtdegames/kcarddialog.cpp index e45e503e..fc73de22 100644 --- a/libtdegames/kcarddialog.cpp +++ b/libtdegames/kcarddialog.cpp @@ -26,7 +26,7 @@ #include <tqgroupbox.h> #include <tqlabel.h> #include <tqcheckbox.h> -#include <layout.h> +#include <tqlayout.h> #include <tqtooltip.h> #include <tqslider.h> #include <tqwmatrix.h> @@ -41,9 +41,9 @@ #include <tqpushbutton.h> #include <kdebug.h> -#define KCARD_DEFAULTDECK TQString::fromLatin1("deck0.png") -#define KCARD_DEFAULTCARD TQString::fromLatin1("11.png") -#define KCARD_DEFAULTCARDDIR TQString::fromLatin1("cards-default/") +#define KCARD_DEFAULTDECK TQString::tqfromLatin1("deck0.png") +#define KCARD_DEFAULTCARD TQString::tqfromLatin1("11.png") +#define KCARD_DEFAULTCARDDIR TQString::tqfromLatin1("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::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_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_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") +#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") 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::fromLatin1("/")) + if (!pCardDir.isNull() && pCardDir.right(1)!=TQString::tqfromLatin1("/")) { - pCardDir+=TQString::fromLatin1("/"); + pCardDir+=TQString::tqfromLatin1("/"); } if (pRandomDeck) { @@ -218,7 +218,7 @@ void KCardDialog::getConfigCardDeck(KConfig* conf, TQString &pDeck, TQString &pC TQString KCardDialog::getDefaultDeck() { KCardDialog::init(); - return locate("cards", TQString::fromLatin1("decks/") + KCARD_DEFAULTDECK); + return locate("cards", TQString::tqfromLatin1("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::fromLatin1(".png"))) - return entry + TQString::fromLatin1(".png"); + if (KStandardDirs::exists(entry + TQString::tqfromLatin1(".png"))) + return entry + TQString::tqfromLatin1(".png"); // rather theoretical - if (KStandardDirs::exists(entry + TQString::fromLatin1(".xpm"))) - return entry + TQString::fromLatin1(".xpm"); + if (KStandardDirs::exists(entry + TQString::tqfromLatin1(".xpm"))) + return entry + TQString::tqfromLatin1(".xpm"); return TQString(); } @@ -271,11 +271,11 @@ void KCardDialog::setupDialog(bool showResizeBox) if (! (flags() & NoDeck)) { - TQHBoxLayout* layout = new TQHBoxLayout(cardLayout); + TQHBoxLayout* tqlayout = new TQHBoxLayout(cardLayout); // Deck iconview TQGroupBox* grp1 = new TQGroupBox(1,Qt::Horizontal, i18n("Choose Backside"), plainPage()); - layout->addWidget(grp1); + tqlayout->addWidget(grp1); d->deckIconView = new KIconView(grp1,"decks"); d->deckIconView->setSpacing(8); @@ -293,13 +293,13 @@ void KCardDialog::setupDialog(bool showResizeBox) d->deckIconView->showToolTips(); // deck select - TQVBoxLayout* l = new TQVBoxLayout(layout); + TQVBoxLayout* l = new TQVBoxLayout(tqlayout); TQGroupBox* grp3 = new TQGroupBox(i18n("Backside"), plainPage()); grp3->setFixedSize(100, 130); l->addWidget(grp3, 0, AlignTop|AlignHCenter); d->deckLabel = new TQLabel(grp3); d->deckLabel->setText(i18n("empty")); - d->deckLabel->setAlignment(AlignHCenter|AlignVCenter); + d->deckLabel->tqsetAlignment(AlignHCenter|AlignVCenter); d->deckLabel->setGeometry(10, 20, 80, 90); d->randomDeck = new TQCheckBox(plainPage()); @@ -325,9 +325,9 @@ void KCardDialog::setupDialog(bool showResizeBox) if (! (flags() & NoCards)) { // Cards iconview - TQHBoxLayout* layout = new TQHBoxLayout(cardLayout); + TQHBoxLayout* tqlayout = new TQHBoxLayout(cardLayout); TQGroupBox* grp2 = new TQGroupBox(1,Qt::Horizontal, i18n("Choose Frontside"), plainPage()); - layout->addWidget(grp2); + tqlayout->addWidget(grp2); d->cardIconView =new KIconView(grp2,"cards"); /* @@ -343,13 +343,13 @@ void KCardDialog::setupDialog(bool showResizeBox) d->cardIconView->showToolTips(); // Card select - TQVBoxLayout* l = new TQVBoxLayout(layout); + TQVBoxLayout* l = new TQVBoxLayout(tqlayout); TQGroupBox* grp4 = new TQGroupBox(i18n("Frontside"), plainPage()); grp4->setFixedSize(100, 130); l->addWidget(grp4, 0, AlignTop|AlignHCenter); d->cardLabel = new TQLabel(grp4); d->cardLabel->setText(i18n("empty")); - d->cardLabel->setAlignment(AlignHCenter|AlignVCenter); + d->cardLabel->tqsetAlignment(AlignHCenter|AlignVCenter); d->cardLabel->setGeometry(10, 20, 80, 90 ); d->randomCardDir = new TQCheckBox(plainPage()); @@ -422,10 +422,10 @@ void KCardDialog::setupDialog(bool showResizeBox) // large. This is desired behaviour as i don't want to make the box even // larger but i want the complete pixmap to be displayed. the dialog is not // resized if you make the pixmap smaller again. - TQVBoxLayout* layout = new TQVBoxLayout(topLayout); + TQVBoxLayout* tqlayout = new TQVBoxLayout(topLayout); TQGroupBox* grp = new TQGroupBox(1,Qt::Horizontal, i18n("Resize Cards"), plainPage()); - layout->setResizeMode(TQLayout::Fixed); - layout->addWidget(grp); + tqlayout->setResizeMode(TQLayout::Fixed); + tqlayout->addWidget(grp); TQWidget* box = new TQWidget(grp); TQHBoxLayout* hbox = new TQHBoxLayout(box, 0, spacingHint()); TQVBoxLayout* boxLayout = new TQVBoxLayout(hbox); @@ -465,7 +465,7 @@ void KCardDialog::insertCardIcons() for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { KSimpleConfig cfg(*it); - cfg.setGroup(TQString::fromLatin1("KDE Backdeck")); + cfg.setGroup(TQString::tqfromLatin1("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::fromLatin1("KDE Cards")); + cfg.setGroup(TQString::tqfromLatin1("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::fromLatin1(".png"))) - return entry + TQString::fromLatin1(".png"); + if (KStandardDirs::exists(entry + TQString::tqfromLatin1(".png"))) + return entry + TQString::tqfromLatin1(".png"); // rather theoretical - if (KStandardDirs::exists(entry + TQString::fromLatin1(".xpm"))) - return entry + TQString::fromLatin1(".xpm"); + if (KStandardDirs::exists(entry + TQString::tqfromLatin1(".xpm"))) + return entry + TQString::tqfromLatin1(".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::fromLatin1("/")) { - setCardDir(cardDir() + TQString::fromLatin1("/")); + if (cardDir().length()>0 && cardDir().right(1)!=TQString::tqfromLatin1("/")) { + setCardDir(cardDir() + TQString::tqfromLatin1("/")); } } else { d->cardLabel->setText("empty"); @@ -742,7 +742,7 @@ void KCardDialog::saveConfig(KConfig* conf) void KCardDialog::slotSetGlobalDeck() { - KSimpleConfig* conf = new KSimpleConfig(TQString::fromLatin1("kdeglobals"), false); + KSimpleConfig* conf = new KSimpleConfig(TQString::tqfromLatin1("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::fromLatin1("kdeglobals"), false); + KSimpleConfig* conf = new KSimpleConfig(TQString::tqfromLatin1("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::fromLatin1("kdeglobals"), true); + KSimpleConfig* conf = new KSimpleConfig(TQString::tqfromLatin1("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::fromLatin1("kdeglobals"), true); + KSimpleConfig* conf = new KSimpleConfig(TQString::tqfromLatin1("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::fromLatin1("carddecks/")); + KGlobal::dirs()->addResourceType("cards", KStandardDirs::kde_default("data") + TQString::tqfromLatin1("carddecks/")); KGlobal::locale()->insertCatalogue("libtdegames"); _inited = true; |