添加参数界面
This commit is contained in:
+52
-8
@@ -6,24 +6,68 @@ ToolsUI::ToolsUI(QWidget *parent) :
|
||||
ui(new Ui::ToolsUI)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
//load qss
|
||||
QFile file(":/qss/Setting.qss");
|
||||
file.open(QFile::ReadOnly);
|
||||
QTextStream filetext(&file);
|
||||
QString stylesheet = filetext.readAll();
|
||||
this->setStyleSheet(stylesheet);
|
||||
file.close();
|
||||
|
||||
index0 = new Index0(this);
|
||||
index1 = new Index1(this);;
|
||||
|
||||
|
||||
|
||||
|
||||
connect(this,SIGNAL(IndexChanged(int)),
|
||||
this,SLOT(onTabIndexChanged(int)));
|
||||
|
||||
|
||||
|
||||
CurrentIndex = 0;
|
||||
emit IndexChanged(CurrentIndex);
|
||||
|
||||
|
||||
}
|
||||
|
||||
ToolsUI::~ToolsUI()
|
||||
{
|
||||
if(index0)
|
||||
{
|
||||
delete index0;
|
||||
}
|
||||
|
||||
if(index1)
|
||||
{
|
||||
delete index1;
|
||||
}
|
||||
|
||||
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void ToolsUI::on_AboutpushButton_clicked()
|
||||
void ToolsUI::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
emit clicked(ui->AboutpushButton->text());
|
||||
Q_UNUSED(event)
|
||||
|
||||
index0->setGeometry(ui->frame->geometry());
|
||||
index1->setGeometry(ui->frame->geometry());
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
void ToolsUI::on_SettingpushButton_clicked()
|
||||
|
||||
|
||||
void ToolsUI::onTabIndexChanged(const int &index)//界面选择管理
|
||||
{
|
||||
emit clicked(ui->SettingpushButton->text());
|
||||
//软件设置
|
||||
if(index == 0) index0->show();
|
||||
else index0->hide();
|
||||
|
||||
//硬件设置
|
||||
if(index == 1) index1->show();
|
||||
else index1->hide();
|
||||
}
|
||||
|
||||
void ToolsUI::on_HelppushButton_clicked()
|
||||
{
|
||||
emit clicked(ui->HelppushButton->text());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user