Rename a number of classes to enhance compatibility with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 2ce15ee76f
commit 58a97ed3af

@ -69,7 +69,7 @@ LogTextEdit::LogTextEdit( TQWidget *parent, const char *name ) : TQTextEdit( par
#ifdef KDE_3_2_FEATURES #ifdef KDE_3_2_FEATURES
m_clear = KStdAction::clear( TQT_TQOBJECT(this), TQT_SLOT( clear() ), 0 ); m_clear = KStdAction::clear( TQT_TQOBJECT(this), TQT_SLOT( clear() ), 0 );
#else #else
m_clear = new KAction( i18n("Clear"), "clear", NULL, TQT_TQOBJECT(this), TQT_SLOT( clear() ), static_cast<KActionCollection *>(0), "clear" ); m_clear = new TDEAction( i18n("Clear"), "clear", NULL, TQT_TQOBJECT(this), TQT_SLOT( clear() ), static_cast<TDEActionCollection *>(0), "clear" );
#endif #endif
m_selectAll = KStdAction::selectAll( TQT_TQOBJECT(this), TQT_SLOT( selectAll() ), 0 ); m_selectAll = KStdAction::selectAll( TQT_TQOBJECT(this), TQT_SLOT( selectAll() ), 0 );
m_copy = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT( copy() ), 0 ); m_copy = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT( copy() ), 0 );
@ -95,7 +95,7 @@ TQPopupMenu *LogTextEdit::createPopupMenu( const TQPoint & )
} }
Atlantik::Atlantik () Atlantik::Atlantik ()
: KMainWindow (), : TDEMainWindow (),
m_runningGame( false ) m_runningGame( false )
{ {
// Read application configuration // Read application configuration
@ -103,7 +103,7 @@ Atlantik::Atlantik ()
// Toolbar: Game // Toolbar: Game
// KStdGameAction::gameNew(this, TQT_SLOT(slotNewGame()), actionCollection(), "game_new"); // KStdGameAction::gameNew(this, TQT_SLOT(slotNewGame()), actionCollection(), "game_new");
m_showEventLog = new KAction(i18n("Show Event &Log")/*, "atlantik_showeventlog"*/, CTRL+Key_L, TQT_TQOBJECT(this), TQT_SLOT(showEventLog()), actionCollection(), "showeventlog"); m_showEventLog = new TDEAction(i18n("Show Event &Log")/*, "atlantik_showeventlog"*/, CTRL+Key_L, TQT_TQOBJECT(this), TQT_SLOT(showEventLog()), actionCollection(), "showeventlog");
KStdGameAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(closeAllWindows()), actionCollection(), "game_quit"); KStdGameAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(closeAllWindows()), actionCollection(), "game_quit");
// Toolbar: Settings // Toolbar: Settings
@ -132,24 +132,24 @@ Atlantik::Atlantik ()
// Menu,toolbar: Move // Menu,toolbar: Move
m_roll = KStdGameAction::roll(TQT_TQOBJECT(this), TQT_SIGNAL(rollDice()), actionCollection()); m_roll = KStdGameAction::roll(TQT_TQOBJECT(this), TQT_SIGNAL(rollDice()), actionCollection());
m_roll->setEnabled(false); m_roll->setEnabled(false);
m_buyEstate = new KAction(i18n("&Buy"), "atlantik_buy_estate", CTRL+Key_B, TQT_TQOBJECT(this), TQT_SIGNAL(buyEstate()), actionCollection(), "buy_estate"); m_buyEstate = new TDEAction(i18n("&Buy"), "atlantik_buy_estate", CTRL+Key_B, TQT_TQOBJECT(this), TQT_SIGNAL(buyEstate()), actionCollection(), "buy_estate");
m_buyEstate->setEnabled(false); m_buyEstate->setEnabled(false);
m_auctionEstate = new KAction(i18n("&Auction"), "auction", CTRL+Key_A, TQT_TQOBJECT(this), TQT_SIGNAL(auctionEstate()), actionCollection(), "auction"); m_auctionEstate = new TDEAction(i18n("&Auction"), "auction", CTRL+Key_A, TQT_TQOBJECT(this), TQT_SIGNAL(auctionEstate()), actionCollection(), "auction");
m_auctionEstate->setEnabled(false); m_auctionEstate->setEnabled(false);
m_endTurn = KStdGameAction::endTurn(TQT_TQOBJECT(this), TQT_SIGNAL(endTurn()), actionCollection()); m_endTurn = KStdGameAction::endTurn(TQT_TQOBJECT(this), TQT_SIGNAL(endTurn()), actionCollection());
m_endTurn->setEnabled(false); m_endTurn->setEnabled(false);
m_jailCard = new KAction(i18n("Use Card to Leave Jail")/*, "atlantik_move_jail_card"*/, 0, TQT_TQOBJECT(this), TQT_SIGNAL(jailCard()), actionCollection(), "move_jailcard"); m_jailCard = new TDEAction(i18n("Use Card to Leave Jail")/*, "atlantik_move_jail_card"*/, 0, TQT_TQOBJECT(this), TQT_SIGNAL(jailCard()), actionCollection(), "move_jailcard");
m_jailCard->setEnabled(false); m_jailCard->setEnabled(false);
m_jailPay = new KAction(i18n("&Pay to Leave Jail"), "jail_pay", CTRL+Key_P, TQT_TQOBJECT(this), TQT_SIGNAL(jailPay()), actionCollection(), "move_jailpay"); m_jailPay = new TDEAction(i18n("&Pay to Leave Jail"), "jail_pay", CTRL+Key_P, TQT_TQOBJECT(this), TQT_SIGNAL(jailPay()), actionCollection(), "move_jailpay");
m_jailPay->setEnabled(false); m_jailPay->setEnabled(false);
m_jailRoll = new KAction(i18n("Roll to Leave &Jail")/*, "atlantik_move_jail_roll"*/, CTRL+Key_J, TQT_TQOBJECT(this), TQT_SIGNAL(jailRoll()), actionCollection(), "move_jailroll"); m_jailRoll = new TDEAction(i18n("Roll to Leave &Jail")/*, "atlantik_move_jail_roll"*/, CTRL+Key_J, TQT_TQOBJECT(this), TQT_SIGNAL(jailRoll()), actionCollection(), "move_jailroll");
m_jailRoll->setEnabled(false); m_jailRoll->setEnabled(false);
// Mix code and XML into GUI // Mix code and XML into GUI
KMainWindow::createGUI(); TDEMainWindow::createGUI();
applyMainWindowSettings( TDEGlobal::config(), "AtlantikMainWindow" ); applyMainWindowSettings( TDEGlobal::config(), "AtlantikMainWindow" );
KMainWindow::statusBar()->insertItem("Atlantik " ATLANTIK_VERSION_STRING, 0); TDEMainWindow::statusBar()->insertItem("Atlantik " ATLANTIK_VERSION_STRING, 0);
KMainWindow::statusBar()->insertItem(TQString(), 1); TDEMainWindow::statusBar()->insertItem(TQString(), 1);
connect(statusBar(), TQT_SIGNAL(released(int)), TQT_TQOBJECT(this), TQT_SLOT(statusBarClick(int))); connect(statusBar(), TQT_SIGNAL(released(int)), TQT_TQOBJECT(this), TQT_SLOT(statusBarClick(int)));
// Main widget, containing all others // Main widget, containing all others
@ -627,7 +627,7 @@ void Atlantik::slotMsgError(TQString msg)
void Atlantik::slotMsgStatus(const TQString &message, const TQString &icon) void Atlantik::slotMsgStatus(const TQString &message, const TQString &icon)
{ {
KMainWindow::statusBar()->changeItem(message, 1); TDEMainWindow::statusBar()->changeItem(message, 1);
m_eventLog->addEvent(message, icon); m_eventLog->addEvent(message, icon);
} }
@ -848,6 +848,6 @@ void Atlantik::closeEvent(TQCloseEvent *e)
m_atlantikNetwork->leaveGame(); m_atlantikNetwork->leaveGame();
saveMainWindowSettings(kapp->config(), "AtlantikMainWindow"); saveMainWindowSettings(kapp->config(), "AtlantikMainWindow");
KMainWindow::closeEvent(e); TDEMainWindow::closeEvent(e);
} }
} }

@ -80,7 +80,7 @@ public:
TQPopupMenu *createPopupMenu( const TQPoint & pos ); TQPopupMenu *createPopupMenu( const TQPoint & pos );
private: private:
KAction *m_clear, *m_selectAll, *m_copy; TDEAction *m_clear, *m_selectAll, *m_copy;
}; };
/** /**
@ -89,7 +89,7 @@ private:
* *
* @author Rob Kaper <cap@capsi.com> * @author Rob Kaper <cap@capsi.com>
*/ */
class Atlantik : public KMainWindow class Atlantik : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -245,7 +245,7 @@ private:
TQLineEdit *m_input; TQLineEdit *m_input;
TQTextEdit *m_serverMsgs; TQTextEdit *m_serverMsgs;
KAction *m_roll, *m_buyEstate, *m_auctionEstate, *m_endTurn, TDEAction *m_roll, *m_buyEstate, *m_auctionEstate, *m_endTurn,
*m_jailCard, *m_jailPay, *m_jailRoll, *m_configure, *m_jailCard, *m_jailPay, *m_jailRoll, *m_configure,
*m_showEventLog; *m_showEventLog;

@ -60,7 +60,7 @@ EventLogWidget::EventLogWidget(EventLog *eventLog, TQWidget *parent, const char
TQVBoxLayout *listCompBox = new TQVBoxLayout(this, KDialog::marginHint()); TQVBoxLayout *listCompBox = new TQVBoxLayout(this, KDialog::marginHint());
m_eventList = new KListView(this, "eventList"); m_eventList = new TDEListView(this, "eventList");
listCompBox->addWidget(m_eventList); listCompBox->addWidget(m_eventList);
m_eventList->addColumn(i18n("Date/Time")); m_eventList->addColumn(i18n("Date/Time"));
@ -92,7 +92,7 @@ void EventLogWidget::addEvent(Event *event)
delete m_eventList->firstChild(); delete m_eventList->firstChild();
TQString description = KStringHandler::rsqueeze( event->description(), 200 ); TQString description = KStringHandler::rsqueeze( event->description(), 200 );
KListViewItem *item = new KListViewItem(m_eventList, event->dateTime().toString("yyyy-MM-dd hh:mm:ss zzz"), description); TDEListViewItem *item = new TDEListViewItem(m_eventList, event->dateTime().toString("yyyy-MM-dd hh:mm:ss zzz"), description);
if (event->icon().isEmpty()) if (event->icon().isEmpty())
item->setPixmap(1, TQPixmap(SmallIcon("atlantik"))); item->setPixmap(1, TQPixmap(SmallIcon("atlantik")));
else else

@ -24,8 +24,8 @@ class TQString;
class Event; class Event;
class KListView; class TDEListView;
class KListViewItem; class TDEListViewItem;
class KPushButton; class KPushButton;
class EventLog : public TQObject class EventLog : public TQObject
@ -68,7 +68,7 @@ private slots:
private: private:
EventLog *m_eventLog; EventLog *m_eventLog;
KListView *m_eventList; TDEListView *m_eventList;
KPushButton *m_saveButton; KPushButton *m_saveButton;
}; };

@ -44,7 +44,7 @@ SelectGame::SelectGame(AtlanticCore *atlanticCore, TQWidget *parent, const char
m_mainLayout->addWidget(groupBox); m_mainLayout->addWidget(groupBox);
// List of games // List of games
m_gameList = new KListView(groupBox, "m_gameList"); m_gameList = new TDEListView(groupBox, "m_gameList");
m_gameList->addColumn(i18n("Game")); m_gameList->addColumn(i18n("Game"));
m_gameList->addColumn(i18n("Description")); m_gameList->addColumn(i18n("Description"));
m_gameList->addColumn(i18n("Id")); m_gameList->addColumn(i18n("Id"));

@ -59,7 +59,7 @@ private:
AtlanticCore *m_atlanticCore; AtlanticCore *m_atlanticCore;
TQVBoxLayout *m_mainLayout; TQVBoxLayout *m_mainLayout;
KListView *m_gameList; TDEListView *m_gameList;
KPushButton *m_connectButton; KPushButton *m_connectButton;
}; };

@ -58,7 +58,7 @@ SelectServer::SelectServer(bool useMonopigatorOnStart, bool hideDevelopmentServe
m_mainLayout->addWidget(bgroup); m_mainLayout->addWidget(bgroup);
// List of servers // List of servers
m_serverList = new KListView(bgroup, "m_serverList"); m_serverList = new TDEListView(bgroup, "m_serverList");
m_serverList->addColumn(i18n("Host")); m_serverList->addColumn(i18n("Host"));
m_serverList->addColumn(i18n("Latency")); m_serverList->addColumn(i18n("Latency"));
m_serverList->addColumn(i18n("Version")); m_serverList->addColumn(i18n("Version"));

@ -64,7 +64,7 @@ private:
void initMonopigator(); void initMonopigator();
TQVBoxLayout *m_mainLayout; TQVBoxLayout *m_mainLayout;
KListView *m_serverList; TDEListView *m_serverList;
KLineEdit *m_hostEdit, *m_portEdit; KLineEdit *m_hostEdit, *m_portEdit;
KPushButton *m_addServerButton, *m_refreshButton, *m_customConnect, *m_connectButton; KPushButton *m_addServerButton, *m_refreshButton, *m_customConnect, *m_connectButton;
Monopigator *m_monopigator; Monopigator *m_monopigator;

@ -50,12 +50,12 @@ AuctionWidget::AuctionWidget(AtlanticCore *atlanticCore, Auction *auction, TQWid
m_playerGroupBox = new TQVGroupBox(estate ? i18n("Auction: %1").arg(estate->name()) : i18n("Auction"), this, "groupBox"); m_playerGroupBox = new TQVGroupBox(estate ? i18n("Auction: %1").arg(estate->name()) : i18n("Auction"), this, "groupBox");
m_mainLayout->addWidget(m_playerGroupBox); m_mainLayout->addWidget(m_playerGroupBox);
m_playerList = new KListView(m_playerGroupBox); m_playerList = new TDEListView(m_playerGroupBox);
m_playerList->addColumn(i18n("Player")); m_playerList->addColumn(i18n("Player"));
m_playerList->addColumn(i18n("Bid")); m_playerList->addColumn(i18n("Bid"));
m_playerList->setSorting(1, false); m_playerList->setSorting(1, false);
KListViewItem *item; TDEListViewItem *item;
Player *player, *pSelf = m_atlanticCore->playerSelf(); Player *player, *pSelf = m_atlanticCore->playerSelf();
TQPtrList<Player> playerList = m_atlanticCore->players(); TQPtrList<Player> playerList = m_atlanticCore->players();
@ -63,7 +63,7 @@ AuctionWidget::AuctionWidget(AtlanticCore *atlanticCore, Auction *auction, TQWid
{ {
if ( (player = *it) && player->game() == pSelf->game() ) if ( (player = *it) && player->game() == pSelf->game() )
{ {
item = new KListViewItem(m_playerList, player->name(), TQString("0")); item = new TDEListViewItem(m_playerList, player->name(), TQString("0"));
item->setPixmap(0, TQPixmap(SmallIcon("personal"))); item->setPixmap(0, TQPixmap(SmallIcon("personal")));
m_playerItems[player] = item; m_playerItems[player] = item;

@ -27,7 +27,7 @@ class TQVGroupBox;
class TQSpinBox; class TQSpinBox;
class TQLabel; class TQLabel;
class KListViewItem; class TDEListViewItem;
class AtlanticCore; class AtlanticCore;
class Player; class Player;
@ -54,10 +54,10 @@ private:
TQVBoxLayout *m_mainLayout; TQVBoxLayout *m_mainLayout;
TQVGroupBox *m_playerGroupBox; TQVGroupBox *m_playerGroupBox;
TQSpinBox *m_bidSpinBox; TQSpinBox *m_bidSpinBox;
TQMap<Player *, KListViewItem *> m_playerItems; TQMap<Player *, TDEListViewItem *> m_playerItems;
TQLabel *m_statusLabel; TQLabel *m_statusLabel;
KListView *m_playerList; TDEListView *m_playerList;
AtlanticCore *m_atlanticCore; AtlanticCore *m_atlanticCore;
Auction *m_auction; Auction *m_auction;

@ -56,7 +56,7 @@ EstateDetails::EstateDetails(Estate *estate, TQString text, TQWidget *parent, co
m_mainLayout->addItem(new TQSpacerItem(KDialog::spacingHint(), KDialog::spacingHint()+50, TQSizePolicy::Fixed, TQSizePolicy::Minimum)); m_mainLayout->addItem(new TQSpacerItem(KDialog::spacingHint(), KDialog::spacingHint()+50, TQSizePolicy::Fixed, TQSizePolicy::Minimum));
m_infoListView = new KListView(this, "infoListView"); m_infoListView = new TDEListView(this, "infoListView");
m_infoListView->addColumn(m_estate ? m_estate->name() : TQString("") ); m_infoListView->addColumn(m_estate ? m_estate->name() : TQString("") );
m_infoListView->setSorting(-1); m_infoListView->setSorting(-1);
m_mainLayout->addWidget(m_infoListView); m_mainLayout->addWidget(m_infoListView);

@ -25,7 +25,7 @@ class TQHBoxLayout;
class TQVBoxLayout; class TQVBoxLayout;
class TQVGroupBox; class TQVGroupBox;
class KListView; class TDEListView;
class KPixmap; class KPixmap;
class KPushButton; class KPushButton;
@ -65,7 +65,7 @@ private:
Estate *m_estate; Estate *m_estate;
TQPixmap *m_pixmap; TQPixmap *m_pixmap;
KPixmap *m_quartzBlocks; KPixmap *m_quartzBlocks;
KListView *m_infoListView; TDEListView *m_infoListView;
KPushButton *m_closeButton; KPushButton *m_closeButton;
bool b_recreate, m_recreateQuartz; bool b_recreate, m_recreateQuartz;
TQVBoxLayout *m_mainLayout; TQVBoxLayout *m_mainLayout;

@ -434,7 +434,7 @@ void EstateView::mousePressEvent(TQMouseEvent *e)
{ {
if (e->button()==Qt::RightButton && m_estate->isOwned()) if (e->button()==Qt::RightButton && m_estate->isOwned())
{ {
KPopupMenu *rmbMenu = new KPopupMenu(this); TDEPopupMenu *rmbMenu = new TDEPopupMenu(this);
rmbMenu->insertTitle(m_estate->name()); rmbMenu->insertTitle(m_estate->name());
if (m_estate->isOwnedBySelf()) if (m_estate->isOwnedBySelf())
@ -480,7 +480,7 @@ void EstateView::mousePressEvent(TQMouseEvent *e)
rmbMenu->insertItem(i18n("Request Trade with %1").arg(player->name()), 3); rmbMenu->insertItem(i18n("Request Trade with %1").arg(player->name()), 3);
} }
KPopupMenu *pm = dynamic_cast<KPopupMenu *>(rmbMenu); TDEPopupMenu *pm = dynamic_cast<TDEPopupMenu *>(rmbMenu);
if (pm) { if (pm) {
connect(pm, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuAction(int))); connect(pm, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuAction(int)));
} }

@ -32,13 +32,13 @@
#include "kwrappedlistviewitem.h" #include "kwrappedlistviewitem.h"
KWrappedListViewItem::KWrappedListViewItem( TQListView *parent, TQString text, TQString t2 ) KWrappedListViewItem::KWrappedListViewItem( TQListView *parent, TQString text, TQString t2 )
: TQObject(), KListViewItem( parent ) : TQObject(), TDEListViewItem( parent )
{ {
init( parent, text, t2 ); init( parent, text, t2 );
} }
KWrappedListViewItem::KWrappedListViewItem( TQListView *parent, TQListViewItem *after, TQString text, TQString t2 ) KWrappedListViewItem::KWrappedListViewItem( TQListView *parent, TQListViewItem *after, TQString text, TQString t2 )
: TQObject(), KListViewItem( parent, after ) : TQObject(), TDEListViewItem( parent, after )
{ {
init( parent, text, t2 ); init( parent, text, t2 );
} }

@ -32,7 +32,7 @@
class KWordWrap; class KWordWrap;
class KWrappedListViewItem : public TQObject, public KListViewItem class KWrappedListViewItem : public TQObject, public TDEListViewItem
{ {
Q_OBJECT Q_OBJECT

@ -254,7 +254,7 @@ void PortfolioView::mousePressEvent(TQMouseEvent *e)
if ( e->button()==Qt::RightButton && (m_player != playerSelf) ) if ( e->button()==Qt::RightButton && (m_player != playerSelf) )
{ {
KPopupMenu *rmbMenu = new KPopupMenu(this); TDEPopupMenu *rmbMenu = new TDEPopupMenu(this);
rmbMenu->insertTitle(m_player->name()); rmbMenu->insertTitle(m_player->name());
if ( m_portfolioEstates.count() ) if ( m_portfolioEstates.count() )

@ -114,7 +114,7 @@ TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, TQWidget *p
connect(m_updateButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(updateComponent())); connect(m_updateButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(updateComponent()));
m_componentList = new KListView(this, "componentList"); m_componentList = new TDEListView(this, "componentList");
listCompBox->addWidget(m_componentList); listCompBox->addWidget(m_componentList);
m_componentList->addColumn(i18n("Player")); m_componentList->addColumn(i18n("Player"));
@ -122,7 +122,7 @@ TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, TQWidget *p
m_componentList->addColumn(i18n("Player")); m_componentList->addColumn(i18n("Player"));
m_componentList->addColumn(i18n("Item")); m_componentList->addColumn(i18n("Item"));
connect(m_componentList, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem *, const TQPoint&)), TQT_SLOT(contextMenu(KListView *, TQListViewItem *, const TQPoint&))); connect(m_componentList, TQT_SIGNAL(contextMenu(TDEListView*, TQListViewItem *, const TQPoint&)), TQT_SLOT(contextMenu(TDEListView *, TQListViewItem *, const TQPoint&)));
connect(m_componentList, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(setCombos(TQListViewItem *))); connect(m_componentList, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(setCombos(TQListViewItem *)));
TQHBoxLayout *actionBox = new TQHBoxLayout(this, 0, KDialog::spacingHint()); TQHBoxLayout *actionBox = new TQHBoxLayout(this, 0, KDialog::spacingHint());
@ -147,7 +147,7 @@ TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, TQWidget *p
// mPlayerList->header()->hide(); // mPlayerList->header()->hide();
// mPlayerList->setRootIsDecorated(true); // mPlayerList->setRootIsDecorated(true);
// mPlayerList->setResizeMode(KListView::AllColumns); // mPlayerList->setResizeMode(TDEListView::AllColumns);
connect(m_trade, TQT_SIGNAL(itemAdded(TradeItem *)), this, TQT_SLOT(tradeItemAdded(TradeItem *))); connect(m_trade, TQT_SIGNAL(itemAdded(TradeItem *)), this, TQT_SLOT(tradeItemAdded(TradeItem *)));
connect(m_trade, TQT_SIGNAL(itemRemoved(TradeItem *)), this, TQT_SLOT(tradeItemRemoved(TradeItem *))); connect(m_trade, TQT_SIGNAL(itemRemoved(TradeItem *)), this, TQT_SLOT(tradeItemRemoved(TradeItem *)));
@ -177,7 +177,7 @@ void TradeDisplay::closeEvent(TQCloseEvent *e)
void TradeDisplay::tradeItemAdded(TradeItem *tradeItem) void TradeDisplay::tradeItemAdded(TradeItem *tradeItem)
{ {
KListViewItem *item = new KListViewItem(m_componentList, (tradeItem->from() ? tradeItem->from()->name() : TQString("?")), i18n("gives is transitive ;)", "gives"), (tradeItem->to() ? tradeItem->to()->name() : TQString("?")), tradeItem->text()); TDEListViewItem *item = new TDEListViewItem(m_componentList, (tradeItem->from() ? tradeItem->from()->name() : TQString("?")), i18n("gives is transitive ;)", "gives"), (tradeItem->to() ? tradeItem->to()->name() : TQString("?")), tradeItem->text());
connect(tradeItem, TQT_SIGNAL(changed(TradeItem *)), this, TQT_SLOT(tradeItemChanged(TradeItem *))); connect(tradeItem, TQT_SIGNAL(changed(TradeItem *)), this, TQT_SLOT(tradeItemChanged(TradeItem *)));
item->setPixmap(0, TQPixmap(SmallIcon("personal"))); item->setPixmap(0, TQPixmap(SmallIcon("personal")));
@ -194,14 +194,14 @@ void TradeDisplay::tradeItemAdded(TradeItem *tradeItem)
void TradeDisplay::tradeItemRemoved(TradeItem *t) void TradeDisplay::tradeItemRemoved(TradeItem *t)
{ {
KListViewItem *item = m_componentMap[t]; TDEListViewItem *item = m_componentMap[t];
delete item; delete item;
m_componentMap[t] = 0; m_componentMap[t] = 0;
} }
void TradeDisplay::tradeItemChanged(TradeItem *t) void TradeDisplay::tradeItemChanged(TradeItem *t)
{ {
KListViewItem *item = m_componentMap[t]; TDEListViewItem *item = m_componentMap[t];
if (item) if (item)
{ {
item->setText(0, t->from() ? t->from()->name() : TQString("?")); item->setText(0, t->from() ? t->from()->name() : TQString("?"));
@ -225,7 +225,7 @@ void TradeDisplay::playerChanged(Player *player)
m_playerTargetCombo->changeItem(player->name(), m_playerTargetRevMap[player]); m_playerTargetCombo->changeItem(player->name(), m_playerTargetRevMap[player]);
TradeItem *item = 0; TradeItem *item = 0;
for (TQMap<KListViewItem *, TradeItem *>::Iterator it=m_componentRevMap.begin() ; it != m_componentRevMap.end() && (item = *it) ; ++it) for (TQMap<TDEListViewItem *, TradeItem *>::Iterator it=m_componentRevMap.begin() ; it != m_componentRevMap.end() && (item = *it) ; ++it)
tradeItemChanged(item); tradeItemChanged(item);
} }
@ -293,7 +293,7 @@ void TradeDisplay::setEstateCombo(int index)
void TradeDisplay::setCombos(TQListViewItem *i) void TradeDisplay::setCombos(TQListViewItem *i)
{ {
TradeItem *item = m_componentRevMap[(KListViewItem *)(i)]; TradeItem *item = m_componentRevMap[(TDEListViewItem *)(i)];
if (TradeEstate *tradeEstate = dynamic_cast<TradeEstate*>(item)) if (TradeEstate *tradeEstate = dynamic_cast<TradeEstate*>(item))
{ {
setTypeCombo(0); setTypeCombo(0);
@ -348,11 +348,11 @@ void TradeDisplay::accept()
emit accept(m_trade); emit accept(m_trade);
} }
void TradeDisplay::contextMenu(KListView *, TQListViewItem *i, const TQPoint& p) void TradeDisplay::contextMenu(TDEListView *, TQListViewItem *i, const TQPoint& p)
{ {
m_contextTradeItem = m_componentRevMap[(KListViewItem *)(i)]; m_contextTradeItem = m_componentRevMap[(TDEListViewItem *)(i)];
KPopupMenu *rmbMenu = new KPopupMenu(this); TDEPopupMenu *rmbMenu = new TDEPopupMenu(this);
// rmbMenu->insertTitle( ... ); // rmbMenu->insertTitle( ... );
rmbMenu->insertItem(i18n("Remove From Trade"), 0); rmbMenu->insertItem(i18n("Remove From Trade"), 0);

@ -26,8 +26,8 @@ class TQLabel;
class TQListViewItem; class TQListViewItem;
class TQSpinBox; class TQSpinBox;
class KListView; class TDEListView;
class KListViewItem; class TDEListViewItem;
class KComboBox; class KComboBox;
class KPushButton; class KPushButton;
@ -65,7 +65,7 @@ private slots:
void reject(); void reject();
void accept(); void accept();
void contextMenu(KListView *l, TQListViewItem *i, const TQPoint& p); void contextMenu(TDEListView *l, TQListViewItem *i, const TQPoint& p);
void contextMenuClicked(int item); void contextMenuClicked(int item);
signals: signals:
@ -80,7 +80,7 @@ private:
TQSpinBox *m_moneyBox; TQSpinBox *m_moneyBox;
KComboBox *m_editTypeCombo, *m_playerFromCombo, *m_playerTargetCombo, *m_estateCombo; KComboBox *m_editTypeCombo, *m_playerFromCombo, *m_playerTargetCombo, *m_estateCombo;
KListView *m_componentList; TDEListView *m_componentList;
KPushButton *m_updateButton, *m_rejectButton, *m_acceptButton; KPushButton *m_updateButton, *m_rejectButton, *m_acceptButton;
AtlanticCore *m_atlanticCore; AtlanticCore *m_atlanticCore;
@ -88,8 +88,8 @@ private:
TradeItem *m_contextTradeItem; TradeItem *m_contextTradeItem;
// TODO: Wouldn't TQPair make more sense here? // TODO: Wouldn't TQPair make more sense here?
TQMap<TradeItem *, KListViewItem *> m_componentMap; TQMap<TradeItem *, TDEListViewItem *> m_componentMap;
TQMap<KListViewItem *, TradeItem *> m_componentRevMap; TQMap<TDEListViewItem *, TradeItem *> m_componentRevMap;
TQMap<int, Estate *> m_estateMap; TQMap<int, Estate *> m_estateMap;
TQMap<Estate *, int> m_estateRevMap; TQMap<Estate *, int> m_estateRevMap;
TQMap<int, Player *> m_playerFromMap, m_playerTargetMap; TQMap<int, Player *> m_playerFromMap, m_playerTargetMap;

@ -246,11 +246,11 @@ KAstTopLevel::KAstTopLevel()
powerMeter->setFixedSize( 200, 12 ); powerMeter->setFixedSize( 200, 12 );
hbd->addWidget( powerMeter ); hbd->addWidget( powerMeter );
initKAction(); initTDEAction();
setCentralWidget( mainWin ); setCentralWidget( mainWin );
setupGUI( KMainWindow::Save | Create ); setupGUI( TDEMainWindow::Save | Create );
setFocusPolicy( TQ_StrongFocus ); setFocusPolicy( TQ_StrongFocus );
setFocus(); setFocus();
@ -277,7 +277,7 @@ KAstTopLevel::~KAstTopLevel()
#endif #endif
} }
void KAstTopLevel::initKAction() void KAstTopLevel::initTDEAction()
{ {
// game // game
KStdGameAction::gameNew( TQT_TQOBJECT(this), TQT_SLOT( slotNewGame() ), actionCollection() ); KStdGameAction::gameNew( TQT_TQOBJECT(this), TQT_SLOT( slotNewGame() ), actionCollection() );
@ -290,14 +290,14 @@ void KAstTopLevel::initKAction()
KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT( slotPref() ), actionCollection()); KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT( slotPref() ), actionCollection());
// keyboard-only actions // keyboard-only actions
keycodes.insert(Thrust, new KAction(i18n("Thrust"), TQt::Key_Up, 0, 0, actionCollection(), "Thrust")); keycodes.insert(Thrust, new TDEAction(i18n("Thrust"), TQt::Key_Up, 0, 0, actionCollection(), "Thrust"));
keycodes.insert(RotateLeft, new KAction(i18n("Rotate Left"), TQt::Key_Left, 0, 0, actionCollection(), "RotateLeft")); keycodes.insert(RotateLeft, new TDEAction(i18n("Rotate Left"), TQt::Key_Left, 0, 0, actionCollection(), "RotateLeft"));
keycodes.insert(RotateRight, new KAction(i18n("Rotate Right"), TQt::Key_Right, 0, 0, actionCollection(), "RotateRight")); keycodes.insert(RotateRight, new TDEAction(i18n("Rotate Right"), TQt::Key_Right, 0, 0, actionCollection(), "RotateRight"));
keycodes.insert(Shoot, new KAction(i18n("Shoot"), TQt::Key_Space, 0, 0, actionCollection(), "Shoot")); keycodes.insert(Shoot, new TDEAction(i18n("Shoot"), TQt::Key_Space, 0, 0, actionCollection(), "Shoot"));
// keycodes.insert(Teleport, new KAction(i18n("Teleport"), TQt::Key_Z, 0, 0, actionCollection(), "Teleport")); // keycodes.insert(Teleport, new TDEAction(i18n("Teleport"), TQt::Key_Z, 0, 0, actionCollection(), "Teleport"));
keycodes.insert(Brake, new KAction(i18n("Brake"), TQt::Key_X, 0, 0, actionCollection(), "Brake")); keycodes.insert(Brake, new TDEAction(i18n("Brake"), TQt::Key_X, 0, 0, actionCollection(), "Brake"));
keycodes.insert(Shield, new KAction(i18n("Shield"), TQt::Key_S, 0, 0, actionCollection(), "Shield")); keycodes.insert(Shield, new TDEAction(i18n("Shield"), TQt::Key_S, 0, 0, actionCollection(), "Shield"));
launchAction = new KAction(i18n("Launch"), TQt::Key_L, TQT_TQOBJECT(this), TQT_SLOT(slotLaunch()), actionCollection(), "Launch"); launchAction = new TDEAction(i18n("Launch"), TQt::Key_L, TQT_TQOBJECT(this), TQT_SLOT(slotLaunch()), actionCollection(), "Launch");
} }
@ -354,7 +354,7 @@ bool KAstTopLevel::processKeyPress( TQKeyEvent *event )
{ {
KKey key(event); KKey key(event);
Action a = Invalid; Action a = Invalid;
TQMap<Action, KAction*>::Iterator it = keycodes.begin(); TQMap<Action, TDEAction*>::Iterator it = keycodes.begin();
for (; it != keycodes.end(); ++it) for (; it != keycodes.end(); ++it)
{ {
if ( (*it)->shortcut().contains(key) ) if ( (*it)->shortcut().contains(key) )
@ -407,7 +407,7 @@ bool KAstTopLevel::processKeyRelease( TQKeyEvent *event )
{ {
KKey key(event); KKey key(event);
Action a = Invalid; Action a = Invalid;
TQMap<Action, KAction*>::Iterator it = keycodes.begin(); TQMap<Action, TDEAction*>::Iterator it = keycodes.begin();
for (; it != keycodes.end(); ++it) for (; it != keycodes.end(); ++it)
{ {
if ( (*it)->shortcut().contains(key) ) if ( (*it)->shortcut().contains(key) )
@ -460,7 +460,7 @@ void KAstTopLevel::focusInEvent( TQFocusEvent *e )
#if defined TQ_WS_X11 && ! defined K_WS_TQTONLY #if defined TQ_WS_X11 && ! defined K_WS_TQTONLY
XAutoRepeatOff( tqt_xdisplay() ); XAutoRepeatOff( tqt_xdisplay() );
#endif #endif
KMainWindow::focusInEvent(e); TDEMainWindow::focusInEvent(e);
} }
void KAstTopLevel::focusOutEvent( TQFocusEvent *e ) void KAstTopLevel::focusOutEvent( TQFocusEvent *e )
@ -469,7 +469,7 @@ void KAstTopLevel::focusOutEvent( TQFocusEvent *e )
#if defined TQ_WS_X11 && ! defined K_WS_TQTONLY #if defined TQ_WS_X11 && ! defined K_WS_TQTONLY
XAutoRepeatOn( tqt_xdisplay() ); XAutoRepeatOn( tqt_xdisplay() );
#endif #endif
KMainWindow::focusOutEvent(e); TDEMainWindow::focusOutEvent(e);
} }
void KAstTopLevel::slotNewGame() void KAstTopLevel::slotNewGame()
@ -663,7 +663,7 @@ void KAstTopLevel::slotPause()
//and we "play" when we close this messagebox //and we "play" when we close this messagebox
//so before this action was 'checked/uncheched' //so before this action was 'checked/uncheched'
//so I force to unchecked it when we close messagebox. //so I force to unchecked it when we close messagebox.
KToggleAction * act = (KToggleAction *)(sender()); TDEToggleAction * act = (TDEToggleAction *)(sender());
act->setChecked(false); act->setChecked(false);
} }

@ -20,7 +20,7 @@ class KALedMeter;
class TQLCDNumber; class TQLCDNumber;
class KDialogBase; class KDialogBase;
class KAstTopLevel : public KMainWindow class KAstTopLevel : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -29,7 +29,7 @@ public:
virtual ~KAstTopLevel(); virtual ~KAstTopLevel();
private: private:
void initKAction(); void initTDEAction();
void playSound( const char *snd ); void playSound( const char *snd );
void readSoundMapping(); void readSoundMapping();
void doStats(); void doStats();
@ -86,9 +86,9 @@ private:
enum Action { Invalid, Launch, Thrust, RotateLeft, RotateRight, Shoot, enum Action { Invalid, Launch, Thrust, RotateLeft, RotateRight, Shoot,
Teleport, Brake, Shield }; Teleport, Brake, Shield };
TQMap<Action, KAction*> keycodes; TQMap<Action, TDEAction*> keycodes;
KAction *launchAction; TDEAction *launchAction;
}; };
#endif #endif

@ -40,7 +40,7 @@ extern Options settings;
void AtomTopLevel::createMenu() void AtomTopLevel::createMenu()
{ {
KAction *act = KStdGameAction::highscores(TQT_TQOBJECT(main), TQT_SLOT(showHighscores()), actionCollection()); TDEAction *act = KStdGameAction::highscores(TQT_TQOBJECT(main), TQT_SLOT(showHighscores()), actionCollection());
act->setText(i18n("Show &Highscores")); act->setText(i18n("Show &Highscores"));
KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection());
KStdGameAction::restart(TQT_TQOBJECT(main), TQT_SLOT(restartLevel()), actionCollection()); KStdGameAction::restart(TQT_TQOBJECT(main), TQT_SLOT(restartLevel()), actionCollection());
@ -54,13 +54,13 @@ void AtomTopLevel::createMenu()
connect (main, TQT_SIGNAL (enableRedo(bool)), TQT_SLOT(enableRedo(bool))); connect (main, TQT_SIGNAL (enableRedo(bool)), TQT_SLOT(enableRedo(bool)));
connect (main, TQT_SIGNAL (enableUndo(bool)), TQT_SLOT(enableUndo(bool))); connect (main, TQT_SIGNAL (enableUndo(bool)), TQT_SLOT(enableUndo(bool)));
new KAction(i18n("Atom Up"), Key_Up, TQT_TQOBJECT(main), TQT_SLOT(moveUp()), actionCollection(), "atom_up"); new TDEAction(i18n("Atom Up"), Key_Up, TQT_TQOBJECT(main), TQT_SLOT(moveUp()), actionCollection(), "atom_up");
new KAction(i18n("Atom Down"), Key_Down, TQT_TQOBJECT(main), TQT_SLOT(moveDown()), actionCollection(), "atom_down"); new TDEAction(i18n("Atom Down"), Key_Down, TQT_TQOBJECT(main), TQT_SLOT(moveDown()), actionCollection(), "atom_down");
new KAction(i18n("Atom Left"), Key_Left, TQT_TQOBJECT(main), TQT_SLOT(moveLeft()), actionCollection(), "atom_left"); new TDEAction(i18n("Atom Left"), Key_Left, TQT_TQOBJECT(main), TQT_SLOT(moveLeft()), actionCollection(), "atom_left");
new KAction(i18n("Atom Right"), Key_Right, TQT_TQOBJECT(main), TQT_SLOT(moveRight()), actionCollection(), "atom_right"); new TDEAction(i18n("Atom Right"), Key_Right, TQT_TQOBJECT(main), TQT_SLOT(moveRight()), actionCollection(), "atom_right");
new KAction(i18n("Next Atom"), Key_Tab, TQT_TQOBJECT(main), TQT_SLOT(nextAtom()), actionCollection(), "next_atom"); new TDEAction(i18n("Next Atom"), Key_Tab, TQT_TQOBJECT(main), TQT_SLOT(nextAtom()), actionCollection(), "next_atom");
new KAction(i18n("Previous Atom"), SHIFT+Key_Tab, TQT_TQOBJECT(main), TQT_SLOT(previousAtom()), actionCollection(), "prev_atom"); new TDEAction(i18n("Previous Atom"), SHIFT+Key_Tab, TQT_TQOBJECT(main), TQT_SLOT(previousAtom()), actionCollection(), "prev_atom");
} }
void AtomTopLevel::configopts() void AtomTopLevel::configopts()
@ -93,7 +93,7 @@ AtomTopLevel::AtomTopLevel()
initConfig(); initConfig();
setCentralWidget(main); setCentralWidget(main);
setupGUI( KMainWindow::Save | Keys | Create ); setupGUI( TDEMainWindow::Save | Keys | Create );
} }
AtomTopLevel::~AtomTopLevel() AtomTopLevel::~AtomTopLevel()

@ -8,7 +8,7 @@
#define TOPLEVEL_H #define TOPLEVEL_H
class GameWidget; class GameWidget;
class KAction; class TDEAction;
class TDEConfig; class TDEConfig;
#include <kmainwindow.h> #include <kmainwindow.h>
@ -21,7 +21,7 @@ class TDEConfig;
* @author Andreas Wüst * @author Andreas Wüst
*/ */
class AtomTopLevel : public KMainWindow class AtomTopLevel : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -51,7 +51,7 @@ class AtomTopLevel : public KMainWindow
GameWidget *main; GameWidget *main;
KAction *redoAction, *undoAction; TDEAction *redoAction, *undoAction;
protected slots: protected slots:
void enableRedo(bool enable); void enableRedo(bool enable);

@ -2159,9 +2159,9 @@ KBgEngineFIBS::KBgEngineFIBS(TQWidget *parent, TQString *name, TQPopupMenu *pmen
/* /*
* Initialize the FIBS submenu - this is also put in the play menu * Initialize the FIBS submenu - this is also put in the play menu
*/ */
conAction = new KAction(i18n("&Connect"), 0, this, TQT_SLOT( connectFIBS()), this); conAction = new TDEAction(i18n("&Connect"), 0, this, TQT_SLOT( connectFIBS()), this);
newAction = new KAction(i18n("New Account"), 0, this, TQT_SLOT( newAccount()), this); newAction = new TDEAction(i18n("New Account"), 0, this, TQT_SLOT( newAccount()), this);
disAction = new KAction(i18n("&Disconnect"), 0, this, TQT_SLOT(disconnectFIBS()), this); disAction = new TDEAction(i18n("&Disconnect"), 0, this, TQT_SLOT(disconnectFIBS()), this);
conAction->setEnabled(true ); conAction->plug(menu); conAction->setEnabled(true ); conAction->plug(menu);
disAction->setEnabled(false); disAction->plug(menu); disAction->setEnabled(false); disAction->plug(menu);
@ -2169,7 +2169,7 @@ KBgEngineFIBS::KBgEngineFIBS(TQWidget *parent, TQString *name, TQPopupMenu *pmen
menu->insertSeparator(); menu->insertSeparator();
(invAction = new KAction(i18n("&Invite..."), 0, this, TQT_SLOT(inviteDialog()), this))->plug(menu); (invAction = new TDEAction(i18n("&Invite..."), 0, this, TQT_SLOT(inviteDialog()), this))->plug(menu);
/* /*
* Create and fill the response menu. This is for all these: type this or * Create and fill the response menu. This is for all these: type this or
@ -2177,8 +2177,8 @@ KBgEngineFIBS::KBgEngineFIBS(TQWidget *parent, TQString *name, TQPopupMenu *pmen
*/ */
cmdMenuID = menu->insertItem(i18n("&Commands"), cmdMenu); { cmdMenuID = menu->insertItem(i18n("&Commands"), cmdMenu); {
(actAway = new KAction(i18n("Away"), 0, this, TQT_SLOT(away()), this))->plug(cmdMenu); (actAway = new TDEAction(i18n("Away"), 0, this, TQT_SLOT(away()), this))->plug(cmdMenu);
(actBack = new KAction(i18n("Back"), 0, this, TQT_SLOT(back()), this))->plug(cmdMenu); (actBack = new TDEAction(i18n("Back"), 0, this, TQT_SLOT(back()), this))->plug(cmdMenu);
actAway->setEnabled(true); actAway->setEnabled(true);
actBack->setEnabled(false); actBack->setEnabled(false);
@ -2194,14 +2194,14 @@ KBgEngineFIBS::KBgEngineFIBS(TQWidget *parent, TQString *name, TQPopupMenu *pmen
for (int i = 0; i < NumFIBSOpt; i++) for (int i = 0; i < NumFIBSOpt; i++)
fibsOpt[i] = 0; fibsOpt[i] = 0;
fibsOpt[OptReady] = new KToggleAction(i18n("Ready to Play"), fibsOpt[OptReady] = new TDEToggleAction(i18n("Ready to Play"),
0, this, TQT_SLOT(toggle_ready()), this); 0, this, TQT_SLOT(toggle_ready()), this);
fibsOpt[OptRatings] = new KToggleAction(i18n("Show Rating Computations"), fibsOpt[OptRatings] = new TDEToggleAction(i18n("Show Rating Computations"),
0, this, TQT_SLOT(toggle_ratings()), this); 0, this, TQT_SLOT(toggle_ratings()), this);
fibsOpt[OptRatings]->setCheckedState(i18n("Hide Rating Computations")); fibsOpt[OptRatings]->setCheckedState(i18n("Hide Rating Computations"));
fibsOpt[OptGreedy] = new KToggleAction(i18n("Greedy Bearoffs"), fibsOpt[OptGreedy] = new TDEToggleAction(i18n("Greedy Bearoffs"),
0, this, TQT_SLOT(toggle_greedy()), this); 0, this, TQT_SLOT(toggle_greedy()), this);
fibsOpt[OptDouble] = new KToggleAction(i18n("Ask for Doubles"), fibsOpt[OptDouble] = new TDEToggleAction(i18n("Ask for Doubles"),
0, this, TQT_SLOT(toggle_double()), this); 0, this, TQT_SLOT(toggle_double()), this);
for (int i = 0; i < NumFIBSOpt; i++) for (int i = 0; i < NumFIBSOpt; i++)
@ -2216,16 +2216,16 @@ KBgEngineFIBS::KBgEngineFIBS(TQWidget *parent, TQString *name, TQPopupMenu *pmen
*/ */
respMenuID = menu->insertItem(i18n("&Response"), respMenu); { respMenuID = menu->insertItem(i18n("&Response"), respMenu); {
(actAccept = new KAction(i18n("Accept"), 0, this, TQT_SLOT(accept()), this))->plug(respMenu); (actAccept = new TDEAction(i18n("Accept"), 0, this, TQT_SLOT(accept()), this))->plug(respMenu);
(actReject = new KAction(i18n("Reject"), 0, this, TQT_SLOT(reject()), this))->plug(respMenu); (actReject = new TDEAction(i18n("Reject"), 0, this, TQT_SLOT(reject()), this))->plug(respMenu);
actAccept->setEnabled(false); actAccept->setEnabled(false);
actReject->setEnabled(false); actReject->setEnabled(false);
respMenu->insertSeparator(); respMenu->insertSeparator();
(actConti = new KAction(i18n("Join"), 0, this, TQT_SLOT(match_conti()), this))->plug(respMenu); (actConti = new TDEAction(i18n("Join"), 0, this, TQT_SLOT(match_conti()), this))->plug(respMenu);
(actLeave = new KAction(i18n("Leave"), 0, this, TQT_SLOT(match_leave()), this))->plug(respMenu); (actLeave = new TDEAction(i18n("Leave"), 0, this, TQT_SLOT(match_leave()), this))->plug(respMenu);
actConti->setEnabled(false); actConti->setEnabled(false);
actLeave->setEnabled(false); actLeave->setEnabled(false);
@ -2238,14 +2238,14 @@ KBgEngineFIBS::KBgEngineFIBS(TQWidget *parent, TQString *name, TQPopupMenu *pmen
joinMenuID = menu->insertItem(i18n("&Join"), joinMenu); { joinMenuID = menu->insertItem(i18n("&Join"), joinMenu); {
numJoin = -1; numJoin = -1;
actJoin[0] = new KAction("", 0, this, TQT_SLOT(join_0()), this); actJoin[0] = new TDEAction("", 0, this, TQT_SLOT(join_0()), this);
actJoin[1] = new KAction("", 0, this, TQT_SLOT(join_1()), this); actJoin[1] = new TDEAction("", 0, this, TQT_SLOT(join_1()), this);
actJoin[2] = new KAction("", 0, this, TQT_SLOT(join_2()), this); actJoin[2] = new TDEAction("", 0, this, TQT_SLOT(join_2()), this);
actJoin[3] = new KAction("", 0, this, TQT_SLOT(join_3()), this); actJoin[3] = new TDEAction("", 0, this, TQT_SLOT(join_3()), this);
actJoin[4] = new KAction("", 0, this, TQT_SLOT(join_4()), this); actJoin[4] = new TDEAction("", 0, this, TQT_SLOT(join_4()), this);
actJoin[5] = new KAction("", 0, this, TQT_SLOT(join_5()), this); actJoin[5] = new TDEAction("", 0, this, TQT_SLOT(join_5()), this);
actJoin[6] = new KAction("", 0, this, TQT_SLOT(join_6()), this); actJoin[6] = new TDEAction("", 0, this, TQT_SLOT(join_6()), this);
actJoin[7] = new KAction("", 0, this, TQT_SLOT(join_7()), this); actJoin[7] = new TDEAction("", 0, this, TQT_SLOT(join_7()), this);
} }
menu->setItemEnabled(joinMenuID, false); menu->setItemEnabled(joinMenuID, false);
@ -2258,8 +2258,8 @@ KBgEngineFIBS::KBgEngineFIBS(TQWidget *parent, TQString *name, TQPopupMenu *pmen
*/ */
menu->insertSeparator(); menu->insertSeparator();
(listAct = new KToggleAction(i18n("&Player List"), 0, this, TQT_SLOT(showList()), this))->plug(menu); (listAct = new TDEToggleAction(i18n("&Player List"), 0, this, TQT_SLOT(showList()), this))->plug(menu);
(chatAct = new KToggleAction(i18n("&Chat"), 0, this, TQT_SLOT(showChat()), this))->plug(menu); (chatAct = new TDEToggleAction(i18n("&Chat"), 0, this, TQT_SLOT(showChat()), this))->plug(menu);
connect(playerlist, TQT_SIGNAL(windowVisible(bool)), listAct, TQT_SLOT(setChecked(bool))); connect(playerlist, TQT_SIGNAL(windowVisible(bool)), listAct, TQT_SLOT(setChecked(bool)));
connect(chatWindow, TQT_SIGNAL(windowVisible(bool)), chatAct, TQT_SLOT(setChecked(bool))); connect(chatWindow, TQT_SIGNAL(windowVisible(bool)), chatAct, TQT_SLOT(setChecked(bool)));

@ -46,8 +46,8 @@ class TQSocket;
class TQPopupMenu; class TQPopupMenu;
class TQCheckBox; class TQCheckBox;
class KAction; class TDEAction;
class KToggleAction; class TDEToggleAction;
/** /**
* *
@ -228,11 +228,11 @@ private:
bool redoPossible; bool redoPossible;
int undoCounter; int undoCounter;
KAction *conAction, *disAction, *newAction, *invAction; TDEAction *conAction, *disAction, *newAction, *invAction;
KAction *actAccept, *actReject, *actConti, *actLeave, *actAway, *actBack; TDEAction *actAccept, *actReject, *actConti, *actLeave, *actAway, *actBack;
KToggleAction *chatAct, *listAct; TDEToggleAction *chatAct, *listAct;
// ########################################################################### // ###########################################################################
@ -253,7 +253,7 @@ private:
* is eight and this is hardcoded in a lot of places (not the least * is eight and this is hardcoded in a lot of places (not the least
* of which are the slots join_N(). * of which are the slots join_N().
*/ */
KAction *actJoin[8]; TDEAction *actJoin[8];
int numJoin; int numJoin;
protected slots: protected slots:
@ -304,7 +304,7 @@ private:
*/ */
enum FIBSOpt {OptReady, OptGreedy, OptDouble, enum FIBSOpt {OptReady, OptGreedy, OptDouble,
OptAllowPip, OptAutoMove, OptCrawford, OptSilent, OptRatings, OptMoves, NumFIBSOpt}; OptAllowPip, OptAutoMove, OptCrawford, OptSilent, OptRatings, OptMoves, NumFIBSOpt};
KToggleAction *fibsOpt[NumFIBSOpt]; TDEToggleAction *fibsOpt[NumFIBSOpt];
public slots: public slots:

@ -159,7 +159,7 @@ public:
/* /*
* Available actions * Available actions
*/ */
KAction *mAct[MaxAction]; TDEAction *mAct[MaxAction];
/* /*
* Context menu and invitation menu * Context menu and invitation menu
@ -193,7 +193,7 @@ KBgChat::KBgChat(TQWidget *parent, const char *name)
: KChat(parent, false) : KChat(parent, false)
{ {
d = new KBgChatPrivate(); d = new KBgChatPrivate();
KActionCollection* actions = new KActionCollection(this); TDEActionCollection* actions = new TDEActionCollection(this);
d->mName[0] = TQString(); d->mName[0] = TQString();
d->mChat = 0; d->mChat = 0;
@ -230,34 +230,34 @@ KBgChat::KBgChat(TQWidget *parent, const char *name)
/* /*
* Define set of available actions * Define set of available actions
*/ */
d->mAct[KBgChatPrivate::Inquire] = new KAction(i18n("Info On"), d->mAct[KBgChatPrivate::Inquire] = new TDEAction(i18n("Info On"),
TQIconSet(kapp->iconLoader()->loadIcon( TQIconSet(kapp->iconLoader()->loadIcon(
"help.xpm", KIcon::Small)), "help.xpm", KIcon::Small)),
0, TQT_TQOBJECT(this), TQT_SLOT(slotInquire()), actions); 0, TQT_TQOBJECT(this), TQT_SLOT(slotInquire()), actions);
d->mAct[KBgChatPrivate::Talk] = new KAction(i18n("Talk To"), d->mAct[KBgChatPrivate::Talk] = new TDEAction(i18n("Talk To"),
TQIconSet(kapp->iconLoader()->loadIcon( TQIconSet(kapp->iconLoader()->loadIcon(
PROG_NAME "-chat.png", KIcon::Small)), PROG_NAME "-chat.png", KIcon::Small)),
0, TQT_TQOBJECT(this), TQT_SLOT(slotTalk()), actions); 0, TQT_TQOBJECT(this), TQT_SLOT(slotTalk()), actions);
d->mAct[KBgChatPrivate::InviteD] = new KAction(i18n("Use Dialog"), 0, TQT_TQOBJECT(this), d->mAct[KBgChatPrivate::InviteD] = new TDEAction(i18n("Use Dialog"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotInviteD()), actions); TQT_SLOT(slotInviteD()), actions);
d->mAct[KBgChatPrivate::Invite1] = new KAction(i18n("1 Point Match"), 0, TQT_TQOBJECT(this), d->mAct[KBgChatPrivate::Invite1] = new TDEAction(i18n("1 Point Match"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotInvite1()), actions); TQT_SLOT(slotInvite1()), actions);
d->mAct[KBgChatPrivate::Invite2] = new KAction(i18n("2 Point Match"), 0, TQT_TQOBJECT(this), d->mAct[KBgChatPrivate::Invite2] = new TDEAction(i18n("2 Point Match"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotInvite2()), actions); TQT_SLOT(slotInvite2()), actions);
d->mAct[KBgChatPrivate::Invite3] = new KAction(i18n("3 Point Match"), 0, TQT_TQOBJECT(this), d->mAct[KBgChatPrivate::Invite3] = new TDEAction(i18n("3 Point Match"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotInvite3()), actions); TQT_SLOT(slotInvite3()), actions);
d->mAct[KBgChatPrivate::Invite4] = new KAction(i18n("4 Point Match"), 0, TQT_TQOBJECT(this), d->mAct[KBgChatPrivate::Invite4] = new TDEAction(i18n("4 Point Match"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotInvite4()), actions); TQT_SLOT(slotInvite4()), actions);
d->mAct[KBgChatPrivate::Invite5] = new KAction(i18n("5 Point Match"), 0, TQT_TQOBJECT(this), d->mAct[KBgChatPrivate::Invite5] = new TDEAction(i18n("5 Point Match"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotInvite5()), actions); TQT_SLOT(slotInvite5()), actions);
d->mAct[KBgChatPrivate::Invite6] = new KAction(i18n("6 Point Match"), 0, TQT_TQOBJECT(this), d->mAct[KBgChatPrivate::Invite6] = new TDEAction(i18n("6 Point Match"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotInvite6()), actions); TQT_SLOT(slotInvite6()), actions);
d->mAct[KBgChatPrivate::Invite7] = new KAction(i18n("7 Point Match"), 0, TQT_TQOBJECT(this), d->mAct[KBgChatPrivate::Invite7] = new TDEAction(i18n("7 Point Match"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotInvite7()), actions); TQT_SLOT(slotInvite7()), actions);
d->mAct[KBgChatPrivate::InviteU] = new KAction(i18n("Unlimited"), 0, TQT_TQOBJECT(this), d->mAct[KBgChatPrivate::InviteU] = new TDEAction(i18n("Unlimited"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotInviteU()), actions); TQT_SLOT(slotInviteU()), actions);
d->mAct[KBgChatPrivate::InviteR] = new KAction(i18n("Resume"), 0, TQT_TQOBJECT(this), d->mAct[KBgChatPrivate::InviteR] = new TDEAction(i18n("Resume"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotInviteR()), actions); TQT_SLOT(slotInviteR()), actions);
d->mAct[KBgChatPrivate::InviteD]->plug(d->mInvt); d->mAct[KBgChatPrivate::InviteD]->plug(d->mInvt);
@ -277,13 +277,13 @@ KBgChat::KBgChat(TQWidget *parent, const char *name)
d->mAct[KBgChatPrivate::InviteU]->plug(d->mInvt); d->mAct[KBgChatPrivate::InviteU]->plug(d->mInvt);
d->mAct[KBgChatPrivate::InviteR]->plug(d->mInvt); d->mAct[KBgChatPrivate::InviteR]->plug(d->mInvt);
d->mAct[KBgChatPrivate::Gag] = new KAction(i18n("Gag"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotGag()), actions); d->mAct[KBgChatPrivate::Gag] = new TDEAction(i18n("Gag"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotGag()), actions);
d->mAct[KBgChatPrivate::Ungag] = new KAction(i18n("Ungag"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotUngag()), actions); d->mAct[KBgChatPrivate::Ungag] = new TDEAction(i18n("Ungag"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotUngag()), actions);
d->mAct[KBgChatPrivate::Cleargag] = new KAction(i18n("Clear Gag List"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotCleargag()), actions); d->mAct[KBgChatPrivate::Cleargag] = new TDEAction(i18n("Clear Gag List"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotCleargag()), actions);
d->mAct[KBgChatPrivate::Copy] = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(slotCopy()), actions); d->mAct[KBgChatPrivate::Copy] = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(slotCopy()), actions);
d->mAct[KBgChatPrivate::Clear] = new KAction(i18n("Clear"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotClear()), actions); d->mAct[KBgChatPrivate::Clear] = new TDEAction(i18n("Clear"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotClear()), actions);
d->mAct[KBgChatPrivate::Close] = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(hide()), actions); d->mAct[KBgChatPrivate::Close] = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(hide()), actions);
d->mAct[KBgChatPrivate::Silent] = new KToggleAction(i18n("Silent"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSilent()), actions); d->mAct[KBgChatPrivate::Silent] = new TDEToggleAction(i18n("Silent"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSilent()), actions);
} }
@ -316,7 +316,7 @@ void KBgChat::readConfig()
config->readBoolEntry("vis", false) ? show() : hide(); config->readBoolEntry("vis", false) ? show() : hide();
((KToggleAction *)d->mAct[KBgChatPrivate::Silent])->setChecked(config->readBoolEntry("sil", false)); ((TDEToggleAction *)d->mAct[KBgChatPrivate::Silent])->setChecked(config->readBoolEntry("sil", false));
d->mGag = config->readListEntry("gag"); d->mGag = config->readListEntry("gag");
} }
@ -334,7 +334,7 @@ void KBgChat::saveConfig()
config->writeEntry("wdt", width()); config->writeEntry("wdt", width());
config->writeEntry("vis", isVisible()); config->writeEntry("vis", isVisible());
config->writeEntry("sil", ((KToggleAction *)d->mAct[KBgChatPrivate::Silent])->isChecked()); config->writeEntry("sil", ((TDEToggleAction *)d->mAct[KBgChatPrivate::Silent])->isChecked());
config->writeEntry("gag", d->mGag); config->writeEntry("gag", d->mGag);
} }
@ -557,7 +557,7 @@ void KBgChat::handleData(const TQString &msg)
break; break;
case CLIP_SHOUTS: case CLIP_SHOUTS:
if ((!((KToggleAction *)d->mAct[KBgChatPrivate::Silent])->isChecked()) && (!d->mGag.contains(user))) { if ((!((TDEToggleAction *)d->mAct[KBgChatPrivate::Silent])->isChecked()) && (!d->mGag.contains(user))) {
cMsg = i18n("<u>%1 shouts:</u> %2").arg(user).arg(cMsg.replace(TQRegExp("^" + user), "")); cMsg = i18n("<u>%1 shouts:</u> %2").arg(user).arg(cMsg.replace(TQRegExp("^" + user), ""));
cMsg = "<font color=\"black\">" + cMsg + "</font>"; cMsg = "<font color=\"black\">" + cMsg + "</font>";
} else } else
@ -784,7 +784,7 @@ void KBgChat::slotInquire()
void KBgChat::slotSilent() void KBgChat::slotSilent()
{ {
TQString msg; TQString msg;
if (((KToggleAction *)d->mAct[KBgChatPrivate::Silent])->isChecked()) if (((TDEToggleAction *)d->mAct[KBgChatPrivate::Silent])->isChecked())
msg = "<font color=\"blue\">" + i18n("You will not hear what people shout.") + "</font>"; msg = "<font color=\"blue\">" + i18n("You will not hear what people shout.") + "</font>";
else else
msg = "<font color=\"blue\">" + i18n("You will hear what people shout.") + "</font>"; msg = "<font color=\"blue\">" + i18n("You will hear what people shout.") + "</font>";

@ -37,7 +37,7 @@ class TQListBoxItem;
class TQPopupMenu; class TQPopupMenu;
class KTabCtl; class KTabCtl;
class KAction; class TDEAction;
class KBgChatPrivate; class KBgChatPrivate;

@ -72,14 +72,14 @@ public:
* Extension of the TQListViewItem class that has a custom key function * Extension of the TQListViewItem class that has a custom key function
* that can deal with the different items of the player list. * that can deal with the different items of the player list.
*/ */
class KFibsPlayerListLVI : public KListViewItem { class KFibsPlayerListLVI : public TDEListViewItem {
public: public:
/* /*
* Constructor * Constructor
*/ */
KFibsPlayerListLVI(KFibsPlayerList *parent) : KListViewItem(parent) { _plist = parent; } KFibsPlayerListLVI(KFibsPlayerList *parent) : TDEListViewItem(parent) { _plist = parent; }
/* /*
* Destructor * Destructor
@ -145,7 +145,7 @@ public:
/* /*
* Various actions for the context menu * Various actions for the context menu
*/ */
KAction *mAct[ActionEnd]; TDEAction *mAct[ActionEnd];
/* /*
* All relevant information on the columns * All relevant information on the columns
@ -201,10 +201,10 @@ public:
* Construct the playerlist and do some initial setup * Construct the playerlist and do some initial setup
*/ */
KFibsPlayerList::KFibsPlayerList(TQWidget *parent, const char *name) KFibsPlayerList::KFibsPlayerList(TQWidget *parent, const char *name)
: KListView(parent, name) : TDEListView(parent, name)
{ {
d = new KFibsPlayerListPrivate(); d = new KFibsPlayerListPrivate();
KActionCollection* actions = new KActionCollection(this); TDEActionCollection* actions = new TDEActionCollection(this);
/* /*
* Allocate the column information * Allocate the column information
@ -286,44 +286,44 @@ KFibsPlayerList::KFibsPlayerList(TQWidget *parent, const char *name)
/* /*
* Create the whole set of actions * Create the whole set of actions
*/ */
d->mAct[KFibsPlayerListPrivate::Info] = new KAction(i18n("Info"), d->mAct[KFibsPlayerListPrivate::Info] = new TDEAction(i18n("Info"),
TQIconSet(kapp->iconLoader()->loadIcon TQIconSet(kapp->iconLoader()->loadIcon
("help.xpm", KIcon::Small)), ("help.xpm", KIcon::Small)),
0, TQT_TQOBJECT(this), TQT_SLOT(slotInfo()), actions); 0, TQT_TQOBJECT(this), TQT_SLOT(slotInfo()), actions);
d->mAct[KFibsPlayerListPrivate::Talk] = new KAction(i18n("Talk"), d->mAct[KFibsPlayerListPrivate::Talk] = new TDEAction(i18n("Talk"),
TQIconSet(kapp->iconLoader()->loadIcon TQIconSet(kapp->iconLoader()->loadIcon
(PROG_NAME "-chat.png", KIcon::Small)), (PROG_NAME "-chat.png", KIcon::Small)),
0, TQT_TQOBJECT(this), TQT_SLOT(slotTalk()), actions); 0, TQT_TQOBJECT(this), TQT_SLOT(slotTalk()), actions);
d->mAct[KFibsPlayerListPrivate::Look] = new KAction(i18n("Look"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotLook()), actions); d->mAct[KFibsPlayerListPrivate::Look] = new TDEAction(i18n("Look"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotLook()), actions);
d->mAct[KFibsPlayerListPrivate::Watch] = new KAction(i18n("Watch"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotWatch()), actions); d->mAct[KFibsPlayerListPrivate::Watch] = new TDEAction(i18n("Watch"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotWatch()), actions);
d->mAct[KFibsPlayerListPrivate::Unwatch] = new KAction(i18n("Unwatch"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotUnwatch()),actions); d->mAct[KFibsPlayerListPrivate::Unwatch] = new TDEAction(i18n("Unwatch"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotUnwatch()),actions);
d->mAct[KFibsPlayerListPrivate::BlindAct] = new KAction(i18n("Blind"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotBlind()), actions); d->mAct[KFibsPlayerListPrivate::BlindAct] = new TDEAction(i18n("Blind"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotBlind()), actions);
d->mAct[KFibsPlayerListPrivate::Update] = new KAction(i18n("Update"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotUpdate()), actions); d->mAct[KFibsPlayerListPrivate::Update] = new TDEAction(i18n("Update"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotUpdate()), actions);
d->mAct[KFibsPlayerListPrivate::Reload] = KStdAction::redisplay(TQT_TQOBJECT(this), TQT_SLOT(slotReload()), actions); d->mAct[KFibsPlayerListPrivate::Reload] = KStdAction::redisplay(TQT_TQOBJECT(this), TQT_SLOT(slotReload()), actions);
d->mAct[KFibsPlayerListPrivate::Mail] = KStdAction::mail(TQT_TQOBJECT(this), TQT_SLOT(slotMail()), actions); d->mAct[KFibsPlayerListPrivate::Mail] = KStdAction::mail(TQT_TQOBJECT(this), TQT_SLOT(slotMail()), actions);
d->mAct[KFibsPlayerListPrivate::Close] = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(hide()), actions); d->mAct[KFibsPlayerListPrivate::Close] = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(hide()), actions);
d->mAct[KFibsPlayerListPrivate::InviteD] = new KAction(i18n("Use Dialog"), 0, TQT_TQOBJECT(this), d->mAct[KFibsPlayerListPrivate::InviteD] = new TDEAction(i18n("Use Dialog"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotInviteD()), actions); TQT_SLOT(slotInviteD()), actions);
d->mAct[KFibsPlayerListPrivate::Invite1] = new KAction(i18n("1 Point Match"), 0, TQT_TQOBJECT(this), d->mAct[KFibsPlayerListPrivate::Invite1] = new TDEAction(i18n("1 Point Match"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotInvite1()), actions); TQT_SLOT(slotInvite1()), actions);
d->mAct[KFibsPlayerListPrivate::Invite2] = new KAction(i18n("2 Point Match"), 0, TQT_TQOBJECT(this), d->mAct[KFibsPlayerListPrivate::Invite2] = new TDEAction(i18n("2 Point Match"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotInvite2()), actions); TQT_SLOT(slotInvite2()), actions);
d->mAct[KFibsPlayerListPrivate::Invite3] = new KAction(i18n("3 Point Match"), 0, TQT_TQOBJECT(this), d->mAct[KFibsPlayerListPrivate::Invite3] = new TDEAction(i18n("3 Point Match"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotInvite3()), actions); TQT_SLOT(slotInvite3()), actions);
d->mAct[KFibsPlayerListPrivate::Invite4] = new KAction(i18n("4 Point Match"), 0, TQT_TQOBJECT(this), d->mAct[KFibsPlayerListPrivate::Invite4] = new TDEAction(i18n("4 Point Match"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotInvite4()), actions); TQT_SLOT(slotInvite4()), actions);
d->mAct[KFibsPlayerListPrivate::Invite5] = new KAction(i18n("5 Point Match"), 0, TQT_TQOBJECT(this), d->mAct[KFibsPlayerListPrivate::Invite5] = new TDEAction(i18n("5 Point Match"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotInvite5()), actions); TQT_SLOT(slotInvite5()), actions);
d->mAct[KFibsPlayerListPrivate::Invite6] = new KAction(i18n("6 Point Match"), 0, TQT_TQOBJECT(this), d->mAct[KFibsPlayerListPrivate::Invite6] = new TDEAction(i18n("6 Point Match"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotInvite6()), actions); TQT_SLOT(slotInvite6()), actions);
d->mAct[KFibsPlayerListPrivate::Invite7] = new KAction(i18n("7 Point Match"), 0, TQT_TQOBJECT(this), d->mAct[KFibsPlayerListPrivate::Invite7] = new TDEAction(i18n("7 Point Match"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotInvite7()), actions); TQT_SLOT(slotInvite7()), actions);
d->mAct[KFibsPlayerListPrivate::InviteU] = new KAction(i18n("Unlimited"), 0, TQT_TQOBJECT(this), d->mAct[KFibsPlayerListPrivate::InviteU] = new TDEAction(i18n("Unlimited"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotInviteU()), actions); TQT_SLOT(slotInviteU()), actions);
d->mAct[KFibsPlayerListPrivate::InviteR] = new KAction(i18n("Resume"), 0, TQT_TQOBJECT(this), d->mAct[KFibsPlayerListPrivate::InviteR] = new TDEAction(i18n("Resume"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotInviteR()), actions); TQT_SLOT(slotInviteR()), actions);
/* /*
@ -363,8 +363,8 @@ KFibsPlayerList::KFibsPlayerList(TQWidget *parent, const char *name)
/* /*
* Right mouse button gets context menu, double click gets player info * Right mouse button gets context menu, double click gets player info
*/ */
connect(this, TQT_SIGNAL(contextMenu(KListView *, TQListViewItem *, const TQPoint &)), connect(this, TQT_SIGNAL(contextMenu(TDEListView *, TQListViewItem *, const TQPoint &)),
this, TQT_SLOT(showContextMenu(KListView *, TQListViewItem *, const TQPoint &))); this, TQT_SLOT(showContextMenu(TDEListView *, TQListViewItem *, const TQPoint &)));
connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int)), connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int)),
this, TQT_SLOT(getPlayerInfo(TQListViewItem *, const TQPoint &, int))); this, TQT_SLOT(getPlayerInfo(TQListViewItem *, const TQPoint &, int)));
} }
@ -562,7 +562,7 @@ void KFibsPlayerList::saveConfig()
/* /*
* Save selected player, update the menu entries and show the popup menu * Save selected player, update the menu entries and show the popup menu
*/ */
void KFibsPlayerList::showContextMenu(KListView *, TQListViewItem *i, const TQPoint &p) void KFibsPlayerList::showContextMenu(TDEListView *, TQListViewItem *i, const TQPoint &p)
{ {
/* /*
* Get the name of the selected player * Get the name of the selected player
@ -849,7 +849,7 @@ int KFibsPlayerList::cIndex(int col)
*/ */
void KFibsPlayerList::showEvent(TQShowEvent *e) void KFibsPlayerList::showEvent(TQShowEvent *e)
{ {
KListView::showEvent(e); TDEListView::showEvent(e);
emit windowVisible(true); emit windowVisible(true);
} }
@ -859,7 +859,7 @@ void KFibsPlayerList::showEvent(TQShowEvent *e)
void KFibsPlayerList::hideEvent(TQHideEvent *e) void KFibsPlayerList::hideEvent(TQHideEvent *e)
{ {
emit windowVisible(false); emit windowVisible(false);
KListView::hideEvent(e); TDEListView::hideEvent(e);
} }
/* /*

@ -43,7 +43,7 @@ class KFibsPlayerListPrivate;
* @author Jens Hoefkens <jens@hoefkens.com> * @author Jens Hoefkens <jens@hoefkens.com>
* *
*/ */
class KFibsPlayerList : public KListView class KFibsPlayerList : public TDEListView
{ {
Q_OBJECT Q_OBJECT
@ -166,7 +166,7 @@ protected slots:
/** /**
* Display a popup menu for the current player * Display a popup menu for the current player
*/ */
void showContextMenu(KListView *, TQListViewItem *, const TQPoint &); void showContextMenu(TDEListView *, TQListViewItem *, const TQPoint &);
/** /**
* Reload the whole list * Reload the whole list

@ -439,7 +439,7 @@ KBgEngineGNU::KBgEngineGNU(TQWidget *parent, TQString *name, TQPopupMenu *pmenu)
/* /*
* Setup of menu * Setup of menu
*/ */
resAction = new KAction(i18n("&Restart GNU Backgammon"), 0, this, TQT_SLOT(startGNU()), this); resAction = new TDEAction(i18n("&Restart GNU Backgammon"), 0, this, TQT_SLOT(startGNU()), this);
resAction->setEnabled(false); resAction->plug(menu); resAction->setEnabled(false); resAction->plug(menu);
/* /*

@ -205,7 +205,7 @@ private:
int turn; int turn;
KAction *resAction; TDEAction *resAction;
protected slots: protected slots:

@ -68,13 +68,13 @@ KBgEngineNg::KBgEngineNg(TQWidget *parent, TQString *name, TQPopupMenu *pmenu)
for (int i = 0; i < MaxTypes; i++) for (int i = 0; i < MaxTypes; i++)
list.append(label[i]); list.append(label[i]);
_gameSelect = new KSelectAction(i18n("&Types"), 0, this, TQT_SLOT(setGame()), this); _gameSelect = new TDESelectAction(i18n("&Types"), 0, this, TQT_SLOT(setGame()), this);
_gameSelect->setItems(list); _gameSelect->setItems(list);
_gameSelect->plug(menu); _gameSelect->plug(menu);
menu->insertSeparator(); menu->insertSeparator();
_connectAction = new KAction(i18n("&Names..."), 0, this, TQT_SLOT(changeName()), this); _connectAction = new TDEAction(i18n("&Names..."), 0, this, TQT_SLOT(changeName()), this);
_connectAction->plug(menu); _connectAction->plug(menu);
// Restore last settings // Restore last settings

@ -212,9 +212,9 @@ private:
enum GameTypes {None = -1, Local, NetServer, NetClient, MaxTypes}; enum GameTypes {None = -1, Local, NetServer, NetClient, MaxTypes};
KSelectAction * _gameSelect; TDESelectAction * _gameSelect;
KAction* _connectAction; TDEAction* _connectAction;
KAction* _nameAction; TDEAction* _nameAction;
int _currGame; int _currGame;
int _nLocalPlayers; int _nLocalPlayers;

@ -70,8 +70,8 @@ public:
/* /*
* Game actions * Game actions
*/ */
KAction *mNew, *mSwap; TDEAction *mNew, *mSwap;
KToggleAction *mEdit; TDEToggleAction *mEdit;
/* /*
* Player's names * Player's names
@ -120,10 +120,10 @@ KBgEngineOffline::KBgEngineOffline(TQWidget *parent, TQString *name, TQPopupMenu
/* /*
* Create engine specific actions * Create engine specific actions
*/ */
d->mNew = new KAction(i18n("&New Game..."), 0, this, TQT_SLOT(newGame()), this); d->mNew = new TDEAction(i18n("&New Game..."), 0, this, TQT_SLOT(newGame()), this);
d->mSwap = new KAction(i18n("&Swap Colors"), 0, this, TQT_SLOT(swapColors()), this); d->mSwap = new TDEAction(i18n("&Swap Colors"), 0, this, TQT_SLOT(swapColors()), this);
d->mEdit = new KToggleAction(i18n("&Edit Mode"), 0, this, d->mEdit = new TDEToggleAction(i18n("&Edit Mode"), 0, this,
TQT_SLOT(toggleEditMode()), this); TQT_SLOT(toggleEditMode()), this);
d->mEdit->setChecked(false); d->mEdit->setChecked(false);

@ -105,7 +105,7 @@ KBg::KBg()
TQStringList list; TQStringList list;
for (int i = 0; i < MaxEngine; i++) for (int i = 0; i < MaxEngine; i++)
list.append(engineString[i]); list.append(engineString[i]);
engineSet = new KSelectAction(i18n("&Engine"), 0, TQT_TQOBJECT(this), TQT_SLOT(setupEngine()), actionCollection(), engineSet = new TDESelectAction(i18n("&Engine"), 0, TQT_TQOBJECT(this), TQT_SLOT(setupEngine()), actionCollection(),
"move_engine"); "move_engine");
engineSet->setItems(list); engineSet->setItems(list);
@ -121,7 +121,7 @@ KBg::KBg()
rollAction->setEnabled(false); rollAction->setEnabled(false);
endAction = KStdGameAction::endTurn(TQT_TQOBJECT(this), TQT_SLOT(done()), actionCollection()); endAction = KStdGameAction::endTurn(TQT_TQOBJECT(this), TQT_SLOT(done()), actionCollection());
endAction->setEnabled(false); endAction->setEnabled(false);
cubeAction = new KAction(i18n("Double Cube"), TQIconSet(kapp->iconLoader()->loadIcon cubeAction = new TDEAction(i18n("Double Cube"), TQIconSet(kapp->iconLoader()->loadIcon
(PROG_NAME "-double.xpm", KIcon::Toolbar)), (PROG_NAME "-double.xpm", KIcon::Toolbar)),
0, TQT_TQOBJECT(this), TQT_SLOT(cube()), actionCollection(), "move_cube"); 0, TQT_TQOBJECT(this), TQT_SLOT(cube()), actionCollection(), "move_cube");
cubeAction->setEnabled(false); cubeAction->setEnabled(false);
@ -130,12 +130,12 @@ KBg::KBg()
KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(setupDlg()), actionCollection()); KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(setupDlg()), actionCollection());
KStdAction::saveOptions(TQT_TQOBJECT(this), TQT_SLOT(saveConfig()), actionCollection()); KStdAction::saveOptions(TQT_TQOBJECT(this), TQT_SLOT(saveConfig()), actionCollection());
KPopupMenu *p = (new KActionMenu(i18n("&Backgammon on the Web"), TDEPopupMenu *p = (new TDEActionMenu(i18n("&Backgammon on the Web"),
actionCollection(), "help_www"))->popupMenu(); actionCollection(), "help_www"))->popupMenu();
(new KAction(helpTopic[FIBSHome][0], 0, TQT_TQOBJECT(this), TQT_SLOT(wwwFIBS()), (new TDEAction(helpTopic[FIBSHome][0], 0, TQT_TQOBJECT(this), TQT_SLOT(wwwFIBS()),
actionCollection(), "help_www_fibs"))->plug(p); actionCollection(), "help_www_fibs"))->plug(p);
(new KAction(helpTopic[RuleHome][0], 0, TQT_TQOBJECT(this), TQT_SLOT(wwwRule()), (new TDEAction(helpTopic[RuleHome][0], 0, TQT_TQOBJECT(this), TQT_SLOT(wwwRule()),
actionCollection(), "help_www_rule"))->plug(p); actionCollection(), "help_www_rule"))->plug(p);
/* /*
@ -812,7 +812,7 @@ void KBg::allowCommand(int cmd, bool f)
*/ */
void KBg::hideEvent(TQHideEvent *e) void KBg::hideEvent(TQHideEvent *e)
{ {
KMainWindow::hideEvent(e); TDEMainWindow::hideEvent(e);
engine[currEngine]->hideEvent(); engine[currEngine]->hideEvent();
} }
@ -822,7 +822,7 @@ void KBg::hideEvent(TQHideEvent *e)
*/ */
void KBg::showEvent(TQShowEvent *e) void KBg::showEvent(TQShowEvent *e)
{ {
KMainWindow::showEvent(e); TDEMainWindow::showEvent(e);
engine[currEngine]->showEvent(); engine[currEngine]->showEvent();
} }

@ -34,8 +34,8 @@ class TQSplitter;
class TQCheckBox; class TQCheckBox;
class TQPopupMenu; class TQPopupMenu;
class TQLabel; class TQLabel;
class KAction; class TDEAction;
class KSelectAction; class TDESelectAction;
class KLineEdit; class KLineEdit;
class KDialogBase; class KDialogBase;
class KDoubleNumInput; class KDoubleNumInput;
@ -45,7 +45,7 @@ class KBgTextView;
class KBgBoardSetup; class KBgBoardSetup;
class KBg : public KMainWindow class KBg : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -193,7 +193,7 @@ protected slots:
void setupCancel(); void setupCancel();
private: private:
KAction *newAction, *undoAction, *redoAction, *rollAction, *cubeAction, *endAction, *loadAction; TDEAction *newAction, *undoAction, *redoAction, *rollAction, *cubeAction, *endAction, *loadAction;
/* /*
* Each engine has its own identifier. * Each engine has its own identifier.
@ -206,7 +206,7 @@ private:
TQPopupMenu *dummyPopup; TQPopupMenu *dummyPopup;
enum HelpTopics {FIBSHome, RuleHome, MaxHelpTopic}; enum HelpTopics {FIBSHome, RuleHome, MaxHelpTopic};
TQString helpTopic[MaxHelpTopic][2]; TQString helpTopic[MaxHelpTopic][2];
KSelectAction *engineSet; TDESelectAction *engineSet;
/** /**
* Notebook for the setup * Notebook for the setup

@ -235,7 +235,7 @@ void KBgBoardSetup::getSetupPages(KDialogBase *nb)
* =================== * ===================
*/ */
w = new TQWidget(tc); w = new TQWidget(tc);
kf = new KFontChooser(w); kf = new TDEFontChooser(w);
kf->setFont(getFont()); kf->setFont(getFont());
gl = new TQGridLayout(w, 1, 1, nb->spacingHint()); gl = new TQGridLayout(w, 1, 1, nb->spacingHint());
gl->addWidget(kf, 0, 0); gl->addWidget(kf, 0, 0);

@ -958,7 +958,7 @@ private:
/** /**
* Save settings before the user changed them * Save settings before the user changed them
*/ */
KFontChooser *kf; TDEFontChooser *kf;
TQRadioButton *rbMove[3]; TQRadioButton *rbMove[3];

@ -75,7 +75,7 @@ void KBgTextView::clear()
void KBgTextView::selectFont() void KBgTextView::selectFont()
{ {
TQFont f = font(); TQFont f = font();
KFontDialog::getFont(f, false, this, true); TDEFontDialog::getFont(f, false, this, true);
setFont(f); setFont(f);
} }

@ -36,7 +36,7 @@
extern const char *clientVersion; extern const char *clientVersion;
KBattleshipWindow::KBattleshipWindow() : KMainWindow() KBattleshipWindow::KBattleshipWindow() : TDEMainWindow()
{ {
shift = false; shift = false;
m_connection = 0; m_connection = 0;
@ -93,20 +93,20 @@ void KBattleshipWindow::initStatusBar()
void KBattleshipWindow::initActions() void KBattleshipWindow::initActions()
{ {
KStdAction::configureNotifications(TQT_TQOBJECT(this), TQT_SLOT(slotConfigureNotifications()), actionCollection()); KStdAction::configureNotifications(TQT_TQOBJECT(this), TQT_SLOT(slotConfigureNotifications()), actionCollection());
m_gameServerConnect = new KAction(i18n("&Connect to Server..."), "connect_no", Key_F2, TQT_TQOBJECT(this), TQT_SLOT(slotServerConnect()), actionCollection(), "game_serverconnect"); m_gameServerConnect = new TDEAction(i18n("&Connect to Server..."), "connect_no", Key_F2, TQT_TQOBJECT(this), TQT_SLOT(slotServerConnect()), actionCollection(), "game_serverconnect");
m_gameNewServer = new KAction(i18n("&Start Server..."), "network", Key_F3, TQT_TQOBJECT(this), TQT_SLOT(slotNewServer()), actionCollection(), "game_newserver"); m_gameNewServer = new TDEAction(i18n("&Start Server..."), "network", Key_F3, TQT_TQOBJECT(this), TQT_SLOT(slotNewServer()), actionCollection(), "game_newserver");
m_gameSingle = new KAction(i18n("S&ingle Player..."), "gear", Key_F4, TQT_TQOBJECT(this), TQT_SLOT(slotSinglePlayer()), actionCollection(), "game_singleplayer"); m_gameSingle = new TDEAction(i18n("S&ingle Player..."), "gear", Key_F4, TQT_TQOBJECT(this), TQT_SLOT(slotSinglePlayer()), actionCollection(), "game_singleplayer");
m_gameQuit = KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); m_gameQuit = KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection());
KStdGameAction::highscores(TQT_TQOBJECT(this), TQT_SLOT(slotHighscore()), actionCollection()); KStdGameAction::highscores(TQT_TQOBJECT(this), TQT_SLOT(slotHighscore()), actionCollection());
m_gameEnemyInfo = new KAction(i18n("&Enemy Info"), "view_text", Key_F11, TQT_TQOBJECT(this), TQT_SLOT(slotEnemyClientInfo()), actionCollection(), "game_enemyinfo"); m_gameEnemyInfo = new TDEAction(i18n("&Enemy Info"), "view_text", Key_F11, TQT_TQOBJECT(this), TQT_SLOT(slotEnemyClientInfo()), actionCollection(), "game_enemyinfo");
m_configSound = new KToggleAction(i18n("&Play Sounds"), 0, actionCollection(), "options_configure_sound"); m_configSound = new TDEToggleAction(i18n("&Play Sounds"), 0, actionCollection(), "options_configure_sound");
m_configGrid = new KToggleAction(i18n("&Show Grid"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowGrid()), actionCollection(), "options_show_grid"); m_configGrid = new TDEToggleAction(i18n("&Show Grid"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowGrid()), actionCollection(), "options_show_grid");
m_configGrid->setCheckedState(i18n("Hide Grid")); m_configGrid->setCheckedState(i18n("Hide Grid"));
m_gameEnemyInfo->setEnabled(false); m_gameEnemyInfo->setEnabled(false);
setupGUI( KMainWindow::Save | StatusBar | Keys | Create ); setupGUI( TDEMainWindow::Save | StatusBar | Keys | Create );
} }
void KBattleshipWindow::initChat() void KBattleshipWindow::initChat()

@ -44,7 +44,7 @@
#include "kshiplist.h" #include "kshiplist.h"
#include "kstatdialog.h" #include "kstatdialog.h"
class KBattleshipWindow : public KMainWindow class KBattleshipWindow : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -145,13 +145,13 @@ private:
KChatWidget *m_chat; KChatWidget *m_chat;
KStatDialog *m_stat; KStatDialog *m_stat;
KBattleshipView *m_view; KBattleshipView *m_view;
KAction *m_gameServerConnect; TDEAction *m_gameServerConnect;
KAction *m_gameNewServer; TDEAction *m_gameNewServer;
KAction *m_gameQuit; TDEAction *m_gameQuit;
KAction *m_gameEnemyInfo; TDEAction *m_gameEnemyInfo;
KAction *m_gameSingle; TDEAction *m_gameSingle;
KToggleAction *m_configSound; TDEToggleAction *m_configSound;
KToggleAction *m_configGrid; TDEToggleAction *m_configGrid;
KClientDialog *m_client; KClientDialog *m_client;
TDEServerDialog *m_server; TDEServerDialog *m_server;
KShipList *m_ownshiplist; KShipList *m_ownshiplist;

@ -87,7 +87,7 @@ KBBGame::KBBGame()
statusBar()->insertItem(i18n("Run: yesno"), SRUN); statusBar()->insertItem(i18n("Run: yesno"), SRUN);
statusBar()->insertItem(i18n("Size: 00 x 00"), SSIZE); statusBar()->insertItem(i18n("Size: 00 x 00"), SSIZE);
initKAction(); initTDEAction();
connect( gr, TQT_SIGNAL(inputAt(int,int,int)), connect( gr, TQT_SIGNAL(inputAt(int,int,int)),
this, TQT_SLOT(gotInputAt(int,int,int)) ); this, TQT_SLOT(gotInputAt(int,int,int)) );
@ -695,40 +695,40 @@ void KBBGame::gotInputAt( int col, int row, int state )
updateStats(); updateStats();
} }
void KBBGame::initKAction() void KBBGame::initTDEAction()
{ {
// game // game
KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(newGame()), actionCollection()); KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(newGame()), actionCollection());
(void)new KAction( i18n("&Give Up"), SmallIcon("giveup"), 0, TQT_TQOBJECT(this), TQT_SLOT(giveUp()), actionCollection(), "game_giveup" ); (void)new TDEAction( i18n("&Give Up"), SmallIcon("giveup"), 0, TQT_TQOBJECT(this), TQT_SLOT(giveUp()), actionCollection(), "game_giveup" );
(void)new KAction( i18n("&Done"), SmallIcon("done"), 0, TQT_TQOBJECT(this), TQT_SLOT(gameFinished()), actionCollection(), "game_done" ); (void)new TDEAction( i18n("&Done"), SmallIcon("done"), 0, TQT_TQOBJECT(this), TQT_SLOT(gameFinished()), actionCollection(), "game_done" );
(void)new KAction( i18n("&Resize"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotResize()), actionCollection(), "game_resize" ); (void)new TDEAction( i18n("&Resize"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotResize()), actionCollection(), "game_resize" );
KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection());
// settings // settings
sizeAction = new KSelectAction( i18n("&Size"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSize()), actionCollection(), "options_size"); sizeAction = new TDESelectAction( i18n("&Size"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSize()), actionCollection(), "options_size");
TQStringList list; TQStringList list;
list.append(i18n(" 8 x 8 ")); list.append(i18n(" 8 x 8 "));
list.append(i18n(" 10 x 10 ")); list.append(i18n(" 10 x 10 "));
list.append(i18n(" 12 x 12 ")); list.append(i18n(" 12 x 12 "));
sizeAction->setItems(list); sizeAction->setItems(list);
ballsAction = new KSelectAction( i18n("&Balls"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotBalls()), actionCollection(), "options_balls"); ballsAction = new TDESelectAction( i18n("&Balls"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotBalls()), actionCollection(), "options_balls");
list.clear(); list.clear();
list.append(i18n(" 4 ")); list.append(i18n(" 4 "));
list.append(i18n(" 6 ")); list.append(i18n(" 6 "));
list.append(i18n(" 8 ")); list.append(i18n(" 8 "));
ballsAction->setItems(list); ballsAction->setItems(list);
tutorialAction = new KToggleAction( i18n("&Tutorial"), 0, TQT_TQOBJECT(this), TQT_SLOT(tutorialSwitch()), actionCollection(), "options_tutorial" ); tutorialAction = new TDEToggleAction( i18n("&Tutorial"), 0, TQT_TQOBJECT(this), TQT_SLOT(tutorialSwitch()), actionCollection(), "options_tutorial" );
// KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), // KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()),
//actionCollection()); //actionCollection());
// keyboard only // keyboard only
(void)new KAction( i18n("Move Down"), TQt::Key_Down, TQT_TQOBJECT(gr), TQT_SLOT(slotDown()), actionCollection(), "move_down" ); (void)new TDEAction( i18n("Move Down"), TQt::Key_Down, TQT_TQOBJECT(gr), TQT_SLOT(slotDown()), actionCollection(), "move_down" );
(void)new KAction( i18n("Move Up"), TQt::Key_Up, TQT_TQOBJECT(gr), TQT_SLOT(slotUp()), actionCollection(), "move_up" ); (void)new TDEAction( i18n("Move Up"), TQt::Key_Up, TQT_TQOBJECT(gr), TQT_SLOT(slotUp()), actionCollection(), "move_up" );
(void)new KAction( i18n("Move Left"), TQt::Key_Left, TQT_TQOBJECT(gr), TQT_SLOT(slotLeft()), actionCollection(), "move_left" ); (void)new TDEAction( i18n("Move Left"), TQt::Key_Left, TQT_TQOBJECT(gr), TQT_SLOT(slotLeft()), actionCollection(), "move_left" );
(void)new KAction( i18n("Move Right"), TQt::Key_Right, TQT_TQOBJECT(gr), TQT_SLOT(slotRight()), actionCollection(), "move_right" ); (void)new TDEAction( i18n("Move Right"), TQt::Key_Right, TQT_TQOBJECT(gr), TQT_SLOT(slotRight()), actionCollection(), "move_right" );
(void)new KAction( i18n("Trigger Action"), TQt::Key_Return, TQT_TQOBJECT(gr), TQT_SLOT(slotInput()), actionCollection(), "move_trigger" ); (void)new TDEAction( i18n("Trigger Action"), TQt::Key_Return, TQT_TQOBJECT(gr), TQT_SLOT(slotInput()), actionCollection(), "move_trigger" );
} }
void KBBGame::slotResize() void KBBGame::slotResize()

@ -18,8 +18,8 @@
#include <kmainwindow.h> #include <kmainwindow.h>
#include <krandomsequence.h> #include <krandomsequence.h>
class KSelectAction; class TDESelectAction;
class KToggleAction; class TDEToggleAction;
/* /*
Types of the boxes (used f.e.g. in the traceRay() method) Types of the boxes (used f.e.g. in the traceRay() method)
@ -47,7 +47,7 @@ class KToggleAction;
#define SRUN 2 #define SRUN 2
#define SSIZE 3 #define SSIZE 3
class KBBGame : public KMainWindow class KBBGame : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -83,7 +83,7 @@ private:
int traceRay( int startX, int startY, int *endX, int *endY ); int traceRay( int startX, int startY, int *endX, int *endY );
void remap( RectOnArray *gam, RectOnArray *gra ); void remap( RectOnArray *gam, RectOnArray *gra );
void getResults(); void getResults();
void initKAction(); void initTDEAction();
int balls; int balls;
int detourCounter; int detourCounter;
@ -98,8 +98,8 @@ private:
TQLabel *statusText;*/ TQLabel *statusText;*/
KRandomSequence random; KRandomSequence random;
KSelectAction *ballsAction, *sizeAction; TDESelectAction *ballsAction, *sizeAction;
KToggleAction *tutorialAction; TDEToggleAction *tutorialAction;
}; };
#endif // KBBGAME_H #endif // KBBGAME_H

@ -122,7 +122,7 @@ void KJezzball::initXMLUI()
m_newAction = KStdGameAction::gameNew( TQT_TQOBJECT(this), TQT_SLOT(newGame()), actionCollection() ); m_newAction = KStdGameAction::gameNew( TQT_TQOBJECT(this), TQT_SLOT(newGame()), actionCollection() );
// AB: originally KBounce/KJezzball used Space for new game - but Ctrl+N is // AB: originally KBounce/KJezzball used Space for new game - but Ctrl+N is
// default. We solve this by providing space as an alternative key // default. We solve this by providing space as an alternative key
KShortcut s = m_newAction->shortcut(); TDEShortcut s = m_newAction->shortcut();
s.append(KKeySequence(TQKeySequence(Key_Space))); s.append(KKeySequence(TQKeySequence(Key_Space)));
m_newAction->setShortcut(s); m_newAction->setShortcut(s);
@ -132,16 +132,16 @@ void KJezzball::initXMLUI()
KStdGameAction::end(TQT_TQOBJECT(this), TQT_SLOT(closeGame()), actionCollection()); KStdGameAction::end(TQT_TQOBJECT(this), TQT_SLOT(closeGame()), actionCollection());
KStdGameAction::configureHighscores(TQT_TQOBJECT(this), TQT_SLOT(configureHighscores()),actionCollection()); KStdGameAction::configureHighscores(TQT_TQOBJECT(this), TQT_SLOT(configureHighscores()),actionCollection());
new KAction( i18n("&Select Background Folder..."), 0, TQT_TQOBJECT(this), TQT_SLOT(selectBackground()), new TDEAction( i18n("&Select Background Folder..."), 0, TQT_TQOBJECT(this), TQT_SLOT(selectBackground()),
actionCollection(), "background_select" ); actionCollection(), "background_select" );
m_backgroundShowAction = m_backgroundShowAction =
new KToggleAction( i18n("Show &Backgrounds"), 0, TQT_TQOBJECT(this), TQT_SLOT(showBackground()), new TDEToggleAction( i18n("Show &Backgrounds"), 0, TQT_TQOBJECT(this), TQT_SLOT(showBackground()),
actionCollection(), "background_show" ); actionCollection(), "background_show" );
m_backgroundShowAction->setCheckedState(i18n("Hide &Backgrounds")); m_backgroundShowAction->setCheckedState(i18n("Hide &Backgrounds"));
m_backgroundShowAction->setEnabled( !m_backgroundDir.isEmpty() ); m_backgroundShowAction->setEnabled( !m_backgroundDir.isEmpty() );
m_backgroundShowAction->setChecked( m_showBackground ); m_backgroundShowAction->setChecked( m_showBackground );
m_soundAction = new KToggleAction( i18n("&Play Sounds"), 0, 0, 0, actionCollection(), "toggle_sound"); m_soundAction = new TDEToggleAction( i18n("&Play Sounds"), 0, 0, 0, actionCollection(), "toggle_sound");
} }
void KJezzball::newGame() void KJezzball::newGame()
@ -336,7 +336,7 @@ void KJezzball::focusOutEvent( TQFocusEvent *ev )
// m_gameWidget->display( i18n("Game suspended") ); // m_gameWidget->display( i18n("Game suspended") );
} }
KMainWindow::focusOutEvent( ev ); TDEMainWindow::focusOutEvent( ev );
} }
void KJezzball::focusInEvent ( TQFocusEvent *ev ) void KJezzball::focusInEvent ( TQFocusEvent *ev )
@ -350,7 +350,7 @@ void KJezzball::focusInEvent ( TQFocusEvent *ev )
//m_gameWidget->display( TQString() ); //m_gameWidget->display( TQString() );
} }
KMainWindow::focusInEvent( ev ); TDEMainWindow::focusInEvent( ev );
} }
void KJezzball::second() void KJezzball::second()

@ -24,10 +24,10 @@
class JezzGame; class JezzGame;
class TQLCDNumber; class TQLCDNumber;
class TQGridLayout; class TQGridLayout;
class KToggleAction; class TDEToggleAction;
class KAction; class TDEAction;
class KJezzball : public KMainWindow class KJezzball : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -74,8 +74,8 @@ protected:
TQLCDNumber *m_scoreLCD; TQLCDNumber *m_scoreLCD;
TQLCDNumber *m_percentLCD; TQLCDNumber *m_percentLCD;
TQLCDNumber *m_timeLCD; TQLCDNumber *m_timeLCD;
KToggleAction *m_pauseButton, *m_backgroundShowAction, *m_soundAction; TDEToggleAction *m_pauseButton, *m_backgroundShowAction, *m_soundAction;
KAction *m_newAction; TDEAction *m_newAction;
TQTimer *m_timer; TQTimer *m_timer;
TQTimer *m_nextLevelTimer; TQTimer *m_nextLevelTimer;

@ -47,7 +47,7 @@ const AbTop::Data AbTop::IPLAY[Nb_IPlays] = {
}; };
AbTop::AbTop() AbTop::AbTop()
:KMainWindow(0) :TDEMainWindow(0)
{ {
timerState = noGame; timerState = noGame;
@ -135,15 +135,15 @@ void AbTop::setupActions()
newAction = KStdGameAction::gameNew( TQT_TQOBJECT(this), TQT_SLOT(newGame()), actionCollection() ); newAction = KStdGameAction::gameNew( TQT_TQOBJECT(this), TQT_SLOT(newGame()), actionCollection() );
KStdGameAction::quit( TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection() ); KStdGameAction::quit( TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection() );
stopAction = new KAction( i18n("&Stop Search"), "stop", Key_S, TQT_TQOBJECT(this), stopAction = new TDEAction( i18n("&Stop Search"), "stop", Key_S, TQT_TQOBJECT(this),
TQT_SLOT(stopSearch()), actionCollection(), "move_stop"); TQT_SLOT(stopSearch()), actionCollection(), "move_stop");
backAction = new KAction( i18n("Take &Back"), "back", backAction = new TDEAction( i18n("Take &Back"), "back",
KStdAccel::shortcut(KStdAccel::Prior), TQT_TQOBJECT(this), TDEStdAccel::shortcut(TDEStdAccel::Prior), TQT_TQOBJECT(this),
TQT_SLOT(back()), actionCollection(), "move_back"); TQT_SLOT(back()), actionCollection(), "move_back");
forwardAction = new KAction( i18n("&Forward"), "forward", forwardAction = new TDEAction( i18n("&Forward"), "forward",
KStdAccel::shortcut(KStdAccel::Next), TQT_TQOBJECT(this), TDEStdAccel::shortcut(TDEStdAccel::Next), TQT_TQOBJECT(this),
TQT_SLOT(forward()), actionCollection(), "move_forward"); TQT_SLOT(forward()), actionCollection(), "move_forward");
hintAction = KStdGameAction::hint(TQT_TQOBJECT(this), TQT_SLOT(suggestion()), actionCollection()); hintAction = KStdGameAction::hint(TQT_TQOBJECT(this), TQT_SLOT(suggestion()), actionCollection());
@ -151,23 +151,23 @@ void AbTop::setupActions()
KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT(copy()), actionCollection()); KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT(copy()), actionCollection());
pasteAction = KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT(paste()), actionCollection()); pasteAction = KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT(paste()), actionCollection());
(void) new KAction( i18n("&Restore Position"), (void) new TDEAction( i18n("&Restore Position"),
KStdAccel::shortcut(KStdAccel::Open), TDEStdAccel::shortcut(TDEStdAccel::Open),
TQT_TQOBJECT(this), TQT_SLOT(restorePosition()), TQT_TQOBJECT(this), TQT_SLOT(restorePosition()),
actionCollection(), "edit_restore" ); actionCollection(), "edit_restore" );
(void) new KAction( i18n("&Save Position"), (void) new TDEAction( i18n("&Save Position"),
KStdAccel::shortcut(KStdAccel::Save), TDEStdAccel::shortcut(TDEStdAccel::Save),
TQT_TQOBJECT(this), TQT_SLOT(savePosition()), TQT_TQOBJECT(this), TQT_SLOT(savePosition()),
actionCollection(), "edit_save" ); actionCollection(), "edit_save" );
KToggleAction *ta; TDEToggleAction *ta;
ta = new KToggleAction( i18n("&Network Play"), "network", Key_N, ta = new TDEToggleAction( i18n("&Network Play"), "network", Key_N,
actionCollection(), "game_net"); actionCollection(), "game_net");
connect(ta, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(gameNetwork(bool))); connect(ta, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(gameNetwork(bool)));
editAction = new KToggleAction( i18n("&Modify"), "edit", editAction = new TDEToggleAction( i18n("&Modify"), "edit",
CTRL+Key_Insert, actionCollection(), "edit_modify"); CTRL+Key_Insert, actionCollection(), "edit_modify");
connect(editAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT( editModify(bool))); connect(editAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT( editModify(bool)));
@ -176,15 +176,15 @@ void AbTop::setupActions()
KStdAction::preferences( TQT_TQOBJECT(this), TQT_SLOT(configure()), actionCollection()); KStdAction::preferences( TQT_TQOBJECT(this), TQT_SLOT(configure()), actionCollection());
moveSlowAction = new KToggleAction( i18n("&Move Slow"), 0, moveSlowAction = new TDEToggleAction( i18n("&Move Slow"), 0,
actionCollection(), "options_moveSlow"); actionCollection(), "options_moveSlow");
connect(moveSlowAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(optionMoveSlow(bool))); connect(moveSlowAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(optionMoveSlow(bool)));
renderBallsAction = new KToggleAction( i18n("&Render Balls"), 0, renderBallsAction = new TDEToggleAction( i18n("&Render Balls"), 0,
actionCollection(), "options_renderBalls"); actionCollection(), "options_renderBalls");
connect(renderBallsAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(optionRenderBalls(bool))); connect(renderBallsAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(optionRenderBalls(bool)));
showSpyAction = new KToggleAction( i18n("&Spy"), 0, showSpyAction = new TDEToggleAction( i18n("&Spy"), 0,
actionCollection(), "options_showSpy"); actionCollection(), "options_showSpy");
connect(showSpyAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(optionShowSpy(bool))); connect(showSpyAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(optionShowSpy(bool)));
@ -196,7 +196,7 @@ void AbTop::setupActions()
levelAction->setItems(list); levelAction->setItems(list);
connect(levelAction, TQT_SIGNAL(activated(int)), TQT_SLOT(setLevel(int))); connect(levelAction, TQT_SIGNAL(activated(int)), TQT_SLOT(setLevel(int)));
iplayAction = new KSelectAction(i18n("&Computer Play"), 0, actionCollection(), "options_iplay"); iplayAction = new TDESelectAction(i18n("&Computer Play"), 0, actionCollection(), "options_iplay");
list.clear(); list.clear();
for (uint i=0; i<Nb_IPlays; i++) for (uint i=0; i<Nb_IPlays; i++)
list.append( i18n(IPLAY[i].label) ); list.append( i18n(IPLAY[i].label) );
@ -410,7 +410,7 @@ void AbTop::setupStatusBar()
#ifdef MYTRACE #ifdef MYTRACE
/* Create a toolbar menu for debugging output level */ /* Create a toolbar menu for debugging output level */
KToolBar *tb = toolBar("mainToolBar"); TDEToolBar *tb = toolBar("mainToolBar");
if (tb) { if (tb) {
TQPopupMenu* spyPopup = new TQPopupMenu; TQPopupMenu* spyPopup = new TQPopupMenu;
spy0 = BarIcon( "spy0" ); spy0 = BarIcon( "spy0" );

@ -15,9 +15,9 @@ class TQTimer;
class TQPopupMenu; class TQPopupMenu;
class TQLabel; class TQLabel;
class KAction; class TDEAction;
class KToggleAction; class TDEToggleAction;
class KSelectAction; class TDESelectAction;
class Network; class Network;
class Board; class Board;
@ -31,7 +31,7 @@ class Spy;
class AbTop: public KMainWindow class AbTop: public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -132,10 +132,10 @@ private:
int myPort; int myPort;
TQStrList hosts; TQStrList hosts;
KAction *newAction, *stopAction, *backAction, *forwardAction, *hintAction, *pasteAction; TDEAction *newAction, *stopAction, *backAction, *forwardAction, *hintAction, *pasteAction;
KToggleAction *showMenubar, *renderBallsAction, *moveSlowAction, TDEToggleAction *showMenubar, *renderBallsAction, *moveSlowAction,
*showSpyAction, *editAction; *showSpyAction, *editAction;
KSelectAction *levelAction, *iplayAction; TDESelectAction *levelAction, *iplayAction;
struct Data { struct Data {
const char *key, *label; const char *key, *label;

@ -10,7 +10,7 @@ Version 1.02 (16.10.97)
(see Board::calcRating / readRating) (see Board::calcRating / readRating)
- New option "Spy": See some of the internals of the computers thoughts ! - New option "Spy": See some of the internals of the computers thoughts !
- Session management - Session management
- KStdAccel used for standard key bindings - TDEStdAccel used for standard key bindings
- Icon/MiniIcon supplied - Icon/MiniIcon supplied

@ -55,7 +55,7 @@ int main(int argc, char *argv[])
/* session management */ /* session management */
if ( app.isRestored() ) { if ( app.isRestored() ) {
uint n = 1; uint n = 1;
while ( KMainWindow::canBeRestored(n) ) { while ( TDEMainWindow::canBeRestored(n) ) {
AbTop *top = create(args); AbTop *top = create(args);
top->restore(n); top->restore(n);
n++; n++;

@ -34,7 +34,7 @@
#include "kgoldrunner.h" #include "kgoldrunner.h"
KGoldrunner::KGoldrunner() KGoldrunner::KGoldrunner()
: KMainWindow (0, "KGoldrunner"), : TDEMainWindow (0, "KGoldrunner"),
view (new KGrCanvas (this)) view (new KGrCanvas (this))
{ {
/******************************************************************************/ /******************************************************************************/
@ -78,7 +78,7 @@ KGoldrunner::KGoldrunner()
// Get catalog for translation // Get catalog for translation
TDEGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
// Tell the KMainWindow that this is the main widget // Tell the TDEMainWindow that this is the main widget
setCentralWidget (view); setCentralWidget (view);
// Set up our actions (menu, toolbar and keystrokes) ... // Set up our actions (menu, toolbar and keystrokes) ...
@ -154,21 +154,21 @@ void KGoldrunner::setupActions()
// Tutorial // Tutorial
// -------------------------- // --------------------------
KAction * newAction = KStdGameAction:: TDEAction * newAction = KStdGameAction::
gameNew ( gameNew (
game, game,
TQT_SLOT(startLevelOne()), actionCollection()); TQT_SLOT(startLevelOne()), actionCollection());
newAction-> setText (i18n("&New Game...")); newAction-> setText (i18n("&New Game..."));
KAction * loadGame = KStdGameAction:: TDEAction * loadGame = KStdGameAction::
load ( load (
game, TQT_SLOT(loadGame()), actionCollection()); game, TQT_SLOT(loadGame()), actionCollection());
loadGame-> setText (i18n("&Load Saved Game...")); loadGame-> setText (i18n("&Load Saved Game..."));
(void) new KAction ( (void) new TDEAction (
i18n("&Play Any Level..."), i18n("&Play Any Level..."),
0, 0,
game, TQT_SLOT(startAnyLevel()), actionCollection(), game, TQT_SLOT(startAnyLevel()), actionCollection(),
"play_any"); "play_any");
(void) new KAction ( (void) new TDEAction (
i18n("Play &Next Level..."), i18n("Play &Next Level..."),
0, 0,
game, game,
@ -198,12 +198,12 @@ void KGoldrunner::setupActions()
highScore = KStdGameAction:: highScore = KStdGameAction::
highscores ( highscores (
game, TQT_SLOT(showHighScores()), actionCollection()); game, TQT_SLOT(showHighScores()), actionCollection());
hintAction = new KAction ( hintAction = new TDEAction (
i18n("&Get Hint"), "ktip", i18n("&Get Hint"), "ktip",
0, 0,
game, TQT_SLOT(showHint()), actionCollection(), game, TQT_SLOT(showHint()), actionCollection(),
"get_hint"); "get_hint");
killHero = new KAction ( killHero = new TDEAction (
i18n("&Kill Hero"), i18n("&Kill Hero"),
Key_Q, Key_Q,
game, TQT_SLOT(herosDead()), actionCollection(), game, TQT_SLOT(herosDead()), actionCollection(),
@ -225,17 +225,17 @@ void KGoldrunner::setupActions()
// Edit Next Level... // Edit Next Level...
// -------------------------- // --------------------------
(void) new KAction ( (void) new TDEAction (
i18n("&Create Level"), i18n("&Create Level"),
0, 0,
TQT_TQOBJECT(game), TQT_SLOT(createLevel()), actionCollection(), TQT_TQOBJECT(game), TQT_SLOT(createLevel()), actionCollection(),
"create"); "create");
(void) new KAction ( (void) new TDEAction (
i18n("&Edit Any Level..."), i18n("&Edit Any Level..."),
0, 0,
TQT_TQOBJECT(game), TQT_SLOT(updateLevel()), actionCollection(), TQT_TQOBJECT(game), TQT_SLOT(updateLevel()), actionCollection(),
"edit_any"); "edit_any");
(void) new KAction ( (void) new TDEAction (
i18n("Edit &Next Level..."), i18n("Edit &Next Level..."),
0, 0,
TQT_TQOBJECT(game), TQT_SLOT(updateNext()), actionCollection(), TQT_TQOBJECT(game), TQT_SLOT(updateNext()), actionCollection(),
@ -246,19 +246,19 @@ void KGoldrunner::setupActions()
// Delete Level... // Delete Level...
// -------------------------- // --------------------------
saveEdits = new KAction ( saveEdits = new TDEAction (
i18n("&Save Edits..."), i18n("&Save Edits..."),
0, 0,
TQT_TQOBJECT(game), TQT_SLOT(saveLevelFile()), actionCollection(), TQT_TQOBJECT(game), TQT_SLOT(saveLevelFile()), actionCollection(),
"save_edits"); "save_edits");
saveEdits->setEnabled (FALSE); // Nothing to save, yet. saveEdits->setEnabled (FALSE); // Nothing to save, yet.
(void) new KAction ( (void) new TDEAction (
i18n("&Move Level..."), i18n("&Move Level..."),
0, 0,
TQT_TQOBJECT(game), TQT_SLOT(moveLevelFile()), actionCollection(), TQT_TQOBJECT(game), TQT_SLOT(moveLevelFile()), actionCollection(),
"move_level"); "move_level");
(void) new KAction ( (void) new TDEAction (
i18n("&Delete Level..."), i18n("&Delete Level..."),
0, 0,
TQT_TQOBJECT(game), TQT_TQOBJECT(game),
@ -269,12 +269,12 @@ void KGoldrunner::setupActions()
// Edit Game Info... // Edit Game Info...
// -------------------------- // --------------------------
(void) new KAction ( (void) new TDEAction (
i18n("Create Game..."), i18n("Create Game..."),
0, 0,
TQT_TQOBJECT(this), TQT_SLOT(createGame()), actionCollection(), TQT_TQOBJECT(this), TQT_SLOT(createGame()), actionCollection(),
"create_game"); "create_game");
(void) new KAction ( (void) new TDEAction (
i18n("Edit Game Info..."), i18n("Edit Game Info..."),
0, 0,
TQT_TQOBJECT(this), TQT_TQOBJECT(this),
@ -287,27 +287,27 @@ void KGoldrunner::setupActions()
// Default shortcut keys are set by "kgoldrunnerui.rc". // Default shortcut keys are set by "kgoldrunnerui.rc".
setKGoldrunner = new KRadioAction ( setKGoldrunner = new TDERadioAction (
"K&Goldrunner", "K&Goldrunner",
0, // Default Shift+G 0, // Default Shift+G
TQT_TQOBJECT(this), TQT_SLOT(lsKGoldrunner()), actionCollection(), TQT_TQOBJECT(this), TQT_SLOT(lsKGoldrunner()), actionCollection(),
"kgoldrunner"); "kgoldrunner");
setAppleII = new KRadioAction ( setAppleII = new TDERadioAction (
"&Apple II", "&Apple II",
0, // Default Shift+A 0, // Default Shift+A
TQT_TQOBJECT(this), TQT_SLOT(lsApple2()), actionCollection(), TQT_TQOBJECT(this), TQT_SLOT(lsApple2()), actionCollection(),
"apple_2"); "apple_2");
setIceCave = new KRadioAction ( setIceCave = new TDERadioAction (
i18n("&Ice Cave"), i18n("&Ice Cave"),
0, // Default Shift+I 0, // Default Shift+I
TQT_TQOBJECT(this), TQT_SLOT(lsIceCave()), actionCollection(), TQT_TQOBJECT(this), TQT_SLOT(lsIceCave()), actionCollection(),
"ice_cave"); "ice_cave");
setMidnight = new KRadioAction ( setMidnight = new TDERadioAction (
i18n("&Midnight"), i18n("&Midnight"),
0, // Default Shift+M 0, // Default Shift+M
TQT_TQOBJECT(this), TQT_SLOT(lsMidnight()), actionCollection(), TQT_TQOBJECT(this), TQT_SLOT(lsMidnight()), actionCollection(),
"midnight"); "midnight");
setKDEKool = new KRadioAction ( setKDEKool = new TDERadioAction (
i18n("&TDE Kool"), i18n("&TDE Kool"),
0, // Default Shift+K 0, // Default Shift+K
TQT_TQOBJECT(this), TQT_SLOT(lsKDEKool()), actionCollection(), TQT_TQOBJECT(this), TQT_SLOT(lsKDEKool()), actionCollection(),
@ -328,13 +328,13 @@ void KGoldrunner::setupActions()
// Keyboard Controls Hero // Keyboard Controls Hero
// -------------------------- // --------------------------
setMouse = new KRadioAction ( setMouse = new TDERadioAction (
i18n("&Mouse Controls Hero"), i18n("&Mouse Controls Hero"),
0, 0,
TQT_TQOBJECT(this), TQT_TQOBJECT(this),
TQT_SLOT(setMouseMode()), actionCollection(), TQT_SLOT(setMouseMode()), actionCollection(),
"mouse_mode"); "mouse_mode");
setKeyboard = new KRadioAction ( setKeyboard = new TDERadioAction (
i18n("&Keyboard Controls Hero"), i18n("&Keyboard Controls Hero"),
0, 0,
TQT_TQOBJECT(this), TQT_TQOBJECT(this),
@ -352,27 +352,27 @@ void KGoldrunner::setupActions()
// Decrease Speed // Decrease Speed
// -------------------------- // --------------------------
KRadioAction * nSpeed = new KRadioAction ( TDERadioAction * nSpeed = new TDERadioAction (
i18n("Normal Speed"), i18n("Normal Speed"),
0, 0,
TQT_TQOBJECT(this), TQT_SLOT(normalSpeed()), actionCollection(), TQT_TQOBJECT(this), TQT_SLOT(normalSpeed()), actionCollection(),
"normal_speed"); "normal_speed");
KRadioAction * bSpeed = new KRadioAction ( TDERadioAction * bSpeed = new TDERadioAction (
i18n("Beginner Speed"), i18n("Beginner Speed"),
0, 0,
TQT_TQOBJECT(this), TQT_SLOT(beginSpeed()), actionCollection(), TQT_TQOBJECT(this), TQT_SLOT(beginSpeed()), actionCollection(),
"beginner_speed"); "beginner_speed");
KRadioAction * cSpeed = new KRadioAction ( TDERadioAction * cSpeed = new TDERadioAction (
i18n("Champion Speed"), i18n("Champion Speed"),
0, 0,
TQT_TQOBJECT(this), TQT_SLOT(champSpeed()), actionCollection(), TQT_TQOBJECT(this), TQT_SLOT(champSpeed()), actionCollection(),
"champion_speed"); "champion_speed");
(void) new KAction ( // Repeatable action. (void) new TDEAction ( // Repeatable action.
i18n("Increase Speed"), i18n("Increase Speed"),
Key_Plus, Key_Plus,
TQT_TQOBJECT(this), TQT_SLOT(incSpeed()), actionCollection(), TQT_TQOBJECT(this), TQT_SLOT(incSpeed()), actionCollection(),
"increase_speed"); "increase_speed");
(void) new KAction ( // Repeatable action. (void) new TDEAction ( // Repeatable action.
i18n("Decrease Speed"), i18n("Decrease Speed"),
Key_Minus, Key_Minus,
TQT_TQOBJECT(this), TQT_SLOT(decSpeed()), actionCollection(), TQT_TQOBJECT(this), TQT_SLOT(decSpeed()), actionCollection(),
@ -387,12 +387,12 @@ void KGoldrunner::setupActions()
// KGoldrunner Rules // KGoldrunner Rules
// -------------------------- // --------------------------
tradRules = new KRadioAction ( tradRules = new TDERadioAction (
i18n("&Traditional Rules"), i18n("&Traditional Rules"),
0, 0,
TQT_TQOBJECT(this), TQT_SLOT(setTradRules()), actionCollection(), TQT_TQOBJECT(this), TQT_SLOT(setTradRules()), actionCollection(),
"trad_rules"); "trad_rules");
kgrRules = new KRadioAction ( kgrRules = new TDERadioAction (
i18n("K&Goldrunner Rules"), i18n("K&Goldrunner Rules"),
0, 0,
TQT_TQOBJECT(this), TQT_SLOT(setKGrRules()), actionCollection(), TQT_TQOBJECT(this), TQT_SLOT(setKGrRules()), actionCollection(),
@ -406,12 +406,12 @@ void KGoldrunner::setupActions()
// Smaller Playing Area // Smaller Playing Area
// -------------------------- // --------------------------
(void) new KAction ( (void) new TDEAction (
i18n("Larger Playing Area"), i18n("Larger Playing Area"),
0, 0,
TQT_TQOBJECT(this), TQT_SLOT(makeLarger()), actionCollection(), TQT_TQOBJECT(this), TQT_SLOT(makeLarger()), actionCollection(),
"larger_area"); "larger_area");
(void) new KAction ( (void) new TDEAction (
i18n("Smaller Playing Area"), i18n("Smaller Playing Area"),
0, 0,
TQT_TQOBJECT(this), TQT_SLOT(makeSmaller()), actionCollection(), TQT_TQOBJECT(this), TQT_SLOT(makeSmaller()), actionCollection(),
@ -434,19 +434,19 @@ void KGoldrunner::setupActions()
// Two-handed KB controls and alternate one-handed controls for the hero. // Two-handed KB controls and alternate one-handed controls for the hero.
(void) new KAction (i18n("Move Up"), Key_Up, (void) new TDEAction (i18n("Move Up"), Key_Up,
TQT_TQOBJECT(this), TQT_SLOT(goUp()), actionCollection(), "move_up"); TQT_TQOBJECT(this), TQT_SLOT(goUp()), actionCollection(), "move_up");
(void) new KAction (i18n("Move Right"), Key_Right, (void) new TDEAction (i18n("Move Right"), Key_Right,
TQT_TQOBJECT(this), TQT_SLOT(goR()), actionCollection(), "move_right"); TQT_TQOBJECT(this), TQT_SLOT(goR()), actionCollection(), "move_right");
(void) new KAction (i18n("Move Down"), Key_Down, (void) new TDEAction (i18n("Move Down"), Key_Down,
TQT_TQOBJECT(this), TQT_SLOT(goDown()), actionCollection(), "move_down"); TQT_TQOBJECT(this), TQT_SLOT(goDown()), actionCollection(), "move_down");
(void) new KAction (i18n("Move Left"), Key_Left, (void) new TDEAction (i18n("Move Left"), Key_Left,
TQT_TQOBJECT(this), TQT_SLOT(goL()), actionCollection(), "move_left"); TQT_TQOBJECT(this), TQT_SLOT(goL()), actionCollection(), "move_left");
(void) new KAction (i18n("Stop"), Key_Space, (void) new TDEAction (i18n("Stop"), Key_Space,
TQT_TQOBJECT(this), TQT_SLOT(stop()), actionCollection(), "stop"); TQT_TQOBJECT(this), TQT_SLOT(stop()), actionCollection(), "stop");
(void) new KAction (i18n("Dig Right"), Key_C, (void) new TDEAction (i18n("Dig Right"), Key_C,
TQT_TQOBJECT(this), TQT_SLOT(digR()), actionCollection(), "dig_right"); TQT_TQOBJECT(this), TQT_SLOT(digR()), actionCollection(), "dig_right");
(void) new KAction (i18n("Dig Left"), Key_Z, (void) new TDEAction (i18n("Dig Left"), Key_Z,
TQT_TQOBJECT(this), TQT_SLOT(digL()), actionCollection(), "dig_left"); TQT_TQOBJECT(this), TQT_SLOT(digL()), actionCollection(), "dig_left");
// Alternate one-handed controls. Set up in "kgoldrunnerui.rc". // Alternate one-handed controls. Set up in "kgoldrunnerui.rc".
@ -462,31 +462,31 @@ void KGoldrunner::setupActions()
#ifdef KGR_DEBUG #ifdef KGR_DEBUG
// Authors' debugging aids. // Authors' debugging aids.
(void) new KAction (i18n("Step"), Key_Period, (void) new TDEAction (i18n("Step"), Key_Period,
game, TQT_SLOT(doStep()), actionCollection(), "do_step"); game, TQT_SLOT(doStep()), actionCollection(), "do_step");
(void) new KAction (i18n("Test Bug Fix"), Key_B, (void) new TDEAction (i18n("Test Bug Fix"), Key_B,
game, TQT_SLOT(bugFix()), actionCollection(), "bug_fix"); game, TQT_SLOT(bugFix()), actionCollection(), "bug_fix");
(void) new KAction (i18n("Show Positions"), Key_D, (void) new TDEAction (i18n("Show Positions"), Key_D,
game, TQT_SLOT(showFigurePositions()), actionCollection(), "step"); game, TQT_SLOT(showFigurePositions()), actionCollection(), "step");
(void) new KAction (i18n("Start Logging"), Key_G, (void) new TDEAction (i18n("Start Logging"), Key_G,
game, TQT_SLOT(startLogging()), actionCollection(), "logging"); game, TQT_SLOT(startLogging()), actionCollection(), "logging");
(void) new KAction (i18n("Show Hero"), Key_H, (void) new TDEAction (i18n("Show Hero"), Key_H,
game, TQT_SLOT(showHeroState()), actionCollection(), "show_hero"); game, TQT_SLOT(showHeroState()), actionCollection(), "show_hero");
(void) new KAction (i18n("Show Object"), Key_Question, (void) new TDEAction (i18n("Show Object"), Key_Question,
game, TQT_SLOT(showObjectState()), actionCollection(), "show_obj"); game, TQT_SLOT(showObjectState()), actionCollection(), "show_obj");
(void) new KAction (i18n("Show Enemy") + "0", Key_0, (void) new TDEAction (i18n("Show Enemy") + "0", Key_0,
this, TQT_SLOT(showEnemy0()), actionCollection(), "show_enemy_0"); this, TQT_SLOT(showEnemy0()), actionCollection(), "show_enemy_0");
(void) new KAction (i18n("Show Enemy") + "1", Key_1, (void) new TDEAction (i18n("Show Enemy") + "1", Key_1,
this, TQT_SLOT(showEnemy1()), actionCollection(), "show_enemy_1"); this, TQT_SLOT(showEnemy1()), actionCollection(), "show_enemy_1");
(void) new KAction (i18n("Show Enemy") + "2", Key_2, (void) new TDEAction (i18n("Show Enemy") + "2", Key_2,
this, TQT_SLOT(showEnemy2()), actionCollection(), "show_enemy_2"); this, TQT_SLOT(showEnemy2()), actionCollection(), "show_enemy_2");
(void) new KAction (i18n("Show Enemy") + "3", Key_3, (void) new TDEAction (i18n("Show Enemy") + "3", Key_3,
this, TQT_SLOT(showEnemy3()), actionCollection(), "show_enemy_3"); this, TQT_SLOT(showEnemy3()), actionCollection(), "show_enemy_3");
(void) new KAction (i18n("Show Enemy") + "4", Key_4, (void) new TDEAction (i18n("Show Enemy") + "4", Key_4,
this, TQT_SLOT(showEnemy4()), actionCollection(), "show_enemy_4"); this, TQT_SLOT(showEnemy4()), actionCollection(), "show_enemy_4");
(void) new KAction (i18n("Show Enemy") + "5", Key_5, (void) new TDEAction (i18n("Show Enemy") + "5", Key_5,
this, TQT_SLOT(showEnemy5()), actionCollection(), "show_enemy_5"); this, TQT_SLOT(showEnemy5()), actionCollection(), "show_enemy_5");
(void) new KAction (i18n("Show Enemy") + "6", Key_6, (void) new TDEAction (i18n("Show Enemy") + "6", Key_6,
this, TQT_SLOT(showEnemy6()), actionCollection(), "show_enemy_6"); this, TQT_SLOT(showEnemy6()), actionCollection(), "show_enemy_6");
#endif #endif
@ -987,7 +987,7 @@ void KGoldrunner::makeEditToolbar()
edenemybg = edenemybg.xForm (w); edenemybg = edenemybg.xForm (w);
} }
editToolbar = new KToolBar (this, TQt::DockTop, TRUE, "Editor", TRUE); editToolbar = new TDEToolBar (this, TQt::DockTop, TRUE, "Editor", TRUE);
// Choose a colour that enhances visibility of the KGoldrunner pixmaps. // Choose a colour that enhances visibility of the KGoldrunner pixmaps.
// editToolbar->setPalette (TQPalette (TQColor (150, 150, 230))); // editToolbar->setPalette (TQPalette (TQColor (150, 150, 230)));

@ -37,7 +37,7 @@ class KGrHero;
* @author $AUTHOR <$EMAIL> * @author $AUTHOR <$EMAIL>
* @version $APP_VERSION * @version $APP_VERSION
*/ */
class KGoldrunner : public KMainWindow class KGoldrunner : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -161,35 +161,35 @@ private:
TQString systemDataDir; // Where the system levels are stored. TQString systemDataDir; // Where the system levels are stored.
TQString userDataDir; // Where the user levels are stored. TQString userDataDir; // Where the user levels are stored.
KAction * saveGame; // Save game, level, lives and score. TDEAction * saveGame; // Save game, level, lives and score.
KAction * myPause; // Pause or resume the game. TDEAction * myPause; // Pause or resume the game.
TQString pauseKeys; // Keystroke names to put in status bar. TQString pauseKeys; // Keystroke names to put in status bar.
KAction * hintAction; // Display a hint, if available. TDEAction * hintAction; // Display a hint, if available.
KAction * killHero; // Kill hero (disabled during edits). TDEAction * killHero; // Kill hero (disabled during edits).
KAction * highScore; // High scores (disabled during edits). TDEAction * highScore; // High scores (disabled during edits).
KAction * saveEdits; // Save a level that has been edited. TDEAction * saveEdits; // Save a level that has been edited.
KRadioAction * setKGoldrunner; // Show default "KGoldrunner" landscape. TDERadioAction * setKGoldrunner; // Show default "KGoldrunner" landscape.
KRadioAction * setAppleII; // Show "Apple II" landscape. TDERadioAction * setAppleII; // Show "Apple II" landscape.
KRadioAction * setIceCave; // Show "Ice Cave" landscape. TDERadioAction * setIceCave; // Show "Ice Cave" landscape.
KRadioAction * setMidnight; // Show "Midnight" landscape. TDERadioAction * setMidnight; // Show "Midnight" landscape.
KRadioAction * setKDEKool; // Show "KDE Kool" landscape. TDERadioAction * setKDEKool; // Show "KDE Kool" landscape.
KRadioAction * setMouse; // Show mouse/keyboard mode on menu. TDERadioAction * setMouse; // Show mouse/keyboard mode on menu.
KRadioAction * setKeyboard; // Show mouse/keyboard mode on menu. TDERadioAction * setKeyboard; // Show mouse/keyboard mode on menu.
KRadioAction * tradRules; // Set Traditional rules. TDERadioAction * tradRules; // Set Traditional rules.
KRadioAction * kgrRules; // Set KGoldrunner rules. TDERadioAction * kgrRules; // Set KGoldrunner rules.
KGrHero * hero; // Pointer to the hero. KGrHero * hero; // Pointer to the hero.
// KToggleAction * m_toolbarAction; // TDEToggleAction * m_toolbarAction;
// KToggleAction * m_statusbarAction; // TDEToggleAction * m_statusbarAction;
KToolBar * editToolbar; // Toolbar for creating/editing levels. TDEToolBar * editToolbar; // Toolbar for creating/editing levels.
int pressedButton; // ID of currently set toolbar button. int pressedButton; // ID of currently set toolbar button.
private slots: private slots:

@ -56,7 +56,7 @@ KJumpingCube::KJumpingCube()
connect(view,TQT_SIGNAL(startedThinking()),TQT_SLOT(enableStop_Thinking())); connect(view,TQT_SIGNAL(startedThinking()),TQT_SLOT(enableStop_Thinking()));
connect(view,TQT_SIGNAL(playerWon(int)),TQT_SLOT(showWinner(int))); connect(view,TQT_SIGNAL(playerWon(int)),TQT_SLOT(showWinner(int)));
// tell the KMainWindow that this is indeed the main widget // tell the TDEMainWindow that this is indeed the main widget
setCentralWidget(view); setCentralWidget(view);
// init statusbar // init statusbar
@ -71,11 +71,11 @@ KJumpingCube::KJumpingCube()
statusBar()->addWidget(currentPlayer, ID_STATUS_TURN, false); statusBar()->addWidget(currentPlayer, ID_STATUS_TURN, false);
statusBar()->setItemAlignment(ID_STATUS_TURN, AlignLeft | AlignVCenter); statusBar()->setItemAlignment(ID_STATUS_TURN, AlignLeft | AlignVCenter);
initKAction(); initTDEAction();
changePlayer(1); changePlayer(1);
} }
void KJumpingCube::initKAction() { void KJumpingCube::initTDEAction() {
KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(newGame()), actionCollection()); KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(newGame()), actionCollection());
KStdGameAction::load(TQT_TQOBJECT(this), TQT_SLOT(openGame()), actionCollection()); KStdGameAction::load(TQT_TQOBJECT(this), TQT_SLOT(openGame()), actionCollection());
KStdGameAction::save(TQT_TQOBJECT(this), TQT_SLOT(save()), actionCollection()); KStdGameAction::save(TQT_TQOBJECT(this), TQT_SLOT(save()), actionCollection());
@ -83,7 +83,7 @@ void KJumpingCube::initKAction() {
KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection());
hintAction = KStdGameAction::hint(TQT_TQOBJECT(view), TQT_SLOT(getHint()), actionCollection()); hintAction = KStdGameAction::hint(TQT_TQOBJECT(view), TQT_SLOT(getHint()), actionCollection());
stopAction = new KAction(i18n("Stop &Thinking"), "stop", stopAction = new TDEAction(i18n("Stop &Thinking"), "stop",
TQt::Key_Escape, TQT_TQOBJECT(this), TQT_SLOT(stop()), actionCollection(), "game_stop"); TQt::Key_Escape, TQT_TQOBJECT(this), TQT_SLOT(stop()), actionCollection(), "game_stop");
stopAction->setEnabled(false); stopAction->setEnabled(false);
undoAction = KStdGameAction::undo(TQT_TQOBJECT(this), TQT_SLOT(undo()), actionCollection()); undoAction = KStdGameAction::undo(TQT_TQOBJECT(this), TQT_SLOT(undo()), actionCollection());

@ -29,7 +29,7 @@
#include <kmainwindow.h> #include <kmainwindow.h>
#include <kurl.h> #include <kurl.h>
class KAction; class TDEAction;
class KCubeBoxWidget; class KCubeBoxWidget;
/** /**
@ -40,7 +40,7 @@ class KCubeBoxWidget;
* @author Matthias Kiefer <matthias.kiefer@gmx.de> * @author Matthias Kiefer <matthias.kiefer@gmx.de>
* @version 0.7.2 * @version 0.7.2
*/ */
class KJumpingCube : public KMainWindow { class KJumpingCube : public TDEMainWindow {
Q_OBJECT Q_OBJECT
@ -51,10 +51,10 @@ public:
private: private:
KCubeBoxWidget *view; KCubeBoxWidget *view;
TQWidget *currentPlayer; TQWidget *currentPlayer;
KAction *undoAction, *stopAction, *hintAction; TDEAction *undoAction, *stopAction, *hintAction;
KURL gameURL; KURL gameURL;
void initKAction(); void initTDEAction();
private slots: private slots:
void newGame(); void newGame();

@ -80,7 +80,7 @@ KLines::KLines()
statusBar()->insertItem(i18n(" Level: "), 0, 1); statusBar()->insertItem(i18n(" Level: "), 0, 1);
statusBar()->setItemAlignment(0, AlignVCenter | AlignLeft); statusBar()->setItemAlignment(0, AlignVCenter | AlignLeft);
initKAction(); initTDEAction();
connect(&demoTimer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(slotDemo())); connect(&demoTimer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(slotDemo()));
@ -100,9 +100,9 @@ KLines::~KLines()
} }
/* /*
Init KAction objects (menubar, toolbar, shortcuts) Init TDEAction objects (menubar, toolbar, shortcuts)
*/ */
void KLines::initKAction() void KLines::initTDEAction()
{ {
KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(startGame()), actionCollection()); KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(startGame()), actionCollection());
act_demo = KStdGameAction::demo(TQT_TQOBJECT(this), TQT_SLOT(startDemo()), actionCollection()); act_demo = KStdGameAction::demo(TQT_TQOBJECT(this), TQT_SLOT(startDemo()), actionCollection());
@ -110,10 +110,10 @@ void KLines::initKAction()
KStdGameAction::highscores(TQT_TQOBJECT(this), TQT_SLOT(viewHighScore()), actionCollection()); KStdGameAction::highscores(TQT_TQOBJECT(this), TQT_SLOT(viewHighScore()), actionCollection());
KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection());
endTurnAction = KStdGameAction::endTurn(TQT_TQOBJECT(this), TQT_SLOT(makeTurn()), actionCollection()); endTurnAction = KStdGameAction::endTurn(TQT_TQOBJECT(this), TQT_SLOT(makeTurn()), actionCollection());
showNextAction = new KToggleAction(i18n("&Show Next"), KShortcut(CTRL+Key_P), showNextAction = new TDEToggleAction(i18n("&Show Next"), TDEShortcut(CTRL+Key_P),
TQT_TQOBJECT(this), TQT_SLOT(switchPrompt()), actionCollection(), "options_show_next"); TQT_TQOBJECT(this), TQT_SLOT(switchPrompt()), actionCollection(), "options_show_next");
showNextAction->setCheckedState(i18n("Hide Next")); showNextAction->setCheckedState(i18n("Hide Next"));
showNumberedAction = new KToggleAction(i18n("&Use Numbered Balls"), KShortcut(), showNumberedAction = new TDEToggleAction(i18n("&Use Numbered Balls"), TDEShortcut(),
TQT_TQOBJECT(this), TQT_SLOT(switchNumbered()), actionCollection(), "options_show_numbered"); TQT_TQOBJECT(this), TQT_SLOT(switchNumbered()), actionCollection(), "options_show_numbered");
undoAction = KStdGameAction::undo(TQT_TQOBJECT(this), TQT_SLOT(undo()), actionCollection()); undoAction = KStdGameAction::undo(TQT_TQOBJECT(this), TQT_SLOT(undo()), actionCollection());
@ -128,13 +128,13 @@ void KLines::initKAction()
showNumberedAction->setChecked(Prefs::numberedBalls()); showNumberedAction->setChecked(Prefs::numberedBalls());
lPrompt->setPrompt(Prefs::showNext()); lPrompt->setPrompt(Prefs::showNext());
(void)new KAction(i18n("Move Left"), Key_Left, TQT_TQOBJECT(lsb), TQT_SLOT(moveLeft()), actionCollection(), "left"); (void)new TDEAction(i18n("Move Left"), Key_Left, TQT_TQOBJECT(lsb), TQT_SLOT(moveLeft()), actionCollection(), "left");
(void)new KAction(i18n("Move Right"), Key_Right, TQT_TQOBJECT(lsb), TQT_SLOT(moveRight()), actionCollection(), "right"); (void)new TDEAction(i18n("Move Right"), Key_Right, TQT_TQOBJECT(lsb), TQT_SLOT(moveRight()), actionCollection(), "right");
(void)new KAction(i18n("Move Up"), Key_Up, TQT_TQOBJECT(lsb), TQT_SLOT(moveUp()), actionCollection(), "up"); (void)new TDEAction(i18n("Move Up"), Key_Up, TQT_TQOBJECT(lsb), TQT_SLOT(moveUp()), actionCollection(), "up");
(void)new KAction(i18n("Move Down"), Key_Down, TQT_TQOBJECT(lsb), TQT_SLOT(moveDown()), actionCollection(), "down"); (void)new TDEAction(i18n("Move Down"), Key_Down, TQT_TQOBJECT(lsb), TQT_SLOT(moveDown()), actionCollection(), "down");
(void)new KAction(i18n("Move Ball"), Key_Space, TQT_TQOBJECT(lsb), TQT_SLOT(placePlayerBall()), actionCollection(), "place_ball"); (void)new TDEAction(i18n("Move Ball"), Key_Space, TQT_TQOBJECT(lsb), TQT_SLOT(placePlayerBall()), actionCollection(), "place_ball");
setupGUI( KMainWindow::Save | Keys | StatusBar | Create ); setupGUI( TDEMainWindow::Save | Keys | StatusBar | Create );
} }
void KLines::startGame() void KLines::startGame()
@ -421,7 +421,7 @@ void KLines::focusOutEvent(TQFocusEvent *ev)
demoTimer.stop(); demoTimer.stop();
statusBar()->changeItem(i18n(" Level: %1").arg(i18n("Tutorial - Paused")), 0); statusBar()->changeItem(i18n(" Level: %1").arg(i18n("Tutorial - Paused")), 0);
} }
KMainWindow::focusOutEvent(ev); TDEMainWindow::focusOutEvent(ev);
} }
void KLines::focusInEvent(TQFocusEvent *ev) void KLines::focusInEvent(TQFocusEvent *ev)
@ -431,7 +431,7 @@ void KLines::focusInEvent(TQFocusEvent *ev)
statusBar()->changeItem(i18n(" Level: %1").arg(levelStr), 0); statusBar()->changeItem(i18n(" Level: %1").arg(levelStr), 0);
slotDemo(); slotDemo();
} }
KMainWindow::focusInEvent(ev); TDEMainWindow::focusInEvent(ev);
} }
void KLines::stopGame() void KLines::stopGame()
@ -581,5 +581,5 @@ void KLines::keyPressEvent(TQKeyEvent *e)
startGame(); startGame();
return; return;
} }
KMainWindow::keyPressEvent(e); TDEMainWindow::keyPressEvent(e);
} }

@ -22,11 +22,11 @@
#include "mwidget.h" #include "mwidget.h"
#include "prompt.h" #include "prompt.h"
class KSelectAction; class TDESelectAction;
class KAction; class TDEAction;
class KToggleAction; class TDEToggleAction;
class KLines : public KMainWindow class KLines : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -36,7 +36,7 @@ public:
protected: protected:
void keyPressEvent(TQKeyEvent *e); void keyPressEvent(TQKeyEvent *e);
void initKAction(); void initTDEAction();
void setLevel(int level); void setLevel(int level);
void focusOutEvent(TQFocusEvent *); void focusOutEvent(TQFocusEvent *);
@ -62,10 +62,10 @@ private:
LinesBoard* lsb; LinesBoard* lsb;
MainWidget *mwidget; MainWidget *mwidget;
LinesPrompt *lPrompt; LinesPrompt *lPrompt;
KAction *act_demo, *undoAction, *endTurnAction; TDEAction *act_demo, *undoAction, *endTurnAction;
KSelectAction *levelAction; TDESelectAction *levelAction;
KToggleAction *showNextAction; TDEToggleAction *showNextAction;
KToggleAction *showNumberedAction; TDEToggleAction *showNumberedAction;
TQString levelStr; TQString levelStr;
bool bNewTurn; bool bNewTurn;

@ -106,8 +106,8 @@ void Editor::setupToolbar()
{ {
KIconLoader *loader = TDEGlobal::iconLoader(); KIconLoader *loader = TDEGlobal::iconLoader();
topToolbar = new KToolBar( this, "editToolBar" ); topToolbar = new TDEToolBar( this, "editToolBar" );
KToolBarRadioGroup *radio = new KToolBarRadioGroup(topToolbar); TDEToolBarRadioGroup *radio = new TDEToolBarRadioGroup(topToolbar);
// new game // new game
topToolbar->insertButton(loader->loadIcon("filenew", KIcon::Toolbar), topToolbar->insertButton(loader->loadIcon("filenew", KIcon::Toolbar),
@ -180,7 +180,7 @@ void Editor::setupToolbar()
topToolbar->updateRects(0); topToolbar->updateRects(0);
topToolbar->setFullSize(true); topToolbar->setFullSize(true);
topToolbar->setBarPos(KToolBar::Top); topToolbar->setBarPos(TDEToolBar::Top);
// topToolbar->enableMoving(false); // topToolbar->enableMoving(false);
topToolbar->adjustSize(); topToolbar->adjustSize();
setMinimumWidth(topToolbar->width()); setMinimumWidth(topToolbar->width());

@ -55,7 +55,7 @@ protected:
private: private:
int mode; int mode;
int numTiles; int numTiles;
KToolBar *topToolbar; TDEToolBar *topToolbar;
FrameImage * drawFrame; FrameImage * drawFrame;
Tileset tiles; Tileset tiles;
BoardLayout theBoard; BoardLayout theBoard;

@ -58,7 +58,7 @@ int is_paused = 0;
Constructor. Constructor.
*/ */
KMahjongg::KMahjongg( TQWidget* parent, const char *name) KMahjongg::KMahjongg( TQWidget* parent, const char *name)
: KMainWindow(parent, name) : TDEMainWindow(parent, name)
{ {
boardEditor = 0; boardEditor = 0;
@ -69,7 +69,7 @@ KMahjongg::KMahjongg( TQWidget* parent, const char *name)
previewLoad = new Preview(this); previewLoad = new Preview(this);
setupStatusBar(); setupStatusBar();
setupKAction(); setupTDEAction();
gameTimer = new GameTimer(toolBar()); gameTimer = new GameTimer(toolBar());
toolBar()->insertWidget(ID_GAME_TIMER, gameTimer->width() , gameTimer); toolBar()->insertWidget(ID_GAME_TIMER, gameTimer->width() , gameTimer);
@ -125,7 +125,7 @@ KMahjongg::~KMahjongg()
} }
// --------------------------------------------------------- // ---------------------------------------------------------
void KMahjongg::setupKAction() void KMahjongg::setupTDEAction()
{ {
// game // game
KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(newGame()), actionCollection()); KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(newGame()), actionCollection());
@ -133,17 +133,17 @@ void KMahjongg::setupKAction()
KStdGameAction::save(TQT_TQOBJECT(this), TQT_SLOT(saveGame()), actionCollection()); KStdGameAction::save(TQT_TQOBJECT(this), TQT_SLOT(saveGame()), actionCollection());
KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection());
KStdGameAction::restart(TQT_TQOBJECT(this), TQT_SLOT(restartGame()), actionCollection()); KStdGameAction::restart(TQT_TQOBJECT(this), TQT_SLOT(restartGame()), actionCollection());
new KAction(i18n("New Numbered Game..."), "newnum", 0, TQT_TQOBJECT(this), TQT_SLOT(startNewNumeric()), actionCollection(), "game_new_numeric"); new TDEAction(i18n("New Numbered Game..."), "newnum", 0, TQT_TQOBJECT(this), TQT_SLOT(startNewNumeric()), actionCollection(), "game_new_numeric");
new KAction(i18n("Open Th&eme..."), 0, TQT_TQOBJECT(this), TQT_SLOT(openTheme()), actionCollection(), "game_open_theme"); new TDEAction(i18n("Open Th&eme..."), 0, TQT_TQOBJECT(this), TQT_SLOT(openTheme()), actionCollection(), "game_open_theme");
new KAction(i18n("Open &Tileset..."), 0, TQT_TQOBJECT(this), TQT_SLOT(openTileset()), actionCollection(), "game_open_tileset"); new TDEAction(i18n("Open &Tileset..."), 0, TQT_TQOBJECT(this), TQT_SLOT(openTileset()), actionCollection(), "game_open_tileset");
new KAction(i18n("Open &Background..."), 0, TQT_TQOBJECT(this), TQT_SLOT(openBackground()), actionCollection(), "game_open_background"); new TDEAction(i18n("Open &Background..."), 0, TQT_TQOBJECT(this), TQT_SLOT(openBackground()), actionCollection(), "game_open_background");
new KAction(i18n("Open La&yout..."), 0, TQT_TQOBJECT(this), TQT_SLOT(openLayout()), actionCollection(), "game_open_layout"); new TDEAction(i18n("Open La&yout..."), 0, TQT_TQOBJECT(this), TQT_SLOT(openLayout()), actionCollection(), "game_open_layout");
new KAction(i18n("Sa&ve Theme..."), 0, TQT_TQOBJECT(this), TQT_SLOT(saveTheme()), actionCollection(), "game_save_theme"); new TDEAction(i18n("Sa&ve Theme..."), 0, TQT_TQOBJECT(this), TQT_SLOT(saveTheme()), actionCollection(), "game_save_theme");
// originally "file" ends here // originally "file" ends here
KStdGameAction::hint(TQT_TQOBJECT(bw), TQT_SLOT(helpMove()), actionCollection()); KStdGameAction::hint(TQT_TQOBJECT(bw), TQT_SLOT(helpMove()), actionCollection());
new KAction(i18n("Shu&ffle"), "reload", 0, TQT_TQOBJECT(bw), TQT_SLOT(shuffle()), actionCollection(), "move_shuffle"); new TDEAction(i18n("Shu&ffle"), "reload", 0, TQT_TQOBJECT(bw), TQT_SLOT(shuffle()), actionCollection(), "move_shuffle");
demoAction = KStdGameAction::demo(TQT_TQOBJECT(this), TQT_SLOT(demoMode()), actionCollection()); demoAction = KStdGameAction::demo(TQT_TQOBJECT(this), TQT_SLOT(demoMode()), actionCollection());
showMatchingTilesAction = new KToggleAction(i18n("Show &Matching Tiles"), 0, TQT_TQOBJECT(this), TQT_SLOT(showMatchingTiles()), actionCollection(), "options_show_matching_tiles"); showMatchingTilesAction = new TDEToggleAction(i18n("Show &Matching Tiles"), 0, TQT_TQOBJECT(this), TQT_SLOT(showMatchingTiles()), actionCollection(), "options_show_matching_tiles");
showMatchingTilesAction->setCheckedState(i18n("Hide &Matching Tiles")); showMatchingTilesAction->setCheckedState(i18n("Hide &Matching Tiles"));
showMatchingTilesAction->setChecked(Prefs::showMatchingTiles()); showMatchingTilesAction->setChecked(Prefs::showMatchingTiles());
bw->setShowMatch( Prefs::showMatchingTiles() ); bw->setShowMatch( Prefs::showMatchingTiles() );
@ -159,7 +159,7 @@ void KMahjongg::setupKAction()
redoAction = KStdGameAction::redo(TQT_TQOBJECT(this), TQT_SLOT(redo()), actionCollection()); redoAction = KStdGameAction::redo(TQT_TQOBJECT(this), TQT_SLOT(redo()), actionCollection());
// edit // edit
new KAction(i18n("&Board Editor"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotBoardEditor()), actionCollection(), "edit_board_editor"); new TDEAction(i18n("&Board Editor"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotBoardEditor()), actionCollection(), "edit_board_editor");
// settings // settings
KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(showSettings()), actionCollection()); KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(showSettings()), actionCollection());

@ -41,14 +41,14 @@
class GameTimer; class GameTimer;
class Editor; class Editor;
class KToggleAction; class TDEToggleAction;
class TQLabel; class TQLabel;
/** /**
... ...
@author Mathias @author Mathias
*/ */
class KMahjongg : public KMainWindow class KMahjongg : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -92,7 +92,7 @@ private slots:
void openTileset(); void openTileset();
protected: protected:
void setupKAction(); void setupTDEAction();
void setupStatusBar(); void setupStatusBar();
private: private:
@ -111,8 +111,8 @@ private:
bool bDemoModeActive; bool bDemoModeActive;
KToggleAction *showMatchingTilesAction, *pauseAction, *demoAction; TDEToggleAction *showMatchingTilesAction, *pauseAction, *demoAction;
KAction *undoAction, *redoAction; TDEAction *undoAction, *redoAction;
}; };

@ -154,7 +154,7 @@
* keyboard is disabled by default * keyboard is disabled by default
2.0.6 (23 August 2000) 2.0.6 (23 August 2000)
* use of KMainWindow (replace KTMainWindow) but this does not solve the * use of TDEMainWindow (replace KTMainWindow) but this does not solve the
resizing problems :( resizing problems :(
* pause game when high scores requested * pause game when high scores requested
* custom game settings are saved [feature suggested by Toan Nguyen, * custom game settings are saved [feature suggested by Toan Nguyen,
@ -190,7 +190,7 @@
* XMLify the GUI * XMLify the GUI
2.0.1 (19 February 2000) 2.0.1 (19 February 2000)
* KAction/KAccel integrated * TDEAction/TDEAccel integrated
* keyboard play * keyboard play
* can choose case size (font is scaled) * can choose case size (font is scaled)
* less flicker in repainting (+ fixed a strange divide negative int by * less flicker in repainting (+ fixed a strange divide negative int by

@ -26,7 +26,7 @@
#include <kcmenumngr.h> #include <kcmenumngr.h>
KZoomMainWindow::KZoomMainWindow(uint min, uint max, uint step, const char *name) KZoomMainWindow::KZoomMainWindow(uint min, uint max, uint step, const char *name)
: KMainWindow(0, name), _zoomStep(step), _minZoom(min), _maxZoom(max) : TDEMainWindow(0, name), _zoomStep(step), _minZoom(min), _maxZoom(max)
{ {
installEventFilter(this); installEventFilter(this);
@ -77,7 +77,7 @@ bool KZoomMainWindow::eventFilter(TQObject *o, TQEvent *e)
setFixedSize(minimumSize()); // because K/TQMainWindow setFixedSize(minimumSize()); // because K/TQMainWindow
// does not manage fixed central widget // does not manage fixed central widget
// with hidden menubar... // with hidden menubar...
return KMainWindow::eventFilter(o, e); return TDEMainWindow::eventFilter(o, e);
} }
void KZoomMainWindow::setZoom(uint zoom) void KZoomMainWindow::setZoom(uint zoom)
@ -111,5 +111,5 @@ void KZoomMainWindow::toggleMenubar()
bool KZoomMainWindow::queryExit() bool KZoomMainWindow::queryExit()
{ {
writeMenubarVisibleSetting(_menu->isChecked()); writeMenubarVisibleSetting(_menu->isChecked());
return KMainWindow::queryExit(); return TDEMainWindow::queryExit();
} }

@ -22,7 +22,7 @@
#include <kmainwindow.h> #include <kmainwindow.h>
class KToggleAction; class TDEToggleAction;
/** /**
* KZoomMainWindow is a main window of fixed size. Its size can be * KZoomMainWindow is a main window of fixed size. Its size can be
@ -39,7 +39,7 @@ class KToggleAction;
* This class also has a "show/hide menubar" action and allows the use * This class also has a "show/hide menubar" action and allows the use
* of a context popup menu (useful to restore the menubar when hidden). * of a context popup menu (useful to restore the menubar when hidden).
*/ */
class KZoomMainWindow : public KMainWindow class KZoomMainWindow : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -117,8 +117,8 @@ private slots:
private: private:
uint _zoom, _zoomStep, _minZoom, _maxZoom; uint _zoom, _zoomStep, _minZoom, _maxZoom;
TQPtrList<TQWidget> _widgets; TQPtrList<TQWidget> _widgets;
KAction *_zoomInAction, *_zoomOutAction; TDEAction *_zoomInAction, *_zoomOutAction;
KToggleAction *_menu; TDEToggleAction *_menu;
class KZoomMainWindowPrivate; class KZoomMainWindowPrivate;
KZoomMainWindowPrivate *d; KZoomMainWindowPrivate *d;

@ -76,10 +76,10 @@ MainWidget::MainWidget()
KStdGameAction::quit(TQT_TQOBJECT(tqApp), TQT_SLOT(quit()), actionCollection()); KStdGameAction::quit(TQT_TQOBJECT(tqApp), TQT_SLOT(quit()), actionCollection());
// keyboard // keyboard
_keybCollection = new KActionCollection(this); _keybCollection = new TDEActionCollection(this);
for (uint i=0; i<NB_KEYS; i++) { for (uint i=0; i<NB_KEYS; i++) {
const KeyData &d = KEY_DATA[i]; const KeyData &d = KEY_DATA[i];
(void)new KAction(i18n(d.label), d.keycode, TQT_TQOBJECT(_status), (void)new TDEAction(i18n(d.label), d.keycode, TQT_TQOBJECT(_status),
d.slot, _keybCollection, d.name); d.slot, _keybCollection, d.name);
} }
@ -103,24 +103,24 @@ MainWidget::MainWidget()
_advise = _advise =
KStdGameAction::hint(TQT_TQOBJECT(_status), TQT_SLOT(advise()), actionCollection()); KStdGameAction::hint(TQT_TQOBJECT(_status), TQT_SLOT(advise()), actionCollection());
_solve = KStdGameAction::solve(TQT_TQOBJECT(_status), TQT_SLOT(solve()), actionCollection()); _solve = KStdGameAction::solve(TQT_TQOBJECT(_status), TQT_SLOT(solve()), actionCollection());
(void)new KAction(i18n("Solving Rate..."), 0, TQT_TQOBJECT(_status), TQT_SLOT(solveRate()), (void)new TDEAction(i18n("Solving Rate..."), 0, TQT_TQOBJECT(_status), TQT_SLOT(solveRate()),
actionCollection(), "solve_rate"); actionCollection(), "solve_rate");
// Log // Log
(void)new KAction(KGuiItem(i18n("View Log"), "viewmag"), 0, (void)new TDEAction(KGuiItem(i18n("View Log"), "viewmag"), 0,
TQT_TQOBJECT(_status), TQT_SLOT(viewLog()), TQT_TQOBJECT(_status), TQT_SLOT(viewLog()),
actionCollection(), "log_view"); actionCollection(), "log_view");
(void)new KAction(KGuiItem(i18n("Replay Log"), "player_play"), (void)new TDEAction(KGuiItem(i18n("Replay Log"), "player_play"),
0, TQT_TQOBJECT(_status), TQT_SLOT(replayLog()), 0, TQT_TQOBJECT(_status), TQT_SLOT(replayLog()),
actionCollection(), "log_replay"); actionCollection(), "log_replay");
(void)new KAction(KGuiItem(i18n("Save Log..."), "filesave"), 0, (void)new TDEAction(KGuiItem(i18n("Save Log..."), "filesave"), 0,
TQT_TQOBJECT(_status), TQT_SLOT(saveLog()), TQT_TQOBJECT(_status), TQT_SLOT(saveLog()),
actionCollection(), "log_save"); actionCollection(), "log_save");
(void)new KAction(KGuiItem(i18n("Load Log..."), "fileopen"), 0, (void)new TDEAction(KGuiItem(i18n("Load Log..."), "fileopen"), 0,
TQT_TQOBJECT(_status), TQT_SLOT(loadLog()), TQT_TQOBJECT(_status), TQT_SLOT(loadLog()),
actionCollection(), "log_load"); actionCollection(), "log_load");
setupGUI( KMainWindow::Save | Create ); setupGUI( TDEMainWindow::Save | Create );
readSettings(); readSettings();
setCentralWidget(_status); setCentralWidget(_status);
init("popup"); init("popup");
@ -150,7 +150,7 @@ void MainWidget::focusOutEvent(TQFocusEvent *e)
{ {
if ( Settings::pauseFocus() && e->reason()==TQFocusEvent::ActiveWindow if ( Settings::pauseFocus() && e->reason()==TQFocusEvent::ActiveWindow
&& _status->isPlaying() ) pause(); && _status->isPlaying() ) pause();
KMainWindow::focusOutEvent(e); TDEMainWindow::focusOutEvent(e);
} }
void MainWidget::configureSettings() void MainWidget::configureSettings()
@ -177,8 +177,8 @@ void MainWidget::configureHighscores()
void MainWidget::settingsChanged() void MainWidget::settingsChanged()
{ {
bool enabled = Settings::keyboardGame(); bool enabled = Settings::keyboardGame();
TQValueList<KAction *> list = _keybCollection->actions(); TQValueList<TDEAction *> list = _keybCollection->actions();
TQValueList<KAction *>::Iterator it; TQValueList<TDEAction *>::Iterator it;
for (it = list.begin(); it!=list.end(); ++it) for (it = list.begin(); it!=list.end(); ++it)
(*it)->setEnabled(enabled); (*it)->setEnabled(enabled);
_status->settingsChanged(); _status->settingsChanged();

@ -23,9 +23,9 @@
#include "defines.h" #include "defines.h"
class KAction; class TDEAction;
class KToggleAction; class TDEToggleAction;
class KSelectAction; class TDESelectAction;
class Status; class Status;
class MainWidget : public KZoomMainWindow, public KMines class MainWidget : public KZoomMainWindow, public KMines
@ -51,10 +51,10 @@ class MainWidget : public KZoomMainWindow, public KMines
private: private:
Status *_status; Status *_status;
KToggleAction *_pause; TDEToggleAction *_pause;
KSelectAction *_levels; TDESelectAction *_levels;
KAction *_advise, *_solve; TDEAction *_advise, *_solve;
KActionCollection *_keybCollection; TDEActionCollection *_keybCollection;
struct KeyData { struct KeyData {
const char *label, *name; const char *label, *name;

@ -53,7 +53,7 @@
static TQMap<Cell::Dirs, Cell::Dirs> contrdirs; static TQMap<Cell::Dirs, Cell::Dirs> contrdirs;
MainWindow::MainWindow(TQWidget *parent, const char* name, WFlags /*fl*/) : MainWindow::MainWindow(TQWidget *parent, const char* name, WFlags /*fl*/) :
KMainWindow(parent, name, WStyle_NoBorder) TDEMainWindow(parent, name, WStyle_NoBorder)
{ {
m_clickcount = 0; m_clickcount = 0;

@ -22,9 +22,9 @@ class Cell;
class TQAction; class TQAction;
class TQSound; class TQSound;
class TQLCDNumber; class TQLCDNumber;
class KSelectAction; class TDESelectAction;
class MainWindow : public KMainWindow class MainWindow : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -91,7 +91,7 @@ class MainWindow : public KMainWindow
TQPopupMenu* skillmenu; TQPopupMenu* skillmenu;
int m_clickcount; int m_clickcount;
KSelectAction* m_levels; TDESelectAction* m_levels;
}; };
#endif // MAINWINDOW_H #endif // MAINWINDOW_H

@ -19,7 +19,7 @@ Editor::Editor(ObjectList *list, TQWidget *parent, const char *name)
TQVBoxLayout *vlayout = new TQVBoxLayout(hlayout, KDialog::spacingHint()); TQVBoxLayout *vlayout = new TQVBoxLayout(hlayout, KDialog::spacingHint());
vlayout->addWidget(new TQLabel(i18n("Add object:"), this)); vlayout->addWidget(new TQLabel(i18n("Add object:"), this));
listbox = new KListBox(this, "Listbox"); listbox = new TDEListBox(this, "Listbox");
vlayout->addWidget(listbox); vlayout->addWidget(listbox);
hlayout->setStretchFactor(vlayout, 2); hlayout->setStretchFactor(vlayout, 2);

@ -5,7 +5,7 @@
#include "game.h" #include "game.h"
class KListBox; class TDEListBox;
class TQHBoxLayout; class TQHBoxLayout;
class TQListBoxItem; class TQListBoxItem;
class Config; class Config;
@ -31,7 +31,7 @@ private slots:
private: private:
ObjectList *list; ObjectList *list;
TQHBoxLayout *hlayout; TQHBoxLayout *hlayout;
KListBox *listbox; TDEListBox *listbox;
Config *config; Config *config;
}; };

@ -48,7 +48,7 @@
#include "kolf.h" #include "kolf.h"
Kolf::Kolf() Kolf::Kolf()
: KMainWindow(0, "Kolf") : TDEMainWindow(0, "Kolf")
{ {
competition = false; competition = false;
game = 0; game = 0;
@ -91,63 +91,63 @@ void Kolf::initGUI()
saveAsAction = KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(saveAs()), actionCollection(), "game_save_as"); saveAsAction = KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(saveAs()), actionCollection(), "game_save_as");
saveAsAction->setText(i18n("Save &Course As...")); saveAsAction->setText(i18n("Save &Course As..."));
saveGameAction = new KAction(i18n("&Save Game"), 0, TQT_TQOBJECT(this), TQT_SLOT(saveGame()), actionCollection(), "savegame"); saveGameAction = new TDEAction(i18n("&Save Game"), 0, TQT_TQOBJECT(this), TQT_SLOT(saveGame()), actionCollection(), "savegame");
saveGameAsAction = new KAction(i18n("&Save Game As..."), 0, TQT_TQOBJECT(this), TQT_SLOT(saveGameAs()), actionCollection(), "savegameas"); saveGameAsAction = new TDEAction(i18n("&Save Game As..."), 0, TQT_TQOBJECT(this), TQT_SLOT(saveGameAs()), actionCollection(), "savegameas");
loadGameAction = KStdGameAction::load(TQT_TQOBJECT(this), TQT_SLOT(loadGame()), actionCollection()); loadGameAction = KStdGameAction::load(TQT_TQOBJECT(this), TQT_SLOT(loadGame()), actionCollection());
loadGameAction->setText(i18n("Load Saved Game...")); loadGameAction->setText(i18n("Load Saved Game..."));
highScoreAction = KStdGameAction::highscores(TQT_TQOBJECT(this), TQT_SLOT(showHighScores()), actionCollection()); highScoreAction = KStdGameAction::highscores(TQT_TQOBJECT(this), TQT_SLOT(showHighScores()), actionCollection());
editingAction = new KToggleAction(i18n("&Edit"), "pencil", CTRL+Key_E, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "editing"); editingAction = new TDEToggleAction(i18n("&Edit"), "pencil", CTRL+Key_E, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "editing");
newHoleAction = new KAction(i18n("&New"), "filenew", CTRL+SHIFT+Key_N, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "newhole"); newHoleAction = new TDEAction(i18n("&New"), "filenew", CTRL+SHIFT+Key_N, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "newhole");
clearHoleAction = new KAction(KStdGuiItem::clear().text(), "locationbar_erase", CTRL+Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "clearhole"); clearHoleAction = new TDEAction(KStdGuiItem::clear().text(), "locationbar_erase", CTRL+Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "clearhole");
resetHoleAction = new KAction(i18n("&Reset"), CTRL+Key_R, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "resethole"); resetHoleAction = new TDEAction(i18n("&Reset"), CTRL+Key_R, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "resethole");
undoShotAction = KStdAction::undo(TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "undoshot"); undoShotAction = KStdAction::undo(TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "undoshot");
undoShotAction->setText(i18n("&Undo Shot")); undoShotAction->setText(i18n("&Undo Shot"));
//replayShotAction = new KAction(i18n("&Replay Shot"), 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "replay"); //replayShotAction = new TDEAction(i18n("&Replay Shot"), 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "replay");
holeAction = new KListAction(i18n("Switch to Hole"), 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "switchhole"); holeAction = new TDEListAction(i18n("Switch to Hole"), 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "switchhole");
nextAction = new KAction(i18n("&Next Hole"), "forward", KStdAccel::shortcut(KStdAccel::Forward), TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "nexthole"); nextAction = new TDEAction(i18n("&Next Hole"), "forward", TDEStdAccel::shortcut(TDEStdAccel::Forward), TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "nexthole");
prevAction = new KAction(i18n("&Previous Hole"), "back", KStdAccel::shortcut(KStdAccel::Back), TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "prevhole"); prevAction = new TDEAction(i18n("&Previous Hole"), "back", TDEStdAccel::shortcut(TDEStdAccel::Back), TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "prevhole");
firstAction = new KAction(i18n("&First Hole"), "gohome", KStdAccel::shortcut(KStdAccel::Home), TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "firsthole"); firstAction = new TDEAction(i18n("&First Hole"), "gohome", TDEStdAccel::shortcut(TDEStdAccel::Home), TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "firsthole");
lastAction = new KAction(i18n("&Last Hole"), CTRL+SHIFT+Key_End, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "lasthole"); lastAction = new TDEAction(i18n("&Last Hole"), CTRL+SHIFT+Key_End, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "lasthole");
randAction = new KAction(i18n("&Random Hole"), "goto", 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "randhole"); randAction = new TDEAction(i18n("&Random Hole"), "goto", 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "randhole");
useMouseAction = new KToggleAction(i18n("Enable &Mouse for Moving Putter"), 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "usemouse"); useMouseAction = new TDEToggleAction(i18n("Enable &Mouse for Moving Putter"), 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "usemouse");
useMouseAction->setCheckedState(i18n("Disable &Mouse for Moving Putter")); useMouseAction->setCheckedState(i18n("Disable &Mouse for Moving Putter"));
connect(useMouseAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(useMouseChanged(bool))); connect(useMouseAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(useMouseChanged(bool)));
TDEConfig *config = kapp->config(); TDEConfig *config = kapp->config();
config->setGroup("Settings"); config->setGroup("Settings");
useMouseAction->setChecked(config->readBoolEntry("useMouse", true)); useMouseAction->setChecked(config->readBoolEntry("useMouse", true));
useAdvancedPuttingAction = new KToggleAction(i18n("Enable &Advanced Putting"), 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "useadvancedputting"); useAdvancedPuttingAction = new TDEToggleAction(i18n("Enable &Advanced Putting"), 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "useadvancedputting");
useAdvancedPuttingAction->setCheckedState(i18n("Disable &Advanced Putting")); useAdvancedPuttingAction->setCheckedState(i18n("Disable &Advanced Putting"));
connect(useAdvancedPuttingAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(useAdvancedPuttingChanged(bool))); connect(useAdvancedPuttingAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(useAdvancedPuttingChanged(bool)));
useAdvancedPuttingAction->setChecked(config->readBoolEntry("useAdvancedPutting", false)); useAdvancedPuttingAction->setChecked(config->readBoolEntry("useAdvancedPutting", false));
showInfoAction = new KToggleAction(i18n("Show &Info"), "info", CTRL+Key_I, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "showinfo"); showInfoAction = new TDEToggleAction(i18n("Show &Info"), "info", CTRL+Key_I, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "showinfo");
showInfoAction->setCheckedState(i18n("Hide &Info")); showInfoAction->setCheckedState(i18n("Hide &Info"));
connect(showInfoAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(showInfoChanged(bool))); connect(showInfoAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(showInfoChanged(bool)));
showInfoAction->setChecked(config->readBoolEntry("showInfo", false)); showInfoAction->setChecked(config->readBoolEntry("showInfo", false));
showGuideLineAction = new KToggleAction(i18n("Show Putter &Guideline"), 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "showguideline"); showGuideLineAction = new TDEToggleAction(i18n("Show Putter &Guideline"), 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "showguideline");
showGuideLineAction->setCheckedState(i18n("Hide Putter &Guideline")); showGuideLineAction->setCheckedState(i18n("Hide Putter &Guideline"));
connect(showGuideLineAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(showGuideLineChanged(bool))); connect(showGuideLineAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(showGuideLineChanged(bool)));
showGuideLineAction->setChecked(config->readBoolEntry("showGuideLine", true)); showGuideLineAction->setChecked(config->readBoolEntry("showGuideLine", true));
KToggleAction *act=new KToggleAction(i18n("Enable All Dialog Boxes"), 0, TQT_TQOBJECT(this), TQT_SLOT(enableAllMessages()), actionCollection(), "enableAll"); TDEToggleAction *act=new TDEToggleAction(i18n("Enable All Dialog Boxes"), 0, TQT_TQOBJECT(this), TQT_SLOT(enableAllMessages()), actionCollection(), "enableAll");
act->setCheckedState(i18n("Disable All Dialog Boxes")); act->setCheckedState(i18n("Disable All Dialog Boxes"));
soundAction = new KToggleAction(i18n("Play &Sounds"), 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "sound"); soundAction = new TDEToggleAction(i18n("Play &Sounds"), 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "sound");
connect(soundAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(soundChanged(bool))); connect(soundAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(soundChanged(bool)));
soundAction->setChecked(config->readBoolEntry("sound", true)); soundAction->setChecked(config->readBoolEntry("sound", true));
(void) new KAction(i18n("&Reload Plugins"), 0, TQT_TQOBJECT(this), TQT_SLOT(initPlugins()), actionCollection(), "reloadplugins"); (void) new TDEAction(i18n("&Reload Plugins"), 0, TQT_TQOBJECT(this), TQT_SLOT(initPlugins()), actionCollection(), "reloadplugins");
(void) new KAction(i18n("Show &Plugins"), 0, TQT_TQOBJECT(this), TQT_SLOT(showPlugins()), actionCollection(), "showplugins"); (void) new TDEAction(i18n("Show &Plugins"), 0, TQT_TQOBJECT(this), TQT_SLOT(showPlugins()), actionCollection(), "showplugins");
aboutAction = new KAction(i18n("&About Course"), 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "aboutcourse"); aboutAction = new TDEAction(i18n("&About Course"), 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "aboutcourse");
tutorialAction = new KAction(i18n("&Tutorial"), 0, TQT_TQOBJECT(this), TQT_SLOT(tutorial()), actionCollection(), "tutorial"); tutorialAction = new TDEAction(i18n("&Tutorial"), 0, TQT_TQOBJECT(this), TQT_SLOT(tutorial()), actionCollection(), "tutorial");
statusBar(); statusBar();
setupGUI(); setupGUI();
@ -808,7 +808,7 @@ void Kolf::setCurrentHole(int hole)
{ {
if (!holeAction) if (!holeAction)
return; return;
// Golf is 1-based, KListAction is 0-based // Golf is 1-based, TDEListAction is 0-based
holeAction->setCurrentItem(hole - 1); holeAction->setCurrentItem(hole - 1);
} }

@ -13,9 +13,9 @@
#include "game.h" #include "game.h"
class KolfGame; class KolfGame;
class KToggleAction; class TDEToggleAction;
class KListAction; class TDEListAction;
class KAction; class TDEAction;
class TQGridLayout; class TQGridLayout;
class ScoreBoard; class ScoreBoard;
class TQCloseEvent; class TQCloseEvent;
@ -24,7 +24,7 @@ class Player;
class TQWidget; class TQWidget;
class Editor; class Editor;
class KDE_EXPORT Kolf : public KMainWindow class KDE_EXPORT Kolf : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -90,34 +90,34 @@ private:
PlayerList spacerPlayers; PlayerList spacerPlayers;
TQGridLayout *layout; TQGridLayout *layout;
ScoreBoard *scoreboard; ScoreBoard *scoreboard;
KToggleAction *editingAction; TDEToggleAction *editingAction;
KAction *newHoleAction; TDEAction *newHoleAction;
KAction *resetHoleAction; TDEAction *resetHoleAction;
KAction *undoShotAction; TDEAction *undoShotAction;
//KAction *replayShotAction; //TDEAction *replayShotAction;
KAction *clearHoleAction; TDEAction *clearHoleAction;
KAction *tutorialAction; TDEAction *tutorialAction;
KAction *newAction; TDEAction *newAction;
KAction *endAction; TDEAction *endAction;
KAction *printAction; TDEAction *printAction;
KAction *saveAction; TDEAction *saveAction;
KAction *saveAsAction; TDEAction *saveAsAction;
KAction *saveGameAction; TDEAction *saveGameAction;
KAction *saveGameAsAction; TDEAction *saveGameAsAction;
KAction *loadGameAction; TDEAction *loadGameAction;
KAction *aboutAction; TDEAction *aboutAction;
KListAction *holeAction; TDEListAction *holeAction;
KAction *highScoreAction; TDEAction *highScoreAction;
KAction *nextAction; TDEAction *nextAction;
KAction *prevAction; TDEAction *prevAction;
KAction *firstAction; TDEAction *firstAction;
KAction *lastAction; TDEAction *lastAction;
KAction *randAction; TDEAction *randAction;
KToggleAction *showInfoAction; TDEToggleAction *showInfoAction;
KToggleAction *useMouseAction; TDEToggleAction *useMouseAction;
KToggleAction *useAdvancedPuttingAction; TDEToggleAction *useAdvancedPuttingAction;
KToggleAction *showGuideLineAction; TDEToggleAction *showGuideLineAction;
KToggleAction *soundAction; TDEToggleAction *soundAction;
void setHoleMovementEnabled(bool); void setHoleMovementEnabled(bool);
void setHoleOtherEnabled(bool); void setHoleOtherEnabled(bool);
inline void setEditingEnabled(bool); inline void setEditingEnabled(bool);

@ -127,7 +127,7 @@ NewGameDialog::NewGameDialog(bool enableCourses, TQWidget *parent, const char *_
names.append(TQString()); names.append(TQString());
nameList.append(newName); nameList.append(newName);
courseList = new KListBox(coursePage); courseList = new TDEListBox(coursePage);
hlayout->addWidget(courseList); hlayout->addWidget(courseList);
courseList->insertStringList(nameList); courseList->insertStringList(nameList);
courseList->setCurrentItem(curItem); courseList->setCurrentItem(curItem);

@ -21,7 +21,7 @@ class TQFrame;
class TQVBoxLayout; class TQVBoxLayout;
class TQVBox; class TQVBox;
class TQPainter; class TQPainter;
class KListBox; class TDEListBox;
class TQEvent; class TQEvent;
class PlayerEditor : public TQWidget class PlayerEditor : public TQWidget
@ -93,7 +93,7 @@ private:
TQStringList extraCourses; TQStringList extraCourses;
KListBox *courseList; TDEListBox *courseList;
TQLabel *name; TQLabel *name;
TQLabel *author; TQLabel *author;
TQLabel *par; TQLabel *par;

@ -40,7 +40,7 @@ FleetDlg::FleetDlg( TQWidget *parent, AttackFleetList *fleets )
{ {
setCaption( kapp->makeStdCaption(i18n("Fleet Overview")) ); setCaption( kapp->makeStdCaption(i18n("Fleet Overview")) );
fleetTable = new KListView( this, 0 ); fleetTable = new TDEListView( this, 0 );
fleetTable->addColumn(i18n("Fleet No.")); fleetTable->addColumn(i18n("Fleet No."));
fleetTable->addColumn(i18n("Destination")); fleetTable->addColumn(i18n("Destination"));
fleetTable->addColumn(i18n("Ships")); fleetTable->addColumn(i18n("Ships"));

@ -26,7 +26,7 @@ MainWindow::MainWindow()
setCaption( i18n("Galactic Conquest") ); setCaption( i18n("Galactic Conquest") );
setupGameBoard(); setupGameBoard();
setupKAction(); setupTDEAction();
setupGUI(); setupGUI();
} }
@ -35,22 +35,22 @@ MainWindow::~MainWindow()
} }
void void
MainWindow::setupKAction() MainWindow::setupTDEAction()
{ {
KStdGameAction::gameNew( TQT_TQOBJECT(gameBoard), TQT_SLOT( startNewGame() ), actionCollection() ); KStdGameAction::gameNew( TQT_TQOBJECT(gameBoard), TQT_SLOT( startNewGame() ), actionCollection() );
KStdGameAction::quit( TQT_TQOBJECT(this), TQT_SLOT( close() ), actionCollection() ); KStdGameAction::quit( TQT_TQOBJECT(this), TQT_SLOT( close() ), actionCollection() );
endAction = KStdGameAction::end( TQT_TQOBJECT(gameBoard), TQT_SLOT( shutdownGame() ), actionCollection() ); endAction = KStdGameAction::end( TQT_TQOBJECT(gameBoard), TQT_SLOT( shutdownGame() ), actionCollection() );
endAction->setEnabled(false); endAction->setEnabled(false);
//AB: there is no icon for disabled - KToolBar::insertButton shows the //AB: there is no icon for disabled - TDEToolBar::insertButton shows the
//different state - KAction not :-( //different state - TDEAction not :-(
measureAction = new KAction( i18n("&Measure Distance"), "ruler", 0, TQT_TQOBJECT(gameBoard), TQT_SLOT( measureDistance() ), actionCollection(), "game_measure" ); measureAction = new TDEAction( i18n("&Measure Distance"), "ruler", 0, TQT_TQOBJECT(gameBoard), TQT_SLOT( measureDistance() ), actionCollection(), "game_measure" );
measureAction->setEnabled(false); measureAction->setEnabled(false);
standingAction = new KAction( i18n("&Show Standings"), "help", 0, TQT_TQOBJECT(gameBoard), TQT_SLOT( showScores() ), actionCollection(), "game_scores" ); standingAction = new TDEAction( i18n("&Show Standings"), "help", 0, TQT_TQOBJECT(gameBoard), TQT_SLOT( showScores() ), actionCollection(), "game_scores" );
standingAction->setEnabled(false); standingAction->setEnabled(false);
fleetAction = new KAction( i18n("&Fleet Overview"), "launch", 0, TQT_TQOBJECT(gameBoard), TQT_SLOT( showFleets() ), actionCollection(), "game_fleets" ); fleetAction = new TDEAction( i18n("&Fleet Overview"), "launch", 0, TQT_TQOBJECT(gameBoard), TQT_SLOT( showFleets() ), actionCollection(), "game_fleets" );
fleetAction->setEnabled(false); fleetAction->setEnabled(false);
toolBar()->setBarPos( KToolBar::Left ); toolBar()->setBarPos( TDEToolBar::Left );
toolBar()->setMovingEnabled( false ); toolBar()->setMovingEnabled( false );
} }

@ -8,7 +8,7 @@
class ConquestMap; class ConquestMap;
class PlanetStatusTable; class PlanetStatusTable;
class MainWindow : public KMainWindow class MainWindow : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -18,12 +18,12 @@ public:
~MainWindow(); ~MainWindow();
protected: protected:
void setupKAction(); void setupTDEAction();
void setupGameBoard(); void setupGameBoard();
private: private:
GameBoard *gameBoard; GameBoard *gameBoard;
KAction *endAction, *measureAction, *standingAction, *fleetAction; TDEAction *endAction, *measureAction, *standingAction, *fleetAction;
private slots: private slots:
void gameStateChange( GameState ); void gameStateChange( GameState );

@ -32,7 +32,7 @@ ScoreDlg::ScoreDlg( TQWidget *parent, const TQString& title, PlayerList *players
{ {
setCaption( kapp->makeStdCaption(title) ); setCaption( kapp->makeStdCaption(title) );
scoreTable = new KListView( this, 0 ); scoreTable = new TDEListView( this, 0 );
scoreTable->addColumn(i18n("Player")); scoreTable->addColumn(i18n("Player"));
scoreTable->addColumn(i18n("Ships Built")); scoreTable->addColumn(i18n("Ships Built"));
scoreTable->addColumn(i18n("Planets Conquered")); scoreTable->addColumn(i18n("Planets Conquered"));

@ -4,7 +4,7 @@
#include <assert.h> #include <assert.h>
#include "cardmaps.h" #include "cardmaps.h"
Clock::Clock( KMainWindow* parent, const char *name ) Clock::Clock( TDEMainWindow* parent, const char *name )
: Dealer( parent, name ) : Dealer( parent, name )
{ {
const int dist_x = cardMap::CARDX() * 11 / 10 + 1; const int dist_x = cardMap::CARDX() * 11 / 10 + 1;
@ -85,7 +85,7 @@ static class LocalDealerInfo11 : public DealerInfo
{ {
public: public:
LocalDealerInfo11() : DealerInfo(I18N_NOOP("G&randfather's Clock"), 11) {} LocalDealerInfo11() : DealerInfo(I18N_NOOP("G&randfather's Clock"), 11) {}
virtual Dealer *createGame(KMainWindow *parent) { return new Clock(parent); } virtual Dealer *createGame(TDEMainWindow *parent) { return new Clock(parent); }
} gfi11; } gfi11;
#include "clock.moc" #include "clock.moc"

@ -8,7 +8,7 @@ class Clock : public Dealer {
public: public:
Clock( KMainWindow* parent=0, const char* name=0); Clock( TDEMainWindow* parent=0, const char* name=0);
virtual bool checkAdd ( int checkIndex, const Pile *c1, const CardList& c2) const; virtual bool checkAdd ( int checkIndex, const Pile *c1, const CardList& c2) const;
virtual bool startAutoDrop() { return false; } virtual bool startAutoDrop() { return false; }

@ -27,7 +27,7 @@
#include <assert.h> #include <assert.h>
#include "cardmaps.h" #include "cardmaps.h"
Computation::Computation( KMainWindow *parent, const char *name ) Computation::Computation( TDEMainWindow *parent, const char *name )
:Dealer( parent, name) :Dealer( parent, name)
{ {
deck = Deck::new_deck(this); deck = Deck::new_deck(this);
@ -114,7 +114,7 @@ static class LocalDealerInfo6 : public DealerInfo
{ {
public: public:
LocalDealerInfo6() : DealerInfo(I18N_NOOP("&Calculation"), 6) {} LocalDealerInfo6() : DealerInfo(I18N_NOOP("&Calculation"), 6) {}
virtual Dealer *createGame(KMainWindow *parent) { return new Computation(parent); } virtual Dealer *createGame(TDEMainWindow *parent) { return new Computation(parent); }
} ldi6; } ldi6;
#include "computation.moc" #include "computation.moc"

@ -33,7 +33,7 @@ class Computation : public Dealer {
public: public:
Computation( KMainWindow *parent = 0, const char *name=0 ); Computation( TDEMainWindow *parent = 0, const char *name=0 );
virtual void restart(); virtual void restart();

@ -55,7 +55,7 @@ void DealerInfoList::add(DealerInfo *dealer)
Dealer *Dealer::s_instance = 0; Dealer *Dealer::s_instance = 0;
Dealer::Dealer( KMainWindow* _parent , const char* _name ) Dealer::Dealer( TDEMainWindow* _parent , const char* _name )
: TQCanvasView( 0, _parent, _name ), : TQCanvasView( 0, _parent, _name ),
towait(0), towait(0),
myActions(0), myActions(0),
@ -108,13 +108,13 @@ void Dealer::setBackgroundPixmap(const TQPixmap &background, const TQColor &midc
void Dealer::setupActions() { void Dealer::setupActions() {
TQPtrList<KAction> actionlist; TQPtrList<TDEAction> actionlist;
kdDebug(11111) << "setupActions " << actions() << endl; kdDebug(11111) << "setupActions " << actions() << endl;
if (actions() & Dealer::Hint) { if (actions() & Dealer::Hint) {
ahint = new KAction( i18n("&Hint"), TQString::fromLatin1("wizard"), Key_H, TQT_TQOBJECT(this), ahint = new TDEAction( i18n("&Hint"), TQString::fromLatin1("wizard"), Key_H, TQT_TQOBJECT(this),
TQT_SLOT(hint()), TQT_SLOT(hint()),
parent()->actionCollection(), "game_hint"); parent()->actionCollection(), "game_hint");
actionlist.append(ahint); actionlist.append(ahint);
@ -122,7 +122,7 @@ void Dealer::setupActions() {
ahint = 0; ahint = 0;
if (actions() & Dealer::Demo) { if (actions() & Dealer::Demo) {
ademo = new KToggleAction( i18n("&Demo"), TQString::fromLatin1("1rightarrow"), CTRL+Key_D, TQT_TQOBJECT(this), ademo = new TDEToggleAction( i18n("&Demo"), TQString::fromLatin1("1rightarrow"), CTRL+Key_D, TQT_TQOBJECT(this),
TQT_SLOT(toggleDemo()), TQT_SLOT(toggleDemo()),
parent()->actionCollection(), "game_demo"); parent()->actionCollection(), "game_demo");
actionlist.append(ademo); actionlist.append(ademo);
@ -130,7 +130,7 @@ void Dealer::setupActions() {
ademo = 0; ademo = 0;
if (actions() & Dealer::Redeal) { if (actions() & Dealer::Redeal) {
aredeal = new KAction (i18n("&Redeal"), TQString::fromLatin1("queue"), 0, TQT_TQOBJECT(this), aredeal = new TDEAction (i18n("&Redeal"), TQString::fromLatin1("queue"), 0, TQT_TQOBJECT(this),
TQT_SLOT(redeal()), TQT_SLOT(redeal()),
parent()->actionCollection(), "game_redeal"); parent()->actionCollection(), "game_redeal");
actionlist.append(aredeal); actionlist.append(aredeal);
@ -154,9 +154,9 @@ Dealer::~Dealer()
s_instance = 0; s_instance = 0;
} }
KMainWindow *Dealer::parent() const TDEMainWindow *Dealer::parent() const
{ {
return dynamic_cast<KMainWindow*>(TQCanvasView::parent()); return dynamic_cast<TDEMainWindow*>(TQCanvasView::parent());
} }

@ -6,12 +6,12 @@
#include <krandomsequence.h> #include <krandomsequence.h>
class TQDomDocument; class TQDomDocument;
class KMainWindow; class TDEMainWindow;
class Dealer; class Dealer;
class DealerInfo; class DealerInfo;
class KAction; class TDEAction;
class KSelectAction; class TDESelectAction;
class KToggleAction; class TDEToggleAction;
class KPixmap; class KPixmap;
class DealerInfoList { class DealerInfoList {
@ -35,7 +35,7 @@ public:
} }
const char *name; const char *name;
uint gameindex; uint gameindex;
virtual Dealer *createGame(KMainWindow *parent) = 0; virtual Dealer *createGame(TDEMainWindow *parent) = 0;
}; };
class CardState; class CardState;
@ -61,7 +61,7 @@ class Dealer: public TQCanvasView
public: public:
Dealer( KMainWindow* parent = 0, const char* name = 0 ); Dealer( TDEMainWindow* parent = 0, const char* name = 0 );
virtual ~Dealer(); virtual ~Dealer();
static const Dealer *instance(); static const Dealer *instance();
@ -171,7 +171,7 @@ protected:
// it's not const because it changes the random seed // it's not const because it changes the random seed
virtual MoveHint *chooseHint(); virtual MoveHint *chooseHint();
KMainWindow *parent() const; TDEMainWindow *parent() const;
bool waiting() const { return _waiting != 0; } bool waiting() const { return _waiting != 0; }
void setWaiting(bool w); void setWaiting(bool w);
@ -206,8 +206,8 @@ protected:
int myActions; int myActions;
bool toldAboutLostGame; bool toldAboutLostGame;
KToggleAction *ademo; TDEToggleAction *ademo;
KAction *ahint, *aredeal; TDEAction *ahint, *aredeal;
KRandomSequence randseq; KRandomSequence randseq;
TQColor _midcolor; TQColor _midcolor;

@ -27,7 +27,7 @@ void HorLeftPile::initSizes()
} }
Fortyeight::Fortyeight( KMainWindow* parent, const char* name) Fortyeight::Fortyeight( TDEMainWindow* parent, const char* name)
: Dealer(parent,name) : Dealer(parent,name)
{ {
deck = Deck::new_deck(this, 2); deck = Deck::new_deck(this, 2);
@ -194,7 +194,7 @@ static class LocalDealerInfo8 : public DealerInfo
{ {
public: public:
LocalDealerInfo8() : DealerInfo(I18N_NOOP("Forty && &Eight"), 8) {} LocalDealerInfo8() : DealerInfo(I18N_NOOP("Forty && &Eight"), 8) {}
virtual Dealer *createGame(KMainWindow *parent) { return new Fortyeight(parent); } virtual Dealer *createGame(TDEMainWindow *parent) { return new Fortyeight(parent); }
} ldi9; } ldi9;
//-------------------------------------------------------------------------// //-------------------------------------------------------------------------//

@ -20,7 +20,7 @@ class Fortyeight : public Dealer
public: public:
Fortyeight( KMainWindow* parent=0, const char* name=0); Fortyeight( TDEMainWindow* parent=0, const char* name=0);
virtual bool isGameLost() const; virtual bool isGameLost() const;
public slots: public slots:

@ -49,7 +49,7 @@ void FreecellPile::moveCards(CardList &c, Pile *to)
//-------------------------------------------------------------------------// //-------------------------------------------------------------------------//
FreecellBase::FreecellBase( int decks, int stores, int freecells, int fill, bool unlimit, FreecellBase::FreecellBase( int decks, int stores, int freecells, int fill, bool unlimit,
KMainWindow* parent, const char* name) TDEMainWindow* parent, const char* name)
: Dealer(parent,name), : Dealer(parent,name),
solver_instance(0), es_filling(fill), solver_ret(FCS_STATE_NOT_BEGAN_YET), solver_instance(0), es_filling(fill), solver_ret(FCS_STATE_NOT_BEGAN_YET),
unlimited_move(unlimit) unlimited_move(unlimit)
@ -813,11 +813,11 @@ bool FreecellBase::checkRemove(int checkIndex, const Pile *p, const Card *c) con
class Freecell : public FreecellBase class Freecell : public FreecellBase
{ {
public: public:
Freecell( KMainWindow* parent=0, const char* name=0); Freecell( TDEMainWindow* parent=0, const char* name=0);
virtual void deal(); virtual void deal();
}; };
Freecell::Freecell( KMainWindow* parent, const char* name) Freecell::Freecell( TDEMainWindow* parent, const char* name)
: FreecellBase(1, 8, 4, FCS_ES_FILLED_BY_ANY_CARD, false, parent, name) : FreecellBase(1, 8, 4, FCS_ES_FILLED_BY_ANY_CARD, false, parent, name)
{ {
for (int i = 0; i < 8; i++) for (int i = 0; i < 8; i++)
@ -846,7 +846,7 @@ static class LocalDealerInfo3 : public DealerInfo
{ {
public: public:
LocalDealerInfo3() : DealerInfo(I18N_NOOP("&Freecell"), 3) {} LocalDealerInfo3() : DealerInfo(I18N_NOOP("&Freecell"), 3) {}
virtual Dealer *createGame(KMainWindow *parent) { return new Freecell(parent); } virtual Dealer *createGame(TDEMainWindow *parent) { return new Freecell(parent); }
} ldi8; } ldi8;
//-------------------------------------------------------------------------// //-------------------------------------------------------------------------//

@ -38,7 +38,7 @@ class FreecellBase : public Dealer
public: public:
FreecellBase( int decks, int stores, int freecells, int es_filling, bool unlimited_move, FreecellBase( int decks, int stores, int freecells, int es_filling, bool unlimited_move,
KMainWindow* parent=0, const char* name=0); TDEMainWindow* parent=0, const char* name=0);
void moveCards(CardList &c, FreecellPile *from, Pile *to); void moveCards(CardList &c, FreecellPile *from, Pile *to);
TQString solverFormat() const; TQString solverFormat() const;
virtual ~FreecellBase(); virtual ~FreecellBase();

@ -19,7 +19,7 @@ TQSize HorRightPile::cardOffset( bool _spread, bool, const Card *) const
//-------------------------------------------------------------------------// //-------------------------------------------------------------------------//
Golf::Golf( KMainWindow* parent, const char* _name) Golf::Golf( TDEMainWindow* parent, const char* _name)
: Dealer( parent, _name ) : Dealer( parent, _name )
{ {
const int dist_x = cardMap::CARDX() * 11 / 10 + 1; const int dist_x = cardMap::CARDX() * 11 / 10 + 1;
@ -158,7 +158,7 @@ static class LocalDealerInfo13 : public DealerInfo
{ {
public: public:
LocalDealerInfo13() : DealerInfo(I18N_NOOP("Go&lf"), 12) {} LocalDealerInfo13() : DealerInfo(I18N_NOOP("Go&lf"), 12) {}
virtual Dealer *createGame(KMainWindow *parent) { return new Golf(parent); } virtual Dealer *createGame(TDEMainWindow *parent) { return new Golf(parent); }
} ldi13; } ldi13;
//-------------------------------------------------------------------------// //-------------------------------------------------------------------------//

@ -19,7 +19,7 @@ class Golf : public Dealer
public: public:
Golf( KMainWindow* parent=0, const char* name=0); Golf( TDEMainWindow* parent=0, const char* name=0);
void deal(); void deal();
virtual void restart(); virtual void restart();
virtual bool isGameLost() const; virtual bool isGameLost() const;

@ -25,7 +25,7 @@
#include <assert.h> #include <assert.h>
#include "cardmaps.h" #include "cardmaps.h"
Grandf::Grandf( KMainWindow* parent, const char *name ) Grandf::Grandf( TDEMainWindow* parent, const char *name )
: Dealer( parent, name ) : Dealer( parent, name )
{ {
deck = Deck::new_deck(this); deck = Deck::new_deck(this);
@ -221,7 +221,7 @@ static class LocalDealerInfo1 : public DealerInfo
{ {
public: public:
LocalDealerInfo1() : DealerInfo(I18N_NOOP("&Grandfather"), 1) {} LocalDealerInfo1() : DealerInfo(I18N_NOOP("&Grandfather"), 1) {}
virtual Dealer *createGame(KMainWindow *parent) { return new Grandf(parent); } virtual Dealer *createGame(TDEMainWindow *parent) { return new Grandf(parent); }
} gfdi; } gfdi;
#include "grandf.moc" #include "grandf.moc"

@ -29,17 +29,17 @@
#include "dealer.h" #include "dealer.h"
class KAction; class TDEAction;
class Pile; class Pile;
class Deck; class Deck;
class KMainWindow; class TDEMainWindow;
class Grandf : public Dealer { class Grandf : public Dealer {
Q_OBJECT Q_OBJECT
public: public:
Grandf( KMainWindow* parent=0, const char* name=0); Grandf( TDEMainWindow* parent=0, const char* name=0);
public slots: public slots:
void redeal(); void redeal();

@ -3,7 +3,7 @@
#include "deck.h" #include "deck.h"
#include "cardmaps.h" #include "cardmaps.h"
Gypsy::Gypsy( KMainWindow* parent, const char *name ) Gypsy::Gypsy( TDEMainWindow* parent, const char *name )
: Dealer( parent, name ) : Dealer( parent, name )
{ {
const int dist_x = cardMap::CARDX() * 11 / 10 + 1; const int dist_x = cardMap::CARDX() * 11 / 10 + 1;
@ -111,7 +111,7 @@ static class LocalDealerInfo7 : public DealerInfo
{ {
public: public:
LocalDealerInfo7() : DealerInfo(I18N_NOOP("Gy&psy"), 7) {} LocalDealerInfo7() : DealerInfo(I18N_NOOP("Gy&psy"), 7) {}
virtual Dealer *createGame(KMainWindow *parent) { return new Gypsy(parent); } virtual Dealer *createGame(TDEMainWindow *parent) { return new Gypsy(parent); }
} gyfdi; } gyfdi;
#include "gypsy.moc" #include "gypsy.moc"

@ -4,17 +4,17 @@
#include "dealer.h" #include "dealer.h"
class KAction; class TDEAction;
class Pile; class Pile;
class Deck; class Deck;
class KMainWindow; class TDEMainWindow;
class Gypsy : public Dealer { class Gypsy : public Dealer {
Q_OBJECT Q_OBJECT
public: public:
Gypsy( KMainWindow* parent=0, const char* name=0); Gypsy( TDEMainWindow* parent=0, const char* name=0);
virtual bool isGameLost() const; virtual bool isGameLost() const;
public slots: public slots:

@ -25,7 +25,7 @@
#include "cardmaps.h" #include "cardmaps.h"
Idiot::Idiot( KMainWindow* parent, const char* _name) Idiot::Idiot( TDEMainWindow* parent, const char* _name)
: Dealer( parent, _name ) : Dealer( parent, _name )
{ {
// Create the deck to the left. // Create the deck to the left.
@ -227,7 +227,7 @@ static class LocalDealerInfo2 : public DealerInfo
{ {
public: public:
LocalDealerInfo2() : DealerInfo(I18N_NOOP("&Aces Up"), 2) {} LocalDealerInfo2() : DealerInfo(I18N_NOOP("&Aces Up"), 2) {}
virtual Dealer *createGame(KMainWindow *parent) { return new Idiot(parent); } virtual Dealer *createGame(TDEMainWindow *parent) { return new Idiot(parent); }
} ldi4; } ldi4;

@ -33,7 +33,7 @@ class Idiot: public Dealer
public: public:
Idiot( KMainWindow* parent = 0, const char* name = 0 ); Idiot( TDEMainWindow* parent = 0, const char* name = 0 );
virtual bool isGameWon() const; virtual bool isGameWon() const;

@ -6,7 +6,7 @@
#include "freecell-solver/fcs_enums.h" #include "freecell-solver/fcs_enums.h"
#include "cardmaps.h" #include "cardmaps.h"
Kings::Kings( KMainWindow* parent, const char *name ) Kings::Kings( TDEMainWindow* parent, const char *name )
: FreecellBase( 2, 8, 8, FCS_ES_FILLED_BY_KINGS_ONLY, true, parent, name ) : FreecellBase( 2, 8, 8, FCS_ES_FILLED_BY_KINGS_ONLY, true, parent, name )
{ {
const int dist_x = cardMap::CARDX() * 11 / 10 + 1; const int dist_x = cardMap::CARDX() * 11 / 10 + 1;
@ -125,7 +125,7 @@ static class LocalDealerInfo12 : public DealerInfo
{ {
public: public:
LocalDealerInfo12() : DealerInfo(I18N_NOOP("&The Kings"), 12) {} LocalDealerInfo12() : DealerInfo(I18N_NOOP("&The Kings"), 12) {}
virtual Dealer *createGame(KMainWindow *parent) { return new Kings(parent); } virtual Dealer *createGame(TDEMainWindow *parent) { return new Kings(parent); }
} gfdi12; } gfdi12;
#endif #endif

@ -5,14 +5,14 @@
class Pile; class Pile;
class Deck; class Deck;
class KMainWindow; class TDEMainWindow;
class Kings : public FreecellBase { class Kings : public FreecellBase {
Q_OBJECT Q_OBJECT
public: public:
Kings( KMainWindow* parent=0, const char* name=0); Kings( TDEMainWindow* parent=0, const char* name=0);
virtual bool isGameLost() const; virtual bool isGameLost() const;
public slots: public slots:

@ -50,7 +50,7 @@ private:
CardList cardlist; CardList cardlist;
}; };
Klondike::Klondike( bool easy, KMainWindow* parent, const char* _name ) Klondike::Klondike( bool easy, TDEMainWindow* parent, const char* _name )
: Dealer( parent, _name ) : Dealer( parent, _name )
{ {
// The units of the follwoing constants are pixels // The units of the follwoing constants are pixels
@ -481,14 +481,14 @@ static class LocalDealerInfo0 : public DealerInfo
{ {
public: public:
LocalDealerInfo0() : DealerInfo(I18N_NOOP("&Klondike"), 0) {} LocalDealerInfo0() : DealerInfo(I18N_NOOP("&Klondike"), 0) {}
virtual Dealer *createGame(KMainWindow *parent) { return new Klondike(true, parent); } virtual Dealer *createGame(TDEMainWindow *parent) { return new Klondike(true, parent); }
} ldi0; } ldi0;
static class LocalDealerInfo14 : public DealerInfo static class LocalDealerInfo14 : public DealerInfo
{ {
public: public:
LocalDealerInfo14() : DealerInfo(I18N_NOOP("Klondike (&draw 3)"), 13) {} LocalDealerInfo14() : DealerInfo(I18N_NOOP("Klondike (&draw 3)"), 13) {}
virtual Dealer *createGame(KMainWindow *parent) { return new Klondike(false, parent); } virtual Dealer *createGame(TDEMainWindow *parent) { return new Klondike(false, parent); }
} ldi14; } ldi14;

@ -36,7 +36,7 @@ class Klondike : public Dealer {
public: public:
Klondike( bool easy, KMainWindow* parent=0, const char* name=0); Klondike( bool easy, TDEMainWindow* parent=0, const char* name=0);
public: public:
virtual void restart(); virtual void restart();

@ -26,7 +26,7 @@
//-------------------------------------------------------------------------// //-------------------------------------------------------------------------//
Mod3::Mod3( KMainWindow* parent, const char* _name) Mod3::Mod3( TDEMainWindow* parent, const char* _name)
: Dealer( parent, _name ) : Dealer( parent, _name )
{ {
const int dist_x = cardMap::CARDX() * 11 / 10 + 1; const int dist_x = cardMap::CARDX() * 11 / 10 + 1;
@ -301,7 +301,7 @@ static class LocalDealerInfo5 : public DealerInfo
{ {
public: public:
LocalDealerInfo5() : DealerInfo(I18N_NOOP("M&od3"), 5) {} LocalDealerInfo5() : DealerInfo(I18N_NOOP("M&od3"), 5) {}
virtual Dealer *createGame(KMainWindow *parent) { return new Mod3(parent); } virtual Dealer *createGame(TDEMainWindow *parent) { return new Mod3(parent); }
} ldi5; } ldi5;
//-------------------------------------------------------------------------// //-------------------------------------------------------------------------//

@ -31,7 +31,7 @@ class Mod3 : public Dealer
public: public:
Mod3( KMainWindow* parent=0, const char* name=0); Mod3( TDEMainWindow* parent=0, const char* name=0);
void deal(); void deal();

@ -22,7 +22,7 @@
#include "deck.h" #include "deck.h"
#include "cardmaps.h" #include "cardmaps.h"
Napoleon::Napoleon( KMainWindow* parent, const char* _name ) Napoleon::Napoleon( TDEMainWindow* parent, const char* _name )
: Dealer( parent, _name ) : Dealer( parent, _name )
{ {
deck = Deck::new_deck( this ); deck = Deck::new_deck( this );
@ -198,7 +198,7 @@ static class LocalDealerInfo4 : public DealerInfo
{ {
public: public:
LocalDealerInfo4() : DealerInfo(I18N_NOOP("&Napoleon's Tomb"), 4) {} LocalDealerInfo4() : DealerInfo(I18N_NOOP("&Napoleon's Tomb"), 4) {}
virtual Dealer *createGame(KMainWindow *parent) { return new Napoleon(parent); } virtual Dealer *createGame(TDEMainWindow *parent) { return new Napoleon(parent); }
} ldi3; } ldi3;
#include "napoleon.moc" #include "napoleon.moc"

@ -28,7 +28,7 @@ class Napoleon : public Dealer {
Q_OBJECT Q_OBJECT
public: public:
Napoleon (KMainWindow* parent=0, const char* name=0); Napoleon (TDEMainWindow* parent=0, const char* name=0);
virtual void restart(); virtual void restart();
virtual void getHints(); virtual void getHints();

@ -55,7 +55,7 @@ void saveGame(int) {
} }
pWidget::pWidget() pWidget::pWidget()
: KMainWindow(0, "pwidget"), dill(0) : TDEMainWindow(0, "pwidget"), dill(0)
{ {
current_pwidget = this; current_pwidget = this;
// KCrash::setEmergencySaveFunction(::saveGame); // KCrash::setEmergencySaveFunction(::saveGame);
@ -73,14 +73,14 @@ pWidget::pWidget()
recent->loadEntries(TDEGlobal::config()); recent->loadEntries(TDEGlobal::config());
(void)KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(saveGame()), (void)KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(saveGame()),
actionCollection(), "save"); actionCollection(), "save");
(void)new KAction(i18n("&Choose Game..."), 0, TQT_TQOBJECT(this), TQT_SLOT(chooseGame()), (void)new TDEAction(i18n("&Choose Game..."), 0, TQT_TQOBJECT(this), TQT_SLOT(chooseGame()),
actionCollection(), "choose_game"); actionCollection(), "choose_game");
(void)new KAction(i18n("Restart &Game"), TQString::fromLatin1("reload"), 0, (void)new TDEAction(i18n("Restart &Game"), TQString::fromLatin1("reload"), 0,
TQT_TQOBJECT(this), TQT_SLOT(restart()), TQT_TQOBJECT(this), TQT_SLOT(restart()),
actionCollection(), "restart_game"); actionCollection(), "restart_game");
(void)KStdAction::help(TQT_TQOBJECT(this), TQT_SLOT(helpGame()), actionCollection(), "help_game"); (void)KStdAction::help(TQT_TQOBJECT(this), TQT_SLOT(helpGame()), actionCollection(), "help_game");
games = new KSelectAction(i18n("&Game Type"), 0, TQT_TQOBJECT(this), games = new TDESelectAction(i18n("&Game Type"), 0, TQT_TQOBJECT(this),
TQT_SLOT(newGameType()), TQT_SLOT(newGameType()),
actionCollection(), "game_type"); actionCollection(), "game_type");
TQStringList list; TQStringList list;
@ -104,7 +104,7 @@ pWidget::pWidget()
TDEGlobal::dirs()->addResourceType("wallpaper", TDEStandardDirs::kde_default("data") + "kpat/backgrounds/"); TDEGlobal::dirs()->addResourceType("wallpaper", TDEStandardDirs::kde_default("data") + "kpat/backgrounds/");
TDEGlobal::dirs()->addResourceType("wallpaper", TDEStandardDirs::kde_default("data") + "ksnake/backgrounds/"); TDEGlobal::dirs()->addResourceType("wallpaper", TDEStandardDirs::kde_default("data") + "ksnake/backgrounds/");
wallpapers = new KSelectAction(i18n("&Change Background"), 0, TQT_TQOBJECT(this), wallpapers = new TDESelectAction(i18n("&Change Background"), 0, TQT_TQOBJECT(this),
TQT_SLOT(changeWallpaper()), TQT_SLOT(changeWallpaper()),
actionCollection(), "wallpaper"); actionCollection(), "wallpaper");
list.clear(); list.clear();
@ -131,16 +131,16 @@ pWidget::pWidget()
(void)new cardMap(midcolor); (void)new cardMap(midcolor);
backs = new KAction(i18n("&Switch Cards..."), 0, TQT_TQOBJECT(this), backs = new TDEAction(i18n("&Switch Cards..."), 0, TQT_TQOBJECT(this),
TQT_SLOT(changeBackside()), TQT_SLOT(changeBackside()),
actionCollection(), "backside"); actionCollection(), "backside");
stats = new KAction(i18n("&Statistics"), 0, TQT_TQOBJECT(this), TQT_SLOT(showStats()), stats = new TDEAction(i18n("&Statistics"), 0, TQT_TQOBJECT(this), TQT_SLOT(showStats()),
actionCollection(),"game_stats"); actionCollection(),"game_stats");
animation = new KToggleAction(i18n( "&Animation on Startup" ), animation = new TDEToggleAction(i18n( "&Animation on Startup" ),
0, TQT_TQOBJECT(this), TQT_SLOT(animationChanged()), 0, TQT_TQOBJECT(this), TQT_SLOT(animationChanged()),
actionCollection(), "animation"); actionCollection(), "animation");
dropaction = new KToggleAction(i18n("&Enable Autodrop"), dropaction = new TDEToggleAction(i18n("&Enable Autodrop"),
0, TQT_TQOBJECT(this), TQT_SLOT(enableAutoDrop()), 0, TQT_TQOBJECT(this), TQT_SLOT(enableAutoDrop()),
actionCollection(), "enable_autodrop"); actionCollection(), "enable_autodrop");
dropaction->setCheckedState(i18n("Disable Autodrop")); dropaction->setCheckedState(i18n("Disable Autodrop"));
@ -168,7 +168,7 @@ pWidget::pWidget()
statusBar()->insertItem( "", 1, 0, true ); statusBar()->insertItem( "", 1, 0, true );
createGUI(TQString(), false); createGUI(TQString(), false);
KAcceleratorManager::manage(menuBar()); TDEAcceleratorManager::manage(menuBar());
newGameType(); newGameType();
adjustSize(); adjustSize();
@ -394,7 +394,7 @@ void pWidget::showEvent(TQShowEvent *e)
{ {
if (dill) if (dill)
dill->setMinimumSize(TQSize(0,0)); dill->setMinimumSize(TQSize(0,0));
KMainWindow::showEvent(e); TDEMainWindow::showEvent(e);
} }
void pWidget::slotGameInfo(const TQString &text) void pWidget::slotGameInfo(const TQString &text)

@ -26,14 +26,14 @@
#include <kmainwindow.h> #include <kmainwindow.h>
class Dealer; class Dealer;
class KToggleAction; class TDEToggleAction;
class KSelectAction; class TDESelectAction;
class KRecentFilesAction; class TDERecentFilesAction;
class KAction; class TDEAction;
class TQWidgetStack; class TQWidgetStack;
class TQLabel; class TQLabel;
class pWidget: public KMainWindow { class pWidget: public TDEMainWindow {
Q_OBJECT Q_OBJECT
@ -74,18 +74,18 @@ private:
Dealer *dill; // The current patience Dealer *dill; // The current patience
KSelectAction *games; TDESelectAction *games;
KSelectAction *wallpapers; TDESelectAction *wallpapers;
KAction *backs; TDEAction *backs;
KAction *undo; TDEAction *undo;
KToggleAction *animation; TDEToggleAction *animation;
KToggleAction *dropaction; TDEToggleAction *dropaction;
KAction *stats; TDEAction *stats;
TQPixmap background; TQPixmap background;
TQColor midcolor; TQColor midcolor;
TQStringList wallpaperlist; TQStringList wallpaperlist;
KRecentFilesAction *recent; TDERecentFilesAction *recent;
}; };
#endif #endif

@ -5,7 +5,7 @@
#include <assert.h> #include <assert.h>
#include "cardmaps.h" #include "cardmaps.h"
Simon::Simon( KMainWindow* parent, const char *name ) Simon::Simon( TDEMainWindow* parent, const char *name )
: Dealer( parent, name ) : Dealer( parent, name )
{ {
deck = Deck::new_deck(this); deck = Deck::new_deck(this);
@ -150,7 +150,7 @@ static class LocalDealerInfo9 : public DealerInfo
{ {
public: public:
LocalDealerInfo9() : DealerInfo(I18N_NOOP("&Simple Simon"), 9) {} LocalDealerInfo9() : DealerInfo(I18N_NOOP("&Simple Simon"), 9) {}
virtual Dealer *createGame(KMainWindow *parent) { return new Simon(parent); } virtual Dealer *createGame(TDEMainWindow *parent) { return new Simon(parent); }
} gfi9; } gfi9;
#include "simon.moc" #include "simon.moc"

@ -8,7 +8,7 @@ class Simon : public Dealer {
public: public:
Simon( KMainWindow* parent=0, const char* name=0); Simon( TDEMainWindow* parent=0, const char* name=0);
public slots: public slots:
void deal(); void deal();

@ -48,7 +48,7 @@ void SpiderPile::moveCards(CardList &c, Pile *to)
//-------------------------------------------------------------------------// //-------------------------------------------------------------------------//
Spider::Spider(int suits, KMainWindow* parent, const char* _name) Spider::Spider(int suits, TDEMainWindow* parent, const char* _name)
: Dealer(parent, _name) : Dealer(parent, _name)
{ {
const int dist_x = cardMap::CARDX() * 11 / 10 + 1; const int dist_x = cardMap::CARDX() * 11 / 10 + 1;
@ -459,21 +459,21 @@ static class LocalDealerInfo15 : public DealerInfo
{ {
public: public:
LocalDealerInfo15() : DealerInfo(I18N_NOOP("S&pider (Easy)"), 14) {} LocalDealerInfo15() : DealerInfo(I18N_NOOP("S&pider (Easy)"), 14) {}
virtual Dealer *createGame(KMainWindow *parent) { return new Spider(1, parent); } virtual Dealer *createGame(TDEMainWindow *parent) { return new Spider(1, parent); }
} ldi15; } ldi15;
static class LocalDealerInfo16 : public DealerInfo static class LocalDealerInfo16 : public DealerInfo
{ {
public: public:
LocalDealerInfo16() : DealerInfo(I18N_NOOP("Spider (&Medium)"), 15) {} LocalDealerInfo16() : DealerInfo(I18N_NOOP("Spider (&Medium)"), 15) {}
virtual Dealer *createGame(KMainWindow *parent) { return new Spider(2, parent); } virtual Dealer *createGame(TDEMainWindow *parent) { return new Spider(2, parent); }
} ldi16; } ldi16;
static class LocalDealerInfo17 : public DealerInfo static class LocalDealerInfo17 : public DealerInfo
{ {
public: public:
LocalDealerInfo17() : DealerInfo(I18N_NOOP("Spider (&Hard)"), 16) {} LocalDealerInfo17() : DealerInfo(I18N_NOOP("Spider (&Hard)"), 16) {}
virtual Dealer *createGame(KMainWindow *parent) { return new Spider(4, parent); } virtual Dealer *createGame(TDEMainWindow *parent) { return new Spider(4, parent); }
} ldi17; } ldi17;
//-------------------------------------------------------------------------// //-------------------------------------------------------------------------//

@ -37,7 +37,7 @@ class Spider : public Dealer
public: public:
Spider(int suits, KMainWindow *parent=0, const char *name=0); Spider(int suits, TDEMainWindow *parent=0, const char *name=0);
void deal(); void deal();
void dealRow(); void dealRow();
void checkPileDeck(Pile *to); void checkPileDeck(Pile *to);

@ -5,7 +5,7 @@
#include <assert.h> #include <assert.h>
#include "cardmaps.h" #include "cardmaps.h"
Yukon::Yukon( KMainWindow* parent, const char *name ) Yukon::Yukon( TDEMainWindow* parent, const char *name )
: Dealer( parent, name ) : Dealer( parent, name )
{ {
const int dist_x = cardMap::CARDX() * 11 / 10 + 1; const int dist_x = cardMap::CARDX() * 11 / 10 + 1;
@ -124,7 +124,7 @@ static class LocalDealerInfo10 : public DealerInfo
{ {
public: public:
LocalDealerInfo10() : DealerInfo(I18N_NOOP("&Yukon"), 10) {} LocalDealerInfo10() : DealerInfo(I18N_NOOP("&Yukon"), 10) {}
virtual Dealer *createGame(KMainWindow *parent) { return new Yukon(parent); } virtual Dealer *createGame(TDEMainWindow *parent) { return new Yukon(parent); }
} gfi10; } gfi10;
#include "yukon.moc" #include "yukon.moc"

@ -8,7 +8,7 @@ class Yukon : public Dealer {
public: public:
Yukon( KMainWindow* parent=0, const char* name=0); Yukon( TDEMainWindow* parent=0, const char* name=0);
virtual bool isGameLost() const; virtual bool isGameLost() const;
public slots: public slots:

@ -63,7 +63,7 @@ PokerWindow::PokerWindow()
m_kpok->updateLHLabel(); m_kpok->updateLHLabel();
//FIXME: LHLabel is shown twize until the bar is repainted! //FIXME: LHLabel is shown twize until the bar is repainted!
initKAction(); initTDEAction();
readOptions(); readOptions();
} }
@ -76,7 +76,7 @@ PokerWindow::~PokerWindow()
// ---------------------------------------------------------------- // ----------------------------------------------------------------
void PokerWindow::initKAction() void PokerWindow::initTDEAction()
{ {
//Game //Game
KStdGameAction::gameNew(TQT_TQOBJECT(m_kpok), TQT_SLOT(newGame()), actionCollection()); KStdGameAction::gameNew(TQT_TQOBJECT(m_kpok), TQT_SLOT(newGame()), actionCollection());
@ -87,15 +87,15 @@ void PokerWindow::initKAction()
showMenubarAction = showMenubarAction =
KStdAction::showMenubar(TQT_TQOBJECT(this), TQT_SLOT(toggleMenubar()), actionCollection()); KStdAction::showMenubar(TQT_TQOBJECT(this), TQT_SLOT(toggleMenubar()), actionCollection());
soundAction = new KToggleAction(i18n("Soun&d"), 0, TQT_TQOBJECT(m_kpok), soundAction = new TDEToggleAction(i18n("Soun&d"), 0, TQT_TQOBJECT(m_kpok),
TQT_SLOT(toggleSound()), actionCollection(), "options_sound"); TQT_SLOT(toggleSound()), actionCollection(), "options_sound");
if (m_kpok->getSound()) if (m_kpok->getSound())
m_kpok->toggleSound(); m_kpok->toggleSound();
blinkingAction = new KToggleAction(i18n("&Blinking Cards"), 0, TQT_TQOBJECT(m_kpok), blinkingAction = new TDEToggleAction(i18n("&Blinking Cards"), 0, TQT_TQOBJECT(m_kpok),
TQT_SLOT(toggleBlinking()), actionCollection(), "options_blinking"); TQT_SLOT(toggleBlinking()), actionCollection(), "options_blinking");
if (m_kpok->getBlinking()) if (m_kpok->getBlinking())
m_kpok->toggleBlinking(); m_kpok->toggleBlinking();
adjustAction = new KToggleAction(i18n("&Adjust Bet is Default"), 0, adjustAction = new TDEToggleAction(i18n("&Adjust Bet is Default"), 0,
TQT_TQOBJECT(m_kpok), TQT_SLOT(toggleAdjust()), actionCollection(), "options_adjust"); TQT_TQOBJECT(m_kpok), TQT_SLOT(toggleAdjust()), actionCollection(), "options_adjust");
if (m_kpok->getAdjust()) if (m_kpok->getAdjust())
m_kpok->toggleAdjust(); m_kpok->toggleAdjust();
@ -108,20 +108,20 @@ void PokerWindow::initKAction()
KStdAction::preferences(TQT_TQOBJECT(m_kpok), TQT_SLOT(slotPreferences()), actionCollection()); KStdAction::preferences(TQT_TQOBJECT(m_kpok), TQT_SLOT(slotPreferences()), actionCollection());
// Keyboard shortcuts. // Keyboard shortcuts.
(void)new KAction(i18n("Draw"), KShortcut(TQt::Key_Return), TQT_TQOBJECT(m_kpok), (void)new TDEAction(i18n("Draw"), TDEShortcut(TQt::Key_Return), TQT_TQOBJECT(m_kpok),
TQT_SLOT(drawClick()), actionCollection(), "draw"); TQT_SLOT(drawClick()), actionCollection(), "draw");
(void)new KAction(i18n("Exchange Card 1"), KShortcut(TQt::Key_1), TQT_TQOBJECT(m_kpok), (void)new TDEAction(i18n("Exchange Card 1"), TDEShortcut(TQt::Key_1), TQT_TQOBJECT(m_kpok),
TQT_SLOT(exchangeCard1()), actionCollection(), "exchange_card_1"); TQT_SLOT(exchangeCard1()), actionCollection(), "exchange_card_1");
(void)new KAction(i18n("Exchange Card 2"), KShortcut(TQt::Key_2), TQT_TQOBJECT(m_kpok), (void)new TDEAction(i18n("Exchange Card 2"), TDEShortcut(TQt::Key_2), TQT_TQOBJECT(m_kpok),
TQT_SLOT(exchangeCard2()), actionCollection(), "exchange_card_2"); TQT_SLOT(exchangeCard2()), actionCollection(), "exchange_card_2");
(void)new KAction(i18n("Exchange Card 3"), KShortcut(TQt::Key_3), TQT_TQOBJECT(m_kpok), (void)new TDEAction(i18n("Exchange Card 3"), TDEShortcut(TQt::Key_3), TQT_TQOBJECT(m_kpok),
TQT_SLOT(exchangeCard3()), actionCollection(), "exchange_card_3"); TQT_SLOT(exchangeCard3()), actionCollection(), "exchange_card_3");
(void)new KAction(i18n("Exchange Card 4"), KShortcut(TQt::Key_4), TQT_TQOBJECT(m_kpok), (void)new TDEAction(i18n("Exchange Card 4"), TDEShortcut(TQt::Key_4), TQT_TQOBJECT(m_kpok),
TQT_SLOT(exchangeCard4()), actionCollection(), "exchange_card_4"); TQT_SLOT(exchangeCard4()), actionCollection(), "exchange_card_4");
(void)new KAction(i18n("Exchange Card 5"), KShortcut(TQt::Key_5), TQT_TQOBJECT(m_kpok), (void)new TDEAction(i18n("Exchange Card 5"), TDEShortcut(TQt::Key_5), TQT_TQOBJECT(m_kpok),
TQT_SLOT(exchangeCard5()), actionCollection(), "exchange_card_5"); TQT_SLOT(exchangeCard5()), actionCollection(), "exchange_card_5");
setupGUI( KMainWindow::Save | StatusBar | Keys | Create); setupGUI( TDEMainWindow::Save | StatusBar | Keys | Create);
} }
@ -168,7 +168,7 @@ void PokerWindow::toggleStatusbar()
/* Ask the user if he/she wants to save the game. This virtual method /* Ask the user if he/she wants to save the game. This virtual method
* is called from the Quit KAction (I think). * is called from the Quit TDEAction (I think).
*/ */
bool PokerWindow::queryClose() bool PokerWindow::queryClose()

@ -23,11 +23,11 @@
class TQLabel; class TQLabel;
class KToggleAction; class TDEToggleAction;
class kpok; class kpok;
class PokerWindow : public KMainWindow class PokerWindow : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -39,7 +39,7 @@ class PokerWindow : public KMainWindow
protected: protected:
virtual bool queryClose(); virtual bool queryClose();
bool eventFilter(TQObject*, TQEvent*); bool eventFilter(TQObject*, TQEvent*);
void initKAction(); void initTDEAction();
void readOptions(); void readOptions();
protected slots: protected slots:
@ -56,11 +56,11 @@ class PokerWindow : public KMainWindow
private: private:
kpok *m_kpok; kpok *m_kpok;
KToggleAction *soundAction; TDEToggleAction *soundAction;
KToggleAction *blinkingAction; TDEToggleAction *blinkingAction;
KToggleAction *adjustAction; TDEToggleAction *adjustAction;
KToggleAction *showMenubarAction; TDEToggleAction *showMenubarAction;
KToggleAction *showStatusbarAction; TDEToggleAction *showStatusbarAction;
// statusbar elements: // statusbar elements:
TQLabel *LHLabel; TQLabel *LHLabel;

@ -317,7 +317,7 @@
2004-09-25 Inge Wallin <inge@lysator.liu.se> 2004-09-25 Inge Wallin <inge@lysator.liu.se>
Transfer the rest of the slots for KActions to kreversi.cpp Transfer the rest of the slots for TDEActions to kreversi.cpp
* Board::interrupt() -> KReversi::slotInterrupt() * Board::interrupt() -> KReversi::slotInterrupt()
* Board::doContinue() -> KReversi::slotContinue() * Board::doContinue() -> KReversi::slotContinue()
@ -332,7 +332,7 @@
Start the work to port KReversi to KGame/Kplayer: Start the work to port KReversi to KGame/Kplayer:
Transfer the slots for most KActions to kreversi.cpp Transfer the slots for most TDEActions to kreversi.cpp
* Board::undo() -> KReversi::slotUndo() * Board::undo() -> KReversi::slotUndo()
(Board::doUndo()): Do the real work of undoing. (Board::doUndo()): Do the real work of undoing.
* Board->hint() -> KReversi::slotHint() * Board->hint() -> KReversi::slotHint()

@ -102,7 +102,7 @@ QReversiBoardView
KReversi KReversi
The main class for the KReversi program The main class for the KReversi program
Contains: KActions Contains: TDEActions
*QReversiGame (owner) *QReversiGame (owner)
*KReversiGameView (owner) *KReversiGameView (owner)
*Engine (owner) *Engine (owner)

@ -46,7 +46,7 @@ Next
1. Fix a ReversiGame (formerly known as Game) DONE 1. Fix a ReversiGame (formerly known as Game) DONE
- Clean it up. (Only store the moves). - Clean it up. (Only store the moves).
- Add a few necessary methods. - Add a few necessary methods.
2. Move all the slots for KActions to kreversi.cpp DONE 2. Move all the slots for TDEActions to kreversi.cpp DONE
3. Move the ownership of the engine and the game to kreversi. DONE 3. Move the ownership of the engine and the game to kreversi. DONE
4. Create a new class QReversiGame, that inherits ReversiGame DONE 4. Create a new class QReversiGame, that inherits ReversiGame DONE
and sends a lot of signals. and sends a lot of signals.

@ -108,7 +108,7 @@ KReversi::KReversi()
top->addMultiCellWidget(m_gameView, 0, 1, 0, 0); top->addMultiCellWidget(m_gameView, 0, 1, 0, 0);
// Populate the GUI. // Populate the GUI.
createKActions(); createTDEActions();
addWidget(m_gameView); addWidget(m_gameView);
// Connect the signals from the game with slots of the view // Connect the signals from the game with slots of the view
@ -144,10 +144,10 @@ KReversi::~KReversi()
// Create all KActions used in KReversi. // Create all TDEActions used in KReversi.
// //
void KReversi::createKActions() void KReversi::createTDEActions()
{ {
// Standard Game Actions. // Standard Game Actions.
KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(slotNewGame()), actionCollection(), KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(slotNewGame()), actionCollection(),
@ -161,13 +161,13 @@ void KReversi::createKActions()
"game_undo"); "game_undo");
// Non-standard Game Actions: Stop, Continue, Switch sides // Non-standard Game Actions: Stop, Continue, Switch sides
stopAction = new KAction(i18n("&Stop Thinking"), "game_stop", TQt::Key_Escape, stopAction = new TDEAction(i18n("&Stop Thinking"), "game_stop", TQt::Key_Escape,
TQT_TQOBJECT(this), TQT_SLOT(slotInterrupt()), actionCollection(), TQT_TQOBJECT(this), TQT_SLOT(slotInterrupt()), actionCollection(),
"game_stop"); "game_stop");
continueAction = new KAction(i18n("&Continue Thinking"), "reload", 0, continueAction = new TDEAction(i18n("&Continue Thinking"), "reload", 0,
TQT_TQOBJECT(this), TQT_SLOT(slotContinue()), actionCollection(), TQT_TQOBJECT(this), TQT_SLOT(slotContinue()), actionCollection(),
"game_continue"); "game_continue");
new KAction(i18n("S&witch Sides"), 0, 0, new TDEAction(i18n("S&witch Sides"), 0, 0,
TQT_TQOBJECT(this), TQT_SLOT(slotSwitchSides()), actionCollection(), TQT_TQOBJECT(this), TQT_SLOT(slotSwitchSides()), actionCollection(),
"game_switch_sides"); "game_switch_sides");
@ -176,11 +176,11 @@ void KReversi::createKActions()
KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotEditSettings()), actionCollection()); KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotEditSettings()), actionCollection());
// Actions for the view(s). // Actions for the view(s).
showLastMoveAction = new KToggleAction(i18n("Show Last Move"), "lastmoves", 0, showLastMoveAction = new TDEToggleAction(i18n("Show Last Move"), "lastmoves", 0,
TQT_TQOBJECT(this), TQT_SLOT(slotShowLastMove()), TQT_TQOBJECT(this), TQT_SLOT(slotShowLastMove()),
actionCollection(), actionCollection(),
"show_last_move"); "show_last_move");
showLegalMovesAction = new KToggleAction(i18n("Show Legal Moves"), "legalmoves", 0, showLegalMovesAction = new TDEToggleAction(i18n("Show Legal Moves"), "legalmoves", 0,
TQT_TQOBJECT(this), TQT_SLOT(slotShowLegalMoves()), TQT_TQOBJECT(this), TQT_SLOT(slotShowLegalMoves()),
actionCollection(), actionCollection(),
"show_legal_moves"); "show_legal_moves");
@ -209,7 +209,7 @@ void KReversi::setStrength(uint strength)
// ---------------------------------------------------------------- // ----------------------------------------------------------------
// Slots for KActions // Slots for TDEActions
// A slot that is called when the user wants a new game. // A slot that is called when the user wants a new game.

@ -53,7 +53,7 @@
class TQLabel; class TQLabel;
class KAction; class TDEAction;
class KReversi : public KZoomMainWindow class KReversi : public KZoomMainWindow
@ -88,7 +88,7 @@ public:
private: private:
// Initialisation // Initialisation
void createKActions(); void createTDEActions();
// View functions. // View functions.
TQString getPlayerName(); TQString getPlayerName();
@ -105,7 +105,7 @@ private:
private slots: private slots:
// Slots for KActions. // Slots for TDEActions.
void slotNewGame(); void slotNewGame();
void slotOpenGame(); void slotOpenGame();
void slotSave(); void slotSave();
@ -113,7 +113,7 @@ private slots:
void slotUndo(); void slotUndo();
void slotSwitchSides(); void slotSwitchSides();
// Interrupt and continue the engines thinking (also KActions). // Interrupt and continue the engines thinking (also TDEActions).
void slotInterrupt(); void slotInterrupt();
void slotContinue(); void slotContinue();
void slotShowLastMove(); void slotShowLastMove();
@ -151,11 +151,11 @@ private:
private: private:
// Some Actions that need to be manipulated. // Some Actions that need to be manipulated.
KAction *stopAction; TDEAction *stopAction;
KAction *continueAction; TDEAction *continueAction;
KToggleAction *showLastMoveAction; TDEToggleAction *showLastMoveAction;
KToggleAction *showLegalMovesAction; TDEToggleAction *showLegalMovesAction;
// The game itself and game properties // The game itself and game properties
QReversiGame *m_game; // The main document - the game QReversiGame *m_game; // The main document - the game

@ -29,7 +29,7 @@
KZoomMainWindow::KZoomMainWindow(uint min, uint max, uint step, KZoomMainWindow::KZoomMainWindow(uint min, uint max, uint step,
const char *name) const char *name)
: KMainWindow(0, name), m_zoomStep(step), m_minZoom(min), m_maxZoom(max) : TDEMainWindow(0, name), m_zoomStep(step), m_minZoom(min), m_maxZoom(max)
{ {
installEventFilter(this); installEventFilter(this);
@ -87,7 +87,7 @@ bool KZoomMainWindow::eventFilter(TQObject *o, TQEvent *e)
setFixedSize(minimumSize()); // because K/TQMainWindow setFixedSize(minimumSize()); // because K/TQMainWindow
// does not manage fixed central widget // does not manage fixed central widget
// with hidden menubar... // with hidden menubar...
return KMainWindow::eventFilter(o, e); return TDEMainWindow::eventFilter(o, e);
} }
@ -131,5 +131,5 @@ bool KZoomMainWindow::queryExit()
{ {
writeMenubarVisibleSetting(m_menu->isChecked()); writeMenubarVisibleSetting(m_menu->isChecked());
return KMainWindow::queryExit(); return TDEMainWindow::queryExit();
} }

@ -25,7 +25,7 @@
#include <kmainwindow.h> #include <kmainwindow.h>
class KToggleAction; class TDEToggleAction;
/** /**
@ -44,7 +44,7 @@ class KToggleAction;
* of a context popup menu (useful to restore the menubar when hidden). * of a context popup menu (useful to restore the menubar when hidden).
*/ */
class KZoomMainWindow : public KMainWindow class KZoomMainWindow : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -127,9 +127,9 @@ private:
TQPtrList<TQWidget> m_widgets; TQPtrList<TQWidget> m_widgets;
KAction *m_zoomInAction; TDEAction *m_zoomInAction;
KAction *m_zoomOutAction; TDEAction *m_zoomOutAction;
KToggleAction *m_menu; TDEToggleAction *m_menu;
class KZoomMainWindowPrivate; class KZoomMainWindowPrivate;
KZoomMainWindowPrivate *d; KZoomMainWindowPrivate *d;

@ -47,17 +47,17 @@ static int default_colors=3;
#define Board KScoreDialog::Custom1 #define Board KScoreDialog::Custom1
KSameWidget::KSameWidget(TQWidget *parent, const char* name, WFlags fl) : KSameWidget::KSameWidget(TQWidget *parent, const char* name, WFlags fl) :
KMainWindow(parent,name,fl) TDEMainWindow(parent,name,fl)
{ {
KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(m_new()), actionCollection(), "game_new"); KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(m_new()), actionCollection(), "game_new");
restart = new KAction(i18n("&Restart This Board"), CTRL+Key_R, TQT_TQOBJECT(this), restart = new TDEAction(i18n("&Restart This Board"), CTRL+Key_R, TQT_TQOBJECT(this),
TQT_SLOT(m_restart()), actionCollection(), "game_restart"); TQT_SLOT(m_restart()), actionCollection(), "game_restart");
KStdGameAction::highscores(TQT_TQOBJECT(this), TQT_SLOT(m_showhs()), actionCollection(), "game_highscores"); KStdGameAction::highscores(TQT_TQOBJECT(this), TQT_SLOT(m_showhs()), actionCollection(), "game_highscores");
KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection(), "game_quit"); KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection(), "game_quit");
undo = KStdGameAction::undo(TQT_TQOBJECT(this), TQT_SLOT(m_undo()), actionCollection(), "edit_undo"); undo = KStdGameAction::undo(TQT_TQOBJECT(this), TQT_SLOT(m_undo()), actionCollection(), "edit_undo");
random = new KToggleAction(i18n("&Random Board"), 0, 0, 0, actionCollection(), "random_board"); random = new TDEToggleAction(i18n("&Random Board"), 0, 0, 0, actionCollection(), "random_board");
showNumberRemaining = new KToggleAction(i18n("&Show Number Remaining"), 0, TQT_TQOBJECT(this), TQT_SLOT(showNumberRemainingToggled()), actionCollection(), "showNumberRemaining"); showNumberRemaining = new TDEToggleAction(i18n("&Show Number Remaining"), 0, TQT_TQOBJECT(this), TQT_SLOT(showNumberRemainingToggled()), actionCollection(), "showNumberRemaining");
KStdAction::configureNotifications(TQT_TQOBJECT(this), TQT_SLOT(configureNotifications()), KStdAction::configureNotifications(TQT_TQOBJECT(this), TQT_SLOT(configureNotifications()),
actionCollection()); actionCollection());
@ -85,7 +85,7 @@ KSameWidget::KSameWidget(TQWidget *parent, const char* name, WFlags fl) :
// Once the main view can scale then use defualt setupGUI() and remove the // Once the main view can scale then use defualt setupGUI() and remove the
// noMerge="1" from the uirc file // noMerge="1" from the uirc file
// StatusBar | ToolBar // StatusBar | ToolBar
setupGUI(KMainWindow::Save | Keys | Create ); setupGUI(TDEMainWindow::Save | Keys | Create );
random->setChecked(true); random->setChecked(true);
setScore(0); setScore(0);

@ -24,10 +24,10 @@
#include <kmainwindow.h> #include <kmainwindow.h>
class KToggleAction; class TDEToggleAction;
class StoneWidget; class StoneWidget;
class KSameWidget: public KMainWindow { class KSameWidget: public TDEMainWindow {
Q_OBJECT Q_OBJECT
@ -69,10 +69,10 @@ private:
StoneWidget *stone; StoneWidget *stone;
KStatusBar *status; KStatusBar *status;
KToggleAction *random; TDEToggleAction *random;
KToggleAction *showNumberRemaining; TDEToggleAction *showNumberRemaining;
KAction *restart; TDEAction *restart;
KAction *undo; TDEAction *undo;
}; };

@ -62,7 +62,7 @@
#include "prefs.h" #include "prefs.h"
#include "settings.h" #include "settings.h"
App::App(TQWidget *parent, const char *name) : KMainWindow(parent, name), App::App(TQWidget *parent, const char *name) : TDEMainWindow(parent, name),
cheat(false) cheat(false)
{ {
highscoreTable = new KHighscore(TQT_TQOBJECT(this)); highscoreTable = new KHighscore(TQT_TQOBJECT(this));
@ -80,7 +80,7 @@ App::App(TQWidget *parent, const char *name) : KMainWindow(parent, name),
statusBar()->insertFixedItem(i18n(" Cheat mode "), SBI_CHEAT); statusBar()->insertFixedItem(i18n(" Cheat mode "), SBI_CHEAT);
statusBar()->changeItem("", SBI_CHEAT); statusBar()->changeItem("", SBI_CHEAT);
initKAction(); initTDEAction();
board = new Board(this, "board"); board = new Board(this, "board");
loadSettings(); loadSettings();
@ -103,7 +103,7 @@ App::App(TQWidget *parent, const char *name) : KMainWindow(parent, name),
enableItems(); enableItems();
} }
void App::initKAction() void App::initTDEAction()
{ {
// Game // Game
KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(newGame()), actionCollection()); KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(newGame()), actionCollection());
@ -116,11 +116,11 @@ void App::initKAction()
KStdGameAction::undo(TQT_TQOBJECT(this), TQT_SLOT(undo()), actionCollection()); KStdGameAction::undo(TQT_TQOBJECT(this), TQT_SLOT(undo()), actionCollection());
KStdGameAction::redo(TQT_TQOBJECT(this), TQT_SLOT(redo()), actionCollection()); KStdGameAction::redo(TQT_TQOBJECT(this), TQT_SLOT(redo()), actionCollection());
KStdGameAction::hint(TQT_TQOBJECT(this), TQT_SLOT(hint()), actionCollection()); KStdGameAction::hint(TQT_TQOBJECT(this), TQT_SLOT(hint()), actionCollection());
//new KAction(i18n("Is Game Solvable?"), 0, this, //new TDEAction(i18n("Is Game Solvable?"), 0, this,
// TQT_SLOT(isSolvable()), actionCollection(), "move_solvable"); // TQT_SLOT(isSolvable()), actionCollection(), "move_solvable");
#ifdef DEBUGGING #ifdef DEBUGGING
(void)new KAction(i18n("&Finish"), 0, board, TQT_SLOT(finish()), actionCollection(), "move_finish"); (void)new TDEAction(i18n("&Finish"), 0, board, TQT_SLOT(finish()), actionCollection(), "move_finish");
#endif #endif
// Settings // Settings
@ -209,7 +209,7 @@ void App::loadSettings()
{ {
TQSize s = board->unscaledSize(); TQSize s = board->unscaledSize();
// We would have liked to have used KMainWindow::sizeForCentralWidgetSize(), // We would have liked to have used TDEMainWindow::sizeForCentralWidgetSize(),
// but this function does not seem to work when the toolbar is docked on the // but this function does not seem to work when the toolbar is docked on the
// left. sizeForCentralWidgetSize() even reports a value 1 pixel too small // left. sizeForCentralWidgetSize() even reports a value 1 pixel too small
// when the toolbar is docked at the top... // when the toolbar is docked at the top...
@ -227,14 +227,14 @@ void App::lockMenus(bool lock)
// Disable all actions apart from (un)pause, quit and those that are help-related. // Disable all actions apart from (un)pause, quit and those that are help-related.
// (Only undo/redo and hint actually *need* to be disabled, but disabling everything // (Only undo/redo and hint actually *need* to be disabled, but disabling everything
// provides a good visual hint to the user, that they need to unpause to continue. // provides a good visual hint to the user, that they need to unpause to continue.
KPopupMenu* help = dynamic_cast<KPopupMenu*>(child("help", "KPopupMenu", false)); TDEPopupMenu* help = dynamic_cast<TDEPopupMenu*>(child("help", "TDEPopupMenu", false));
KActionPtrList actions = actionCollection()->actions(); TDEActionPtrList actions = actionCollection()->actions();
KActionPtrList::iterator actionIter = actions.begin(); TDEActionPtrList::iterator actionIter = actions.begin();
KActionPtrList::iterator actionIterEnd = actions.end(); TDEActionPtrList::iterator actionIterEnd = actions.end();
while(actionIter != actionIterEnd) while(actionIter != actionIterEnd)
{ {
KAction* a = *actionIter; TDEAction* a = *actionIter;
if(!a->isPlugged(help)) if(!a->isPlugged(help))
a->setEnabled(!lock); a->setEnabled(!lock);
++actionIter; ++actionIter;

@ -59,7 +59,7 @@ struct HighScore
const unsigned HIGHSCORE_MAX = 10; const unsigned HIGHSCORE_MAX = 10;
class App : public KMainWindow class App : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -105,7 +105,7 @@ private:
bool isBetter(const HighScore &, const HighScore &); bool isBetter(const HighScore &, const HighScore &);
void showHighscore(int focusitem = -1); void showHighscore(int focusitem = -1);
void initKAction(); void initTDEAction();
void setCheatMode(); void setCheatMode();
void resetCheatMode(); void resetCheatMode();

@ -37,7 +37,7 @@
2.1.6 (6 June 2002) 2.1.6 (6 June 2002)
* simplify start/pause button (ugly with large texts) * simplify start/pause button (ugly with large texts)
* arcade mode (only 6 levels) for KSirtet [idea by Douglas Smith] * arcade mode (only 6 levels) for KSirtet [idea by Douglas Smith]
* KAccel is not used anymore... * TDEAccel is not used anymore...
* some code cleanup and separation of source directories * some code cleanup and separation of source directories
2.1.5 (16 April 2002) 2.1.5 (16 April 2002)
@ -126,7 +126,7 @@
tdelibs/kaccel ; thanks to Chris] tdelibs/kaccel ; thanks to Chris]
2.0.3 2.0.3
* use of KMainWindow + interception of LayoutHint events to fix the resize * use of TDEMainWindow + interception of LayoutHint events to fix the resize
problems ... problems ...
2.0.2 (19 June 2000) 2.0.2 (19 June 2000)
@ -155,7 +155,7 @@
* new "progressive falling on remove" animation for ksirtet * new "progressive falling on remove" animation for ksirtet
1.1.14 (2 April 2000) 1.1.14 (2 April 2000)
* KAction * TDEAction
* separated in two executables (ksirtet and kfouleggs) * separated in two executables (ksirtet and kfouleggs)
* use of QCanvas done * use of QCanvas done
* fixed a nasty bug for kfouleggs (segfault when the piece is almost at top * fixed a nasty bug for kfouleggs (segfault when the piece is almost at top

@ -43,7 +43,7 @@ const int default_width = 362;
const int default_height = 460; const int default_height = 460;
GameWindow::GameWindow(TQWidget *, const char *name) GameWindow::GameWindow(TQWidget *, const char *name)
: KMainWindow(0, name) : TDEMainWindow(0, name)
{ {
//New Games //New Games
(void)KStdGameAction::gameNew(TQT_TQOBJECT(this), (void)KStdGameAction::gameNew(TQT_TQOBJECT(this),
@ -71,15 +71,15 @@ GameWindow::GameWindow(TQWidget *, const char *name)
actionCollection()); actionCollection());
TQStringList list; TQStringList list;
KSelectAction* piecesAct = TDESelectAction* piecesAct =
new KSelectAction(i18n("&Pieces"), 0, TQT_TQOBJECT(this), TQT_SLOT(menu_pieces()), new TDESelectAction(i18n("&Pieces"), 0, TQT_TQOBJECT(this), TQT_SLOT(menu_pieces()),
actionCollection(), "settings_pieces"); actionCollection(), "settings_pieces");
list.append(i18n("&Smiles")); list.append(i18n("&Smiles"));
list.append(i18n("S&ymbols")); list.append(i18n("S&ymbols"));
list.append(i18n("&Icons")); list.append(i18n("&Icons"));
piecesAct->setItems(list); piecesAct->setItems(list);
(void)new KToggleAction(i18n("&Sounds"), 0, TQT_TQOBJECT(this), (void)new TDEToggleAction(i18n("&Sounds"), 0, TQT_TQOBJECT(this),
TQT_SLOT(menu_sounds()), actionCollection(), "settings_sounds"); TQT_SLOT(menu_sounds()), actionCollection(), "settings_sounds");
@ -102,11 +102,11 @@ GameWindow::GameWindow(TQWidget *, const char *name)
connect(game, TQT_SIGNAL(gameOver()), TQT_TQOBJECT(this), TQT_SLOT(gameOver())); connect(game, TQT_SIGNAL(gameOver()), TQT_TQOBJECT(this), TQT_SLOT(gameOver()));
//keys //keys
(void)new KAction(i18n("Move Left"), Key_Left, TQT_TQOBJECT(game), TQT_SLOT(keyLeft()), actionCollection(), "left"); (void)new TDEAction(i18n("Move Left"), Key_Left, TQT_TQOBJECT(game), TQT_SLOT(keyLeft()), actionCollection(), "left");
(void)new KAction(i18n("Move Right"), Key_Right, TQT_TQOBJECT(game), TQT_SLOT(keyRight()), actionCollection(), "right"); (void)new TDEAction(i18n("Move Right"), Key_Right, TQT_TQOBJECT(game), TQT_SLOT(keyRight()), actionCollection(), "right");
(void)new KAction(i18n("Rotate Left"), Key_Up, TQT_TQOBJECT(game), TQT_SLOT(keyUp()), actionCollection(), "up"); (void)new TDEAction(i18n("Rotate Left"), Key_Up, TQT_TQOBJECT(game), TQT_SLOT(keyUp()), actionCollection(), "up");
(void)new KAction(i18n("Rotate Right"), Key_Down, TQT_TQOBJECT(game), TQT_SLOT(keyDown()), actionCollection(), "down"); (void)new TDEAction(i18n("Rotate Right"), Key_Down, TQT_TQOBJECT(game), TQT_SLOT(keyDown()), actionCollection(), "down");
(void)new KAction(i18n("Drop Down"), Key_Space, TQT_TQOBJECT(game), TQT_SLOT(keySpace()), actionCollection(), "space"); (void)new TDEAction(i18n("Drop Down"), Key_Space, TQT_TQOBJECT(game), TQT_SLOT(keySpace()), actionCollection(), "space");
game->setFixedSize(default_width, default_height); game->setFixedSize(default_width, default_height);
adjustSize(); adjustSize();
@ -117,18 +117,18 @@ GameWindow::GameWindow(TQWidget *, const char *name)
config->setGroup("Options"); config->setGroup("Options");
PiecesType pieces_type = (PiecesType)config->readNumEntry("Pieces", static_cast<int>(Pieces_Smiles)); PiecesType pieces_type = (PiecesType)config->readNumEntry("Pieces", static_cast<int>(Pieces_Smiles));
game->setPieces(pieces_type); game->setPieces(pieces_type);
((KSelectAction*)actionCollection()->action("settings_pieces"))->setCurrentItem((int)pieces_type); ((TDESelectAction*)actionCollection()->action("settings_pieces"))->setCurrentItem((int)pieces_type);
game->do_sounds = config->readBoolEntry("Sounds", true); game->do_sounds = config->readBoolEntry("Sounds", true);
((KToggleAction*)actionCollection()->action("settings_sounds"))->setChecked(game->do_sounds); ((TDEToggleAction*)actionCollection()->action("settings_sounds"))->setChecked(game->do_sounds);
setupGUI(KMainWindow::Save | Keys | StatusBar | Create); setupGUI(TDEMainWindow::Save | Keys | StatusBar | Create);
} }
void GameWindow::menu_newGame() void GameWindow::menu_newGame()
{ {
((KToggleAction*)actionCollection()->action(KStdGameAction::stdName(KStdGameAction::Pause)))->setChecked(false); ((TDEToggleAction*)actionCollection()->action(KStdGameAction::stdName(KStdGameAction::Pause)))->setChecked(false);
game->newGame(); game->newGame();
} }
@ -136,7 +136,7 @@ void GameWindow::menu_pause()
{ {
if (game->in_game) { if (game->in_game) {
game->in_pause = !game->in_pause; game->in_pause = !game->in_pause;
((KToggleAction*)actionCollection()->action(KStdGameAction::stdName(KStdGameAction::Pause)))->setChecked(game->in_pause); ((TDEToggleAction*)actionCollection()->action(KStdGameAction::stdName(KStdGameAction::Pause)))->setChecked(game->in_pause);
game->repaintChilds(); game->repaintChilds();
} }
} }
@ -146,7 +146,7 @@ void GameWindow::menu_endGame()
if (game->in_game) { if (game->in_game) {
game->in_game = false; game->in_game = false;
game->repaintChilds(); game->repaintChilds();
((KToggleAction*)actionCollection()->action(KStdGameAction::stdName(KStdGameAction::Pause)))->setChecked(false); ((TDEToggleAction*)actionCollection()->action(KStdGameAction::stdName(KStdGameAction::Pause)))->setChecked(false);
gameOver(); gameOver();
} }
} }
@ -159,7 +159,7 @@ void GameWindow::menu_highScores()
void GameWindow::menu_pieces() void GameWindow::menu_pieces()
{ {
int index = ((KSelectAction*)actionCollection()->action("settings_pieces"))->currentItem(); int index = ((TDESelectAction*)actionCollection()->action("settings_pieces"))->currentItem();
game->setPieces((PiecesType)index); game->setPieces((PiecesType)index);
TDEConfig *config = kapp->config(); TDEConfig *config = kapp->config();
@ -170,7 +170,7 @@ void GameWindow::menu_pieces()
void GameWindow::menu_sounds() void GameWindow::menu_sounds()
{ {
game->do_sounds = !game->do_sounds; game->do_sounds = !game->do_sounds;
((KToggleAction*)actionCollection()->action("settings_sounds"))->setChecked(game->do_sounds); ((TDEToggleAction*)actionCollection()->action("settings_sounds"))->setChecked(game->do_sounds);
TDEConfig *config = kapp->config(); TDEConfig *config = kapp->config();
config->setGroup("Options"); config->setGroup("Options");

@ -33,7 +33,7 @@ class TQPopupMenu;
class GameWidget; class GameWidget;
class KStatusBar; class KStatusBar;
class GameWindow : public KMainWindow { class GameWindow : public TDEMainWindow {
Q_OBJECT Q_OBJECT

@ -54,7 +54,7 @@
#define SCORE 1 #define SCORE 1
#define LIVES 2 #define LIVES 2
Game::Game(TQWidget *parent, const char *name) : KMainWindow(parent,name) Game::Game(TQWidget *parent, const char *name) : TDEMainWindow(parent,name)
{ {
// create statusbar // create statusbar
statusBar()->insertItem(i18n("Score: 0"), SCORE); statusBar()->insertItem(i18n("Score: 0"), SCORE);
@ -79,7 +79,7 @@ Game::Game(TQWidget *parent, const char *name) : KMainWindow(parent,name)
setCentralWidget(view); setCentralWidget(view);
createMenu(); createMenu();
setupGUI(KMainWindow::Save | StatusBar | Create ); setupGUI(TDEMainWindow::Save | StatusBar | Create );
} }
Game::~Game() Game::~Game()
@ -113,10 +113,10 @@ void Game::showHighScores()
void Game::createMenu() void Game::createMenu()
{ {
actionCollection()->setAutoConnectShortcuts(false); actionCollection()->setAutoConnectShortcuts(false);
(void)new KAction(i18n("Move Up"), Key_Up, 0, 0, actionCollection(), "Pl1Up"); (void)new TDEAction(i18n("Move Up"), Key_Up, 0, 0, actionCollection(), "Pl1Up");
(void)new KAction(i18n("Move Down"), Key_Down, 0, 0, actionCollection(), "Pl1Down"); (void)new TDEAction(i18n("Move Down"), Key_Down, 0, 0, actionCollection(), "Pl1Down");
(void)new KAction(i18n("Move Right"), Key_Right, 0, 0, actionCollection(), "Pl1Right"); (void)new TDEAction(i18n("Move Right"), Key_Right, 0, 0, actionCollection(), "Pl1Right");
(void)new KAction(i18n("Move Left"), Key_Left, 0, 0, actionCollection(), "Pl1Left"); (void)new TDEAction(i18n("Move Left"), Key_Left, 0, 0, actionCollection(), "Pl1Left");
actionCollection()->setAutoConnectShortcuts(true); actionCollection()->setAutoConnectShortcuts(true);
rattler->setActionCollection(actionCollection()); rattler->setActionCollection(actionCollection());

@ -28,12 +28,12 @@
#include <kmainwindow.h> #include <kmainwindow.h>
class KAction; class TDEAction;
class Rattler; class Rattler;
class Levels; class Levels;
class View; class View;
class Game : public KMainWindow { class Game : public TDEMainWindow {
Q_OBJECT Q_OBJECT
@ -56,7 +56,7 @@ private:
View *view; View *view;
Rattler *rattler; Rattler *rattler;
Levels *levels; Levels *levels;
KAction *pause; TDEAction *pause;
void createMenu(); void createMenu();
}; };

@ -308,7 +308,7 @@ void Rattler::pause()
gameState.setBit(Paused); gameState.setBit(Paused);
stop(); stop();
KAction* tempPauseAction = KStdGameAction::pause(); TDEAction* tempPauseAction = KStdGameAction::pause();
label = new TQLabel(this); label = new TQLabel(this);
label->setFont( TQFont( "Times", 14, TQFont::Bold ) ); label->setFont( TQFont( "Times", 14, TQFont::Bold ) );

@ -48,7 +48,7 @@ class Rattler : public TQWidget
public: public:
Rattler ( TQWidget *parent=0, const char *name=0 ); Rattler ( TQWidget *parent=0, const char *name=0 );
~Rattler(); ~Rattler();
void setActionCollection(KActionCollection *a){ actionCollection = a;} void setActionCollection(TDEActionCollection *a){ actionCollection = a;}
void setBalls(int); void setBalls(int);
@ -108,7 +108,7 @@ protected:
void mousePressEvent( TQMouseEvent * ); void mousePressEvent( TQMouseEvent * );
void focusOutEvent( TQFocusEvent * ) { ; } void focusOutEvent( TQFocusEvent * ) { ; }
void focusInEvent( TQFocusEvent * ) { ; } void focusInEvent( TQFocusEvent * ) { ; }
KActionCollection *actionCollection; TDEActionCollection *actionCollection;
private: private:
Board *board; Board *board;

@ -70,7 +70,7 @@ MainWindow::createCollectionMenu() {
} }
MainWindow::MainWindow() : KMainWindow(0), externalCollection_(0) { MainWindow::MainWindow() : TDEMainWindow(0), externalCollection_(0) {
int i; int i;
TQPixmap pixmap; TQPixmap pixmap;
@ -102,12 +102,12 @@ MainWindow::MainWindow() : KMainWindow(0), externalCollection_(0) {
game_->insertItem(i18n("&Level Collection"), collection_); game_->insertItem(i18n("&Level Collection"), collection_);
pixmap = SmallIcon("undo"); pixmap = SmallIcon("undo");
game_->insertItem(TQIconSet(pixmap), i18n("&Undo"), playField_, TQT_SLOT(undo()),TQKeySequence( (KStdAccel::undo()).toString())); game_->insertItem(TQIconSet(pixmap), i18n("&Undo"), playField_, TQT_SLOT(undo()),TQKeySequence( (TDEStdAccel::undo()).toString()));
pixmap = SmallIcon("redo"); pixmap = SmallIcon("redo");
game_->insertItem(TQIconSet(pixmap), i18n("&Redo"), playField_, TQT_SLOT(redo()), TQKeySequence( (KStdAccel::redo()).toString())); game_->insertItem(TQIconSet(pixmap), i18n("&Redo"), playField_, TQT_SLOT(redo()), TQKeySequence( (TDEStdAccel::redo()).toString()));
game_->insertSeparator(); game_->insertSeparator();
pixmap = SmallIcon("exit"); pixmap = SmallIcon("exit");
game_->insertItem(TQIconSet(pixmap), i18n("&Quit"), TDEApplication::kApplication(), TQT_SLOT(closeAllWindows()), TQKeySequence( (KStdAccel::quit()).toString())); game_->insertItem(TQIconSet(pixmap), i18n("&Quit"), TDEApplication::kApplication(), TQT_SLOT(closeAllWindows()), TQKeySequence( (TDEStdAccel::quit()).toString()));
menu_->insertItem(i18n("&Game"), game_); menu_->insertItem(i18n("&Game"), game_);
animation_ = new TQPopupMenu(0,"animation menu"); animation_ = new TQPopupMenu(0,"animation menu");

@ -33,7 +33,7 @@ class TQDragEnterEvent;
class TQDropEvent; class TQDropEvent;
class LevelCollection; class LevelCollection;
class MainWindow : public KMainWindow { class MainWindow : public TDEMainWindow {
Q_OBJECT Q_OBJECT
public: public:

@ -16,7 +16,7 @@
#include "ai.h" #include "ai.h"
#include "options.h" #include "options.h"
KToggleAction *MyMainView::pauseAction = 0; TDEToggleAction *MyMainView::pauseAction = 0;
MyMainView::MyMainView(TQWidget *parent) MyMainView::MyMainView(TQWidget *parent)
:TQWidget(parent), :TQWidget(parent),
@ -103,7 +103,7 @@ MyMainView::~MyMainView()
writeConfig(); writeConfig();
} }
void MyMainView::setActionCollection(KActionCollection *a) void MyMainView::setActionCollection(TDEActionCollection *a)
{ {
actionCollection = a; actionCollection = a;
} }
@ -492,7 +492,7 @@ void MyMainView::newRound()
field.update(); field.update();
TQString str = i18n("Press %1 to start") TQString str = i18n("Press %1 to start")
.arg(KShortcut(GAME_START_SHORTCUT).toString()); .arg(TDEShortcut(GAME_START_SHORTCUT).toString());
emit(setStatusText(str,IDS_MAIN)); emit(setStatusText(str,IDS_MAIN));
emit( setStatusText( "", IDS_PAUSE ) ); emit( setStatusText( "", IDS_PAUSE ) );
stop( ); stop( );
@ -557,7 +557,7 @@ void MyMainView::timerEvent(TQTimerEvent *event)
emit(wins(0,w)); emit(wins(0,w));
} }
TQString str = i18n("Press %1 for new round") TQString str = i18n("Press %1 for new round")
.arg(KShortcut(GAME_START_SHORTCUT).toString()); .arg(TDEShortcut(GAME_START_SHORTCUT).toString());
emit(setStatusText(str,IDS_MAIN)); emit(setStatusText(str,IDS_MAIN));
stop( ); stop( );
} }

@ -4,8 +4,8 @@
#include <tqwidget.h> #include <tqwidget.h>
#include <tqimage.h> #include <tqimage.h>
class KToggleAction; class TDEToggleAction;
class KActionCollection; class TDEActionCollection;
#include <krandomsequence.h> #include <krandomsequence.h>
#include "sprites.h" #include "sprites.h"
@ -24,8 +24,8 @@ public:
MyMainView(TQWidget *parent=0); MyMainView(TQWidget *parent=0);
~MyMainView(); ~MyMainView();
static KToggleAction *pauseAction; static TDEToggleAction *pauseAction;
void setActionCollection(KActionCollection *a); void setActionCollection(TDEActionCollection *a);
public slots: public slots:
void newRound(); void newRound();
@ -60,7 +60,7 @@ protected:
void calculatePowerups(); void calculatePowerups();
void collisions(); void collisions();
private: private:
KActionCollection *actionCollection; TDEActionCollection *actionCollection;
TQCanvas field; TQCanvas field;
TQCanvasView view; TQCanvasView view;

@ -64,52 +64,52 @@ void MyTopLevelWidget::initActions( )
{ {
KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection());
KStdGameAction::gameNew(TQT_TQOBJECT(playfield), TQT_SLOT(newGame()), actionCollection()); KStdGameAction::gameNew(TQT_TQOBJECT(playfield), TQT_SLOT(newGame()), actionCollection());
( void )new KAction( i18n( "&New Round" ), "spnewround", ( void )new TDEAction( i18n( "&New Round" ), "spnewround",
CTRL + Key_R, TQT_TQOBJECT(playfield), TQT_SLOT( newRound( ) ), CTRL + Key_R, TQT_TQOBJECT(playfield), TQT_SLOT( newRound( ) ),
actionCollection( ), "new_round" ); actionCollection( ), "new_round" );
MyMainView::pauseAction = MyMainView::pauseAction =
KStdGameAction::pause(TQT_TQOBJECT(playfield), TQT_SLOT(togglePause()), actionCollection()); KStdGameAction::pause(TQT_TQOBJECT(playfield), TQT_SLOT(togglePause()), actionCollection());
MyMainView::pauseAction->setChecked( false ); MyMainView::pauseAction->setChecked( false );
KAction* gameStart = new KAction( i18n( "Start" ), GAME_START_SHORTCUT, TDEAction* gameStart = new TDEAction( i18n( "Start" ), GAME_START_SHORTCUT,
TQT_TQOBJECT(playfield), TQT_SLOT( start( ) ), actionCollection( ), "game_start" ); TQT_TQOBJECT(playfield), TQT_SLOT( start( ) ), actionCollection( ), "game_start" );
KStdAction::preferences(TQT_TQOBJECT(playfield), TQT_SLOT(gameSetup()), actionCollection()); KStdAction::preferences(TQT_TQOBJECT(playfield), TQT_SLOT(gameSetup()), actionCollection());
KAccel* acc = new KAccel(this); TDEAccel* acc = new TDEAccel(this);
gameStart->plugAccel(acc); gameStart->plugAccel(acc);
// Default keys // Default keys
actionCollection()->setAutoConnectShortcuts(false); actionCollection()->setAutoConnectShortcuts(false);
KAction* ac; TDEAction* ac;
ac = new KAction(i18n("Player 1 Rotate Left"), Key_S, 0, 0, ac = new TDEAction(i18n("Player 1 Rotate Left"), Key_S, 0, 0,
actionCollection(), "P1KeyLeft"); actionCollection(), "P1KeyLeft");
ac->setEnabled( false ); ac->setEnabled( false );
ac = new KAction(i18n("Player 1 Rotate Right"), Key_F, 0, 0, ac = new TDEAction(i18n("Player 1 Rotate Right"), Key_F, 0, 0,
actionCollection(), "P1KeyRight"); actionCollection(), "P1KeyRight");
ac->setEnabled( false ); ac->setEnabled( false );
ac = new KAction(i18n("Player 1 Accelerate"), Key_E, 0, 0, ac = new TDEAction(i18n("Player 1 Accelerate"), Key_E, 0, 0,
actionCollection(), "P1KeyAcc"); actionCollection(), "P1KeyAcc");
ac->setEnabled( false ); ac->setEnabled( false );
ac = new KAction(i18n("Player 1 Shot"), Key_D, 0, 0, ac = new TDEAction(i18n("Player 1 Shot"), Key_D, 0, 0,
actionCollection(), "P1Shot"); actionCollection(), "P1Shot");
ac->setEnabled( false ); ac->setEnabled( false );
ac = new KAction(i18n("Player 1 Mine"), Key_A, 0, 0, ac = new TDEAction(i18n("Player 1 Mine"), Key_A, 0, 0,
actionCollection(), "P1Mine"); actionCollection(), "P1Mine");
ac->setEnabled( false ); ac->setEnabled( false );
ac = new KAction(i18n("Player 2 Rotate Left"), Key_Left, 0, 0, ac = new TDEAction(i18n("Player 2 Rotate Left"), Key_Left, 0, 0,
actionCollection(), "P2KeyLeft"); actionCollection(), "P2KeyLeft");
ac->setEnabled( false ); ac->setEnabled( false );
ac = new KAction(i18n("Player 2 Rotate Right"), Key_Right, 0, 0, ac = new TDEAction(i18n("Player 2 Rotate Right"), Key_Right, 0, 0,
actionCollection(), "P2KeyRight"); actionCollection(), "P2KeyRight");
ac->setEnabled( false ); ac->setEnabled( false );
ac = new KAction(i18n("Player 2 Accelerate"), Key_Up, 0, 0, ac = new TDEAction(i18n("Player 2 Accelerate"), Key_Up, 0, 0,
actionCollection(), "P2KeyAcc"); actionCollection(), "P2KeyAcc");
ac->setEnabled( false ); ac->setEnabled( false );
ac = new KAction(i18n("Player 2 Shot"), Key_Down, 0, 0, ac = new TDEAction(i18n("Player 2 Shot"), Key_Down, 0, 0,
actionCollection(), "P2Shot"); actionCollection(), "P2Shot");
ac->setEnabled( false ); ac->setEnabled( false );
ac = new KAction(i18n("Player 2 Mine"), Key_Insert, 0, 0, ac = new TDEAction(i18n("Player 2 Mine"), Key_Insert, 0, 0,
actionCollection(), "P2Mine"); actionCollection(), "P2Mine");
ac->setEnabled( false ); ac->setEnabled( false );

@ -6,7 +6,7 @@
class PlayerInfo; class PlayerInfo;
class MyMainView; class MyMainView;
class MyTopLevelWidget:public KMainWindow class MyTopLevelWidget:public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT

@ -42,7 +42,7 @@
/** /**
* Constuctor * Constuctor
*/ */
KTron::KTron(TQWidget *parent, const char *name) : KMainWindow(parent, name) { KTron::KTron(TQWidget *parent, const char *name) : TDEMainWindow(parent, name) {
playerPoints[0]=playerPoints[1]=0; playerPoints[0]=playerPoints[1]=0;
tron=new Tron(this, "Tron"); tron=new Tron(this, "Tron");
@ -56,27 +56,27 @@ KTron::KTron(TQWidget *parent, const char *name) : KMainWindow(parent, name) {
// We match up keyboard events ourselves in Tron::keyPressEvent() // We match up keyboard events ourselves in Tron::keyPressEvent()
// We must disable the actions, otherwise we don't get the keyPressEvent's // We must disable the actions, otherwise we don't get the keyPressEvent's
KAction *act; TDEAction *act;
act = new KAction(i18n("Player 1 Up"), Key_R, 0, 0, actionCollection(), "Pl1Up"); act = new TDEAction(i18n("Player 1 Up"), Key_R, 0, 0, actionCollection(), "Pl1Up");
act->setEnabled(false); act->setEnabled(false);
act = new KAction(i18n("Player 1 Down"), Key_F, 0, 0, actionCollection(), "Pl1Down"); act = new TDEAction(i18n("Player 1 Down"), Key_F, 0, 0, actionCollection(), "Pl1Down");
act->setEnabled(false); act->setEnabled(false);
act = new KAction(i18n("Player 1 Right"), Key_G, 0, 0, actionCollection(), "Pl1Right"); act = new TDEAction(i18n("Player 1 Right"), Key_G, 0, 0, actionCollection(), "Pl1Right");
act->setEnabled(false); act->setEnabled(false);
act = new KAction(i18n("Player 1 Left"), Key_D, 0, 0, actionCollection(), "Pl1Left"); act = new TDEAction(i18n("Player 1 Left"), Key_D, 0, 0, actionCollection(), "Pl1Left");
act->setEnabled(false); act->setEnabled(false);
act = new KAction(i18n("Player 1 Accelerator"), Key_A, 0, 0, actionCollection(), "Pl1Ac"); act = new TDEAction(i18n("Player 1 Accelerator"), Key_A, 0, 0, actionCollection(), "Pl1Ac");
act->setEnabled(false); act->setEnabled(false);
act = new KAction(i18n("Player 2 Up"), Key_Up, 0, 0, actionCollection(), "Pl2Up"); act = new TDEAction(i18n("Player 2 Up"), Key_Up, 0, 0, actionCollection(), "Pl2Up");
act->setEnabled(false); act->setEnabled(false);
act = new KAction(i18n("Player 2 Down"), Key_Down, 0, 0, actionCollection(), "Pl2Down"); act = new TDEAction(i18n("Player 2 Down"), Key_Down, 0, 0, actionCollection(), "Pl2Down");
act->setEnabled(false); act->setEnabled(false);
act = new KAction(i18n("Player 2 Right"), Key_Right, 0, 0, actionCollection(), "Pl2Right"); act = new TDEAction(i18n("Player 2 Right"), Key_Right, 0, 0, actionCollection(), "Pl2Right");
act->setEnabled(false); act->setEnabled(false);
act = new KAction(i18n("Player 2 Left"), Key_Left, 0, 0, actionCollection(), "Pl2Left"); act = new TDEAction(i18n("Player 2 Left"), Key_Left, 0, 0, actionCollection(), "Pl2Left");
act->setEnabled(false); act->setEnabled(false);
act = new KAction(i18n("Player 2 Accelerator"), Key_0, 0, 0, actionCollection(), "Pl2Ac"); act = new TDEAction(i18n("Player 2 Accelerator"), Key_0, 0, 0, actionCollection(), "Pl2Ac");
act->setEnabled(false); act->setEnabled(false);
tron->setActionCollection(actionCollection()); tron->setActionCollection(actionCollection());
@ -86,7 +86,7 @@ KTron::KTron(TQWidget *parent, const char *name) : KMainWindow(parent, name) {
KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT( close() ), actionCollection()); KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT( close() ), actionCollection());
KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(showSettings()), actionCollection()); KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(showSettings()), actionCollection());
setupGUI( KMainWindow::Keys | StatusBar | Save | Create); setupGUI( TDEMainWindow::Keys | StatusBar | Save | Create);
loadSettings(); loadSettings();
} }

@ -29,14 +29,14 @@
#include <kmainwindow.h> #include <kmainwindow.h>
#include "tron.h" #include "tron.h"
class KAccel; class TDEAccel;
class KSelectAction; class TDESelectAction;
class Tron; class Tron;
/** /**
* @short The main window of KTron * @short The main window of KTron
*/ */
class KTron : public KMainWindow { class KTron : public TDEMainWindow {
Q_OBJECT Q_OBJECT
@ -45,7 +45,7 @@ public:
KTron(TQWidget *parent=0, const char *name=0); KTron(TQWidget *parent=0, const char *name=0);
private: private:
KAccel *accel; TDEAccel *accel;
Tron *tron; Tron *tron;
TQString playerName[2]; TQString playerName[2];
int playerPoints[2]; int playerPoints[2];

@ -422,7 +422,7 @@ void Tron::drawRect(TQPainter & p, int x, int y)
** config functions ** ** config functions **
** *************************************************************** */ ** *************************************************************** */
void Tron::setActionCollection(KActionCollection *a) void Tron::setActionCollection(TDEActionCollection *a)
{ {
actionCollection = a; actionCollection = a;
} }

@ -32,7 +32,7 @@
#include <math.h> #include <math.h>
#include <krandomsequence.h> #include <krandomsequence.h>
class KActionCollection; class TDEActionCollection;
#include "player.h" #include "player.h"
@ -51,7 +51,7 @@ class Tron : public TQWidget
public: public:
Tron(TQWidget *parent=0, const char *name=0); Tron(TQWidget *parent=0, const char *name=0);
~Tron(); ~Tron();
void setActionCollection(KActionCollection*); void setActionCollection(TDEActionCollection*);
void updatePixmap(); void updatePixmap();
void setBackgroundPix(TQPixmap); void setBackgroundPix(TQPixmap);
void setComputerplayer(Player player, bool); void setComputerplayer(Player player, bool);
@ -91,7 +91,7 @@ protected:
private: private:
/** Stores key shortcuts */ /** Stores key shortcuts */
KActionCollection* actionCollection; TDEActionCollection* actionCollection;
/** Drawing buffer */ /** Drawing buffer */
TQPixmap *pixmap; TQPixmap *pixmap;
/** The playingfield */ /** The playingfield */

@ -23,7 +23,7 @@
// Constructor // Constructor
TopLevel::TopLevel() TopLevel::TopLevel()
: KMainWindow(0) : TDEMainWindow(0)
{ {
readOptions(); readOptions();
@ -34,7 +34,7 @@ TopLevel::TopLevel()
setCentralWidget(playGround); setCentralWidget(playGround);
setupKAction(); setupTDEAction();
} }
// Destructor // Destructor
@ -57,25 +57,25 @@ void TopLevel::enableRedo(bool enable) const
// Register an available gameboard // Register an available gameboard
void TopLevel::registerGameboard(const TQString &menuItem, const char *actionId) void TopLevel::registerGameboard(const TQString &menuItem, const char *actionId)
{ {
KToggleAction *t = 0; TDEToggleAction *t = 0;
switch (gameboards) switch (gameboards)
{ {
case 0: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(gameboard0()), actionCollection(), actionId); case 0: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(gameboard0()), actionCollection(), actionId);
break; break;
case 1: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(gameboard1()), actionCollection(), actionId); case 1: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(gameboard1()), actionCollection(), actionId);
break; break;
case 2: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(gameboard2()), actionCollection(), actionId); case 2: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(gameboard2()), actionCollection(), actionId);
break; break;
case 3: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(gameboard3()), actionCollection(), actionId); case 3: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(gameboard3()), actionCollection(), actionId);
break; break;
case 4: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(gameboard4()), actionCollection(), actionId); case 4: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(gameboard4()), actionCollection(), actionId);
break; break;
case 5: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(gameboard5()), actionCollection(), actionId); case 5: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(gameboard5()), actionCollection(), actionId);
break; break;
case 6: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(gameboard6()), actionCollection(), actionId); case 6: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(gameboard6()), actionCollection(), actionId);
break; break;
case 7: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(gameboard7()), actionCollection(), actionId); case 7: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(gameboard7()), actionCollection(), actionId);
break; break;
} }
@ -89,41 +89,41 @@ void TopLevel::registerGameboard(const TQString &menuItem, const char *actionId)
// Register an available language // Register an available language
void TopLevel::registerLanguage(const TQString &menuItem, const char *actionId, bool enabled) void TopLevel::registerLanguage(const TQString &menuItem, const char *actionId, bool enabled)
{ {
KToggleAction *t = 0; TDEToggleAction *t = 0;
switch (languages) switch (languages)
{ {
case 0: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language0()), actionCollection(), actionId); case 0: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language0()), actionCollection(), actionId);
break; break;
case 1: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language1()), actionCollection(), actionId); case 1: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language1()), actionCollection(), actionId);
break; break;
case 2: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language2()), actionCollection(), actionId); case 2: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language2()), actionCollection(), actionId);
break; break;
case 3: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language3()), actionCollection(), actionId); case 3: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language3()), actionCollection(), actionId);
break; break;
case 4: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language4()), actionCollection(), actionId); case 4: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language4()), actionCollection(), actionId);
break; break;
case 5: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language5()), actionCollection(), actionId); case 5: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language5()), actionCollection(), actionId);
break; break;
case 6: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language6()), actionCollection(), actionId); case 6: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language6()), actionCollection(), actionId);
break; break;
case 7: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language7()), actionCollection(), actionId); case 7: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language7()), actionCollection(), actionId);
break; break;
case 8: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language8()), actionCollection(), actionId); case 8: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language8()), actionCollection(), actionId);
break; break;
case 9: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language9()), actionCollection(), actionId); case 9: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language9()), actionCollection(), actionId);
break; break;
case 10: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language10()), actionCollection(), actionId); case 10: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language10()), actionCollection(), actionId);
break; break;
case 11: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language11()), actionCollection(), actionId); case 11: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language11()), actionCollection(), actionId);
break; break;
case 12: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language12()), actionCollection(), actionId); case 12: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language12()), actionCollection(), actionId);
break; break;
case 13: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language13()), actionCollection(), actionId); case 13: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language13()), actionCollection(), actionId);
break; break;
case 14: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language14()), actionCollection(), actionId); case 14: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language14()), actionCollection(), actionId);
break; break;
case 15: t = new KToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language15()), actionCollection(), actionId); case 15: t = new TDEToggleAction(i18n(menuItem.latin1()), 0, TQT_TQOBJECT(this), TQT_SLOT(language15()), actionCollection(), actionId);
break; break;
} }
@ -141,19 +141,19 @@ void TopLevel::changeGameboard(uint newGameboard)
// Do not accept to switch to same gameboard // Do not accept to switch to same gameboard
if (newGameboard == selectedGameboard) { if (newGameboard == selectedGameboard) {
// select this gameboard again // select this gameboard again
((KToggleAction*) actionCollection()->action(gameboardActions[newGameboard].latin1()))->setChecked(true); ((TDEToggleAction*) actionCollection()->action(gameboardActions[newGameboard].latin1()))->setChecked(true);
return; return;
} }
// Unselect preceding gameboard // Unselect preceding gameboard
((KToggleAction*) actionCollection()->action(gameboardActions[selectedGameboard].latin1()))->setChecked(false); ((TDEToggleAction*) actionCollection()->action(gameboardActions[selectedGameboard].latin1()))->setChecked(false);
// Change gameboard in the remembered options // Change gameboard in the remembered options
selectedGameboard = newGameboard; selectedGameboard = newGameboard;
writeOptions(); writeOptions();
if( !((KToggleAction*) actionCollection()->action(gameboardActions[selectedGameboard].latin1()))->isChecked() ) if( !((TDEToggleAction*) actionCollection()->action(gameboardActions[selectedGameboard].latin1()))->isChecked() )
((KToggleAction*) actionCollection()->action(gameboardActions[selectedGameboard].latin1()))->setChecked(true); ((TDEToggleAction*) actionCollection()->action(gameboardActions[selectedGameboard].latin1()))->setChecked(true);
// Change gameboard effectively // Change gameboard effectively
playGround->change(newGameboard); playGround->change(newGameboard);
@ -169,13 +169,13 @@ void TopLevel::changeLanguage(uint newLanguage)
// Do not accept to switch to same language // Do not accept to switch to same language
if (newLanguage == selectedLanguage && soundEnabled) { if (newLanguage == selectedLanguage && soundEnabled) {
// newLanguage should stay checked // newLanguage should stay checked
((KToggleAction*) actionCollection()->action(languageActions[newLanguage].latin1()))->setChecked(true); ((TDEToggleAction*) actionCollection()->action(languageActions[newLanguage].latin1()))->setChecked(true);
return; return;
} }
// Unselect preceding language // Unselect preceding language
if (!soundEnabled) ((KToggleAction*) actionCollection()->action("speech_no_sound"))->setChecked(false); if (!soundEnabled) ((TDEToggleAction*) actionCollection()->action("speech_no_sound"))->setChecked(false);
((KToggleAction*) actionCollection()->action(languageActions[selectedLanguage].latin1()))->setChecked(false); ((TDEToggleAction*) actionCollection()->action(languageActions[selectedLanguage].latin1()))->setChecked(false);
// Change language in the remembered options // Change language in the remembered options
soundEnabled = true; soundEnabled = true;
@ -250,8 +250,8 @@ void TopLevel::writeOptions()
config->sync(); config->sync();
} }
// KAction initialization (aka menubar + toolbar init) // TDEAction initialization (aka menubar + toolbar init)
void TopLevel::setupKAction() void TopLevel::setupTDEAction()
{ {
//Game //Game
KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(fileNew()), actionCollection()); KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(fileNew()), actionCollection());
@ -259,7 +259,7 @@ void TopLevel::setupKAction()
KStdGameAction::save(TQT_TQOBJECT(this), TQT_SLOT(fileSave()), actionCollection()); KStdGameAction::save(TQT_TQOBJECT(this), TQT_SLOT(fileSave()), actionCollection());
KStdGameAction::print(TQT_TQOBJECT(this), TQT_SLOT(filePrint()), actionCollection()); KStdGameAction::print(TQT_TQOBJECT(this), TQT_SLOT(filePrint()), actionCollection());
KStdGameAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(quit()), actionCollection()); KStdGameAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(quit()), actionCollection());
(void) new KAction(i18n("Save &as Picture..."), 0, TQT_TQOBJECT(this), TQT_SLOT(filePicture()), actionCollection(), "game_save_picture"); (void) new TDEAction(i18n("Save &as Picture..."), 0, TQT_TQOBJECT(this), TQT_SLOT(filePicture()), actionCollection(), "game_save_picture");
//Edit //Edit
KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(editCopy()), actionCollection()); KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(editCopy()), actionCollection());
@ -269,7 +269,7 @@ void TopLevel::setupKAction()
enableRedo(false); enableRedo(false);
//Speech //Speech
KToggleAction* t = new KToggleAction(i18n("&No Sound"), 0, TQT_TQOBJECT(this), TQT_SLOT(soundOff()), actionCollection(), "speech_no_sound"); TDEToggleAction* t = new TDEToggleAction(i18n("&No Sound"), 0, TQT_TQOBJECT(this), TQT_SLOT(soundOff()), actionCollection(), "speech_no_sound");
if (!soundEnabled) t->setChecked(true); if (!soundEnabled) t->setChecked(true);
setupGUI(); setupGUI();
@ -508,8 +508,8 @@ void TopLevel::soundOff()
if (!soundEnabled) return; if (!soundEnabled) return;
soundEnabled = false; soundEnabled = false;
((KToggleAction*) actionCollection()->action(languageActions[selectedLanguage].latin1()))->setChecked(false); ((TDEToggleAction*) actionCollection()->action(languageActions[selectedLanguage].latin1()))->setChecked(false);
((KToggleAction*) actionCollection()->action("speech_no_sound"))->setChecked(true); ((TDEToggleAction*) actionCollection()->action("speech_no_sound"))->setChecked(true);
writeOptions(); writeOptions();
} }

@ -15,7 +15,7 @@ class TQDomDocument;
class PlayGround; class PlayGround;
class SoundFactory; class SoundFactory;
class TopLevel : public KMainWindow class TopLevel : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -42,7 +42,7 @@ protected:
void readOptions(); void readOptions();
void writeOptions(); void writeOptions();
void setupKAction(); void setupTDEAction();
private slots: private slots:

@ -26,7 +26,7 @@
#include <kcmenumngr.h> #include <kcmenumngr.h>
KZoomMainWindow::KZoomMainWindow(uint min, uint max, uint step, const char *name) KZoomMainWindow::KZoomMainWindow(uint min, uint max, uint step, const char *name)
: KMainWindow(0, name), _zoomStep(step), _minZoom(min), _maxZoom(max) : TDEMainWindow(0, name), _zoomStep(step), _minZoom(min), _maxZoom(max)
{ {
installEventFilter(this); installEventFilter(this);
@ -77,7 +77,7 @@ bool KZoomMainWindow::eventFilter(TQObject *o, TQEvent *e)
setFixedSize(minimumSize()); // because K/TQMainWindow setFixedSize(minimumSize()); // because K/TQMainWindow
// does not manage fixed central widget // does not manage fixed central widget
// with hidden menubar... // with hidden menubar...
return KMainWindow::eventFilter(o, e); return TDEMainWindow::eventFilter(o, e);
} }
void KZoomMainWindow::setZoom(uint zoom) void KZoomMainWindow::setZoom(uint zoom)
@ -111,5 +111,5 @@ void KZoomMainWindow::toggleMenubar()
bool KZoomMainWindow::queryExit() bool KZoomMainWindow::queryExit()
{ {
writeMenubarVisibleSetting(_menu->isChecked()); writeMenubarVisibleSetting(_menu->isChecked());
return KMainWindow::queryExit(); return TDEMainWindow::queryExit();
} }

@ -24,7 +24,7 @@
#include <kdemacros.h> #include <kdemacros.h>
class KToggleAction; class TDEToggleAction;
/** /**
* KZoomMainWindow is a main window of fixed size. Its size can be * KZoomMainWindow is a main window of fixed size. Its size can be
@ -41,7 +41,7 @@ class KToggleAction;
* This class also has a "show/hide menubar" action and allows the use * This class also has a "show/hide menubar" action and allows the use
* of a context popup menu (useful to restore the menubar when hidden). * of a context popup menu (useful to restore the menubar when hidden).
*/ */
class KDE_EXPORT KZoomMainWindow : public KMainWindow class KDE_EXPORT KZoomMainWindow : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -119,8 +119,8 @@ private slots:
private: private:
uint _zoom, _zoomStep, _minZoom, _maxZoom; uint _zoom, _zoomStep, _minZoom, _maxZoom;
TQPtrList<TQWidget> _widgets; TQPtrList<TQWidget> _widgets;
KAction *_zoomInAction, *_zoomOutAction; TDEAction *_zoomInAction, *_zoomOutAction;
KToggleAction *_menu; TDEToggleAction *_menu;
class KZoomMainWindowPrivate; class KZoomMainWindowPrivate;
KZoomMainWindowPrivate *d; KZoomMainWindowPrivate *d;

@ -6,7 +6,7 @@
#include <kdemacros.h> #include <kdemacros.h>
class BaseInterface; class BaseInterface;
class KToggleAction; class TDEToggleAction;
class KKeyDialog; class KKeyDialog;
class TDEConfigDialog; class TDEConfigDialog;
@ -44,7 +44,7 @@ protected:
virtual bool menubarVisibleSetting() const; virtual bool menubarVisibleSetting() const;
private: private:
KToggleAction *_pause; TDEToggleAction *_pause;
}; };
#endif #endif

@ -25,17 +25,17 @@ void MainWindow::init()
// Modes // Modes
bool ama = ( bfactory->bbi.nbArcadeStages!=0 ); bool ama = ( bfactory->bbi.nbArcadeStages!=0 );
TQString s = (ama ? i18n("&Single Human (Normal)") : i18n("&Single Human")); TQString s = (ama ? i18n("&Single Human (Normal)") : i18n("&Single Human"));
(void)new KAction(s, 0, TQT_TQOBJECT(inter), TQT_SLOT(normalGame()), (void)new TDEAction(s, 0, TQT_TQOBJECT(inter), TQT_SLOT(normalGame()),
actionCollection(), "mp_single_human"); actionCollection(), "mp_single_human");
if (ama) (void)new KAction(i18n("&Single Human (Arcade)"), 0, if (ama) (void)new TDEAction(i18n("&Single Human (Arcade)"), 0,
TQT_TQOBJECT(inter), TQT_SLOT(arcadeGame()), TQT_TQOBJECT(inter), TQT_SLOT(arcadeGame()),
actionCollection(), "mp_arcade"); actionCollection(), "mp_arcade");
(void)new KAction(i18n("Human vs &Human"), 0, TQT_TQOBJECT(inter), TQT_SLOT(humanVsHuman()), (void)new TDEAction(i18n("Human vs &Human"), 0, TQT_TQOBJECT(inter), TQT_SLOT(humanVsHuman()),
actionCollection(), "mp_human_vs_human"); actionCollection(), "mp_human_vs_human");
(void)new KAction(i18n("Human vs &Computer"), 0, (void)new TDEAction(i18n("Human vs &Computer"), 0,
TQT_TQOBJECT(inter), TQT_SLOT(humanVsComputer()), TQT_TQOBJECT(inter), TQT_SLOT(humanVsComputer()),
actionCollection(), "mp_human_vs_computer"); actionCollection(), "mp_human_vs_computer");
(void)new KAction(i18n("&More..."), 0, TQT_TQOBJECT(inter), TQT_SLOT(dialog()), (void)new TDEAction(i18n("&More..."), 0, TQT_TQOBJECT(inter), TQT_SLOT(dialog()),
actionCollection(), "mp_more"); actionCollection(), "mp_more");
buildGUI(inter); buildGUI(inter);

@ -43,12 +43,12 @@ void KeyData::clear()
void KeyData::createActionCollection(uint index, TQWidget *receiver) void KeyData::createActionCollection(uint index, TQWidget *receiver)
{ {
Q_ASSERT( index<_cols.size() ); Q_ASSERT( index<_cols.size() );
_cols[index] = new KActionCollection(receiver, this); _cols[index] = new TDEActionCollection(receiver, this);
for (uint k=0; k<_data.size(); k++) { for (uint k=0; k<_data.size(); k++) {
TQString label = i18n(_data[k].label); TQString label = i18n(_data[k].label);
TQString name = TQString("%2 %3").arg(index+1).arg(_data[k].name); TQString name = TQString("%2 %3").arg(index+1).arg(_data[k].name);
const char *slot = (_data[k].slotRelease ? 0 : _data[k].slot); const char *slot = (_data[k].slotRelease ? 0 : _data[k].slot);
KAction *a = new KAction(label, _keycodes[_cols.size()-1][index][k], TDEAction *a = new TDEAction(label, _keycodes[_cols.size()-1][index][k],
TQT_TQOBJECT(receiver), slot, _cols[index], name.utf8()); TQT_TQOBJECT(receiver), slot, _cols[index], name.utf8());
a->setEnabled(false); a->setEnabled(false);
if ( slot==0 ) { if ( slot==0 ) {
@ -67,7 +67,7 @@ void KeyData::createActionCollection(uint index, TQWidget *receiver)
void KeyData::setEnabled(uint index, bool enabled) void KeyData::setEnabled(uint index, bool enabled)
{ {
for (uint k=0; k<_cols[index]->count(); k++) { for (uint k=0; k<_cols[index]->count(); k++) {
TQMap<KAction *, SpecialData>::Iterator it = TQMap<TDEAction *, SpecialData>::Iterator it =
_specActions.find(_cols[index]->action(k)); _specActions.find(_cols[index]->action(k));
if ( it==_specActions.end() ) if ( it==_specActions.end() )
_cols[index]->action(k)->setEnabled(enabled); _cols[index]->action(k)->setEnabled(enabled);
@ -93,7 +93,7 @@ void KeyData::keyEvent(TQKeyEvent *e, bool pressed)
if ( e->isAutoRepeat() ) return; if ( e->isAutoRepeat() ) return;
KKey key(e); KKey key(e);
TQMap<KAction *, SpecialData>::Iterator it = _specActions.begin(); TQMap<TDEAction *, SpecialData>::Iterator it = _specActions.begin();
for(; it!=_specActions.end(); ++it) { for(; it!=_specActions.end(); ++it) {
if ( !it.data().enabled ) continue; if ( !it.data().enabled ) continue;
if ( !it.key()->shortcut().contains(key) ) continue; if ( !it.key()->shortcut().contains(key) ) continue;

@ -29,12 +29,12 @@ class KeyData : public TQObject
uint _maxNb; uint _maxNb;
TQMemArray<ActionData> _data; TQMemArray<ActionData> _data;
TQMap<int, TQMap<int, TQMemArray<int> > > _keycodes; TQMap<int, TQMap<int, TQMemArray<int> > > _keycodes;
TQMemArray<KActionCollection *> _cols; TQMemArray<TDEActionCollection *> _cols;
struct SpecialData { struct SpecialData {
bool enabled; bool enabled;
TQSignal *pressed, *released; TQSignal *pressed, *released;
}; };
TQMap<KAction *, SpecialData> _specActions; TQMap<TDEAction *, SpecialData> _specActions;
TQString group() const TQString group() const
{ return TQString("Keys (%1 humans)").arg(_cols.size()); } { return TQString("Keys (%1 humans)").arg(_cols.size()); }

@ -15,7 +15,7 @@ class RemoteHostData;
class KeyData; class KeyData;
class KeyCollection; class KeyCollection;
class KKeyDialog; class KKeyDialog;
class KAction; class TDEAction;
struct ActionData { struct ActionData {
const char *label, *name; const char *label, *name;

@ -9,7 +9,7 @@
#define PAUSE_ACTION \ #define PAUSE_ACTION \
((KToggleAction *)((KMainWindow *)topLevelWidget())->action("game_pause")) ((TDEToggleAction *)((TDEMainWindow *)topLevelWidget())->action("game_pause"))
MPSimpleInterface::MPSimpleInterface(const MPGameInfo &gi, MPSimpleInterface::MPSimpleInterface(const MPGameInfo &gi,
uint nbActions, const ActionData *data, uint nbActions, const ActionData *data,

@ -46,7 +46,7 @@ namespace KExtHighscore
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
ShowItem::ShowItem(TQListView *list, bool highlight) ShowItem::ShowItem(TQListView *list, bool highlight)
: KListViewItem(list), _highlight(highlight) : TDEListViewItem(list), _highlight(highlight)
{} {}
void ShowItem::paintCell(TQPainter *p, const TQColorGroup &cg, void ShowItem::paintCell(TQPainter *p, const TQColorGroup &cg,
@ -54,12 +54,12 @@ void ShowItem::paintCell(TQPainter *p, const TQColorGroup &cg,
{ {
TQColorGroup cgrp(cg); TQColorGroup cgrp(cg);
if (_highlight) cgrp.setColor(TQColorGroup::Text, red); if (_highlight) cgrp.setColor(TQColorGroup::Text, red);
KListViewItem::paintCell(p, cgrp, column, width, align); TDEListViewItem::paintCell(p, cgrp, column, width, align);
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
ScoresList::ScoresList(TQWidget *parent) ScoresList::ScoresList(TQWidget *parent)
: KListView(parent) : TDEListView(parent)
{ {
setSelectionMode(TQListView::NoSelection); setSelectionMode(TQListView::NoSelection);
setItemMargin(3); setItemMargin(3);

@ -42,7 +42,7 @@ class Score;
class AdditionalTab; class AdditionalTab;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
class ShowItem : public KListViewItem class ShowItem : public TDEListViewItem
{ {
public: public:
ShowItem(TQListView *, bool highlight); ShowItem(TQListView *, bool highlight);
@ -55,7 +55,7 @@ class ShowItem : public KListViewItem
bool _highlight; bool _highlight;
}; };
class ScoresList : public KListView class ScoresList : public TDEListView
{ {
Q_OBJECT Q_OBJECT

@ -211,7 +211,7 @@ HistogramTab::HistogramTab(TQWidget *parent)
// construct GUI // construct GUI
TQVBoxLayout *top = static_cast<TQVBoxLayout *>(layout()); TQVBoxLayout *top = static_cast<TQVBoxLayout *>(layout());
_list = new KListView(this); _list = new TDEListView(this);
_list->setSelectionMode(TQListView::NoSelection); _list->setSelectionMode(TQListView::NoSelection);
_list->setItemMargin(3); _list->setItemMargin(3);
_list->setAllColumnsShowFocus(true); _list->setAllColumnsShowFocus(true);
@ -235,7 +235,7 @@ HistogramTab::HistogramTab(TQWidget *parent)
TQString s2; TQString s2;
if ( k==sh.size() ) s2 = "..."; if ( k==sh.size() ) s2 = "...";
else if ( sh[k]!=sh[k-1]+1 ) s2 = sitem->pretty(0, sh[k]); else if ( sh[k]!=sh[k-1]+1 ) s2 = sitem->pretty(0, sh[k]);
(void)new KListViewItem(_list, s1, s2); (void)new TDEListViewItem(_list, s1, s2);
} }
} }

@ -24,7 +24,7 @@
#include <tqmemarray.h> #include <tqmemarray.h>
class TQLabel; class TQLabel;
class KListView; class TDEListView;
namespace KExtHighscore namespace KExtHighscore
@ -111,7 +111,7 @@ class HistogramTab : public AdditionalTab
private: private:
TQMemArray<uint> _counts; TQMemArray<uint> _counts;
TQMemArray<uint> _data; TQMemArray<uint> _data;
KListView *_list; TDEListView *_list;
void display(uint i); void display(uint i);
}; };

@ -133,28 +133,28 @@ void KChatDialog::init()
void KChatDialog::slotGetNameFont() void KChatDialog::slotGetNameFont()
{ {
TQFont font = nameFont(); TQFont font = nameFont();
KFontDialog::getFont(font); TDEFontDialog::getFont(font);
setNameFont(font); setNameFont(font);
} }
void KChatDialog::slotGetTextFont() void KChatDialog::slotGetTextFont()
{ {
TQFont font = textFont(); TQFont font = textFont();
KFontDialog::getFont(font); TDEFontDialog::getFont(font);
setTextFont(font); setTextFont(font);
} }
void KChatDialog::slotGetSystemNameFont() void KChatDialog::slotGetSystemNameFont()
{ {
TQFont font = systemNameFont(); TQFont font = systemNameFont();
KFontDialog::getFont(font); TDEFontDialog::getFont(font);
setSystemNameFont(font); setSystemNameFont(font);
} }
void KChatDialog::slotGetSystemTextFont() void KChatDialog::slotGetSystemTextFont()
{ {
TQFont font = systemTextFont(); TQFont font = systemTextFont();
KFontDialog::getFont(font); TDEFontDialog::getFont(font);
setSystemTextFont(font); setSystemTextFont(font);
} }

@ -86,7 +86,7 @@ public:
const KGame* mGame; const KGame* mGame;
TQFrame* mGamePage; TQFrame* mGamePage;
KListView* mGameProperties; TDEListView* mGameProperties;
TQListViewItem* mGameAddress; TQListViewItem* mGameAddress;
TQListViewItem* mGameId; TQListViewItem* mGameId;
TQListViewItem* mGameCookie; TQListViewItem* mGameCookie;
@ -100,8 +100,8 @@ public:
TQListViewItem* mGamePlayerCount; TQListViewItem* mGamePlayerCount;
TQFrame* mPlayerPage; TQFrame* mPlayerPage;
KListBox* mPlayerList; TDEListBox* mPlayerList;
KListView* mPlayerProperties; TDEListView* mPlayerProperties;
TQListViewItem* mPlayerAddress; TQListViewItem* mPlayerAddress;
TQListViewItem* mPlayerId; TQListViewItem* mPlayerId;
TQListViewItem* mPlayerName; TQListViewItem* mPlayerName;
@ -116,8 +116,8 @@ public:
TQListViewItem* mPlayerNetworkPriority; TQListViewItem* mPlayerNetworkPriority;
TQFrame* mMessagePage; TQFrame* mMessagePage;
KListView* mMessageList; TDEListView* mMessageList;
KListBox* mHideIdList; TDEListBox* mHideIdList;
}; };
KGameDebugDialog::KGameDebugDialog(KGame* g, TQWidget* parent, bool modal) : KGameDebugDialog::KGameDebugDialog(KGame* g, TQWidget* parent, bool modal) :
@ -144,12 +144,12 @@ void KGameDebugDialog::initGamePage()
TQVBoxLayout* topLayout = new TQVBoxLayout(d->mGamePage, marginHint(), spacingHint()); TQVBoxLayout* topLayout = new TQVBoxLayout(d->mGamePage, marginHint(), spacingHint());
TQHBoxLayout* layout = new TQHBoxLayout(topLayout); TQHBoxLayout* layout = new TQHBoxLayout(topLayout);
KListView* v = new KListView(d->mGamePage); TDEListView* v = new TDEListView(d->mGamePage);
v->addColumn(i18n("Data")); v->addColumn(i18n("Data"));
v->addColumn(i18n("Value")); v->addColumn(i18n("Value"));
layout->addWidget(v); layout->addWidget(v);
d->mGameProperties = new KListView(d->mGamePage); d->mGameProperties = new TDEListView(d->mGamePage);
d->mGameProperties->addColumn(i18n("Property")); d->mGameProperties->addColumn(i18n("Property"));
d->mGameProperties->addColumn(i18n("Value")); d->mGameProperties->addColumn(i18n("Value"));
d->mGameProperties->addColumn(i18n("Policy")); d->mGameProperties->addColumn(i18n("Policy"));
@ -183,17 +183,17 @@ void KGameDebugDialog::initPlayerPage()
TQVBoxLayout* listLayout = new TQVBoxLayout(layout); TQVBoxLayout* listLayout = new TQVBoxLayout(layout);
TQLabel* listLabel = new TQLabel(i18n("Available Players"), d->mPlayerPage); TQLabel* listLabel = new TQLabel(i18n("Available Players"), d->mPlayerPage);
listLayout->addWidget(listLabel); listLayout->addWidget(listLabel);
d->mPlayerList = new KListBox(d->mPlayerPage); d->mPlayerList = new TDEListBox(d->mPlayerPage);
connect(d->mPlayerList, TQT_SIGNAL(executed(TQListBoxItem*)), this, TQT_SLOT(slotUpdatePlayerData(TQListBoxItem*))); connect(d->mPlayerList, TQT_SIGNAL(executed(TQListBoxItem*)), this, TQT_SLOT(slotUpdatePlayerData(TQListBoxItem*)));
listLayout->addWidget(d->mPlayerList); listLayout->addWidget(d->mPlayerList);
d->mPlayerList->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding)); d->mPlayerList->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding));
KListView* v = new KListView(d->mPlayerPage); TDEListView* v = new TDEListView(d->mPlayerPage);
layout->addWidget(v); layout->addWidget(v);
v->addColumn(i18n("Data")); v->addColumn(i18n("Data"));
v->addColumn(i18n("Value")); v->addColumn(i18n("Value"));
d->mPlayerProperties = new KListView(d->mPlayerPage); d->mPlayerProperties = new TDEListView(d->mPlayerPage);
d->mPlayerProperties->addColumn(i18n("Property")); d->mPlayerProperties->addColumn(i18n("Property"));
d->mPlayerProperties->addColumn(i18n("Value")); d->mPlayerProperties->addColumn(i18n("Value"));
d->mPlayerProperties->addColumn(i18n("Policy")); d->mPlayerProperties->addColumn(i18n("Policy"));
@ -221,7 +221,7 @@ void KGameDebugDialog::initMessagePage()
{ {
d->mMessagePage = addPage(i18n("Debug &Messages")); d->mMessagePage = addPage(i18n("Debug &Messages"));
TQGridLayout* layout = new TQGridLayout(d->mMessagePage, 11, 7, marginHint(), spacingHint()); TQGridLayout* layout = new TQGridLayout(d->mMessagePage, 11, 7, marginHint(), spacingHint());
d->mMessageList = new KListView(d->mMessagePage); d->mMessageList = new TDEListView(d->mMessagePage);
layout->addMultiCellWidget(d->mMessageList, 0, 9, 0, 3); layout->addMultiCellWidget(d->mMessageList, 0, 9, 0, 3);
d->mMessageList->addColumn(i18n("Time")); d->mMessageList->addColumn(i18n("Time"));
d->mMessageList->addColumn(i18n("ID")); d->mMessageList->addColumn(i18n("ID"));
@ -239,7 +239,7 @@ void KGameDebugDialog::initMessagePage()
TQLabel* l = new TQLabel(i18n("Do not show IDs:"), d->mMessagePage); TQLabel* l = new TQLabel(i18n("Do not show IDs:"), d->mMessagePage);
layout->addMultiCellWidget(l, 0, 0, 5, 6); layout->addMultiCellWidget(l, 0, 0, 5, 6);
d->mHideIdList = new KListBox(d->mMessagePage); d->mHideIdList = new TDEListBox(d->mMessagePage);
layout->addMultiCellWidget(d->mHideIdList, 1, 8, 5, 6); layout->addMultiCellWidget(d->mHideIdList, 1, 8, 5, 6);
TQPushButton* clear = new KPushButton(KStdGuiItem::clear(), d->mMessagePage); TQPushButton* clear = new KPushButton(KStdGuiItem::clear(), d->mMessagePage);

@ -596,7 +596,7 @@ public:
} }
TQPtrDict<KPlayer> mItem2Player; TQPtrDict<KPlayer> mItem2Player;
KListBox* mPlayerBox; TDEListBox* mPlayerBox;
}; };
KGameDialogConnectionConfig::KGameDialogConnectionConfig(TQWidget* parent) KGameDialogConnectionConfig::KGameDialogConnectionConfig(TQWidget* parent)
@ -607,7 +607,7 @@ KGameDialogConnectionConfig::KGameDialogConnectionConfig(TQWidget* parent)
TQVBoxLayout* topLayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); TQVBoxLayout* topLayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
topLayout->setAutoAdd(true); topLayout->setAutoAdd(true);
TQHGroupBox* b = new TQHGroupBox(i18n("Connected Players"), this); TQHGroupBox* b = new TQHGroupBox(i18n("Connected Players"), this);
d->mPlayerBox = new KListBox(b); d->mPlayerBox = new TDEListBox(b);
setMinimumHeight(100); setMinimumHeight(100);
} }

@ -32,8 +32,8 @@ KStdGameAction::KStdGameAction()
KStdGameAction::~KStdGameAction() KStdGameAction::~KStdGameAction()
{} {}
KAction *KStdGameAction::action(StdGameAction act_enum, const TQObject *recvr, TDEAction *KStdGameAction::action(StdGameAction act_enum, const TQObject *recvr,
const char *slot, KActionCollection *parent, const char *slot, TDEActionCollection *parent,
const char *name) const char *name)
{ {
return create( act_enum, name, recvr, slot, parent ); return create( act_enum, name, recvr, slot, parent );
@ -47,7 +47,7 @@ const char* KStdGameAction::stdName(StdGameAction act_enum)
struct KStdGameActionInfo struct KStdGameActionInfo
{ {
KStdGameAction::StdGameAction id; KStdGameAction::StdGameAction id;
KStdAccel::StdAccel globalAccel; // if we reuse a global accel TDEStdAccel::StdAccel globalAccel; // if we reuse a global accel
int shortcut; // specific shortcut (NH: should be configurable) int shortcut; // specific shortcut (NH: should be configurable)
const char* psName; const char* psName;
const char* psLabel; const char* psLabel;
@ -57,32 +57,32 @@ struct KStdGameActionInfo
const KStdGameActionInfo g_rgActionInfo[] = { const KStdGameActionInfo g_rgActionInfo[] = {
// "game" menu // "game" menu
{ KStdGameAction::New, KStdAccel::New, 0, "game_new", I18N_NOOP2("new game", "&New"), 0, "filenew" }, { KStdGameAction::New, TDEStdAccel::New, 0, "game_new", I18N_NOOP2("new game", "&New"), 0, "filenew" },
{ KStdGameAction::Load, KStdAccel::Open, 0, "game_load", I18N_NOOP("&Load..."), 0, "fileopen" }, { KStdGameAction::Load, TDEStdAccel::Open, 0, "game_load", I18N_NOOP("&Load..."), 0, "fileopen" },
{ KStdGameAction::LoadRecent, KStdAccel::AccelNone, 0, "game_load_recent", I18N_NOOP("Load &Recent"), 0, 0 }, { KStdGameAction::LoadRecent, TDEStdAccel::AccelNone, 0, "game_load_recent", I18N_NOOP("Load &Recent"), 0, 0 },
{ KStdGameAction::Restart, KStdAccel::Reload, 0, "game_restart", I18N_NOOP("Restart &Game"), 0, "reload" }, { KStdGameAction::Restart, TDEStdAccel::Reload, 0, "game_restart", I18N_NOOP("Restart &Game"), 0, "reload" },
{ KStdGameAction::Save, KStdAccel::Save, 0, "game_save", I18N_NOOP("&Save"), 0, "filesave" }, { KStdGameAction::Save, TDEStdAccel::Save, 0, "game_save", I18N_NOOP("&Save"), 0, "filesave" },
{ KStdGameAction::SaveAs, KStdAccel::AccelNone, 0, "game_save_as", I18N_NOOP("Save &As..."), 0, "filesaveas" }, { KStdGameAction::SaveAs, TDEStdAccel::AccelNone, 0, "game_save_as", I18N_NOOP("Save &As..."), 0, "filesaveas" },
{ KStdGameAction::End, KStdAccel::End, 0, "game_end", I18N_NOOP("&End Game"), 0, "fileclose" }, { KStdGameAction::End, TDEStdAccel::End, 0, "game_end", I18N_NOOP("&End Game"), 0, "fileclose" },
{ KStdGameAction::Pause, KStdAccel::AccelNone, TQt::Key_P, "game_pause", I18N_NOOP("Pa&use"), 0, "player_pause" }, { KStdGameAction::Pause, TDEStdAccel::AccelNone, TQt::Key_P, "game_pause", I18N_NOOP("Pa&use"), 0, "player_pause" },
{ KStdGameAction::Highscores, KStdAccel::AccelNone, TQt::CTRL+TQt::Key_H, "game_highscores", I18N_NOOP("Show &Highscores"), 0, "highscore" }, { KStdGameAction::Highscores, TDEStdAccel::AccelNone, TQt::CTRL+TQt::Key_H, "game_highscores", I18N_NOOP("Show &Highscores"), 0, "highscore" },
{ KStdGameAction::Print, KStdAccel::Print, 0, "game_print", I18N_NOOP("&Print..."), 0, "fileprint" }, { KStdGameAction::Print, TDEStdAccel::Print, 0, "game_print", I18N_NOOP("&Print..."), 0, "fileprint" },
{ KStdGameAction::Quit, KStdAccel::Quit, 0, "game_quit", I18N_NOOP("&Quit"), 0, "exit" }, { KStdGameAction::Quit, TDEStdAccel::Quit, 0, "game_quit", I18N_NOOP("&Quit"), 0, "exit" },
// "move" menu // "move" menu
{ KStdGameAction::Repeat, KStdAccel::AccelNone, 0, "move_repeat", I18N_NOOP("Repeat"), 0, 0 }, { KStdGameAction::Repeat, TDEStdAccel::AccelNone, 0, "move_repeat", I18N_NOOP("Repeat"), 0, 0 },
{ KStdGameAction::Undo, KStdAccel::Undo, 0, "move_undo", I18N_NOOP("Und&o"), 0, "undo" }, { KStdGameAction::Undo, TDEStdAccel::Undo, 0, "move_undo", I18N_NOOP("Und&o"), 0, "undo" },
{ KStdGameAction::Redo, KStdAccel::Redo, 0, "move_redo", I18N_NOOP("Re&do"), 0, "redo" }, { KStdGameAction::Redo, TDEStdAccel::Redo, 0, "move_redo", I18N_NOOP("Re&do"), 0, "redo" },
{ KStdGameAction::Roll, KStdAccel::AccelNone, TQt::CTRL+TQt::Key_R, "move_roll", I18N_NOOP("&Roll Dice"), 0, "roll" }, { KStdGameAction::Roll, TDEStdAccel::AccelNone, TQt::CTRL+TQt::Key_R, "move_roll", I18N_NOOP("&Roll Dice"), 0, "roll" },
{ KStdGameAction::EndTurn, KStdAccel::AccelNone, 0, "move_end_turn", I18N_NOOP("End Turn"), 0, "endturn" }, { KStdGameAction::EndTurn, TDEStdAccel::AccelNone, 0, "move_end_turn", I18N_NOOP("End Turn"), 0, "endturn" },
{ KStdGameAction::Hint, KStdAccel::AccelNone, TQt::Key_H, "move_hint", I18N_NOOP("&Hint"), 0, "idea" }, { KStdGameAction::Hint, TDEStdAccel::AccelNone, TQt::Key_H, "move_hint", I18N_NOOP("&Hint"), 0, "idea" },
{ KStdGameAction::Demo, KStdAccel::AccelNone, TQt::Key_D, "move_demo", I18N_NOOP("&Demo"), 0, "1rightarrow" }, { KStdGameAction::Demo, TDEStdAccel::AccelNone, TQt::Key_D, "move_demo", I18N_NOOP("&Demo"), 0, "1rightarrow" },
{ KStdGameAction::Solve, KStdAccel::AccelNone, 0, "move_solve", I18N_NOOP("&Solve"), 0, "wizard" }, { KStdGameAction::Solve, TDEStdAccel::AccelNone, 0, "move_solve", I18N_NOOP("&Solve"), 0, "wizard" },
// "settings" menu // "settings" menu
{ KStdGameAction::ChooseGameType, KStdAccel::AccelNone, 0, "options_choose_game_type", I18N_NOOP("Choose Game &Type"), 0, 0 }, { KStdGameAction::ChooseGameType, TDEStdAccel::AccelNone, 0, "options_choose_game_type", I18N_NOOP("Choose Game &Type"), 0, 0 },
{ KStdGameAction::Carddecks, KStdAccel::AccelNone, 0, "options_configure_carddecks", I18N_NOOP("Configure &Carddecks..."), 0, 0 }, { KStdGameAction::Carddecks, TDEStdAccel::AccelNone, 0, "options_configure_carddecks", I18N_NOOP("Configure &Carddecks..."), 0, 0 },
{ KStdGameAction::ConfigureHighscores, KStdAccel::AccelNone, 0, "options_configure_highscores", I18N_NOOP("Configure &Highscores..."), 0, 0 }, { KStdGameAction::ConfigureHighscores, TDEStdAccel::AccelNone, 0, "options_configure_highscores", I18N_NOOP("Configure &Highscores..."), 0, 0 },
{ KStdGameAction::ActionNone, KStdAccel::AccelNone, 0, 0, 0, 0, 0 } { KStdGameAction::ActionNone, TDEStdAccel::AccelNone, 0, 0, 0, 0, 0 }
}; };
static const KStdGameActionInfo* infoPtr( KStdGameAction::StdGameAction id ) static const KStdGameActionInfo* infoPtr( KStdGameAction::StdGameAction id )
@ -95,35 +95,35 @@ static const KStdGameActionInfo* infoPtr( KStdGameAction::StdGameAction id )
} }
KAction* KStdGameAction::create(StdGameAction id, const char *name, TDEAction* KStdGameAction::create(StdGameAction id, const char *name,
const TQObject *recvr, const char *slot, const TQObject *recvr, const char *slot,
KActionCollection* parent ) TDEActionCollection* parent )
{ {
KAction* pAction = 0; TDEAction* pAction = 0;
const KStdGameActionInfo* pInfo = infoPtr( id ); const KStdGameActionInfo* pInfo = infoPtr( id );
kdDebug(125) << "KStdGameAction::create( " << id << "=" << (pInfo ? pInfo->psName : (const char*)0) << ", " << parent << ", " << name << " )" << endl; kdDebug(125) << "KStdGameAction::create( " << id << "=" << (pInfo ? pInfo->psName : (const char*)0) << ", " << parent << ", " << name << " )" << endl;
if( pInfo ) { if( pInfo ) {
TQString sLabel = i18n(pInfo->psLabel); TQString sLabel = i18n(pInfo->psLabel);
KShortcut cut = (pInfo->globalAccel==KStdAccel::AccelNone TDEShortcut cut = (pInfo->globalAccel==TDEStdAccel::AccelNone
? KShortcut(pInfo->shortcut) ? TDEShortcut(pInfo->shortcut)
: KStdAccel::shortcut(pInfo->globalAccel)); : TDEStdAccel::shortcut(pInfo->globalAccel));
const char *n = name ? name : pInfo->psName; const char *n = name ? name : pInfo->psName;
switch( id ) { switch( id ) {
case LoadRecent: case LoadRecent:
pAction = pAction =
new KRecentFilesAction(sLabel, cut, recvr, slot, parent, n); new TDERecentFilesAction(sLabel, cut, recvr, slot, parent, n);
break; break;
case Pause: case Pause:
case Demo: case Demo:
pAction = new KToggleAction( sLabel, pInfo->psIconName, cut, pAction = new TDEToggleAction( sLabel, pInfo->psIconName, cut,
recvr, slot, parent, n); recvr, slot, parent, n);
break; break;
case ChooseGameType: case ChooseGameType:
pAction = new KSelectAction( sLabel, pInfo->psIconName, cut, pAction = new TDESelectAction( sLabel, pInfo->psIconName, cut,
recvr, slot, parent, n); recvr, slot, parent, n);
break; break;
default: default:
pAction = new KAction( sLabel, pInfo->psIconName, cut, pAction = new TDEAction( sLabel, pInfo->psIconName, cut,
recvr, slot, parent, n); recvr, slot, parent, n);
break; break;
} }
@ -137,73 +137,73 @@ const char* KStdGameAction::name( StdGameAction id )
return (pInfo) ? pInfo->psName : 0; return (pInfo) ? pInfo->psName : 0;
} }
KAction *KStdGameAction::gameNew(const TQObject *recvr, const char *slot, TDEAction *KStdGameAction::gameNew(const TQObject *recvr, const char *slot,
KActionCollection *parent, const char *name ) TDEActionCollection *parent, const char *name )
{ return KStdGameAction::create(New, name, recvr, slot, parent); } { return KStdGameAction::create(New, name, recvr, slot, parent); }
KAction *KStdGameAction::load(const TQObject *recvr, const char *slot, TDEAction *KStdGameAction::load(const TQObject *recvr, const char *slot,
KActionCollection *parent, const char *name ) TDEActionCollection *parent, const char *name )
{ return KStdGameAction::create(Load, name, recvr, slot, parent); } { return KStdGameAction::create(Load, name, recvr, slot, parent); }
KRecentFilesAction *KStdGameAction::loadRecent(const TQObject *recvr, const char *slot, TDERecentFilesAction *KStdGameAction::loadRecent(const TQObject *recvr, const char *slot,
KActionCollection *parent, const char *name ) TDEActionCollection *parent, const char *name )
{ return static_cast<KRecentFilesAction *>(KStdGameAction::create(LoadRecent, name, recvr, slot, parent)); } { return static_cast<TDERecentFilesAction *>(KStdGameAction::create(LoadRecent, name, recvr, slot, parent)); }
KAction *KStdGameAction::save(const TQObject *recvr, const char *slot, TDEAction *KStdGameAction::save(const TQObject *recvr, const char *slot,
KActionCollection *parent, const char *name ) TDEActionCollection *parent, const char *name )
{ return KStdGameAction::create(Save, name, recvr, slot, parent); } { return KStdGameAction::create(Save, name, recvr, slot, parent); }
KAction *KStdGameAction::saveAs(const TQObject *recvr, const char *slot, TDEAction *KStdGameAction::saveAs(const TQObject *recvr, const char *slot,
KActionCollection *parent, const char *name ) TDEActionCollection *parent, const char *name )
{ return KStdGameAction::create(SaveAs, name, recvr, slot, parent); } { return KStdGameAction::create(SaveAs, name, recvr, slot, parent); }
KAction *KStdGameAction::end(const TQObject *recvr, const char *slot, TDEAction *KStdGameAction::end(const TQObject *recvr, const char *slot,
KActionCollection *parent, const char *name ) TDEActionCollection *parent, const char *name )
{ return KStdGameAction::create(End, name, recvr, slot, parent); } { return KStdGameAction::create(End, name, recvr, slot, parent); }
KToggleAction *KStdGameAction::pause(const TQObject *recvr, const char *slot, TDEToggleAction *KStdGameAction::pause(const TQObject *recvr, const char *slot,
KActionCollection *parent, const char *name ) TDEActionCollection *parent, const char *name )
{ return static_cast<KToggleAction *>(KStdGameAction::create(Pause, name, recvr, slot, parent)); } { return static_cast<TDEToggleAction *>(KStdGameAction::create(Pause, name, recvr, slot, parent)); }
KAction *KStdGameAction::highscores(const TQObject *recvr, const char *slot, TDEAction *KStdGameAction::highscores(const TQObject *recvr, const char *slot,
KActionCollection *parent, const char *name ) TDEActionCollection *parent, const char *name )
{ return KStdGameAction::create(Highscores, name, recvr, slot, parent); } { return KStdGameAction::create(Highscores, name, recvr, slot, parent); }
KAction *KStdGameAction::print(const TQObject *recvr, const char *slot, TDEAction *KStdGameAction::print(const TQObject *recvr, const char *slot,
KActionCollection *parent, const char *name ) TDEActionCollection *parent, const char *name )
{ return KStdGameAction::create(Print, name, recvr, slot, parent); } { return KStdGameAction::create(Print, name, recvr, slot, parent); }
KAction *KStdGameAction::quit(const TQObject *recvr, const char *slot, TDEAction *KStdGameAction::quit(const TQObject *recvr, const char *slot,
KActionCollection *parent, const char *name ) TDEActionCollection *parent, const char *name )
{ return KStdGameAction::create(Quit, name, recvr, slot, parent); } { return KStdGameAction::create(Quit, name, recvr, slot, parent); }
KAction *KStdGameAction::repeat(const TQObject *recvr, const char *slot, TDEAction *KStdGameAction::repeat(const TQObject *recvr, const char *slot,
KActionCollection *parent, const char *name ) TDEActionCollection *parent, const char *name )
{ return KStdGameAction::create(Repeat, name, recvr, slot, parent); } { return KStdGameAction::create(Repeat, name, recvr, slot, parent); }
KAction *KStdGameAction::undo(const TQObject *recvr, const char *slot, TDEAction *KStdGameAction::undo(const TQObject *recvr, const char *slot,
KActionCollection *parent, const char *name ) TDEActionCollection *parent, const char *name )
{ return KStdGameAction::create(Undo, name, recvr, slot, parent); } { return KStdGameAction::create(Undo, name, recvr, slot, parent); }
KAction *KStdGameAction::redo(const TQObject *recvr, const char *slot, TDEAction *KStdGameAction::redo(const TQObject *recvr, const char *slot,
KActionCollection *parent, const char *name ) TDEActionCollection *parent, const char *name )
{ return KStdGameAction::create(Redo, name, recvr, slot, parent); } { return KStdGameAction::create(Redo, name, recvr, slot, parent); }
KAction *KStdGameAction::roll(const TQObject *recvr, const char *slot, TDEAction *KStdGameAction::roll(const TQObject *recvr, const char *slot,
KActionCollection *parent, const char *name ) TDEActionCollection *parent, const char *name )
{ return KStdGameAction::create(Roll, name, recvr, slot, parent); } { return KStdGameAction::create(Roll, name, recvr, slot, parent); }
KAction *KStdGameAction::endTurn(const TQObject *recvr, const char *slot, TDEAction *KStdGameAction::endTurn(const TQObject *recvr, const char *slot,
KActionCollection *parent, const char *name ) TDEActionCollection *parent, const char *name )
{ return KStdGameAction::create(EndTurn, name, recvr, slot, parent); } { return KStdGameAction::create(EndTurn, name, recvr, slot, parent); }
KAction *KStdGameAction::carddecks(const TQObject *recvr, const char *slot, TDEAction *KStdGameAction::carddecks(const TQObject *recvr, const char *slot,
KActionCollection *parent, const char *name ) TDEActionCollection *parent, const char *name )
{ return KStdGameAction::create(Carddecks, name, recvr, slot, parent); } { return KStdGameAction::create(Carddecks, name, recvr, slot, parent); }
KAction *KStdGameAction::configureHighscores(const TQObject*recvr, const char *slot, TDEAction *KStdGameAction::configureHighscores(const TQObject*recvr, const char *slot,
KActionCollection *parent, const char *name) TDEActionCollection *parent, const char *name)
{ return KStdGameAction::create(ConfigureHighscores, name, recvr, slot, parent); } { return KStdGameAction::create(ConfigureHighscores, name, recvr, slot, parent); }
KAction *KStdGameAction::hint(const TQObject*recvr, const char *slot, TDEAction *KStdGameAction::hint(const TQObject*recvr, const char *slot,
KActionCollection *parent, const char *name) TDEActionCollection *parent, const char *name)
{ return KStdGameAction::create(Hint, name, recvr, slot, parent); } { return KStdGameAction::create(Hint, name, recvr, slot, parent); }
KToggleAction *KStdGameAction::demo(const TQObject*recvr, const char *slot, TDEToggleAction *KStdGameAction::demo(const TQObject*recvr, const char *slot,
KActionCollection *parent, const char *name) TDEActionCollection *parent, const char *name)
{ return static_cast<KToggleAction *>(KStdGameAction::create(Demo, name, recvr, slot, parent)); } { return static_cast<TDEToggleAction *>(KStdGameAction::create(Demo, name, recvr, slot, parent)); }
KAction *KStdGameAction::solve(const TQObject*recvr, const char *slot, TDEAction *KStdGameAction::solve(const TQObject*recvr, const char *slot,
KActionCollection *parent, const char *name) TDEActionCollection *parent, const char *name)
{ return KStdGameAction::create(Solve, name, recvr, slot, parent); } { return KStdGameAction::create(Solve, name, recvr, slot, parent); }
KSelectAction *KStdGameAction::chooseGameType(const TQObject*recvr, const char *slot, TDESelectAction *KStdGameAction::chooseGameType(const TQObject*recvr, const char *slot,
KActionCollection *parent, const char *name) TDEActionCollection *parent, const char *name)
{ return static_cast<KSelectAction *>(KStdGameAction::create(ChooseGameType, name, recvr, slot, parent)); } { return static_cast<TDESelectAction *>(KStdGameAction::create(ChooseGameType, name, recvr, slot, parent)); }
KAction *KStdGameAction::restart(const TQObject*recvr, const char *slot, TDEAction *KStdGameAction::restart(const TQObject*recvr, const char *slot,
KActionCollection *parent, const char *name) TDEActionCollection *parent, const char *name)
{ return KStdGameAction::create(Restart, name, recvr, slot, parent); } { return KStdGameAction::create(Restart, name, recvr, slot, parent); }

@ -21,12 +21,12 @@
#ifndef KSTDGAMEACTION_H #ifndef KSTDGAMEACTION_H
#define KSTDGAMEACTION_H #define KSTDGAMEACTION_H
class KAction; class TDEAction;
class KToggleAction; class TDEToggleAction;
class TQObject; class TQObject;
class KActionCollection; class TDEActionCollection;
class KRecentFilesAction; class TDERecentFilesAction;
class KSelectAction; class TDESelectAction;
#include <kdemacros.h> #include <kdemacros.h>
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@ -77,16 +77,16 @@ public:
* KStdAction::StdAction enum. * KStdAction::StdAction enum.
* @since 3.2 * @since 3.2
*/ */
static KAction* create( StdGameAction id, const char *name, static TDEAction* create( StdGameAction id, const char *name,
const TQObject *recvr, const char *slot, const TQObject *recvr, const char *slot,
KActionCollection* parent ); TDEActionCollection* parent );
/** /**
* @since 3.2 * @since 3.2
*/ */
static KAction* create( StdGameAction id, static TDEAction* create( StdGameAction id,
const TQObject *recvr, const char *slot, const TQObject *recvr, const char *slot,
KActionCollection* parent ) TDEActionCollection* parent )
{ return create( id, 0, recvr, slot, parent ); } { return create( id, 0, recvr, slot, parent ); }
@ -95,8 +95,8 @@ public:
* KStdGameAction::StdGameAction enum. * KStdGameAction::StdGameAction enum.
* @deprecated * @deprecated
*/ */
static KAction *action(StdGameAction act_enum, const TQObject *recvr = 0, static TDEAction *action(StdGameAction act_enum, const TQObject *recvr = 0,
const char *slot = 0, KActionCollection *parent = 0, const char *slot = 0, TDEActionCollection *parent = 0,
const char *name = 0L ); const char *name = 0L );
/** /**
@ -114,147 +114,147 @@ public:
/** /**
* Start a new game * Start a new game
**/ **/
static KAction *gameNew(const TQObject *recvr = 0, const char *slot = 0, static TDEAction *gameNew(const TQObject *recvr = 0, const char *slot = 0,
KActionCollection *parent = 0, const char *name = 0L ); TDEActionCollection *parent = 0, const char *name = 0L );
/** /**
* Load a previousely saved game * Load a previousely saved game
*/ */
static KAction *load(const TQObject *recvr = 0, const char *slot = 0, static TDEAction *load(const TQObject *recvr = 0, const char *slot = 0,
KActionCollection *parent = 0, const char *name = 0L ); TDEActionCollection *parent = 0, const char *name = 0L );
/** /**
* Load a recently loaded game. * Load a recently loaded game.
*/ */
static KRecentFilesAction *loadRecent(const TQObject *recvr = 0, const char *slot = 0, static TDERecentFilesAction *loadRecent(const TQObject *recvr = 0, const char *slot = 0,
KActionCollection *parent = 0, const char *name = 0L ); TDEActionCollection *parent = 0, const char *name = 0L );
/** /**
* Save the current game. * Save the current game.
*/ */
static KAction *save(const TQObject *recvr = 0, const char *slot = 0, static TDEAction *save(const TQObject *recvr = 0, const char *slot = 0,
KActionCollection *parent = 0, const char *name = 0L ); TDEActionCollection *parent = 0, const char *name = 0L );
/** /**
* Save the current game under a different filename. * Save the current game under a different filename.
*/ */
static KAction *saveAs(const TQObject *recvr = 0, const char *slot = 0, static TDEAction *saveAs(const TQObject *recvr = 0, const char *slot = 0,
KActionCollection *parent = 0, const char *name = 0L ); TDEActionCollection *parent = 0, const char *name = 0L );
/** /**
* Pause the game * Pause the game
**/ **/
static KToggleAction *pause(const TQObject *recvr = 0, const char *slot = 0, static TDEToggleAction *pause(const TQObject *recvr = 0, const char *slot = 0,
KActionCollection *parent = 0, const char *name = 0L ); TDEActionCollection *parent = 0, const char *name = 0L );
/** /**
* Show the highscores. * Show the highscores.
*/ */
static KAction *highscores(const TQObject *recvr = 0, const char *slot = 0, static TDEAction *highscores(const TQObject *recvr = 0, const char *slot = 0,
KActionCollection *parent = 0, const char *name = 0L ); TDEActionCollection *parent = 0, const char *name = 0L );
/** /**
* End the current game, but do not quit the program. Think of a "close" * End the current game, but do not quit the program. Think of a "close"
* entry. * entry.
*/ */
static KAction *end(const TQObject *recvr = 0, const char *slot = 0, static TDEAction *end(const TQObject *recvr = 0, const char *slot = 0,
KActionCollection *parent = 0, const char *name = 0L ); TDEActionCollection *parent = 0, const char *name = 0L );
/** /**
* Print the current screen? Game? Whatever - hardly used in games but there * Print the current screen? Game? Whatever - hardly used in games but there
* is at least one example (ktuberling) * is at least one example (ktuberling)
*/ */
static KAction *print(const TQObject *recvr = 0, const char *slot = 0, static TDEAction *print(const TQObject *recvr = 0, const char *slot = 0,
KActionCollection *parent = 0, const char *name = 0L ); TDEActionCollection *parent = 0, const char *name = 0L );
/** /**
* Quit the game. * Quit the game.
*/ */
static KAction *quit(const TQObject *recvr = 0, const char *slot = 0, static TDEAction *quit(const TQObject *recvr = 0, const char *slot = 0,
KActionCollection *parent = 0, const char *name = 0L ); TDEActionCollection *parent = 0, const char *name = 0L );
/** /**
* Repeat the last move. * Repeat the last move.
**/ **/
static KAction *repeat(const TQObject *recvr = 0, const char *slot = 0, static TDEAction *repeat(const TQObject *recvr = 0, const char *slot = 0,
KActionCollection *parent = 0, const char *name = 0L ); TDEActionCollection *parent = 0, const char *name = 0L );
/** /**
* Undo the last move * Undo the last move
**/ **/
static KAction *undo(const TQObject *recvr = 0, const char *slot = 0, static TDEAction *undo(const TQObject *recvr = 0, const char *slot = 0,
KActionCollection *parent = 0, const char *name = 0L ); TDEActionCollection *parent = 0, const char *name = 0L );
/** /**
* Redo the last move (which has been undone) * Redo the last move (which has been undone)
**/ **/
static KAction *redo(const TQObject *recvr = 0, const char *slot = 0, static TDEAction *redo(const TQObject *recvr = 0, const char *slot = 0,
KActionCollection *parent = 0, const char *name = 0L ); TDEActionCollection *parent = 0, const char *name = 0L );
/** /**
* Roll die or dice * Roll die or dice
**/ **/
static KAction *roll(const TQObject *recvr = 0, const char *slot = 0, static TDEAction *roll(const TQObject *recvr = 0, const char *slot = 0,
KActionCollection *parent = 0, const char *name = 0L ); TDEActionCollection *parent = 0, const char *name = 0L );
/** /**
* End the current turn (not the game). Usually to let the next player * End the current turn (not the game). Usually to let the next player
* start * start
**/ **/
static KAction *endTurn(const TQObject *recvr = 0, const char *slot = 0, static TDEAction *endTurn(const TQObject *recvr = 0, const char *slot = 0,
KActionCollection *parent = 0, const char *name = 0L ); TDEActionCollection *parent = 0, const char *name = 0L );
/** /**
* Display configure carddecks dialog. * Display configure carddecks dialog.
*/ */
static KAction *carddecks(const TQObject *recvr = 0, const char *slot = 0, static TDEAction *carddecks(const TQObject *recvr = 0, const char *slot = 0,
KActionCollection *parent = 0, const char *name = 0L ); TDEActionCollection *parent = 0, const char *name = 0L );
/** /**
* Display configure highscores dialog. * Display configure highscores dialog.
* @since 3.2 * @since 3.2
*/ */
static KAction *configureHighscores(const TQObject *recvr = 0, const char *slot = 0, static TDEAction *configureHighscores(const TQObject *recvr = 0, const char *slot = 0,
KActionCollection *parent = 0, const char *name = 0L ); TDEActionCollection *parent = 0, const char *name = 0L );
/** /**
* Give an advice/hint. * Give an advice/hint.
* @since 3.2 * @since 3.2
*/ */
static KAction *hint(const TQObject *recvr = 0, const char *slot = 0, static TDEAction *hint(const TQObject *recvr = 0, const char *slot = 0,
KActionCollection *parent = 0, const char *name = 0L ); TDEActionCollection *parent = 0, const char *name = 0L );
/** /**
* Show a demo. * Show a demo.
* @since 3.2 * @since 3.2
*/ */
static KToggleAction *demo(const TQObject *recvr = 0, const char *slot = 0, static TDEToggleAction *demo(const TQObject *recvr = 0, const char *slot = 0,
KActionCollection *parent = 0, const char *name = 0L ); TDEActionCollection *parent = 0, const char *name = 0L );
/** /**
* Solve the game. * Solve the game.
* @since 3.2 * @since 3.2
*/ */
static KAction *solve(const TQObject *recvr = 0, const char *slot = 0, static TDEAction *solve(const TQObject *recvr = 0, const char *slot = 0,
KActionCollection *parent = 0, const char *name = 0L ); TDEActionCollection *parent = 0, const char *name = 0L );
/** /**
* Choose game type. * Choose game type.
* @since 3.2 * @since 3.2
*/ */
static KSelectAction *chooseGameType(const TQObject *recvr = 0, const char *slot = 0, static TDESelectAction *chooseGameType(const TQObject *recvr = 0, const char *slot = 0,
KActionCollection *parent = 0, const char *name = 0L ); TDEActionCollection *parent = 0, const char *name = 0L );
/** /**
* Restart game. * Restart game.
* @since 3.2 * @since 3.2
*/ */
static KAction *restart(const TQObject *recvr = 0, const char *slot = 0, static TDEAction *restart(const TQObject *recvr = 0, const char *slot = 0,
KActionCollection *parent = 0, const char *name = 0L ); TDEActionCollection *parent = 0, const char *name = 0L );
}; };

@ -45,7 +45,7 @@
#define ID_STATUS_MSG 1003 #define ID_STATUS_MSG 1003
#define ID_STATUS_MOVER 1002 #define ID_STATUS_MOVER 1002
LSkatApp::LSkatApp() : KMainWindow(0) LSkatApp::LSkatApp() : TDEMainWindow(0)
{ {
config=kapp->config(); config=kapp->config();
@ -62,7 +62,7 @@ LSkatApp::LSkatApp() : KMainWindow(0)
initGUI(); initGUI();
initStatusBar(); initStatusBar();
setupGUI(KMainWindow::StatusBar | Save); setupGUI(TDEMainWindow::StatusBar | Save);
createGUI(TQString(), false); createGUI(TQString(), false);
initDocument(); initDocument();
@ -120,17 +120,17 @@ void LSkatApp::checkMenus(int menu)
if (!menu || (menu&CheckOptionsMenu)) if (!menu || (menu&CheckOptionsMenu))
{ {
((KSelectAction *)ACTION("startplayer"))->setCurrentItem(doc->GetStartPlayer()); ((TDESelectAction *)ACTION("startplayer"))->setCurrentItem(doc->GetStartPlayer());
if (doc->IsRunning()) disableAction("startplayer"); if (doc->IsRunning()) disableAction("startplayer");
else enableAction("startplayer"); else enableAction("startplayer");
if (doc->GetPlayedBy(0)==KG_INPUTTYPE_INTERACTIVE) if (doc->GetPlayedBy(0)==KG_INPUTTYPE_INTERACTIVE)
((KSelectAction *)ACTION("player1"))->setCurrentItem(0); ((TDESelectAction *)ACTION("player1"))->setCurrentItem(0);
else if (doc->GetPlayedBy(0)==KG_INPUTTYPE_PROCESS) else if (doc->GetPlayedBy(0)==KG_INPUTTYPE_PROCESS)
((KSelectAction *)ACTION("player1"))->setCurrentItem(1); ((TDESelectAction *)ACTION("player1"))->setCurrentItem(1);
else else
((KSelectAction *)ACTION("player1"))->setCurrentItem(2); ((TDESelectAction *)ACTION("player1"))->setCurrentItem(2);
/* /*
if (doc->IsRunning()) disableAction("player1"); if (doc->IsRunning()) disableAction("player1");
@ -138,18 +138,18 @@ void LSkatApp::checkMenus(int menu)
*/ */
if (doc->GetPlayedBy(1)==KG_INPUTTYPE_INTERACTIVE) if (doc->GetPlayedBy(1)==KG_INPUTTYPE_INTERACTIVE)
((KSelectAction *)ACTION("player2"))->setCurrentItem(0); ((TDESelectAction *)ACTION("player2"))->setCurrentItem(0);
else if (doc->GetPlayedBy(1)==KG_INPUTTYPE_PROCESS) else if (doc->GetPlayedBy(1)==KG_INPUTTYPE_PROCESS)
((KSelectAction *)ACTION("player2"))->setCurrentItem(1); ((TDESelectAction *)ACTION("player2"))->setCurrentItem(1);
else else
((KSelectAction *)ACTION("player2"))->setCurrentItem(2); ((TDESelectAction *)ACTION("player2"))->setCurrentItem(2);
/* /*
if (doc->IsRunning()) disableAction("player2"); if (doc->IsRunning()) disableAction("player2");
else enableAction("player2"); else enableAction("player2");
*/ */
((KSelectAction *)ACTION("choose_level"))->setCurrentItem(doc->GetComputerLevel()-1); ((TDESelectAction *)ACTION("choose_level"))->setCurrentItem(doc->GetComputerLevel()-1);
} }
} }
@ -161,15 +161,15 @@ void LSkatApp::initGUI()
(void)KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(slotFileNew()), actionCollection(), "new_game"); (void)KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(slotFileNew()), actionCollection(), "new_game");
ACTION("new_game")->setStatusText(i18n("Starting a new game...")); ACTION("new_game")->setStatusText(i18n("Starting a new game..."));
ACTION("new_game")->setWhatsThis(i18n("Starting a new game...")); ACTION("new_game")->setWhatsThis(i18n("Starting a new game..."));
(void)new KAction(i18n("&End Game"),"stop", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileEnd()), (void)new TDEAction(i18n("&End Game"),"stop", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileEnd()),
actionCollection(), "end_game"); actionCollection(), "end_game");
ACTION("end_game")->setStatusText(i18n("Ending the current game...")); ACTION("end_game")->setStatusText(i18n("Ending the current game..."));
ACTION("end_game")->setWhatsThis(i18n("Aborts a currently played game. No winner will be declared.")); ACTION("end_game")->setWhatsThis(i18n("Aborts a currently played game. No winner will be declared."));
(void)new KAction(i18n("&Clear Statistics"),"flag", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileStatistics()), (void)new TDEAction(i18n("&Clear Statistics"),"flag", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileStatistics()),
actionCollection(), "clear_statistics"); actionCollection(), "clear_statistics");
ACTION("clear_statistics")->setStatusText(i18n("Delete all time statistics...")); ACTION("clear_statistics")->setStatusText(i18n("Delete all time statistics..."));
ACTION("clear_statistics")->setWhatsThis(i18n("Clears the all time statistics which is kept in all sessions.")); ACTION("clear_statistics")->setWhatsThis(i18n("Clears the all time statistics which is kept in all sessions."));
(void)new KAction(i18n("Send &Message..."), CTRL+Key_M, TQT_TQOBJECT(this), TQT_SLOT(slotFileMessage()), (void)new TDEAction(i18n("Send &Message..."), CTRL+Key_M, TQT_TQOBJECT(this), TQT_SLOT(slotFileMessage()),
actionCollection(), "send_message"); actionCollection(), "send_message");
ACTION("send_message")->setStatusText(i18n("Sending message to remote player...")); ACTION("send_message")->setStatusText(i18n("Sending message to remote player..."));
ACTION("send_message")->setWhatsThis(i18n("Allows you to talk with a remote player.")); ACTION("send_message")->setWhatsThis(i18n("Allows you to talk with a remote player."));
@ -177,16 +177,16 @@ void LSkatApp::initGUI()
ACTION("game_exit")->setStatusText(i18n("Exiting...")); ACTION("game_exit")->setStatusText(i18n("Exiting..."));
ACTION("game_exit")->setWhatsThis(i18n("Quits the program.")); ACTION("game_exit")->setWhatsThis(i18n("Quits the program."));
(void)new KSelectAction(i18n("Starting Player"),0,TQT_TQOBJECT(this),TQT_SLOT(slotStartplayer()), (void)new TDESelectAction(i18n("Starting Player"),0,TQT_TQOBJECT(this),TQT_SLOT(slotStartplayer()),
actionCollection(), "startplayer"); actionCollection(), "startplayer");
ACTION("startplayer")->setStatusText(i18n("Changing starting player...")); ACTION("startplayer")->setStatusText(i18n("Changing starting player..."));
ACTION("startplayer")->setWhatsThis(i18n("Chooses which player begins the next game.")); ACTION("startplayer")->setWhatsThis(i18n("Chooses which player begins the next game."));
list.clear(); list.clear();
list.append(i18n("Player &1")); list.append(i18n("Player &1"));
list.append(i18n("Player &2")); list.append(i18n("Player &2"));
((KSelectAction *)ACTION("startplayer"))->setItems(list); ((TDESelectAction *)ACTION("startplayer"))->setItems(list);
(void)new KSelectAction(i18n("Player &1 Played By"),0,TQT_TQOBJECT(this),TQT_SLOT(slotPlayer1By()), (void)new TDESelectAction(i18n("Player &1 Played By"),0,TQT_TQOBJECT(this),TQT_SLOT(slotPlayer1By()),
actionCollection(), "player1"); actionCollection(), "player1");
ACTION("player1")->setStatusText(i18n("Changing who plays player 1...")); ACTION("player1")->setStatusText(i18n("Changing who plays player 1..."));
ACTION("player1")->setWhatsThis(i18n("Changing who plays player 1...")); ACTION("player1")->setWhatsThis(i18n("Changing who plays player 1..."));
@ -194,14 +194,14 @@ void LSkatApp::initGUI()
list.append(i18n("&Player")); list.append(i18n("&Player"));
list.append(i18n("&Computer")); list.append(i18n("&Computer"));
list.append(i18n("&Remote")); list.append(i18n("&Remote"));
((KSelectAction *)ACTION("player1"))->setItems(list); ((TDESelectAction *)ACTION("player1"))->setItems(list);
(void)new KSelectAction(i18n("Player &2 Played By"),0,TQT_TQOBJECT(this),TQT_SLOT(slotPlayer2By()), (void)new TDESelectAction(i18n("Player &2 Played By"),0,TQT_TQOBJECT(this),TQT_SLOT(slotPlayer2By()),
actionCollection(), "player2"); actionCollection(), "player2");
ACTION("player1")->setStatusText(i18n("Changing who plays player 2...")); ACTION("player1")->setStatusText(i18n("Changing who plays player 2..."));
ACTION("player1")->setWhatsThis(i18n("Changing who plays player 2...")); ACTION("player1")->setWhatsThis(i18n("Changing who plays player 2..."));
((KSelectAction *)ACTION("player2"))->setItems(list); ((TDESelectAction *)ACTION("player2"))->setItems(list);
(void)new KSelectAction(i18n("&Level"),0,TQT_TQOBJECT(this),TQT_SLOT(slotLevel()), (void)new TDESelectAction(i18n("&Level"),0,TQT_TQOBJECT(this),TQT_SLOT(slotLevel()),
actionCollection(), "choose_level"); actionCollection(), "choose_level");
ACTION("choose_level")->setStatusText(i18n("Change level...")); ACTION("choose_level")->setStatusText(i18n("Change level..."));
ACTION("choose_level")->setWhatsThis(i18n("Change the strength of the computer player.")); ACTION("choose_level")->setWhatsThis(i18n("Change the strength of the computer player."));
@ -209,14 +209,14 @@ void LSkatApp::initGUI()
list.append(i18n("&Normal")); list.append(i18n("&Normal"));
list.append(i18n("&Advanced")); list.append(i18n("&Advanced"));
list.append(i18n("&Hard")); list.append(i18n("&Hard"));
((KSelectAction *)ACTION("choose_level"))->setItems(list); ((TDESelectAction *)ACTION("choose_level"))->setItems(list);
(void)new KAction(i18n("Select &Card Deck..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionsCardDeck()), (void)new TDEAction(i18n("Select &Card Deck..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionsCardDeck()),
actionCollection(), "select_carddeck"); actionCollection(), "select_carddeck");
ACTION("select_carddeck")->setStatusText(i18n("Configure card decks...")); ACTION("select_carddeck")->setStatusText(i18n("Configure card decks..."));
ACTION("select_carddeck")->setWhatsThis(i18n("Choose how the cards should look.")); ACTION("select_carddeck")->setWhatsThis(i18n("Choose how the cards should look."));
(void)new KAction(i18n("Change &Names..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionsNames()), (void)new TDEAction(i18n("Change &Names..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionsNames()),
actionCollection(), "change_names"); actionCollection(), "change_names");
ACTION("change_names")->setStatusText(i18n("Configure player names...")); ACTION("change_names")->setStatusText(i18n("Configure player names..."));
ACTION("change_names")->setWhatsThis(i18n("Configure player names...")); ACTION("change_names")->setWhatsThis(i18n("Configure player names..."));
@ -256,7 +256,7 @@ void LSkatApp::initDocument()
void LSkatApp::initView() void LSkatApp::initView()
{ {
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// create the main widget here that is managed by KMainWindow's view-region and // create the main widget here that is managed by TDEMainWindow's view-region and
// connect the widget to your document to display document contents. // connect the widget to your document to display document contents.
view = new LSkatView(this); view = new LSkatView(this);
doc->addView(view); doc->addView(view);
@ -268,7 +268,7 @@ void LSkatApp::enableAction(const char *s)
{ {
if (s) if (s)
{ {
KAction *act=actionCollection()->action(s); TDEAction *act=actionCollection()->action(s);
if (act) act->setEnabled(true); if (act) act->setEnabled(true);
} }
@ -277,7 +277,7 @@ void LSkatApp::disableAction(const char *s)
{ {
if (s) if (s)
{ {
KAction *act=actionCollection()->action(s); TDEAction *act=actionCollection()->action(s);
if (act) act->setEnabled(false); if (act) act->setEnabled(false);
} }
} }
@ -430,14 +430,14 @@ void LSkatApp::slotFileQuit()
void LSkatApp::slotStartplayer() void LSkatApp::slotStartplayer()
{ {
int i=((KSelectAction *)ACTION("startplayer"))->currentItem(); int i=((TDESelectAction *)ACTION("startplayer"))->currentItem();
doc->SetStartPlayer(i); doc->SetStartPlayer(i);
doc->UpdateViews(UPDATE_STATUS); doc->UpdateViews(UPDATE_STATUS);
} }
void LSkatApp::slotPlayer1By() void LSkatApp::slotPlayer1By()
{ {
switch(((KSelectAction *)ACTION("player1"))->currentItem()) switch(((TDESelectAction *)ACTION("player1"))->currentItem())
{ {
case 0: case 0:
slotPlayer1(KG_INPUTTYPE_INTERACTIVE); slotPlayer1(KG_INPUTTYPE_INTERACTIVE);
@ -453,7 +453,7 @@ void LSkatApp::slotPlayer1By()
void LSkatApp::slotPlayer2By() void LSkatApp::slotPlayer2By()
{ {
switch(((KSelectAction *)ACTION("player2"))->currentItem()) switch(((TDESelectAction *)ACTION("player2"))->currentItem())
{ {
case 0: case 0:
slotPlayer2(KG_INPUTTYPE_INTERACTIVE); slotPlayer2(KG_INPUTTYPE_INTERACTIVE);
@ -533,7 +533,7 @@ void LSkatApp::slotOptionsCardDeck()
void LSkatApp::slotLevel() void LSkatApp::slotLevel()
{ {
int i=((KSelectAction *)ACTION("choose_level"))->currentItem(); int i=((TDESelectAction *)ACTION("choose_level"))->currentItem();
i++; // we start at 1 i++; // we start at 1
doc->SetComputerLevel(i); doc->SetComputerLevel(i);
doc->UpdateViews(UPDATE_STATUS); doc->UpdateViews(UPDATE_STATUS);

@ -56,17 +56,17 @@ class LSkatView;
* window and reads the config file as well as providing a menubar, toolbar * window and reads the config file as well as providing a menubar, toolbar
* and statusbar. An instance of LSkatView creates your center view, which is connected * and statusbar. An instance of LSkatView creates your center view, which is connected
* to the window's Doc object. * to the window's Doc object.
* LSkatApp reimplements the methods that KMainWindow provides for main window handling and supports * LSkatApp reimplements the methods that TDEMainWindow provides for main window handling and supports
* full session management as well as keyboard accelerator configuration by using KAccel. * full session management as well as keyboard accelerator configuration by using TDEAccel.
* @see KMainWindow * @see TDEMainWindow
* @see TDEApplication * @see TDEApplication
* @see TDEConfig * @see TDEConfig
* @see KAccel * @see TDEAccel
* *
* @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team. * @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team.
* @version KDevelop version 0.4 code generation * @version KDevelop version 0.4 code generation
*/ */
class LSkatApp : public KMainWindow class LSkatApp : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -86,7 +86,7 @@ class LSkatApp : public KMainWindow
void disableAction(const char *); void disableAction(const char *);
/** add a opened file to the recent file list and update recent_file_menu /** add a opened file to the recent file list and update recent_file_menu
*/ */
/** returns a pointer to the current document connected to the KMainWindow instance and is used by /** returns a pointer to the current document connected to the TDEMainWindow instance and is used by
* the View class to access the document object's methods * the View class to access the document object's methods
*/ */
LSkatDoc *getDocument() const; LSkatDoc *getDocument() const;
@ -118,31 +118,31 @@ class LSkatApp : public KMainWindow
* @see initView(); * @see initView();
*/ */
void initDocument(); void initDocument();
/** creates the centerwidget of the KMainWindow instance and sets it as the view /** creates the centerwidget of the TDEMainWindow instance and sets it as the view
*/ */
void initView(); void initView();
/** queryClose is called by KMainWindow on each closeEvent of a window. Against the /** queryClose is called by TDEMainWindow on each closeEvent of a window. Against the
* default implementation (only returns true), this calles saveModified() on the document object to ask if the document shall * default implementation (only returns true), this calles saveModified() on the document object to ask if the document shall
* be saved if Modified; on cancel the closeEvent is rejected. * be saved if Modified; on cancel the closeEvent is rejected.
* @see KMainWindow#queryClose * @see TDEMainWindow#queryClose
* @see KMainWindow#closeEvent * @see TDEMainWindow#closeEvent
*/ */
virtual bool queryClose(); virtual bool queryClose();
/** queryExit is called by KMainWindow when the last window of the application is going to be closed during the closeEvent(). /** queryExit is called by TDEMainWindow when the last window of the application is going to be closed during the closeEvent().
* Against the default implementation that just returns true, this calls saveOptions() to save the settings of the last window's * Against the default implementation that just returns true, this calls saveOptions() to save the settings of the last window's
* properties. * properties.
* @see KMainWindow#queryExit * @see TDEMainWindow#queryExit
* @see KMainWindow#closeEvent * @see TDEMainWindow#closeEvent
*/ */
virtual bool queryExit(); virtual bool queryExit();
/** saves the window properties for each open window during session end to the session config file, including saving the currently /** saves the window properties for each open window during session end to the session config file, including saving the currently
* opened file by a temporary filename provided by TDEApplication. * opened file by a temporary filename provided by TDEApplication.
* @see KMainWindow#saveProperties * @see TDEMainWindow#saveProperties
*/ */
virtual void saveProperties(TDEConfig *_cfg); virtual void saveProperties(TDEConfig *_cfg);
/** reads the session config file and restores the application's state including the last opened files and documents by reading the /** reads the session config file and restores the application's state including the last opened files and documents by reading the
* temporary files saved by saveProperties() * temporary files saved by saveProperties()
* @see KMainWindow#readProperties * @see TDEMainWindow#readProperties
*/ */
virtual void readProperties(TDEConfig *_cfg); virtual void readProperties(TDEConfig *_cfg);

@ -107,7 +107,7 @@ void ChatDlg::setPlayer(Kwin4Player *p)
/** /**
* Construct the main application window * Construct the main application window
*/ */
Kwin4App::Kwin4App(TQWidget *parent, const char *name) : KMainWindow(parent,name), view(0), doc(0), mChat(0), mMyChatDlg(0) Kwin4App::Kwin4App(TQWidget *parent, const char *name) : TDEMainWindow(parent,name), view(0), doc(0), mChat(0), mMyChatDlg(0)
{ {
initGUI(); initGUI();
initStatusBar(); initStatusBar();
@ -201,17 +201,17 @@ void Kwin4App::initGUI()
ACTION("end_game")->setStatusText(i18n("Ending the current game...")); ACTION("end_game")->setStatusText(i18n("Ending the current game..."));
ACTION("end_game")->setWhatsThis(i18n("Aborts a currently played game. No winner will be declared.")); ACTION("end_game")->setWhatsThis(i18n("Aborts a currently played game. No winner will be declared."));
new KAction(i18n("&Network Configuration..."),0, TQT_TQOBJECT(this), TQT_SLOT(slotInitNetwork()), new TDEAction(i18n("&Network Configuration..."),0, TQT_TQOBJECT(this), TQT_SLOT(slotInitNetwork()),
actionCollection(), "network_conf"); actionCollection(), "network_conf");
new KAction(i18n("Network Chat..."),0, TQT_TQOBJECT(this), TQT_SLOT(slotChat()), new TDEAction(i18n("Network Chat..."),0, TQT_TQOBJECT(this), TQT_SLOT(slotChat()),
actionCollection(), "network_chat"); actionCollection(), "network_chat");
if (global_debug>0) if (global_debug>0)
new KAction(i18n("Debug KGame"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotDebugKGame()), new TDEAction(i18n("Debug KGame"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotDebugKGame()),
actionCollection(), "file_debug"); actionCollection(), "file_debug");
new KAction(i18n("&Show Statistics"),"flag", 0, TQT_TQOBJECT(this), new TDEAction(i18n("&Show Statistics"),"flag", 0, TQT_TQOBJECT(this),
TQT_SLOT(showStatistics()), actionCollection(), "statistics"); TQT_SLOT(showStatistics()), actionCollection(), "statistics");
ACTION("statistics")->setStatusText(i18n("Show statistics.")); ACTION("statistics")->setStatusText(i18n("Show statistics."));
@ -280,7 +280,7 @@ void Kwin4App::changeAction(const char *action, bool enable){
if (!action) if (!action)
return; return;
KAction *act=actionCollection()->action(action); TDEAction *act=actionCollection()->action(action);
if (act) if (act)
act->setEnabled(enable); act->setEnabled(enable);
} }

@ -53,7 +53,7 @@ private:
/** /**
* The base class for Kwin4 application window. * The base class for Kwin4 application window.
*/ */
class Kwin4App : public KMainWindow class Kwin4App : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT

Loading…
Cancel
Save