-
Notifications
You must be signed in to change notification settings - Fork 3
/
csettings.h
60 lines (52 loc) · 2.75 KB
/
csettings.h
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/* LaVa 2, a inventory managment tool
Copyright (C) 2015 - Robert Ewert - robert.ewert@gmail.com - www.robert.ewert.de.vu
created with QtCreator(Qt 4.8)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CSETTINGS_H
#define CSETTINGS_H
#include <QtGui>
#include "data_classes.h"
class CSettings
{
private:
QString m_sSettingsPath;
public:
CSettings();
~CSettings(){}
bool create_default_setting_file(void);
bool load(QList<QString> & lsSType, QList<QString> & lsSValue);
bool load(QString sType, QString & sValue);
bool write(QList<QString> & lsSType, QList<QString> & lsSValue);
bool write(QString sType, QString sValue);
bool set_table_columns_width(QTableWidget * pTable, QString sValues, int iDefaultValue);
bool set_table_sort(QTableWidget * pTable, QString sValues, int iDefaultValue);
bool set_table_columns_order_visible_alignment(CTableColumnsData * pColumnsData, QString sValues);
bool set_checkbox(QCheckBox * pCheckBox,QString sValue, bool bDefaultValue);
bool set_combobox(QComboBox * pComboBox, QString sValue, int iDefaultValue);
bool set_tree_width(QTreeWidget * pTree,QString sValues, int iDefaultValue);
bool set_tab_order(QTabWidget * pTab, QString sValues);
bool get_table_columns_width(QTableWidget * pTable, QString & sValues);
bool get_table_sort(QTableWidget * pTable, QString & sValues);
bool get_table_columns_order_visible_alignment(CTableColumnsData * pColumnsData, QString & sValues);
bool get_checkbox(QCheckBox * pCheckBox,QString & sValue);
bool get_combobox(QComboBox * pComboBox, QString & sValue);
bool get_tree_width(QTreeWidget * pTree, QString & sValues);
bool get_tab_order(QTabWidget * pTab, QString & sValues, QList<QWidget*> & lsPWidget);
bool remove_line(QString sType);
bool cast_string_to_int_list(QString s, QList<int> & lsInt, bool bWithType=false);
QString cast_int_list_to_string(QList<int> & lsInt, QString sType=QString::fromUtf8(""));
bool cast_table_columns_order_visible_alignment(QString & sValues, CTableColumnsData * p_tcdData);
bool give_it_setting_file(void);
bool is_program_running(void);
};
#endif // CSETTINGS_H