-
Notifications
You must be signed in to change notification settings - Fork 1
/
settingswidget.h
58 lines (50 loc) · 1.74 KB
/
settingswidget.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
/*
Copyright (c) 2010 by Stanislav (proDOOMman) Kosolapov <[email protected]>
***************************************************************************
* *
* 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 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************
*/
#ifndef SETTINGSWIDGET_H
#define SETTINGSWIDGET_H
#include "ui_settingswidget.h"
#include "qmlapplicationview.h"
#include <QtCore>
#include <QtGui>
#include <QtXml>
#include <QLayout>
#include <QtNetwork>
struct SetItem{
QString name;
QString type;
QString def;
QString text;
QWidget *widget;
};
class SettingsWidget : public QWidget, private Ui::SettingsWidget
{
Q_OBJECT
QmlApplicationView *qmlapp;
QHash<QString, SetItem> settingsItems;
QNetworkAccessManager *net;
public:
explicit SettingsWidget(QWidget *parent = 0);
protected:
void changeEvent(QEvent *e);
private slots:
void on_quirkList_currentItemChanged(QListWidgetItem* current, QListWidgetItem* previous);
void updateList();
void saveSettings(QListWidgetItem*);
void loadSettings(QListWidgetItem*);
void createSettings(QListWidgetItem*);
void on_buttonBox_clicked(QAbstractButton* button);
void setToolButtonColor();
void setLineEditFile();
void setSettings();
void sceneResized(QSize s);
};
#endif // SETTINGSWIDGET_H