mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 09:33:25 -08:00
[Tests] Name the menus and dialogs the shell GUI tests drive (#7695)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
ee57d740c2
commit
d2abd645e8
14 changed files with 81 additions and 0 deletions
|
|
@ -33,6 +33,7 @@ class QWidget;
|
|||
|
||||
DlgConnect::DlgConnect(QWidget *parent) : QDialog(parent)
|
||||
{
|
||||
setObjectName("connectDialog");
|
||||
previousHostButton = new QRadioButton(tr("Known Hosts"), this);
|
||||
previousHosts = new QComboBox(this);
|
||||
|
||||
|
|
@ -85,6 +86,11 @@ DlgConnect::DlgConnect(QWidget *parent) : QDialog(parent)
|
|||
passwordLabel->setBuddy(passwordEdit);
|
||||
passwordEdit->setEchoMode(QLineEdit::Password);
|
||||
|
||||
hostEdit->setObjectName("connectHostEdit");
|
||||
portEdit->setObjectName("connectPortEdit");
|
||||
playernameEdit->setObjectName("connectPlayernameEdit");
|
||||
passwordEdit->setObjectName("connectPasswordEdit");
|
||||
|
||||
savePasswordCheckBox = new QCheckBox(tr("&Save password"));
|
||||
|
||||
autoConnectCheckBox = new QCheckBox(tr("A&uto connect"));
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ class QWidget;
|
|||
|
||||
DlgEditTokens::DlgEditTokens(QWidget *parent) : QDialog(parent), currentCard(nullptr)
|
||||
{
|
||||
setObjectName("editTokensDialog");
|
||||
nameLabel = new QLabel(tr("&Name:"));
|
||||
nameEdit = new QLineEdit;
|
||||
nameEdit->setMaxLength(MAX_NAME_LENGTH);
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@
|
|||
|
||||
WndSets::WndSets(QWidget *parent) : QMainWindow(parent)
|
||||
{
|
||||
setObjectName("manageSetsWindow");
|
||||
setOrderIsSorted = false;
|
||||
|
||||
// left toolbar
|
||||
|
|
@ -221,6 +222,7 @@ WndSets::WndSets(QWidget *parent) : QMainWindow(parent)
|
|||
|
||||
WndSets::~WndSets()
|
||||
{
|
||||
disconnect(view->header(), &QHeaderView::geometriesChanged, this, &WndSets::saveHeaderState);
|
||||
}
|
||||
|
||||
void WndSets::closeEvent(QCloseEvent * /*ev*/)
|
||||
|
|
|
|||
|
|
@ -73,6 +73,8 @@ DlgSettings::DlgSettings(QWidget *parent) : QDialog(parent)
|
|||
resize(calculateDialogSize(hostSize, available.size(), minimum));
|
||||
setSizeGripEnabled(true);
|
||||
|
||||
setObjectName("settingsDialog");
|
||||
|
||||
connect(&SettingsCache::instance().personal(), &PersonalSettings::langChanged, this, &DlgSettings::updateLanguage);
|
||||
|
||||
settingsView = new SettingsView(this);
|
||||
|
|
@ -82,6 +84,7 @@ DlgSettings::DlgSettings(QWidget *parent) : QDialog(parent)
|
|||
buttonBox->addStretch();
|
||||
okButton = new QPushButton;
|
||||
okButton->setDefault(true);
|
||||
okButton->setObjectName("settingsOkButton");
|
||||
connect(okButton, &QPushButton::clicked, this, &DlgSettings::close);
|
||||
buttonBox->addWidget(okButton);
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
DlgTipOfTheDay::DlgTipOfTheDay(QWidget *parent) : QDialog(parent)
|
||||
{
|
||||
setObjectName("tipOfTheDayDialog");
|
||||
successfulInit = false;
|
||||
QString xmlPath = "theme:tips/tips_of_the_day.xml";
|
||||
tipDatabase = new TipsOfTheDay(xmlPath, this);
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ static const QString UPDATE_INSTALLER_OVERRIDE = "Cockatrice-Update-Override.exe
|
|||
|
||||
DlgUpdate::DlgUpdate(QWidget *parent) : QDialog(parent)
|
||||
{
|
||||
setObjectName("updateDialog");
|
||||
|
||||
// Handle layout
|
||||
statusLabel = new QLabel(this);
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ class QWidget;
|
|||
|
||||
DlgViewLog::DlgViewLog(QWidget *parent) : QDialog(parent)
|
||||
{
|
||||
setObjectName("viewLogDialog");
|
||||
logArea = new QPlainTextEdit;
|
||||
logArea->setReadOnly(true);
|
||||
|
||||
|
|
|
|||
|
|
@ -431,24 +431,33 @@ void MainWindow::retranslateUi()
|
|||
void MainWindow::createActions()
|
||||
{
|
||||
aConnect = new QAction(this);
|
||||
aConnect->setObjectName("actionConnect");
|
||||
connect(aConnect, &QAction::triggered, this, &MainWindow::actConnect);
|
||||
aDisconnect = new QAction(this);
|
||||
aDisconnect->setObjectName("actionDisconnect");
|
||||
aDisconnect->setEnabled(false);
|
||||
connect(aDisconnect, &QAction::triggered, this, &MainWindow::actDisconnect);
|
||||
aSinglePlayer = new QAction(this);
|
||||
aSinglePlayer->setObjectName("actionSinglePlayer");
|
||||
connect(aSinglePlayer, &QAction::triggered, this, &MainWindow::actSinglePlayer);
|
||||
aWatchReplay = new QAction(this);
|
||||
aWatchReplay->setObjectName("actionWatchReplay");
|
||||
connect(aWatchReplay, &QAction::triggered, this, &MainWindow::actWatchReplay);
|
||||
aFullScreen = new QAction(this);
|
||||
aFullScreen->setObjectName("actionFullScreen");
|
||||
aFullScreen->setCheckable(true);
|
||||
connect(aFullScreen, &QAction::toggled, this, &MainWindow::actFullScreen);
|
||||
aRegister = new QAction(this);
|
||||
aRegister->setObjectName("actionRegister");
|
||||
connect(aRegister, &QAction::triggered, connectionController, &ConnectionController::registerToServer);
|
||||
aForgotPassword = new QAction(this);
|
||||
aForgotPassword->setObjectName("actionForgotPassword");
|
||||
connect(aForgotPassword, &QAction::triggered, connectionController, &ConnectionController::forgotPasswordRequest);
|
||||
aSettings = new QAction(this);
|
||||
aSettings->setObjectName("actionSettings");
|
||||
connect(aSettings, &QAction::triggered, this, &MainWindow::actSettings);
|
||||
aExit = new QAction(this);
|
||||
aExit->setObjectName("actionExit");
|
||||
connect(aExit, &QAction::triggered, this, &MainWindow::actExit);
|
||||
|
||||
aManageSets = new QAction(QString(), this);
|
||||
|
|
@ -533,6 +542,7 @@ void MainWindow::createMenus()
|
|||
{
|
||||
menuBar()->setObjectName("menubar");
|
||||
cockatriceMenu = menuBar()->addMenu(QString());
|
||||
cockatriceMenu->setObjectName("cockatriceMenu");
|
||||
cockatriceMenu->addAction(aConnect);
|
||||
cockatriceMenu->addAction(aDisconnect);
|
||||
cockatriceMenu->addAction(aRegister);
|
||||
|
|
@ -548,6 +558,7 @@ void MainWindow::createMenus()
|
|||
cockatriceMenu->addAction(aExit);
|
||||
|
||||
dbMenu = menuBar()->addMenu(QString());
|
||||
dbMenu->setObjectName("dbMenu");
|
||||
dbMenu->addAction(aManageSets);
|
||||
dbMenu->addAction(aEditTokens);
|
||||
dbMenu->addSeparator();
|
||||
|
|
@ -558,6 +569,7 @@ void MainWindow::createMenus()
|
|||
dbMenu->addAction(aReloadCardDatabase);
|
||||
|
||||
tabsMenu = menuBar()->addMenu(QString());
|
||||
tabsMenu->setObjectName("tabsMenu");
|
||||
|
||||
helpMenu = menuBar()->addMenu(QString());
|
||||
helpMenu->setObjectName("helpMenu");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue