source: ntrip/trunk/GnssCenter/monitor/dlgconf.cpp@ 5464

Last change on this file since 5464 was 5464, checked in by mervart, 11 years ago
File size: 1.8 KB
Line 
1
2/* -------------------------------------------------------------------------
3 * RTNet DlgConf
4 * -------------------------------------------------------------------------
5 *
6 * Class: t_dlgConf
7 *
8 * Purpose: Set configuration
9 *
10 * Author: L. Mervart
11 *
12 * Created: 15-Sep-2013
13 *
14 * Changes:
15 *
16 * -----------------------------------------------------------------------*/
17
18#include "dlgconf.h"
19#include "settings.h"
20#include "const.h"
21
22using namespace std;
23using namespace GnssCenter;
24
25// Constructor
26/////////////////////////////////////////////////////////////////////////////
27t_dlgConf::t_dlgConf(QWidget* parent) : QDialog(parent) {
28
29 _hostLineEdit = new QLineEdit;
30 _portLineEdit = new QLineEdit;
31
32
33 QFormLayout* formLayout = new QFormLayout;
34 formLayout->addRow("Host:", _hostLineEdit);
35 formLayout->addRow("Port:", _portLineEdit);
36
37 QPushButton* cancelButton = new QPushButton("Cancel", this);
38 connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
39
40 QPushButton* okButton = new QPushButton("OK", this);
41 connect(okButton, SIGNAL(clicked()), this, SLOT(accept()));
42
43 QHBoxLayout* buttonLayout = new QHBoxLayout;
44 buttonLayout->addWidget(cancelButton);
45 buttonLayout->addWidget(okButton);
46
47 QVBoxLayout* mainLayout = new QVBoxLayout;
48 mainLayout->addLayout(formLayout);
49 mainLayout->addLayout(buttonLayout);
50 setLayout(mainLayout);
51
52 t_settings settings(pluginName);
53 settings.setValue("host", "rtnet.rtcm-ntrip.org");
54 settings.setValue("port", 7777);
55 settings.sync();
56
57}
58
59// Destructor
60/////////////////////////////////////////////////////////////////////////////
61t_dlgConf::~t_dlgConf() {
62}
63
64// Accept (virtual slot)
65/////////////////////////////////////////////////////////////////////////////
66void t_dlgConf::accept() {
67 qDebug() << "accept hovno";
68}
69
Note: See TracBrowser for help on using the repository browser.