diff options
Diffstat (limited to 'atlantikdesigner')
-rw-r--r-- | atlantikdesigner/designer/Makefile.am | 2 | ||||
-rw-r--r-- | atlantikdesigner/designer/boardinfo.cpp | 20 | ||||
-rw-r--r-- | atlantikdesigner/designer/boardinfo.h | 12 | ||||
-rw-r--r-- | atlantikdesigner/designer/designer.cpp | 102 | ||||
-rw-r--r-- | atlantikdesigner/designer/designer.h | 5 | ||||
-rw-r--r-- | atlantikdesigner/designer/editor.cpp | 108 | ||||
-rw-r--r-- | atlantikdesigner/designer/editor.h | 40 | ||||
-rw-r--r-- | atlantikdesigner/designer/group.cpp | 36 | ||||
-rw-r--r-- | atlantikdesigner/designer/group.h | 5 |
9 files changed, 171 insertions, 159 deletions
diff --git a/atlantikdesigner/designer/Makefile.am b/atlantikdesigner/designer/Makefile.am index ca9fadc..de53920 100644 --- a/atlantikdesigner/designer/Makefile.am +++ b/atlantikdesigner/designer/Makefile.am @@ -1,5 +1,5 @@ bin_PROGRAMS = atlantikdesigner -INCLUDES = -I$(kde_includes)/atlantic $(all_includes) +INCLUDES = -I$(kde_includes)/atlantic $(all_includes) -I$(kde_includes)/kde AM_LDFLAGS = $(all_libraries) $(KDE_RPATH) LDADD = -latlantikui -lkdegames $(LIB_KIO) diff --git a/atlantikdesigner/designer/boardinfo.cpp b/atlantikdesigner/designer/boardinfo.cpp index 56b561a..b7399b0 100644 --- a/atlantikdesigner/designer/boardinfo.cpp +++ b/atlantikdesigner/designer/boardinfo.cpp @@ -15,8 +15,8 @@ #include "boardinfo.h" -BoardInfoDlg::BoardInfoDlg(bool editable, BoardInfo *info, TQWidget *parent, const char *_name, bool modal) - : KDialogBase(KDialogBase::Tabbed, i18n("Gameboard Information"), (editable? Ok|Apply|Cancel : Close), (editable? Ok : Close), parent, _name, modal) +BoardInfoDlg::BoardInfoDlg(bool editable, BoardInfo *info, TQWidget *tqparent, const char *_name, bool modal) + : KDialogBase(KDialogBase::Tabbed, i18n("Gameboard Information"), (editable? Ok|Apply|Cancel : Close), (editable? Ok : Close), tqparent, _name, modal) { if (!info) return; @@ -110,26 +110,26 @@ void BoardInfoDlg::slotOk() /////////////////////////////////// -LotsaEdits::LotsaEdits(bool editable, TQStringList defaults, TQWidget *parent, const char *name) : TQWidget(parent, name) +LotsaEdits::LotsaEdits(bool editable, TQStringList defaults, TQWidget *tqparent, const char *name) : TQWidget(tqparent, name) { list.setAutoDelete(true); this->editable = editable; - layout = new TQVBoxLayout(this, KDialogBase::spacingHint()); - TQHBoxLayout *hlayout = new TQHBoxLayout(layout, KDialogBase::spacingHint()); + tqlayout = new TQVBoxLayout(this, KDialogBase::spacingHint()); + TQHBoxLayout *htqlayout = new TQHBoxLayout(tqlayout, KDialogBase::spacingHint()); if (editable) { KPushButton *more = new KPushButton(i18n("&Add Name"), this); - hlayout->addWidget(more); + htqlayout->addWidget(more); connect(more, TQT_SIGNAL(clicked()), this, TQT_SLOT(more())); - hlayout->addStretch(); + htqlayout->addStretch(); KPushButton *less= new KPushButton(i18n("&Delete Name"), this); - hlayout->addWidget(less); + htqlayout->addWidget(less); connect(less, TQT_SIGNAL(clicked()), this, TQT_SLOT(less())); } - layout->addStretch(); + tqlayout->addStretch(); for (TQStringList::Iterator it = defaults.begin(); it != defaults.end(); ++it) { @@ -148,7 +148,7 @@ void LotsaEdits::more() edit = new KLineEdit(this); else edit = new TQLabel(this); - layout->addWidget(edit); + tqlayout->addWidget(edit); list.append(edit); edit->show(); } diff --git a/atlantikdesigner/designer/boardinfo.h b/atlantikdesigner/designer/boardinfo.h index a1f822e..9faff57 100644 --- a/atlantikdesigner/designer/boardinfo.h +++ b/atlantikdesigner/designer/boardinfo.h @@ -17,7 +17,7 @@ class TQVBoxLayout; struct BoardInfo { - BoardInfo() { bgColor = Qt::lightGray; } + BoardInfo() { bgColor = TQt::lightGray; } TQString name; TQStringList authors; TQStringList credits; @@ -27,12 +27,13 @@ struct BoardInfo TQColor bgColor; }; -class LotsaEdits : public QWidget +class LotsaEdits : public TQWidget { Q_OBJECT + TQ_OBJECT public: - LotsaEdits(bool, QStringList=TQStringList(), TQWidget *parent=0, const char *name=0); + LotsaEdits(bool, TQStringList=TQStringList(), TQWidget *tqparent=0, const char *name=0); public slots: TQStringList save(); @@ -44,15 +45,16 @@ class LotsaEdits : public QWidget private: bool editable; TQPtrList<TQWidget> list; - TQVBoxLayout *layout; + TQVBoxLayout *tqlayout; }; class BoardInfoDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - BoardInfoDlg(bool editable, BoardInfo *, TQWidget *parent=0, const char *_name=0, bool = true); + BoardInfoDlg(bool editable, BoardInfo *, TQWidget *tqparent=0, const char *_name=0, bool = true); protected slots: void slotOk(); diff --git a/atlantikdesigner/designer/designer.cpp b/atlantikdesigner/designer/designer.cpp index 87b548d..7ce7b89 100644 --- a/atlantikdesigner/designer/designer.cpp +++ b/atlantikdesigner/designer/designer.cpp @@ -35,8 +35,8 @@ #include "editor.h" #include "designer.h" -AtlanticDesigner::AtlanticDesigner(TQWidget *parent, const char *name) - : KMainWindow(parent, name) +AtlanticDesigner::AtlanticDesigner(TQWidget *tqparent, const char *name) + : KMainWindow(tqparent, name) { firstBoard = true; estates.setAutoDelete(true); @@ -46,27 +46,27 @@ AtlanticDesigner::AtlanticDesigner(TQWidget *parent, const char *name) copiedEstate = 0; editor = 0; board = 0; - layout = 0; - - (void) KStdAction::quit(this, TQT_SLOT(close()), actionCollection()); - (void) KStdAction::open(this, TQT_SLOT(open()), actionCollection()); - (void) KStdAction::openNew(this, TQT_SLOT(openNew()), actionCollection()); - (void) KStdAction::save(this, TQT_SLOT(save()), actionCollection()); - (void) KStdAction::saveAs(this, TQT_SLOT(saveAs()), actionCollection()); - (void) new KAction(i18n("&Edit Gameboard Info..."), CTRL+Key_I, this, TQT_SLOT(info()), actionCollection(), "boardinfo"); - (void) new KAction(i18n("&Edit Groups..."), CTRL+Key_G, this, TQT_SLOT(editGroups()), actionCollection(), "groupeditor"); - - (void) new KAction(i18n("&Add 4 Squares"), "viewmag+", 0, this, TQT_SLOT(larger()), actionCollection(), "larger"); - (void) new KAction(i18n("&Remove 4 Squares"), "viewmag-", 0, this, TQT_SLOT(smaller()), actionCollection(), "smaller"); - (void) KStdAction::copy(this, TQT_SLOT(copy()), actionCollection()); - (void) KStdAction::paste(this, TQT_SLOT(paste()), actionCollection()); - (void) new KAction(i18n("&Up"), Key_Up, this, TQT_SLOT(up()), actionCollection(), "up"); - (void) new KAction(i18n("&Down"), Key_Down, this, TQT_SLOT(down()), actionCollection(), "down"); - (void) new KAction(i18n("&Left"), Key_Left, this, TQT_SLOT(left()), actionCollection(), "left"); - (void) new KAction(i18n("&Right"), Key_Right, this, TQT_SLOT(right()), actionCollection(), "right"); + tqlayout = 0; + + (void) KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); + (void) KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(open()), actionCollection()); + (void) KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(openNew()), actionCollection()); + (void) KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(save()), actionCollection()); + (void) KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(saveAs()), actionCollection()); + (void) new KAction(i18n("&Edit Gameboard Info..."), CTRL+Key_I, TQT_TQOBJECT(this), TQT_SLOT(info()), actionCollection(), "boardinfo"); + (void) new KAction(i18n("&Edit Groups..."), CTRL+Key_G, TQT_TQOBJECT(this), TQT_SLOT(editGroups()), actionCollection(), "groupeditor"); + + (void) new KAction(i18n("&Add 4 Squares"), "viewmag+", 0, TQT_TQOBJECT(this), TQT_SLOT(larger()), actionCollection(), "larger"); + (void) new KAction(i18n("&Remove 4 Squares"), "viewmag-", 0, TQT_TQOBJECT(this), TQT_SLOT(smaller()), actionCollection(), "smaller"); + (void) KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(copy()), actionCollection()); + (void) KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(paste()), actionCollection()); + (void) new KAction(i18n("&Up"), Key_Up, TQT_TQOBJECT(this), TQT_SLOT(up()), actionCollection(), "up"); + (void) new KAction(i18n("&Down"), Key_Down, TQT_TQOBJECT(this), TQT_SLOT(down()), actionCollection(), "down"); + (void) new KAction(i18n("&Left"), Key_Left, TQT_TQOBJECT(this), TQT_SLOT(left()), actionCollection(), "left"); + (void) new KAction(i18n("&Right"), Key_Right, TQT_TQOBJECT(this), TQT_SLOT(right()), actionCollection(), "right"); recentAct = KStdAction::openRecent(0, 0, actionCollection()); - connect(recentAct, TQT_SIGNAL(urlSelected(const KURL &)), this, TQT_SLOT(openRecent(const KURL &))); + connect(recentAct, TQT_SIGNAL(urlSelected(const KURL &)), TQT_TQOBJECT(this), TQT_SLOT(openRecent(const KURL &))); recentAct->loadEntries(KGlobal::config(), "Designer recent files"); estateAct = new KListAction(i18n("Change Estate"), 0, 0, 0, actionCollection(), "estate_num"); @@ -76,10 +76,10 @@ AtlanticDesigner::AtlanticDesigner(TQWidget *parent, const char *name) KConfig *config = kapp->config(); config->setGroup("General"); - TQColor defaultColor = colorGroup().background(); + TQColor defaultColor = tqcolorGroup().background(); defaultBg = config->readColorEntry("alternateBackground", &defaultColor); config->setGroup("WM"); - defaultColor = colorGroup().dark(); + defaultColor = tqcolorGroup().dark(); defaultFg = config->readColorEntry("activeBackground", &defaultColor); // these must match up to the ones in editor.cpp! @@ -130,17 +130,17 @@ void AtlanticDesigner::initBoard() delete editor; delete board; - delete layout; + delete tqlayout; board = new AtlantikBoard(0, max, AtlantikBoard::Edit, this, "Board"); setCentralWidget(board); - layout = new TQVBoxLayout(board->centerWidget()); + tqlayout = new TQVBoxLayout(board->centerWidget()); editor = new EstateEdit(&groups, &estates, &cards, board->centerWidget(), "Estate Editor"); - connect(editor, TQT_SIGNAL(goChecked(int)), this, TQT_SLOT(goChanged(int))); - connect(editor, TQT_SIGNAL(updateBackground()), this, TQT_SLOT(updateBackground())); + connect(editor, TQT_SIGNAL(goChecked(int)), TQT_TQOBJECT(this), TQT_SLOT(goChanged(int))); + connect(editor, TQT_SIGNAL(updateBackground()), TQT_TQOBJECT(this), TQT_SLOT(updateBackground())); connect(editor, TQT_SIGNAL(resized()), board, TQT_SLOT(slotResizeAftermath())); - layout->addWidget(editor); + tqlayout->addWidget(editor); editor->setReady(false); @@ -166,7 +166,7 @@ void AtlanticDesigner::openNew() { if (warnClose()) return; - filename = TQString::null; + filename = TQString(); max = 40; @@ -184,7 +184,7 @@ void AtlanticDesigner::openNew() groupsChanged(); updateBackground(); - TQTimer::singleShot(500, this, TQT_SLOT(setPlayerAtBeginning())); + TQTimer::singleShot(500, TQT_TQOBJECT(this), TQT_SLOT(setPlayerAtBeginning())); doCaption(false); } @@ -198,8 +198,8 @@ ConfigEstate *AtlanticDesigner::newEstate(int i) estate->setChanged(false); estates.insert(i, estate); - connect(estate, TQT_SIGNAL(LMBClicked(Estate *)), this, TQT_SLOT(changeEstate(Estate *))); - connect(estate, TQT_SIGNAL(changed()), this, TQT_SLOT(modified())); + connect(estate, TQT_SIGNAL(LMBClicked(Estate *)), TQT_TQOBJECT(this), TQT_SLOT(changeEstate(Estate *))); + connect(estate, TQT_SIGNAL(changed()), TQT_TQOBJECT(this), TQT_SLOT(modified())); board->addEstateView(estate); @@ -303,7 +303,7 @@ void AtlanticDesigner::openFile(const TQString &filename) } // this for outside-of-[]-settings - int eqSign = s.find("="); + int eqSign = s.tqfind("="); if (eqSign >= 0) { TQString key = s.left(eqSign); @@ -344,8 +344,8 @@ void AtlanticDesigner::openFile(const TQString &filename) continue; } - name = s.left(s.find("]")); - name = name.right(name.length() - name.find("[") - 1); + name = s.left(s.tqfind("]")); + name = name.right(name.length() - name.tqfind("[") - 1); if (name.isEmpty()) name = i18n("No Name"); @@ -380,7 +380,7 @@ void AtlanticDesigner::openFile(const TQString &filename) if (s.left(1) == "[" || s.left(1) == "<") break; - int eqSign = s.find("="); + int eqSign = s.tqfind("="); if (eqSign < 0) continue; @@ -486,8 +486,8 @@ void AtlanticDesigner::openFile(const TQString &filename) estate->setPassMoney(passMoney); estates.append(estate); - connect(estate, TQT_SIGNAL(LMBClicked(Estate *)), this, TQT_SLOT(changeEstate(Estate *))); - connect(estate, TQT_SIGNAL(changed()), this, TQT_SLOT(modified())); + connect(estate, TQT_SIGNAL(LMBClicked(Estate *)), TQT_TQOBJECT(this), TQT_SLOT(changeEstate(Estate *))); + connect(estate, TQT_SIGNAL(changed()), TQT_TQOBJECT(this), TQT_SLOT(modified())); i++; } else if (parseMode == Parse_Cards) @@ -526,7 +526,7 @@ void AtlanticDesigner::openFile(const TQString &filename) if (i < 8) { - KMessageBox::detailedSorry(this, i18n("This board file is invalid; cannot open."), i18n("There are only %1 estates specified in this file.").arg(i)); + KMessageBox::detailedSorry(this, i18n("This board file is invalid; cannot open."), i18n("There are only %1 estates specified in this file.").tqarg(i)); if (this->filename.isNull()) close(); return; @@ -545,7 +545,7 @@ void AtlanticDesigner::openFile(const TQString &filename) updateBackground(); updateJumpMenu(); - TQTimer::singleShot(500, this, TQT_SLOT(setPlayerAtBeginning())); + TQTimer::singleShot(500, TQT_TQOBJECT(this), TQT_SLOT(setPlayerAtBeginning())); doCaption(false); } @@ -553,7 +553,7 @@ void AtlanticDesigner::updateJumpMenu() { TQStringList estates; for (int i = 1; i <= max; i++) - estates.append(i18n("Jump to Estate %1").arg(TQString::number(i))); + estates.append(i18n("Jump to Estate %1").tqarg(TQString::number(i))); estateAct->setItems(estates); } @@ -574,7 +574,7 @@ void AtlanticDesigner::setPlayerAtBeginning() void AtlanticDesigner::saveAs() { TQString oldfilename = filename; - filename = TQString::null; + filename = TQString(); save(); @@ -658,7 +658,7 @@ void AtlanticDesigner::save() for (ConfigEstateGroupList::Iterator it = groups.begin(); it != groups.end(); ++it) { - if (writtenGroups.contains((*it).name()) > 0) + if (writtenGroups.tqcontains((*it).name()) > 0) continue; if ((*it).name() == "Default") @@ -679,7 +679,7 @@ void AtlanticDesigner::save() writtenGroups.append((*it).name()); - t << endl << TQString("[%1]").arg((*it).name()) << endl; + t << endl << TQString("[%1]").tqarg((*it).name()) << endl; if ((*it).globalPrice() > 0) t << "price=" << (*it).globalPrice() << endl; @@ -748,7 +748,7 @@ void AtlanticDesigner::save() for (estate = estates.first(); estate; estate = estates.next()) { - t << endl << TQString("[%1]").arg(estate->name()) << endl; + t << endl << TQString("[%1]").tqarg(estate->name()) << endl; switch (estate->type()) { @@ -895,7 +895,7 @@ void AtlanticDesigner::larger() groupsChanged(); updateBackground(); - TQTimer::singleShot(500, this, TQT_SLOT(setPlayerAtBeginning())); + TQTimer::singleShot(500, TQT_TQOBJECT(this), TQT_SLOT(setPlayerAtBeginning())); doCaption(true); } @@ -934,7 +934,7 @@ void AtlanticDesigner::smaller() updateJumpMenu(); groupsChanged(); updateBackground(); - TQTimer::singleShot(500, this, TQT_SLOT(setPlayerAtBeginning())); + TQTimer::singleShot(500, TQT_TQOBJECT(this), TQT_SLOT(setPlayerAtBeginning())); doCaption(true); } @@ -957,8 +957,8 @@ void AtlanticDesigner::editGroups() groupEditor = new GroupEditor(&groups, this); groupEditor->show(); - connect(groupEditor, TQT_SIGNAL(changed()), this, TQT_SLOT(modified())); - connect(groupEditor, TQT_SIGNAL(update()), this, TQT_SLOT(groupsChanged())); + connect(groupEditor, TQT_SIGNAL(changed()), TQT_TQOBJECT(this), TQT_SLOT(modified())); + connect(groupEditor, TQT_SIGNAL(update()), TQT_TQOBJECT(this), TQT_SLOT(groupsChanged())); connect(groupEditor, TQT_SIGNAL(update()), editor, TQT_SLOT(groupsChanged())); } else @@ -1019,8 +1019,8 @@ void AtlanticDesigner::info() boardInfoDlg = new BoardInfoDlg(true, &boardInfo, this, "Board Information", false); boardInfoDlg->show(); - connect(boardInfoDlg, TQT_SIGNAL(okClicked()), this, TQT_SLOT(updateBackground())); - connect(boardInfoDlg, TQT_SIGNAL(okClicked()), this, TQT_SLOT(modified())); + connect(boardInfoDlg, TQT_SIGNAL(okClicked()), TQT_TQOBJECT(this), TQT_SLOT(updateBackground())); + connect(boardInfoDlg, TQT_SIGNAL(okClicked()), TQT_TQOBJECT(this), TQT_SLOT(modified())); } else boardInfoDlg->raise(); diff --git a/atlantikdesigner/designer/designer.h b/atlantikdesigner/designer/designer.h index 69e7790..f8c9674 100644 --- a/atlantikdesigner/designer/designer.h +++ b/atlantikdesigner/designer/designer.h @@ -25,9 +25,10 @@ class AtlantikBoard; class AtlanticDesigner : public KMainWindow { Q_OBJECT + TQ_OBJECT public: - AtlanticDesigner(TQWidget *parent = 0, const char *name = 0); + AtlanticDesigner(TQWidget *tqparent = 0, const char *name = 0); ~AtlanticDesigner(); protected: @@ -74,7 +75,7 @@ class AtlanticDesigner : public KMainWindow ConfigEstate *newEstate(int); TQGuardedPtr<EstateEdit> editor; - TQGuardedPtr<TQVBoxLayout> layout; + TQGuardedPtr<TQVBoxLayout> tqlayout; TQGuardedPtr<AtlantikBoard> board; TQGuardedPtr<GroupEditor> groupEditor; TQGuardedPtr<BoardInfoDlg> boardInfoDlg; diff --git a/atlantikdesigner/designer/editor.cpp b/atlantikdesigner/designer/editor.cpp index fd978d2..407e03d 100644 --- a/atlantikdesigner/designer/editor.cpp +++ b/atlantikdesigner/designer/editor.cpp @@ -144,8 +144,8 @@ void ConfigEstate::setPassMoney(const int passMoney) TQStringList types; -EstateEdit::EstateEdit(ConfigEstateGroupList *newGroups, EstateList *estates, TQValueList<CardStack> *cards, TQWidget *parent, const char *name) - : TQWidget(parent, name) +EstateEdit::EstateEdit(ConfigEstateGroupList *newGroups, EstateList *estates, TQValueList<CardStack> *cards, TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { groups = newGroups; @@ -172,19 +172,19 @@ EstateEdit::EstateEdit(ConfigEstateGroupList *newGroups, EstateList *estates, TQ connect(this, TQT_SIGNAL(somethingChanged()), this, TQT_SLOT(saveEstate())); - layout = new TQGridLayout(this, 7, 1, KDialog::marginHint(), KDialog::spacingHint()); + tqlayout = new TQGridLayout(this, 7, 1, KDialog::marginHint(), KDialog::spacingHint()); nameEdit = new TQLineEdit(this, "Name Edit"); - layout->addWidget(nameEdit, 0, 0); + tqlayout->addWidget(nameEdit, 0, 0); connect(nameEdit, TQT_SIGNAL(returnPressed()), this, TQT_SIGNAL(somethingChanged())); confDlg = 0; - layout->setRowStretch(2, 2); + tqlayout->setRowStretch(2, 2); - layout->addWidget(new KSeparator(this), 3, 0); + tqlayout->addWidget(new KSeparator(this), 3, 0); TQHBoxLayout *typeLayout = new TQHBoxLayout(KDialog::spacingHint()); - layout->addLayout(typeLayout, 4, 0); + tqlayout->addLayout(typeLayout, 4, 0); TQLabel *typeLabel = new TQLabel(i18n("Type:"), this); typeLayout->addWidget(typeLabel); @@ -196,10 +196,10 @@ EstateEdit::EstateEdit(ConfigEstateGroupList *newGroups, EstateList *estates, TQ goCheck = new TQCheckBox(i18n("This estate is 'Go'"), this); connect(goCheck, TQT_SIGNAL(toggled(bool)), this, TQT_SIGNAL(somethingChanged())); connect(goCheck, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(goToggled(bool))); - layout->addWidget(goCheck, 5, 0); + tqlayout->addWidget(goCheck, 5, 0); TQHBoxLayout *passMoneyLayout = new TQHBoxLayout(KDialog::spacingHint()); - layout->addLayout(passMoneyLayout, 6, 0); + tqlayout->addLayout(passMoneyLayout, 6, 0); TQLabel *passMoneyLabel = new TQLabel(i18n("Pass money:"), this); passMoneyLayout->addWidget(passMoneyLabel); passMoney = new TQSpinBox(0, 3000, 10, this); @@ -327,7 +327,7 @@ void EstateEdit::configure() connect(confDlg, TQT_SIGNAL(updateBackground()), this, TQT_SIGNAL(updateBackground())); - layout->addWidget(confDlg, 1, 0); + tqlayout->addWidget(confDlg, 1, 0); confDlg->show(); oldType = typeCombo->currentItem(); @@ -378,8 +378,8 @@ bool EstateEdit::rightArrow()const ///////////////////////////////// -TaxDlg::TaxDlg(TQWidget *parent, char *name) - : EstateDlg(parent, name) +TaxDlg::TaxDlg(TQWidget *tqparent, char *name) + : EstateDlg(tqparent, name) { TQGridLayout *taxBox = new TQGridLayout(this, 2, 2, KDialog::marginHint(), KDialog::spacingHint()); taxBox->addWidget(new TQLabel(i18n("Fixed tax:"), this), 0, 0); @@ -406,14 +406,14 @@ void TaxDlg::update() ///////////////////////////////// -GenericDlg::GenericDlg(TQWidget *parent, char *name) - : EstateDlg(parent, name) +GenericDlg::GenericDlg(TQWidget *tqparent, char *name) + : EstateDlg(tqparent, name) { - TQHBoxLayout *layout = new TQHBoxLayout(this, KDialog::spacingHint()); - layout->addWidget(new TQLabel(i18n("Background:"), this)); + TQHBoxLayout *tqlayout = new TQHBoxLayout(this, KDialog::spacingHint()); + tqlayout->addWidget(new TQLabel(i18n("Background:"), this)); col = new KColorButton(this); - layout->addWidget(col); + tqlayout->addWidget(col); } void GenericDlg::save() @@ -429,40 +429,40 @@ void GenericDlg::update() ///////////////////////////////// -CardsDlg::CardsDlg(EstateList *newEstates, TQValueList<CardStack> *newCards, TQWidget *parent, char *name) - : EstateDlg(parent, name) +CardsDlg::CardsDlg(EstateList *newEstates, TQValueList<CardStack> *newCards, TQWidget *tqparent, char *name) + : EstateDlg(tqparent, name) { estates = newEstates; stacks = newCards; view = 0; - vlayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); + vtqlayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); - TQHBoxLayout *layout = new TQHBoxLayout(vlayout, KDialog::spacingHint()); + TQHBoxLayout *tqlayout = new TQHBoxLayout(vtqlayout, KDialog::spacingHint()); KPushButton *addB = new KPushButton(i18n("&New Stack"), this); connect(addB, TQT_SIGNAL(clicked()), this, TQT_SLOT(addStack())); - layout->addWidget(addB); - layout->addStretch(); + tqlayout->addWidget(addB); + tqlayout->addStretch(); - layout->addWidget(new TQLabel(i18n("Cards from"), this)); + tqlayout->addWidget(new TQLabel(i18n("Cards from"), this)); TQStringList cardNames; for (TQValueList<CardStack>::Iterator it = stacks->begin(); it != stacks->end(); ++it) cardNames.append((*it).name()); cards = new TQComboBox(this); cards->insertStringList(cardNames); - layout->addWidget(cards); + tqlayout->addWidget(cards); connect(cards, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(updateView(const TQString &))); - vlayout->addWidget(new KSeparator(this)); + vtqlayout->addWidget(new KSeparator(this)); } void CardsDlg::addStack() { bool ok; - TQString name = KLineEditDlg::getText(i18n("Add Stack"), i18n("Enter the name of the new stack:"), TQString::null, &ok, this); + TQString name = KLineEditDlg::getText(i18n("Add Stack"), i18n("Enter the name of the new stack:"), TQString(), &ok, this); if (ok) { for (TQValueList<CardStack>::Iterator it = stacks->begin(); it != stacks->end(); ++it) @@ -493,7 +493,7 @@ void CardsDlg::updateView(const TQString &curName) delete view; view = new CardView(estates, curStack, this); - vlayout->addWidget(view); + vtqlayout->addWidget(view); view->show(); } @@ -515,8 +515,8 @@ void CardsDlg::update() ///////////////////////////////// -ChooseWidget::ChooseWidget(EstateList *estates, int id, Card *card, TQWidget *parent, char *name) - : TQWidget (parent, name) +ChooseWidget::ChooseWidget(EstateList *estates, int id, Card *card, TQWidget *tqparent, char *name) + : TQWidget (tqparent, name) { this->id = id; this->card = card; @@ -530,7 +530,7 @@ ChooseWidget::ChooseWidget(EstateList *estates, int id, Card *card, TQWidget *pa value = 0; - hlayout = new TQHBoxLayout(this, KDialog::spacingHint()); + htqlayout = new TQHBoxLayout(this, KDialog::spacingHint()); typeCombo = new KComboBox(this); TQStringList _types(i18n("Pay")); _types.append(i18n("Pay Each Player")); @@ -546,10 +546,10 @@ ChooseWidget::ChooseWidget(EstateList *estates, int id, Card *card, TQWidget *pa _types.append(i18n("Pay for Each House")); _types.append(i18n("Pay for Each Hotel")); typeCombo->insertStringList(_types); - hlayout->addWidget(typeCombo); + htqlayout->addWidget(typeCombo); connect(typeCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(typeChanged(int))); - hlayout->addStretch(); + htqlayout->addStretch(); } void ChooseWidget::valueChanged(int i) @@ -588,7 +588,7 @@ void ChooseWidget::typeChanged(int i) value = new TQSpinBox(0, 2000, (key == "advance" || key == "goback")? 1 : 5, this); - hlayout->addWidget(value); + htqlayout->addWidget(value); connect(value, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(valueChanged(int))); value->show(); @@ -605,7 +605,7 @@ void ChooseWidget::typeChanged(int i) estate->insertStringList(estateStrings); connect(estate, TQT_SIGNAL(activated(int)), this, TQT_SLOT(estateChanged(int))); - hlayout->addWidget(estate); + htqlayout->addWidget(estate); estate->show(); } @@ -640,7 +640,7 @@ Skipped: ///////////////////////////////// -CardView::CardView(EstateList *estates, CardStack *stack, TQWidget *parent, char *name) : TQWidget(parent, name) +CardView::CardView(EstateList *estates, CardStack *stack, TQWidget *tqparent, char *name) : TQWidget(tqparent, name) { card = 0; @@ -649,36 +649,36 @@ CardView::CardView(EstateList *estates, CardStack *stack, TQWidget *parent, char choosies.setAutoDelete(true); - layout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); - TQHBoxLayout *hlayout = new TQHBoxLayout(layout, KDialog::spacingHint()); + tqlayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); + TQHBoxLayout *htqlayout = new TQHBoxLayout(tqlayout, KDialog::spacingHint()); addButton = new KPushButton(i18n("&Add Card..."), this); connect(addButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(add())); - hlayout->addWidget(addButton); - hlayout->addStretch(); + htqlayout->addWidget(addButton); + htqlayout->addStretch(); renameButton = new KPushButton(i18n("&Rename..."), this); connect(renameButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(rename())); - hlayout->addWidget(renameButton); - hlayout->addStretch(); + htqlayout->addWidget(renameButton); + htqlayout->addStretch(); delButton = new KPushButton(i18n("&Delete"), this); connect(delButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(del())); - hlayout->addWidget(delButton); + htqlayout->addWidget(delButton); List = new KListBox(this); - layout->addWidget(List); + tqlayout->addWidget(List); connect(List, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(selected(int))); // it gets very big (and won't shrink) otherwise List->setMaximumHeight(90); - hlayout = new TQHBoxLayout(layout, KDialog::spacingHint()); + htqlayout = new TQHBoxLayout(tqlayout, KDialog::spacingHint()); moreButton = new KPushButton(i18n("&More Properties"), this); connect(moreButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(more())); - hlayout->addWidget(moreButton); - hlayout->addStretch(); + htqlayout->addWidget(moreButton); + htqlayout->addStretch(); lessButton = new KPushButton(i18n("&Fewer Properties"), this); connect(lessButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(less())); - hlayout->addWidget(lessButton); + htqlayout->addWidget(lessButton); for (CardStack::Iterator it = stack->begin(); it != stack->end(); ++it) List->insertItem((*it).name); @@ -698,7 +698,7 @@ void CardView::more() newChooseWidget->valueChanged(0); choosies.append(newChooseWidget); - layout->addWidget(newChooseWidget); + tqlayout->addWidget(newChooseWidget); newChooseWidget->show(); @@ -720,7 +720,7 @@ void CardView::less() void CardView::add() { bool ok = false; - TQString name = KLineEditDlg::getText(i18n("Add Card"), i18n("Enter the name of the new card:"), TQString::null, &ok, this); + TQString name = KLineEditDlg::getText(i18n("Add Card"), i18n("Enter the name of the new card:"), TQString(), &ok, this); if (ok) List->insertItem(name, 0); @@ -780,11 +780,11 @@ void CardView::selected(int i) ChooseWidget *newChooseWidget = new ChooseWidget(estates, choosies.count(), card, this); choosies.append(newChooseWidget); - layout->addWidget(newChooseWidget); + tqlayout->addWidget(newChooseWidget); newChooseWidget->show(); - newChooseWidget->typeChanged(types.findIndex(*it)); + newChooseWidget->typeChanged(types.tqfindIndex(*it)); newChooseWidget->valueChanged(*vit); newChooseWidget->estateChanged(*vit); @@ -812,8 +812,8 @@ void CardView::updateButtonsEnabled() ///////////////////////////////// -StreetDlg::StreetDlg(ConfigEstateGroupList *newGroups, TQWidget *parent, char *name) - : EstateDlg(parent, name) +StreetDlg::StreetDlg(ConfigEstateGroupList *newGroups, TQWidget *tqparent, char *name) + : EstateDlg(tqparent, name) { groups = newGroups; diff --git a/atlantikdesigner/designer/editor.h b/atlantikdesigner/designer/editor.h index ebc768d..4abc9ce 100644 --- a/atlantikdesigner/designer/editor.h +++ b/atlantikdesigner/designer/editor.h @@ -84,12 +84,13 @@ class CardStack : public TQValueList<Card> TQString m_name; }; -class EstateDlg : public QWidget +class EstateDlg : public TQWidget { Q_OBJECT + TQ_OBJECT public: - EstateDlg(TQWidget *parent = 0, char *name = 0) : TQWidget(parent, name) { estate = 0; } + EstateDlg(TQWidget *tqparent = 0, char *name = 0) : TQWidget(tqparent, name) { estate = 0; } signals: void updateBackground(); @@ -106,12 +107,13 @@ class EstateDlg : public QWidget ConfigEstate *estate; }; -class EstateEdit : public QWidget +class EstateEdit : public TQWidget { Q_OBJECT + TQ_OBJECT public: - EstateEdit(ConfigEstateGroupList *, EstateList *, TQValueList<CardStack> *, TQWidget *parent = 0, const char *name = 0); + EstateEdit(ConfigEstateGroupList *, EstateList *, TQValueList<CardStack> *, TQWidget *tqparent = 0, const char *name = 0); ConfigEstate *theEstate() { return estate; } bool upArrow()const; bool downArrow()const; @@ -145,7 +147,7 @@ class EstateEdit : public QWidget TQCheckBox *goCheck; TQSpinBox *passMoney; TQWidget *centerWidget; - TQGridLayout *layout; + TQGridLayout *tqlayout; EstateList *estates; TQValueList<CardStack> *cards; @@ -161,12 +163,13 @@ class EstateEdit : public QWidget bool locked; }; -class ChooseWidget : public QWidget +class ChooseWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - ChooseWidget(EstateList *, int id, Card *, TQWidget *parent = 0, char *name = 0); + ChooseWidget(EstateList *, int id, Card *, TQWidget *tqparent = 0, char *name = 0); public slots: void typeChanged(int); @@ -181,19 +184,20 @@ class ChooseWidget : public QWidget bool number; bool prevNumber; bool init; - TQHBoxLayout *hlayout; + TQHBoxLayout *htqlayout; EstateList *estates; int id; }; -class CardView : public QWidget +class CardView : public TQWidget { Q_OBJECT + TQ_OBJECT public: - CardView(EstateList *, CardStack *, TQWidget *parent = 0, char *name = 0); + CardView(EstateList *, CardStack *, TQWidget *tqparent = 0, char *name = 0); private slots: void selected(int); @@ -214,7 +218,7 @@ class CardView : public QWidget EstateList *estates; - TQVBoxLayout *layout; + TQVBoxLayout *tqlayout; Card *card; @@ -225,9 +229,10 @@ class CardView : public QWidget class TaxDlg : public EstateDlg { Q_OBJECT + TQ_OBJECT public: - TaxDlg(TQWidget *parent = 0, char *name = 0); + TaxDlg(TQWidget *tqparent = 0, char *name = 0); protected: virtual void save(); @@ -241,9 +246,10 @@ class TaxDlg : public EstateDlg class GenericDlg : public EstateDlg { Q_OBJECT + TQ_OBJECT public: - GenericDlg(TQWidget *parent = 0, char *name = 0); + GenericDlg(TQWidget *tqparent = 0, char *name = 0); protected: virtual void save(); @@ -256,9 +262,10 @@ class GenericDlg : public EstateDlg class CardsDlg : public EstateDlg { Q_OBJECT + TQ_OBJECT public: - CardsDlg(EstateList *, TQValueList<CardStack> *, TQWidget *parent = 0, char *name = 0); + CardsDlg(EstateList *, TQValueList<CardStack> *, TQWidget *tqparent = 0, char *name = 0); protected: virtual void save(); @@ -274,15 +281,16 @@ class CardsDlg : public EstateDlg TQComboBox *cards; CardView *view; - TQVBoxLayout *vlayout; + TQVBoxLayout *vtqlayout; }; class StreetDlg : public EstateDlg { Q_OBJECT + TQ_OBJECT public: - StreetDlg(ConfigEstateGroupList *, TQWidget *parent = 0, char *name = 0); + StreetDlg(ConfigEstateGroupList *, TQWidget *tqparent = 0, char *name = 0); protected: virtual void save(); diff --git a/atlantikdesigner/designer/group.cpp b/atlantikdesigner/designer/group.cpp index 8f4d513..cd804e6 100644 --- a/atlantikdesigner/designer/group.cpp +++ b/atlantikdesigner/designer/group.cpp @@ -19,17 +19,17 @@ #include "group.h" -GroupEditor::GroupEditor(ConfigEstateGroupList *newList, TQWidget *parent) - : KDialogBase(KDialogBase::Plain, i18n("Group Editor"), Ok|Apply|Cancel, Ok, parent, "Group Editor", false, true), mylist(*newList) +GroupEditor::GroupEditor(ConfigEstateGroupList *newList, TQWidget *tqparent) + : KDialogBase(KDialogBase::Plain, i18n("Group Editor"), Ok|Apply|Cancel, Ok, tqparent, "Group Editor", false, true), mylist(*newList) { setWFlags(WDestructiveClose); list = newList; TQFrame *page = plainPage(); - TQHBoxLayout *hlayout = new TQHBoxLayout(page, marginHint(), spacingHint()); + TQHBoxLayout *htqlayout = new TQHBoxLayout(page, marginHint(), spacingHint()); groups = new KListBox(page); - hlayout->addWidget(groups); + htqlayout->addWidget(groups); connect(groups, TQT_SIGNAL(highlighted(TQListBoxItem *)), this, TQT_SLOT(updateSettings(TQListBoxItem *))); TQStringList newgroups; for (ConfigEstateGroupList::Iterator it = list->begin(); it != list->end(); ++it) @@ -37,22 +37,22 @@ GroupEditor::GroupEditor(ConfigEstateGroupList *newList, TQWidget *parent) groups->insertStringList(newgroups); connect(groups, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(selectionChanged())); - TQVBoxLayout *vlayout = new TQVBoxLayout(hlayout, spacingHint()); - colorGroupBox = new TQVGroupBox(i18n("&Colors"), page); - vlayout->addWidget(colorGroupBox); + TQVBoxLayout *vtqlayout = new TQVBoxLayout(htqlayout, spacingHint()); + tqcolorGroupBox = new TQVGroupBox(i18n("&Colors"), page); + vtqlayout->addWidget(tqcolorGroupBox); - (void) new TQLabel(i18n("Foreground:"), colorGroupBox); - fgButton = new KColorButton(colorGroupBox, "Foreground Button"); + (void) new TQLabel(i18n("Foreground:"), tqcolorGroupBox); + fgButton = new KColorButton(tqcolorGroupBox, "Foreground Button"); connect(fgButton, TQT_SIGNAL(changed(const TQColor &)), this, TQT_SLOT(fgChanged(const TQColor &))); connect(fgButton, TQT_SIGNAL(changed(const TQColor &)), this, TQT_SIGNAL(changed())); - (void) new TQLabel(i18n("Background:"), colorGroupBox); - bgButton = new KColorButton(colorGroupBox, "Background Button"); + (void) new TQLabel(i18n("Background:"), tqcolorGroupBox); + bgButton = new KColorButton(tqcolorGroupBox, "Background Button"); connect(bgButton, TQT_SIGNAL(changed(const TQColor &)), this, TQT_SLOT(bgChanged(const TQColor &))); connect(bgButton, TQT_SIGNAL(changed(const TQColor &)), this, TQT_SIGNAL(changed())); pricesGroupBox = new TQVGroupBox(i18n("&Prices"), page); - vlayout->addWidget(pricesGroupBox); + vtqlayout->addWidget(pricesGroupBox); pricesWidget = new TQWidget(pricesGroupBox); TQGridLayout *pricesLayout = new TQGridLayout(pricesWidget, 2, 2, 0, spacingHint()); @@ -69,7 +69,7 @@ GroupEditor::GroupEditor(ConfigEstateGroupList *newList, TQWidget *parent) connect(globalPrice, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(globalPriceChanged(int))); dynamicGroupBox = new TQVGroupBox(i18n("&Dynamic Rent"), page); - vlayout->addWidget(dynamicGroupBox); + vtqlayout->addWidget(dynamicGroupBox); mathWidget = new TQWidget(dynamicGroupBox); TQGridLayout *mathLayout = new TQGridLayout(mathWidget, 2, 2, 0, spacingHint()); @@ -89,13 +89,13 @@ GroupEditor::GroupEditor(ConfigEstateGroupList *newList, TQWidget *parent) connect(rentVarCombo, TQT_SIGNAL(activated(const TQString &)), rentMathEdit, TQT_SLOT(insert(const TQString &))); mathLayout->addWidget(rentMathEdit, 1, 1); - TQHBoxLayout *buttonlayout = new TQHBoxLayout(vlayout, spacingHint()); + TQHBoxLayout *buttontqlayout = new TQHBoxLayout(vtqlayout, spacingHint()); KPushButton *addB = new KPushButton(i18n("&Add..."), page); - buttonlayout->addWidget(addB); + buttontqlayout->addWidget(addB); connect(addB, TQT_SIGNAL(clicked()), this, TQT_SLOT(add())); removeB = new KPushButton(i18n("&Remove"), page); - buttonlayout->addWidget(removeB); + buttontqlayout->addWidget(removeB); connect(removeB, TQT_SIGNAL(clicked()), this, TQT_SLOT(remove())); selectionChanged(); @@ -104,7 +104,7 @@ GroupEditor::GroupEditor(ConfigEstateGroupList *newList, TQWidget *parent) void GroupEditor::add() { bool ok; - TQString name = KLineEditDlg::getText(i18n("Add Group"), i18n("Enter the name of the new group:"), TQString::null, &ok, this); + TQString name = KLineEditDlg::getText(i18n("Add Group"), i18n("Enter the name of the new group:"), TQString(), &ok, this); if (ok) { for (ConfigEstateGroupList::Iterator it = mylist.begin(); it != mylist.end(); ++it) @@ -233,7 +233,7 @@ void GroupEditor::slotOk() void GroupEditor::selectionChanged() { bool issel = groups->currentItem() >= 0; - colorGroupBox->setEnabled(issel); + tqcolorGroupBox->setEnabled(issel); pricesGroupBox->setEnabled(issel); dynamicGroupBox->setEnabled(issel); removeB->setEnabled(issel); diff --git a/atlantikdesigner/designer/group.h b/atlantikdesigner/designer/group.h index f76b2bc..97b0446 100644 --- a/atlantikdesigner/designer/group.h +++ b/atlantikdesigner/designer/group.h @@ -53,9 +53,10 @@ typedef TQValueList<ConfigEstateGroup> ConfigEstateGroupList; class GroupEditor : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - GroupEditor(ConfigEstateGroupList *, TQWidget *parent=0); + GroupEditor(ConfigEstateGroupList *, TQWidget *tqparent=0); signals: void changed(); @@ -85,7 +86,7 @@ class GroupEditor : public KDialogBase TQWidget *mathWidget; TQSpinBox *housePrice; TQSpinBox *globalPrice; - TQVGroupBox *colorGroupBox; + TQVGroupBox *tqcolorGroupBox; TQVGroupBox *pricesGroupBox; TQVGroupBox *dynamicGroupBox; KPushButton *removeB; |