Changeset 5056 in ntrip for trunk/GnssCenter


Ignore:
Timestamp:
Mar 28, 2013, 7:19:11 PM (11 years ago)
Author:
mervart
Message:
 
Location:
trunk/GnssCenter/main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GnssCenter/main/mainwin.cpp

    r5055 r5056  
    4444    QPluginLoader loader(pluginsDir.absoluteFilePath(fileName));
    4545    QObject* object = loader.instance();
    46     qDebug() << pluginsDir.absoluteFilePath(fileName) << object;
    4746    if (object) {
    4847      t_pluginFactoryInterface* plugin = qobject_cast<t_pluginFactoryInterface*>(object);
    49       qDebug() << "Plugin: " << plugin; 
    5048      if (plugin) {
    51         for (int ii = 1; ii <= 2; ii++) {
    52           t_pluginInterface* widget = plugin->create();
    53           widget->show();
    54         }
     49        t_pluginAction* action = new t_pluginAction(this, plugin);
     50        _menuPlugins->addAction(action);
     51        connect(action, SIGNAL(triggered()), SLOT(slotStartPlugin()));
    5552      }
    5653    }
     
    8380  // Create Actions
    8481  // --------------
    85   _actFontSel = new QAction(tr("Select &Font"),this);
    86   connect(_actFontSel, SIGNAL(triggered()), SLOT(slotFontSel()));
     82  QAction* actFontSel = new QAction(tr("Select &Font"),this);
     83  connect(actFontSel, SIGNAL(triggered()), SLOT(slotFontSel()));
    8784
    88   _actSaveOpt = new QAction(tr("&Save && Reread Configuration"),this);
    89   connect(_actSaveOpt, SIGNAL(triggered()), SLOT(slotSaveOptions()));
     85  QAction* actSaveOpt = new QAction(tr("&Save && Reread Configuration"),this);
     86  connect(actSaveOpt, SIGNAL(triggered()), SLOT(slotSaveOptions()));
    9087
    91   _actQuit  = new QAction(tr("&Quit"),this);
    92   connect(_actQuit, SIGNAL(triggered()), SLOT(close()));
     88  QAction* actQuit  = new QAction(tr("&Quit"),this);
     89  connect(actQuit, SIGNAL(triggered()), SLOT(close()));
    9390
    94   _actHelp = new QAction(tr("&Help Contents"),this);
    95   connect(_actHelp, SIGNAL(triggered()), SLOT(slotHelp()));
     91  QAction* actHelp = new QAction(tr("&Help Contents"),this);
     92  connect(actHelp, SIGNAL(triggered()), SLOT(slotHelp()));
    9693
    97   _actAbout = new QAction(tr("&About"),this);
    98   connect(_actAbout, SIGNAL(triggered()), SLOT(slotAbout()));
     94  QAction* actAbout = new QAction(tr("&About"),this);
     95  connect(actAbout, SIGNAL(triggered()), SLOT(slotAbout()));
    9996
    10097  // Create Menu
    10198  // -----------
    10299  _menuFile = menuBar()->addMenu(tr("&File"));
    103   _menuFile->addAction(_actFontSel);
     100  _menuFile->addAction(actFontSel);
    104101  _menuFile->addSeparator();
    105   _menuFile->addAction(_actSaveOpt);
     102  _menuFile->addAction(actSaveOpt);
    106103  _menuFile->addSeparator();
    107   _menuFile->addAction(_actQuit);
     104  _menuFile->addAction(actQuit);
    108105
    109106  _menuPlugins = menuBar()->addMenu(tr("&Plugins"));
    110107
    111108  _menuHlp = menuBar()->addMenu(tr("&Help"));
    112   _menuHlp->addAction(_actHelp);
    113   _menuHlp->addAction(_actAbout);
     109  _menuHlp->addAction(actHelp);
     110  _menuHlp->addAction(actAbout);
    114111}
    115112
     
    136133////////////////////////////////////////////////////////////////////////////
    137134void t_mainWin::slotStartPlugin() {
     135  qDebug() << "slotStartPlugin" << sender();
    138136//  t_svgMap* svgMap = new t_svgMap();
    139137//  QMdiSubWindow* win = _mdi->addSubWindow(svgMap);
  • trunk/GnssCenter/main/mainwin.h

    r5055 r5056  
    4444  QMenu*     _menuHlp;
    4545
    46   QAction*   _actFontSel;
    47   QAction*   _actSaveOpt;
    48   QAction*   _actQuit;
    49   QAction*   _actHelp;
    50   QAction*   _actAbout;
    51 
    5246  QToolBar*  _fileToolBar;
    5347  QToolBar*  _editToolBar;
Note: See TracChangeset for help on using the changeset viewer.