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

Last change on this file since 10590 was 5099, checked in by mervart, 12 years ago
File size: 1.7 KB
RevLine 
[4823]1
2/* -------------------------------------------------------------------------
3 * RTNet GUI
4 * -------------------------------------------------------------------------
5 *
[5015]6 * Class: t_inpEdit
[4823]7 *
8 * Purpose: RTNet Input File
9 *
10 * Author: L. Mervart
11 *
12 * Created: 05-Jan-2013
13 *
14 * Changes:
15 *
16 * -----------------------------------------------------------------------*/
17
[5015]18#include "inpedit.h"
[4855]19#include "keyword.h"
20#include "panel.h"
[4823]21
22using namespace std;
[5000]23using namespace GnssCenter;
[4823]24
[5051]25Q_EXPORT_PLUGIN2(gnsscenter_inpedit, GnssCenter::t_inpEditFactory)
[5017]26
[4823]27// Constructor
28////////////////////////////////////////////////////////////////////////////
[5088]29t_inpEdit::t_inpEdit() : QMainWindow() {
[5089]30
[5088]31 _tabWidget = new t_tabWidget();
32 setCentralWidget(_tabWidget);
[5089]33
34 QMenu* menuFile = menuBar()->addMenu(tr("&File"));
[5099]35
[5089]36 QAction* actOpenFile = new QAction(tr("&Open"), this);
37 connect(actOpenFile, SIGNAL(triggered()), this, SLOT(slotOpenFile()));
38 menuFile->addAction(actOpenFile);
[5099]39
40 QAction* actSaveFile = new QAction(tr("&Save"), this);
41 connect(actSaveFile, SIGNAL(triggered()), this, SLOT(slotSaveFile()));
42 menuFile->addAction(actSaveFile);
[4823]43}
44
45// Destructor
46////////////////////////////////////////////////////////////////////////////
[5015]47t_inpEdit::~t_inpEdit() {
[4823]48}
[5089]49
50//
51////////////////////////////////////////////////////////////////////////////
52void t_inpEdit::slotOpenFile() {
[5090]53 QString fileName = QFileDialog::getOpenFileName(this);
54 if (!fileName.isEmpty()) {
[5099]55 _tabWidget->readInputFile(fileName);
[5090]56 }
[5089]57}
[5099]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.