File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 4
4
#define LINUX // WIN | LINUX
5
5
#define MAX_ROW_SIZE 40
6
6
#define MAX_LIST_SIZE 10000
7
+ #define LIST_TAB_ID 0
8
+ #define NEW_TAB_ID 1
7
9
8
10
#endif // CONFIG_HPP
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ void DiaryWindow::setDefault()
39
39
{
40
40
isEdited = false ;
41
41
clearInput ();
42
- ui->tabBar ->setCurrentIndex (LIST_TAB );
42
+ ui->tabBar ->setCurrentIndex (LIST_TAB_ID );
43
43
}
44
44
45
45
void DiaryWindow::on_RemoveButton_clicked ()
@@ -59,7 +59,7 @@ void DiaryWindow::on_EditButton_clicked()
59
59
try
60
60
{
61
61
UserData eData = database->getData (selectedItem);
62
- ui->tabBar ->setCurrentIndex (NEW_TAB );
62
+ ui->tabBar ->setCurrentIndex (NEW_TAB_ID );
63
63
ui->text_field ->setPlainText (eData.getText ());
64
64
ui->text_label ->setText (QString (eData.getDate ().c_str ()));
65
65
isEdited = true ;
@@ -98,7 +98,7 @@ void DiaryWindow::on_save_button_clicked()
98
98
}
99
99
isEdited = false ;
100
100
clearInput ();
101
- ui->tabBar ->setCurrentIndex (LIST_TAB );
101
+ ui->tabBar ->setCurrentIndex (LIST_TAB_ID );
102
102
}
103
103
else
104
104
{
@@ -109,7 +109,7 @@ void DiaryWindow::on_save_button_clicked()
109
109
database->addData (usd);
110
110
}
111
111
clearInput ();
112
- ui->tabBar ->setCurrentIndex (LIST_TAB );
112
+ ui->tabBar ->setCurrentIndex (LIST_TAB_ID );
113
113
}
114
114
}
115
115
Original file line number Diff line number Diff line change 1
1
#ifndef DIARYWINDOW_HPP
2
2
#define DIARYWINDOW_HPP
3
3
4
- #define LIST_TAB 0
5
- #define NEW_TAB 1
6
-
7
4
#include < iostream>
8
5
#include < QMainWindow>
9
6
10
7
#include " database.hpp"
8
+ #include " config.hpp"
11
9
12
10
using namespace std ;
13
11
You can’t perform that action at this time.
0 commit comments