Changeset 5015 in ntrip


Ignore:
Timestamp:
Mar 28, 2013, 2:32:27 PM (8 years ago)
Author:
mervart
Message:
 
Location:
trunk/GnssCenter/src
Files:
2 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/GnssCenter/src/inpedit/inpedit.cpp

    r5014 r5015  
    44 * -------------------------------------------------------------------------
    55 *
    6  * Class:      t_inpFile
     6 * Class:      t_inpEdit
    77 *
    88 * Purpose:    RTNet Input File
     
    1616 * -----------------------------------------------------------------------*/
    1717
    18 #include "inpfile.h"
     18#include "inpedit.h"
    1919#include "keyword.h"
    2020#include "panel.h"
     
    2525// Constructor
    2626////////////////////////////////////////////////////////////////////////////
    27 t_inpFile::t_inpFile(const QString& fileName) : QTabWidget(0) {
    28   _fileName = fileName;
    29   readFile();
     27t_inpEdit::t_inpEdit() : QTabWidget(), t_pluginInterface() {
    3028}
    3129
    3230// Destructor
    3331////////////////////////////////////////////////////////////////////////////
    34 t_inpFile::~t_inpFile() {
     32t_inpEdit::~t_inpEdit() {
    3533  QMapIterator<QString, t_keyword*> it(_keywords);
    3634  while (it.hasNext()) {
     
    4240//
    4341////////////////////////////////////////////////////////////////////////////
    44 void t_inpFile::readFile() {
     42void t_inpEdit::setInputFile(const QString& fileName) {
     43  _fileName = fileName;
     44  readFile();
     45}
     46
     47//
     48////////////////////////////////////////////////////////////////////////////
     49void t_inpEdit::readFile() {
    4550
    4651  QFile file(_fileName);
  • trunk/GnssCenter/src/inpedit/inpedit.h

    r5014 r5015  
    1 #ifndef GnssCenter_INPFILE_H
    2 #define GnssCenter_INPFILE_H
     1#ifndef GnssCenter_INPEDIT_H
     2#define GnssCenter_INPEDIT_H
    33
    44#include <QtGui>
     5#include "plugininterface.h"
    56
    67namespace GnssCenter {
     
    910class t_panel;
    1011
    11 class t_inpFile : public QTabWidget {
     12class t_inpEdit : public QTabWidget, public t_pluginInterface {
     13 Q_OBJECT
     14 Q_INTERFACES(GnssCenter::t_pluginInterface)
     15
    1216 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();}   
    1522
    1623 private:
  • trunk/GnssCenter/src/mainwin.cpp

    r5011 r5015  
    2121#include "plugininterface.h"
    2222#include "map/svgmap.h"
    23 #include "inpedit/inpfile.h"
     23#include "inpedit/inpedit.h"
    2424
    2525using namespace std;
     
    126126  QString fileName = QFileDialog::getOpenFileName(this);
    127127  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);
    130131    win->show();
    131132  }
  • trunk/GnssCenter/src/src.pro

    r5013 r5015  
    3232  INCLUDEPATH += inpedit
    3333
    34   HEADERS += inpedit/keyword.h   inpedit/panel.h      inpedit/inpfile.h   \
     34  HEADERS += inpedit/keyword.h   inpedit/panel.h      inpedit/inpedit.h   \
    3535             inpedit/selwin.h    inpedit/lineedit.h   inpedit/uniline.h
    3636
    37   SOURCES += inpedit/keyword.cpp inpedit/panel.cpp    inpedit/inpfile.cpp \
     37  SOURCES += inpedit/keyword.cpp inpedit/panel.cpp    inpedit/inpedit.cpp \
    3838             inpedit/selwin.cpp  inpedit/lineedit.cpp inpedit/uniline.cpp
    3939}
Note: See TracChangeset for help on using the changeset viewer.