- Timestamp:
- Mar 28, 2013, 2:32:27 PM (12 years ago)
- Location:
- trunk/GnssCenter/src
- Files:
-
- 2 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/GnssCenter/src/inpedit/inpedit.cpp
r5014 r5015 4 4 * ------------------------------------------------------------------------- 5 5 * 6 * Class: t_inp File6 * Class: t_inpEdit 7 7 * 8 8 * Purpose: RTNet Input File … … 16 16 * -----------------------------------------------------------------------*/ 17 17 18 #include "inp file.h"18 #include "inpedit.h" 19 19 #include "keyword.h" 20 20 #include "panel.h" … … 25 25 // Constructor 26 26 //////////////////////////////////////////////////////////////////////////// 27 t_inpFile::t_inpFile(const QString& fileName) : QTabWidget(0) { 28 _fileName = fileName; 29 readFile(); 27 t_inpEdit::t_inpEdit() : QTabWidget(), t_pluginInterface() { 30 28 } 31 29 32 30 // Destructor 33 31 //////////////////////////////////////////////////////////////////////////// 34 t_inp File::~t_inpFile() {32 t_inpEdit::~t_inpEdit() { 35 33 QMapIterator<QString, t_keyword*> it(_keywords); 36 34 while (it.hasNext()) { … … 42 40 // 43 41 //////////////////////////////////////////////////////////////////////////// 44 void t_inpFile::readFile() { 42 void t_inpEdit::setInputFile(const QString& fileName) { 43 _fileName = fileName; 44 readFile(); 45 } 46 47 // 48 //////////////////////////////////////////////////////////////////////////// 49 void t_inpEdit::readFile() { 45 50 46 51 QFile file(_fileName); -
trunk/GnssCenter/src/inpedit/inpedit.h
r5014 r5015 1 #ifndef GnssCenter_INP FILE_H2 #define GnssCenter_INP FILE_H1 #ifndef GnssCenter_INPEDIT_H 2 #define GnssCenter_INPEDIT_H 3 3 4 4 #include <QtGui> 5 #include "plugininterface.h" 5 6 6 7 namespace GnssCenter { … … 9 10 class t_panel; 10 11 11 class t_inpFile : public QTabWidget { 12 class t_inpEdit : public QTabWidget, public t_pluginInterface { 13 Q_OBJECT 14 Q_INTERFACES(GnssCenter::t_pluginInterface) 15 12 16 public: 13 t_inpFile(const QString& fileName); 14 ~t_inpFile(); 17 t_inpEdit(); 18 ~t_inpEdit(); 19 virtual bool expectInputFile() const {return true;} 20 virtual void setInputFile(const QString&); 21 virtual void show() {QTabWidget::show();} 15 22 16 23 private: -
trunk/GnssCenter/src/mainwin.cpp
r5011 r5015 21 21 #include "plugininterface.h" 22 22 #include "map/svgmap.h" 23 #include "inpedit/inp file.h"23 #include "inpedit/inpedit.h" 24 24 25 25 using namespace std; … … 126 126 QString fileName = QFileDialog::getOpenFileName(this); 127 127 if (!fileName.isEmpty()) { 128 t_inpFile* inpFile = new t_inpFile(fileName); 129 QMdiSubWindow* win = _mdi->addSubWindow(inpFile); 128 t_inpEdit* inpEdit = new t_inpEdit(); 129 inpEdit->setInputFile(fileName); 130 QMdiSubWindow* win = _mdi->addSubWindow(inpEdit); 130 131 win->show(); 131 132 } -
trunk/GnssCenter/src/src.pro
r5013 r5015 32 32 INCLUDEPATH += inpedit 33 33 34 HEADERS += inpedit/keyword.h inpedit/panel.h inpedit/inp file.h \34 HEADERS += inpedit/keyword.h inpedit/panel.h inpedit/inpedit.h \ 35 35 inpedit/selwin.h inpedit/lineedit.h inpedit/uniline.h 36 36 37 SOURCES += inpedit/keyword.cpp inpedit/panel.cpp inpedit/inp file.cpp \37 SOURCES += inpedit/keyword.cpp inpedit/panel.cpp inpedit/inpedit.cpp \ 38 38 inpedit/selwin.cpp inpedit/lineedit.cpp inpedit/uniline.cpp 39 39 }
Note:
See TracChangeset
for help on using the changeset viewer.