-
Notifications
You must be signed in to change notification settings - Fork 0
/
rs232testng.cpp
79 lines (57 loc) · 1.79 KB
/
rs232testng.cpp
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#include "rs232testng.h"
#include "plugapi/vartype.h"
#include "QConfigStorage.h"
rs232testng::rs232testng(QWidget *parent)
: QMainWindow(parent)
{
ui.setupUi(this);
loadSettings();
/*
CONF_START_GROUP( debug );
CONF_STORE_VAL( valInt );
CONF_STORE_VAL( valString );
CONF_READ_VAL( valInt, -1 );
CONF_READ_VAL( valString, "No i dupa" );
CONF_END_GROUP( debug );
*/
/*
mainToolBar = new QToolBar();
mainToolBar->addAction(ui.actionStart);
mainToolBar->addSeparator();
mainToolBar->addAction(ui.actionConf);
mainToolBar->addAction(ui.actionHelp);
mainToolBar->addAction(ui.actionExit);
ui.mainDock->setWidget(mainToolBar);
selCombo = new QComboBox(ui.srcSelDock);
selCombo->addItems(QStringList() << "Ala" << "Ma" << "Kota" );
ui.srcSelDock->setWidget(selCombo);
ui.btnSrcHelp->setDefaultAction(ui.actSrcHelp);
ui.btnSrcConf->setDefaultAction(ui.actSrcConf);
ui.btnSrcConn->setDefaultAction(ui.actSrcConn);
ui.btnOutHelp->setDefaultAction(ui.actOutHelp);
ui.btnOutConf->setDefaultAction(ui.actOutConf);
ui.btnAppExit->setDefaultAction(ui.actAppExit);
*/
}
rs232testng::~rs232testng()
{
}
void rs232testng::loadSettings()
{
CONF_START_GROUP( MainWindow );
restoreGeometry( QConfigStorage::getVal( "Geometry", QByteArray() ) );
restoreState( QConfigStorage::getVal( "State", QByteArray() ) );
ui.splitter->restoreState( QConfigStorage::getVal( "ContentState", QByteArray() ) );
}
void rs232testng::saveSettings()
{
CONF_START_GROUP( MainWindow );
QConfigStorage::setVal( "Geometry", saveGeometry() );
QConfigStorage::setVal( "State", saveState() );
QConfigStorage::setVal( "ContentState", ui.splitter->saveState() );
}
void rs232testng::closeEvent(QCloseEvent *event)
{
saveSettings();
QMainWindow::closeEvent(event);
}