}
void GUIGame::mousePressEvent(QMouseEvent *event){
QMessageBox::about(this,"xxxx!","yyyyy!");
}
To copy to clipboard, switch view to plain text mode
}
void GUIGame::mousePressEvent(QGraphicsSceneMouseEvent *event){
QMessageBox::about(this,"xxxx!","yyyyy!");
}
To copy to clipboard, switch view to plain text mode
it does'nt do anything.
{
setWindowTitle(tr("DuckBoard"));
setWindowIcon
(QPixmap("logo.png"));
this->setWindowState(Qt::WindowMaximized);
setWindowTitle(tr("DuckBoard"));
setWindowIcon
(QPixmap("logo.png"));
gamemenu = menuBar()->addMenu(tr("&Game"));
gamemenu
->addAction
(QPixmap("icons/wand.png"), tr
("&New"),
this,
SLOT(newGame
()),
QKeySequence("Ctrl+N"));
gamemenu
->addAction
(QPixmap("icons/cancel.png"), tr
("&Quit"),
this,
SLOT(close
()),
QKeySequence("Ctrl+Q"));
helpmenu = menuBar()->addMenu(tr("&Help"));
helpmenu
->addAction
(QPixmap("icons/rosette.png"), tr
("&Credits"),
this,
SLOT(credits
()),
QKeySequence("Ctrl+C"));
helpmenu
->addAction
(QPixmap("icons/help.png"), tr
("&Help"),
this,
SLOT(help
()),
QKeySequence("Ctrl+H"));
canvas->setSceneRect(0,0,640,640);
view->setFixedSize(642,642);
view->setAlignment(Qt::AlignLeft);
gamelog = new logGUI(this);
setBord(new Bord());
m_GUIBord = new BordGUI(canvas, geefBord());
setDobbel(new Dobbel());
m_GUIDobbel = new DobbelGUI(this);
layout->addWidget(view);
layout2->addWidget(m_GUIDobbel);
layout2->addWidget(gamelog);
layout->addLayout(layout2);
test->setLayout(layout);
setCentralWidget(test);
int j = 1+1;
int i=0;
disableBeforePlay();
gedaan = false;
aandebeurt = 0;
connect(m_GUIDobbel->geefWerpKnop(), SIGNAL(clicked()), this, SLOT(zetPion()));
}
GUIGame::GUIGame() : QMainWindow(0, Qt::WindowFlags())
{
setWindowTitle(tr("DuckBoard"));
setWindowIcon(QPixmap("logo.png"));
this->setWindowState(Qt::WindowMaximized);
setWindowTitle(tr("DuckBoard"));
setWindowIcon(QPixmap("logo.png"));
gamemenu = menuBar()->addMenu(tr("&Game"));
gamemenu->addAction(QPixmap("icons/wand.png"), tr("&New"), this, SLOT(newGame()), QKeySequence("Ctrl+N"));
gamemenu->addAction(QPixmap("icons/cancel.png"), tr("&Quit"), this, SLOT(close()), QKeySequence("Ctrl+Q"));
helpmenu = menuBar()->addMenu(tr("&Help"));
helpmenu->addAction(QPixmap("icons/rosette.png"), tr("&Credits"), this, SLOT(credits()), QKeySequence("Ctrl+C"));
helpmenu->addAction(QPixmap("icons/help.png"), tr("&Help"), this, SLOT(help()), QKeySequence("Ctrl+H"));
canvas = new QGraphicsScene;
canvas->setSceneRect(0,0,640,640);
view = new QGraphicsView(canvas, NULL);
view->setFixedSize(642,642);
view->setAlignment(Qt::AlignLeft);
gamelog = new logGUI(this);
setBord(new Bord());
m_GUIBord = new BordGUI(canvas, geefBord());
setDobbel(new Dobbel());
m_GUIDobbel = new DobbelGUI(this);
QWidget *test = new QWidget;
QHBoxLayout *layout = new QHBoxLayout;
QVBoxLayout *layout2 = new QVBoxLayout;
layout->addWidget(view);
layout2->addWidget(m_GUIDobbel);
layout2->addWidget(gamelog);
layout->addLayout(layout2);
test->setLayout(layout);
setCentralWidget(test);
int j = 1+1;
int i=0;
disableBeforePlay();
gedaan = false;
aandebeurt = 0;
connect(m_GUIDobbel->geefWerpKnop(), SIGNAL(clicked()), this, SLOT(zetPion()));
}
To copy to clipboard, switch view to plain text mode
Bookmarks