Changeset 5055 in ntrip


Ignore:
Timestamp:
Mar 28, 2013, 7:11:20 PM (8 years ago)
Author:
mervart
Message:
 
Location:
trunk/GnssCenter
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/GnssCenter/inpedit/inpedit.h

    r5051 r5055  
    2727 Q_INTERFACES(GnssCenter::t_pluginFactoryInterface)
    2828 public:
    29   t_pluginInterface* create() {return new t_inpEdit();}
     29  virtual t_pluginInterface* create() {return new t_inpEdit();}
     30  virtual QString getName() const {return QString("Edit Input");}
    3031};
    3132
  • trunk/GnssCenter/main/mainwin.cpp

    r5054 r5055  
    1919#include "settings.h"
    2020#include "mdiarea.h"
    21 #include "plugininterface.h"
    2221
    2322using namespace std;
     
    3130  _mdi = new t_mdiArea(0);
    3231  setCentralWidget(_mdi);
     32
     33  createMenu();
     34  createToolBar();
     35  createStatusBar();
    3336
    3437  // Handle Plugins
     
    5457  }
    5558
    56   createMenu();
    57   createToolBar();
    58   createStatusBar();
    5959}
    6060
     
    9292  connect(_actQuit, SIGNAL(triggered()), SLOT(close()));
    9393
    94   _actEditInput = new QAction(tr("&Edit Input File"),this);
    95   connect(_actEditInput, SIGNAL(triggered()), SLOT(slotEditInput()));
    96 
    97   _actMap = new QAction(tr("Show &Map"),this);
    98   connect(_actMap, SIGNAL(triggered()), SLOT(slotMap()));
    99 
    10094  _actHelp = new QAction(tr("&Help Contents"),this);
    10195  connect(_actHelp, SIGNAL(triggered()), SLOT(slotHelp()));
     
    113107  _menuFile->addAction(_actQuit);
    114108
    115   _menuNew = menuBar()->addMenu(tr("&New"));
    116   _menuNew->addAction(_actEditInput);
    117   _menuNew->addAction(_actMap);
     109  _menuPlugins = menuBar()->addMenu(tr("&Plugins"));
    118110
    119111  _menuHlp = menuBar()->addMenu(tr("&Help"));
     
    141133}
    142134
    143 // Edit RTNet Input File
     135//
    144136////////////////////////////////////////////////////////////////////////////
    145 void t_mainWin::slotEditInput() {
    146 //  QString fileName = QFileDialog::getOpenFileName(this);
    147 //  if (!fileName.isEmpty()) {
    148 //    t_inpEdit* inpEdit = new t_inpEdit();
    149 //    inpEdit->setInputFile(fileName);
    150 //    QMdiSubWindow* win = _mdi->addSubWindow(inpEdit);
    151 //    win->show();
    152 //  }
    153 }
    154 
    155 // Edit RTNet Input File
    156 ////////////////////////////////////////////////////////////////////////////
    157 void t_mainWin::slotMap() {
     137void t_mainWin::slotStartPlugin() {
    158138//  t_svgMap* svgMap = new t_svgMap();
    159139//  QMdiSubWindow* win = _mdi->addSubWindow(svgMap);
  • trunk/GnssCenter/main/mainwin.h

    r5001 r5055  
    33
    44#include <QtGui>
     5#include "plugininterface.h"
    56
    67namespace GnssCenter {
    78
    89class t_mdiArea;
     10
     11class t_pluginAction : public QAction {
     12 public:
     13  t_pluginAction(QObject* parent, t_pluginFactoryInterface* factIface) :
     14                QAction(factIface->getName(), parent), _factIface(factIface) {}
     15  t_pluginFactoryInterface* _factIface;
     16};
    917
    1018class t_mainWin : public QMainWindow {
     
    1826  void slotFontSel();
    1927  void slotSaveOptions();
    20   void slotEditInput();
    21   void slotMap();
     28  void slotStartPlugin();
    2229  void slotHelp();
    2330  void slotAbout();
     
    3441
    3542  QMenu*     _menuFile;
    36   QMenu*     _menuNew;
     43  QMenu*     _menuPlugins;
    3744  QMenu*     _menuHlp;
    3845
     
    4047  QAction*   _actSaveOpt;
    4148  QAction*   _actQuit;
    42   QAction*   _actEditInput;
    43   QAction*   _actMap;
    4449  QAction*   _actHelp;
    4550  QAction*   _actAbout;
  • trunk/GnssCenter/main/plugininterface.h

    r5052 r5055  
    1414 public:
    1515  virtual t_pluginInterface* create() = 0;
     16  virtual QString getName() const = 0;
    1617};
    1718
  • trunk/GnssCenter/svgmap/svgmap.h

    r5053 r5055  
    4949 Q_INTERFACES(GnssCenter::t_pluginFactoryInterface)
    5050 public:
    51   t_pluginInterface* create() {return new t_svgMap();}
     51  virtual t_pluginInterface* create() {return new t_svgMap();}
     52  virtual QString getName() const {return QString("Map");}
    5253};
    5354
Note: See TracChangeset for help on using the changeset viewer.