-
Notifications
You must be signed in to change notification settings - Fork 0
/
startscreen.cpp
43 lines (37 loc) · 1.13 KB
/
startscreen.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "startscreen.h"
#include "ui_startscreen.h"
#include "jsonintrepeter.h"
#include "processplayercards.h"
#include "processfinancialmutations.h"
StartScreen::StartScreen(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::StartScreen)
{
ui->setupUi(this);
ui->tabWidget->clear();
ui->tabWidget->addTab(JSONIntrepeter::getAPIToCreateWidget(), "Log");
ui->tabWidget->setTabsClosable(true);
connect(ui->tabWidget, SIGNAL(tabCloseRequested(int)), this, SLOT(closeTab(int)));
this->showMaximized();
}
StartScreen::~StartScreen()
{
delete ui;
}
void StartScreen::on_actionUnprocessed_Financial_Mutations_triggered()
{
ProcessFinancialMutations *mutations = new ProcessFinancialMutations();
ui->tabWidget->insertTab(0, mutations, "Mutations");
ui->tabWidget->setCurrentIndex(0);
}
void StartScreen::on_actionProcess_Player_Cards_triggered()
{
ProcessPlayerCards *cards = new ProcessPlayerCards();
ui->tabWidget->insertTab(0, cards, "Cards");
ui->tabWidget->setCurrentIndex(0);
}
void StartScreen::closeTab(int index)
{
if (index != ui->tabWidget->count() - 1)
ui->tabWidget->removeTab(index);
}