source: ntrip/trunk/GnssCenter/inpedit/inpedit.cpp@ 9340

Last change on this file since 9340 was 5099, checked in by mervart, 12 years ago
File size: 1.7 KB
Line 
1
2/* -------------------------------------------------------------------------
3 * RTNet GUI
4 * -------------------------------------------------------------------------
5 *
6 * Class: t_inpEdit
7 *
8 * Purpose: RTNet Input File
9 *
10 * Author: L. Mervart
11 *
12 * Created: 05-Jan-2013
13 *
14 * Changes:
15 *
16 * -----------------------------------------------------------------------*/
17
18#include "inpedit.h"
19#include "keyword.h"
20#include "panel.h"
21
22using namespace std;
23using namespace GnssCenter;
24
25Q_EXPORT_PLUGIN2(gnsscenter_inpedit, GnssCenter::t_inpEditFactory)
26
27// Constructor
28////////////////////////////////////////////////////////////////////////////
29t_inpEdit::t_inpEdit() : QMainWindow() {
30
31 _tabWidget = new t_tabWidget();
32 setCentralWidget(_tabWidget);
33
34 QMenu* menuFile = menuBar()->addMenu(tr("&File"));
35
36 QAction* actOpenFile = new QAction(tr("&Open"), this);
37 connect(actOpenFile, SIGNAL(triggered()), this, SLOT(slotOpenFile()));
38 menuFile->addAction(actOpenFile);
39
40 QAction* actSaveFile = new QAction(tr("&Save"), this);
41 connect(actSaveFile, SIGNAL(triggered()), this, SLOT(slotSaveFile()));
42 menuFile->addAction(actSaveFile);
43}
44
45// Destructor
46////////////////////////////////////////////////////////////////////////////
47t_inpEdit::~t_inpEdit() {
48}
49
50//
51////////////////////////////////////////////////////////////////////////////
52void t_inpEdit::slotOpenFile() {
53 QString fileName = QFileDialog::getOpenFileName(this);
54 if (!fileName.isEmpty()) {
55 _tabWidget->readInputFile(fileName);
56 }
57}
58
59//
60////////////////////////////////////////////////////////////////////////////
61void t_inpEdit::slotSaveFile() {
62 QString fileName = QFileDialog::getSaveFileName(this);
63 if (!fileName.isEmpty()) {
64 _tabWidget->writeInputFile(fileName);
65 }
66}
Note: See TracBrowser for help on using the repository browser.