summaryrefslogtreecommitdiff
path: root/noncore
authorar <ar>2004-02-14 16:06:45 (UTC)
committer ar <ar>2004-02-14 16:06:45 (UTC)
commit1ab6282d6869ca200133a0e47323ae9a760b3400 (patch) (side-by-side diff)
treea7f2b4fb6f34edb4b50f00b12cf649b9cf59b8ca /noncore
parentc7cf5faa7f1512fa48fb298a75902d4557bc9cfa (diff)
downloadopie-1ab6282d6869ca200133a0e47323ae9a760b3400.zip
opie-1ab6282d6869ca200133a0e47323ae9a760b3400.tar.gz
opie-1ab6282d6869ca200133a0e47323ae9a760b3400.tar.bz2
improve support for BigScreen
Diffstat (limited to 'noncore') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/backgammon/aidialog.cpp3
-rw-r--r--noncore/games/backgammon/filedialog.cpp3
-rw-r--r--noncore/games/backgammon/playerdialog.cpp4
-rw-r--r--noncore/games/backgammon/rulesdialog.cpp4
-rw-r--r--noncore/games/backgammon/themedialog.cpp2
-rw-r--r--noncore/games/sfcave/helpwindow.cpp4
-rw-r--r--noncore/games/tetrix/ohighscoredlg.cpp3
-rw-r--r--noncore/games/tictac/tictac.cpp4
8 files changed, 18 insertions, 9 deletions
diff --git a/noncore/games/backgammon/aidialog.cpp b/noncore/games/backgammon/aidialog.cpp
index 7dfe403..32e9b52 100644
--- a/noncore/games/backgammon/aidialog.cpp
+++ b/noncore/games/backgammon/aidialog.cpp
@@ -1,16 +1,17 @@
#include "aidialog.h"
#include <qgroupbox.h>
+#include <qpe/qpeapplication.h>
AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
: QDialog(parent,name,modal,f)
{
setCaption("AI Configuration");
QGroupBox* settings=new QGroupBox(tr( "Settings" ),this);
settings->setGeometry(10,5,220,170);
QLabel* rescue_label=new QLabel(tr( "<b>Rescue</b>" ),settings);
rescue_label->setGeometry(50,20,50,20);
rescue=new QSpinBox(0,6,1,settings);
@@ -67,25 +68,25 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
defaultvalues=new QPushButton(tr( "Default Values" ),settings);
defaultvalues->setGeometry(60,140,90,20);
connect(defaultvalues,SIGNAL(clicked()),this,SLOT(setDefaultValues()));
QGroupBox* helpbox=new QGroupBox(tr( "Help" ),this);
helpbox->setGeometry(10,185,220,90);
help=new QLabel(helpbox);
help->setGeometry(10,15,200,65);
setHelpText();
- showMaximized();
+ QPEApplication::showDialog( this );
}
AI_Dialog::~AI_Dialog()
{
}
void AI_Dialog::rescuehelp_pressed()
{
setHelpText("rescue");
}
diff --git a/noncore/games/backgammon/filedialog.cpp b/noncore/games/backgammon/filedialog.cpp
index 6c858a2..a5e71c9 100644
--- a/noncore/games/backgammon/filedialog.cpp
+++ b/noncore/games/backgammon/filedialog.cpp
@@ -13,25 +13,26 @@ FileDialog::FileDialog(QWidget* parent,QString header,QString extension,const ch
setCaption(header);
ext=extension;
dirselector=new QListView(this);
dirselector->setGeometry(1,10,235,200);
dirselector->addColumn("Files");
connect(dirselector,SIGNAL(clicked(QListViewItem*)),this,SLOT(selectorclicked(QListViewItem*)));
getCurrentDir();
file_name="user";
fileinput=new QLineEdit(file_name,this);
fileinput->setGeometry(1,220,235,20);
- showMaximized();
+
+ QPEApplication::showDialog( this );
}
FileDialog::~FileDialog()
{}
void FileDialog::selectorclicked(QListViewItem* entry)
{
if(entry==NULL)
return;
file_name=entry->text(0);
fileinput->setText(file_name);
diff --git a/noncore/games/backgammon/playerdialog.cpp b/noncore/games/backgammon/playerdialog.cpp
index c16f202..0faf7e2 100644
--- a/noncore/games/backgammon/playerdialog.cpp
+++ b/noncore/games/backgammon/playerdialog.cpp
@@ -1,16 +1,18 @@
#include "playerdialog.h"
#include <qgroupbox.h>
+#include <qpe/qpeapplication.h>
+
PlayerDialog::PlayerDialog(QWidget* parent,const char* name,bool modal,WFlags f)
:QDialog(parent,name,modal,f)
{
auto2=false;
auto2=true;
setCaption("Player Settings");
QGroupBox* player1_box=new QGroupBox("Player 1",this);
player1_box->setGeometry(10,30,220,60);
manual_button1=new QRadioButton("Human",player1_box);
connect(manual_button1,SIGNAL(clicked()),this,SLOT(button_manual1()));
@@ -22,25 +24,25 @@ PlayerDialog::PlayerDialog(QWidget* parent,const char* name,bool modal,WFlags f)
QGroupBox* player2_box=new QGroupBox("Player 2",this);
player2_box->setGeometry(10,150,220,60);
manual_button2=new QRadioButton("Human",player2_box);
connect(manual_button2,SIGNAL(clicked()),this,SLOT(button_manual2()));
manual_button2->setGeometry(10,20,100,20);
auto_button2=new QRadioButton("Computer",player2_box);
connect(auto_button2,SIGNAL(clicked()),this,SLOT(button_auto2()));
auto_button2->setGeometry(110,20,100,20);
button2_state(auto2);
- showMaximized();
+ QPEApplication::showDialog( this );
}
PlayerDialog::~PlayerDialog()
{}
void PlayerDialog::button_manual1()
{
auto1=false;
button1_state(auto1);
}
diff --git a/noncore/games/backgammon/rulesdialog.cpp b/noncore/games/backgammon/rulesdialog.cpp
index 85c3db3..5e17eeb 100644
--- a/noncore/games/backgammon/rulesdialog.cpp
+++ b/noncore/games/backgammon/rulesdialog.cpp
@@ -1,17 +1,19 @@
#include "rulesdialog.h"
#include <qgroupbox.h>
#include <qlabel.h>
+#include <qpe/qpeapplication.h>
+
RulesDialog::RulesDialog(QWidget* parent,const char* name,bool modal,WFlags f)
: QDialog(parent,name,modal,f)
{
setCaption("Rules Configuration");
QLabel* header=new QLabel("<b>Change the game rules here</b>",this);
header->setGeometry(10,10,200,20);
//
QGroupBox* pieces_out_box=new QGroupBox("Movement",this);
pieces_out_box->setGeometry(10,10,220,120);
pieces_out=new QCheckBox("Don't care about others",pieces_out_box);
@@ -23,25 +25,25 @@ RulesDialog::RulesDialog(QWidget* parent,const char* name,bool modal,WFlags f)
//
QGroupBox* nice_dice_box=new QGroupBox("Dice",this);
nice_dice_box->setGeometry(10,140,220,120);
nice_dice=new QCheckBox("Big dice for small numbers",nice_dice_box);
nice_dice->setGeometry(10,20,200,20);
connect(nice_dice,SIGNAL(clicked()),this,SLOT(nice_dice_clicked()));
QLabel* nice_dice_help=new QLabel("allow to rescue pieces with dice\nvalues graeter than the distance\nto the players endzone.",nice_dice_box);
nice_dice_help->setGeometry(10,40,200,60);
- showMaximized();
+ QPEApplication::showDialog( this );
}
RulesDialog::~RulesDialog()
{
}
void RulesDialog::pieces_out_clicked()
{
if(pieces_out->isChecked())
rules.move_with_pieces_out=true;
else
diff --git a/noncore/games/backgammon/themedialog.cpp b/noncore/games/backgammon/themedialog.cpp
index dcb957c..f342381 100644
--- a/noncore/games/backgammon/themedialog.cpp
+++ b/noncore/games/backgammon/themedialog.cpp
@@ -50,25 +50,25 @@ ThemeDialog::ThemeDialog(QWidget* parent,const char* name,bool modal,WFlags f)
labelodds->setGeometry(0,200,40,20);
boxodds=new QComboBox(this);
boxodds->setGeometry(40,200,195,20);
fillBox("odds",boxodds);
boxodds->setEnabled(false);
QLabel* labeltable=new QLabel("table",this);
labeltable->setGeometry(0,225,40,20);
boxtable=new QComboBox(this);
boxtable->setGeometry(40,225,195,20);
fillBox("table",boxtable);
- showMaximized();
+ QPEApplication::showDialog( this );
}
ThemeDialog::~ThemeDialog()
{}
ImageNames ThemeDialog::getNames()
{
ImageNames names;
names.theme=lineName->text();
names.board=boxboard->currentText();
names.pieces1=boxpiecesA->currentText();
diff --git a/noncore/games/sfcave/helpwindow.cpp b/noncore/games/sfcave/helpwindow.cpp
index c920312..544e237 100644
--- a/noncore/games/sfcave/helpwindow.cpp
+++ b/noncore/games/sfcave/helpwindow.cpp
@@ -11,24 +11,26 @@
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include <qwidget.h>
#include <qlayout.h>
#include <qstring.h>
#include <qtextview.h>
+#include <qpe/qpeapplication.h>
+
#include "helpwindow.h"
#define HELP_TEXT \
"<qt><h1>SFCave Help</h1><p> " \
"SFCave is a flying game for the Zaurus.<br><br> " \
"The aim is to stay alive for as long as possible and get the highest score " \
"you can.<br><br>" \
"There are three game types currently - SFCave, Gates, and Fly.<br>" \
"<b>SFCave</b> is a remake of the classic SFCave game - fly through the " \
"cavern avoiding all the blocks that just happen to be hanging in " \
"midair<br><br>" \
@@ -62,18 +64,18 @@ HelpWindow::HelpWindow( QWidget *parent, const char *name, bool modal, WFlags fl
{
// resize( 230, 280 );
setCaption( "Help for SFCave" );
QVBoxLayout *layout = new QVBoxLayout( this );
QString text = HELP_TEXT;;
QTextView *view = new QTextView( text, 0, this, "view" );
layout->insertSpacing( -1, 5 );
layout->insertWidget( -1, view );
layout->insertSpacing( -1, 5 );
- showMaximized();
+ QPEApplication::showDialog( this );
}
HelpWindow::~HelpWindow()
{
}
diff --git a/noncore/games/tetrix/ohighscoredlg.cpp b/noncore/games/tetrix/ohighscoredlg.cpp
index cf0dcf7..7581f51 100644
--- a/noncore/games/tetrix/ohighscoredlg.cpp
+++ b/noncore/games/tetrix/ohighscoredlg.cpp
@@ -8,24 +8,25 @@
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* ( at your option ) any later version. *
* *
**************************************************************************/
#include <qdialog.h>
#include <qpe/config.h>
#include <qlayout.h>
#include <qpe/config.h>
+#include <qpe/qpeapplication.h>
#include <qstring.h>
#include <qhbox.h>
#include <qvbox.h>
#include <qlabel.h>
#include <qlistview.h>
#include <qlineedit.h>
#include "ohighscoredlg.h"
OHighscore::OHighscore( int score , int playerLevel )
{
@@ -160,25 +161,25 @@ OHighscoreDialog::OHighscoreDialog(OHighscore *highscore, QWidget *parent, const
setCaption( tr( "Highscores" ) );
vbox_layout = new QVBoxLayout( this, 4 , 4 );
list = new QListView( this );
list->setSorting( -1 );
list->addColumn( tr( "#" ));
list->addColumn( tr( "Name" ));
list->addColumn( tr( "Points" ));
list->addColumn( tr( "Level" ));
createHighscoreListView();
vbox_layout->addWidget( list );
- showMaximized();
+ QPEApplication::showDialog( this );
}
void OHighscoreDialog::createHighscoreListView()
{
int pos = 10;
int points_ = 0;
int level_ = 0;
std::list<t_playerData*>::reverse_iterator iListe = hs_->playerData.rbegin();
for ( ; iListe != hs_->playerData.rend() ; ++iListe )
{
diff --git a/noncore/games/tictac/tictac.cpp b/noncore/games/tictac/tictac.cpp
index 4954ba4..9de3b58 100644
--- a/noncore/games/tictac/tictac.cpp
+++ b/noncore/games/tictac/tictac.cpp
@@ -54,25 +54,25 @@ void TicTacButton::drawButtonLabel( QPainter *p )
//***************************************************************************
//* TicTacGameBoard member functions
//***************************************************************************
// --------------------------------------------------------------------------
// Creates a game board with N x N buttons and connects the "clicked()"
// signal of all buttons to the "buttonClicked()" slot.
//
TicTacGameBoard::TicTacGameBoard( int n, QWidget *parent, const char *name )
: QWidget( parent, name )
{
- showMaximized();
+ QPEApplication::showWidget( this );
st = Init; // initial state
nBoard = n;
n *= n; // make square
comp_starts = FALSE; // human starts
buttons = new TicTacButtons(n); // create real buttons
btArray = new TicTacArray(n); // create button model
QGridLayout * grid = new QGridLayout( this, 3, 3, 4 );
QPalette p( blue );
for ( int i=0; i<n; i++ ) { // create and connect buttons
TicTacButton *ttb = new TicTacButton( this );
ttb->setPalette( p );
ttb->setEnabled( FALSE );
@@ -324,25 +324,25 @@ TicTacToe::TicTacToe( QWidget *parent, const char *name, WFlags fl )
// Create the push buttons and connect their clicked() signals
// to this right slots.
newGame = new QPushButton( tr( "Play!" ), this );
connect( newGame, SIGNAL(clicked()), SLOT(newGameClicked()) );
quit = new QPushButton( tr( "Quit" ), this );
connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) );
QHBoxLayout * b = new QHBoxLayout;
l->addLayout( b );
b->addWidget( newGame );
b->addWidget( quit );
- showMaximized();
+ QPEApplication::showWidget( this );
newState();
}
// --------------------------------------------------------------------------
// TicTacToe::newGameClicked() - SLOT
//
// This slot is activated when the new game button is clicked.
//
void TicTacToe::newGameClicked()
{