Ejemplo n.º 1
0
void GameFlow::setupWinFail(bool isAWin)
{
    theDialogPtr = theRequestDialogItfPtr->showWinFail(isAWin);
    connect(theDialogPtr, SIGNAL(chooseButton_clicked()), theMainWindowPtr, SLOT(on_action_Open_Level_triggered()));
    connect(theDialogPtr, SIGNAL(nextButton_clicked()),   theMainWindowPtr, SLOT(slot_actionNextLevel()));
    connect(theDialogPtr, SIGNAL(replayButton_clicked()), theGameStateMachinePtr, SIGNAL(signal_Reset_triggered()));
    connect(theDialogPtr, SIGNAL(skipButton_clicked()),   theMainWindowPtr, SLOT(on_action_Skip_Level_triggered()));
}
Ejemplo n.º 2
0
BrowserWindow::BrowserWindow(const QString& userName, const QUrl& url, QWidget* parent) :
    QMainWindow(parent),
    ui(new Ui::BrowserWindow)
{
    ui->setupUi(this);

    webView = new WebView(this->ui->centralwidget);
	webView->setObjectName(QStringLiteral("webView"));
	webView->setUrl(QUrl(QStringLiteral("about:blank")));
    this->ui->verticalLayout->addWidget(webView);

	this->statusLabel = new QLabel(tr("<b>Not Connected</b>")) ;
    this->statusBar()->addWidget(this->statusLabel);

    this->currentHistoryItem = -1;
    historySetEnabled();

	connect(this->ui->prevButton, SIGNAL(clicked()),
			this, SLOT(prevButton_clicked()));
	connect(this->ui->nextButton, SIGNAL(clicked()),
			this, SLOT(nextButton_clicked()));
	connect(this->ui->reloadButton, SIGNAL(clicked()),
			this, SLOT(reloadButton_clicked()));
	connect(this->ui->stopButton, SIGNAL(clicked()),
			this, SLOT(stopButton_clicked()));
	connect(this->ui->goButton, SIGNAL(clicked()),
			this, SLOT(goButton_clicked()));

	connect(webView, SIGNAL(loadStarted()),
			this, SLOT(webView_loadStarted()));
	connect(webView, SIGNAL(loadProgress(int)),
			this, SLOT(webView_loadProgress(int)));
	connect(webView, SIGNAL(loadFinished(bool)),
			this, SLOT(webView_loadFinished(bool)));
	connect(webView, SIGNAL(titleChanged(QString)),
			this, SLOT(webView_titleChanged(QString)));
	connect(webView, SIGNAL(linkClicked(QUrl)),
			this, SLOT(webView_linkClicked(QUrl)));

    this->userName = userName;

    setUrl(url);
}