dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
logginggadgetwidget.cpp
Go to the documentation of this file.
1 
12 /*
13  * This program is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation; either version 3 of the License, or
16  * (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful, but
19  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  * for more details.
22  *
23  * You should have received a copy of the GNU General Public License along
24  * with this program; if not, see <http://www.gnu.org/licenses/>
25  */
26 #include "logginggadgetwidget.h"
27 #include "ui_logging.h"
28 
29 #include <QDebug>
30 #include <QStringList>
31 #include <QWidget>
32 #include <QTextEdit>
33 #include <QVBoxLayout>
34 #include <QPushButton>
35 #include <loggingplugin.h>
36 
38  : QLabel(parent)
39 {
40  m_logging = new Ui_Logging();
41  m_logging->setupUi(this);
42 
43  ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
44  scpPlugin = pm->getObject<ScopeGadgetFactory>();
45 }
46 
48 {
49  // Do nothing
50 }
51 
53 {
54  loggingPlugin = p;
55  connect(p, SIGNAL(stateChanged(QString)), this, SLOT(stateChanged(QString)));
56  connect(m_logging->playButton, SIGNAL(clicked()), p->getLogfile(), SLOT(resumeReplay()));
57  connect(m_logging->pauseButton, SIGNAL(clicked()), p->getLogfile(), SLOT(pauseReplay()));
58  connect(m_logging->playbackSpeedSpinBox, SIGNAL(valueChanged(double)), p->getLogfile(),
59  SLOT(setReplaySpeed(double)));
60  connect(m_logging->jumpToTimeSpinBox, SIGNAL(valueChanged(double)), p->getLogfile(),
61  SLOT(setReplayTime(double)));
62 
63  void pauseReplay();
64  void resumeReplay();
65 }
66 
68 {
69  m_logging->statusLabel->setText(status);
70 }
71 
Core plugin system that manages the plugins, their life cycle and their registered objects...
Definition: pluginmanager.h:53
void setPlugin(LoggingPlugin *p)
LoggingGadgetWidget(QWidget *parent=nullptr)
void stateChanged(QString status)