replaced menu by toolbar
This commit is contained in:
+11
-1
@@ -1,9 +1,11 @@
|
||||
#include "mainwindow.h"
|
||||
#include <QComboBox>
|
||||
#include <QToolBar>
|
||||
|
||||
using namespace std;
|
||||
|
||||
bool display = false;
|
||||
extern QDialog Configuration;
|
||||
//extern QDialog Configuration;
|
||||
extern Ui::Configuration config;
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent)
|
||||
@@ -28,11 +30,13 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
connect(&downloadO, &downloadFile::finishedSignal, this, &MainWindow::downloadFinished);
|
||||
connect(this, &MainWindow::stopDownloading, &downloadO, &downloadFile::cancelled);
|
||||
connect(config.buttonBox, SIGNAL(accepted()), this, SLOT(on_buttonBox_accepted()));
|
||||
connect(config.comboBox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &MainWindow::on_comboBox_currentIndexChanged);
|
||||
|
||||
// init of widgets
|
||||
ui->ktreewidgetsearchline->setTreeWidget(ui->treeWidget);
|
||||
ui->ktreewidgetsearchline->setCaseSensitivity(Qt::CaseInsensitive);
|
||||
ui->treeWidget->setHeaderLabels({tr("Type"), tr("Path"), tr("Size")} );
|
||||
config.comboBox->setCurrentIndex(ui->toolBar->toolButtonStyle());
|
||||
if (this->settings.contains("connexion/lastServer"))
|
||||
{
|
||||
ui->portEdit->setText(this->settings.value("connexion/port").toString());
|
||||
@@ -593,4 +597,10 @@ void MainWindow::on_buttonBox_accepted()
|
||||
this->settings.setValue("bandwidthlimit", this->connexion.bandwidthLimit);
|
||||
this->settings.setValue("bandwidthlimitunit", this->connexion.bandwidthLimitUnit.c_str());
|
||||
this->settings.sync();
|
||||
Configuration.hide();
|
||||
}
|
||||
|
||||
void MainWindow::on_comboBox_currentIndexChanged(int index)
|
||||
{
|
||||
ui->toolBar->setToolButtonStyle((Qt::ToolButtonStyle)index);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user