-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.cpp
More file actions
43 lines (36 loc) · 848 Bytes
/
settings.cpp
File metadata and controls
43 lines (36 loc) · 848 Bytes
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 "headers/settings.h"
#include "ui_settings.h"
Settings::Settings(QWidget *parent) : QDialog(parent), ui(new Ui::Settings){
ui->setupUi(this);
loadSettings();
isListEmpty();
}
Settings::~Settings(){
delete ui;
}
void Settings::loadSettings(){
//
}
void Settings::isListEmpty(){
if(ui->list->count() == 0){
ui->button_delete->setEnabled(false);
}
else{
ui->button_delete->setEnabled(true);
}
}
void Settings::on_button_add_clicked(){
QString fileAddress = ui->text_address->text();
if(ui->text_address->text() != ""){
ui->list->addItem(fileAddress);
}
ui->text_address->clear();
isListEmpty();
}
void Settings::on_button_delete_clicked(){
delete ui->list->currentItem();
isListEmpty();
}
void Settings::on_save_clicked(){
// export to file
}