summaryrefslogtreecommitdiffstats
path: root/atlantikdesigner/designer/designer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'atlantikdesigner/designer/designer.cpp')
-rw-r--r--atlantikdesigner/designer/designer.cpp102
1 files changed, 51 insertions, 51 deletions
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();