- Added icons to some menu items
- Fix: Changed Preferences to inherit privately from Ui::Preferences - Added "About Qt" to Help Menu - Added the PortList/StreamList actions to File Menu - Fix: "New Stream" action is enabled only when a port is selected in the port list - Fix: Ostinato now looks for Drone in the correct path
This commit is contained in:
parent
1cfc771daa
commit
c630d4c291
BIN
client/icons/about.png
Normal file
BIN
client/icons/about.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
BIN
client/icons/exit.png
Normal file
BIN
client/icons/exit.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 688 B |
BIN
client/icons/qt.png
Normal file
BIN
client/icons/qt.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
@ -40,25 +40,36 @@ PortGroupList *pgl;
|
|||||||
MainWindow::MainWindow(QWidget *parent)
|
MainWindow::MainWindow(QWidget *parent)
|
||||||
: QMainWindow (parent)
|
: QMainWindow (parent)
|
||||||
{
|
{
|
||||||
|
QString serverApp = QCoreApplication::applicationDirPath();
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN32
|
||||||
|
serverApp.append("/drone.exe");
|
||||||
|
#else
|
||||||
|
serverApp.append("/drone");
|
||||||
|
#endif
|
||||||
|
|
||||||
localServer_ = new QProcess(this);
|
localServer_ = new QProcess(this);
|
||||||
localServer_->setProcessChannelMode(QProcess::ForwardedChannels);
|
localServer_->setProcessChannelMode(QProcess::ForwardedChannels);
|
||||||
localServer_->start("./drone.exe");
|
localServer_->start(serverApp);
|
||||||
|
|
||||||
pgl = new PortGroupList;
|
pgl = new PortGroupList;
|
||||||
|
|
||||||
portsWindow = new PortsWindow(pgl, this);
|
portsWindow = new PortsWindow(pgl, this);
|
||||||
statsWindow = new PortStatsWindow(pgl, this);
|
statsWindow = new PortStatsWindow(pgl, this);
|
||||||
portsDock = new QDockWidget(tr("Ports"), this);
|
portsDock = new QDockWidget(tr("Ports and Streams"), this);
|
||||||
statsDock = new QDockWidget(tr("Stats"), this);
|
statsDock = new QDockWidget(tr("Statistics"), this);
|
||||||
|
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
|
||||||
|
menuFile->insertActions(menuFile->actions().at(0), portsWindow->actions());
|
||||||
|
|
||||||
statsDock->setWidget(statsWindow);
|
statsDock->setWidget(statsWindow);
|
||||||
addDockWidget(Qt::BottomDockWidgetArea, statsDock);
|
addDockWidget(Qt::BottomDockWidgetArea, statsDock);
|
||||||
portsDock->setWidget(portsWindow);
|
portsDock->setWidget(portsWindow);
|
||||||
addDockWidget(Qt::TopDockWidgetArea, portsDock);
|
addDockWidget(Qt::TopDockWidgetArea, portsDock);
|
||||||
|
|
||||||
connect(actionFileExit, SIGNAL(triggered()), this, SLOT(close()));
|
connect(actionFileExit, SIGNAL(triggered()), this, SLOT(close()));
|
||||||
|
connect(actionAboutQt, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
|
||||||
#if 0
|
#if 0
|
||||||
{
|
{
|
||||||
DbgThread *dbg = new DbgThread(pgl);
|
DbgThread *dbg = new DbgThread(pgl);
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
<property name="title" >
|
<property name="title" >
|
||||||
<string>File</string>
|
<string>File</string>
|
||||||
</property>
|
</property>
|
||||||
|
<addaction name="separator" />
|
||||||
<addaction name="actionPreferences" />
|
<addaction name="actionPreferences" />
|
||||||
<addaction name="actionFileExit" />
|
<addaction name="actionFileExit" />
|
||||||
</widget>
|
</widget>
|
||||||
@ -34,17 +35,24 @@
|
|||||||
<string>Help</string>
|
<string>Help</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="actionHelpAbout" />
|
<addaction name="actionHelpAbout" />
|
||||||
|
<addaction name="actionAboutQt" />
|
||||||
</widget>
|
</widget>
|
||||||
<addaction name="menuFile" />
|
<addaction name="menuFile" />
|
||||||
<addaction name="menuHelp" />
|
<addaction name="menuHelp" />
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QStatusBar" name="statusbar" />
|
<widget class="QStatusBar" name="statusbar" />
|
||||||
<action name="actionFileExit" >
|
<action name="actionFileExit" >
|
||||||
|
<property name="icon" >
|
||||||
|
<iconset resource="ostinato.qrc" >:/icons/exit.png</iconset>
|
||||||
|
</property>
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>E&xit</string>
|
<string>E&xit</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionHelpAbout" >
|
<action name="actionHelpAbout" >
|
||||||
|
<property name="icon" >
|
||||||
|
<iconset resource="ostinato.qrc" >:/icons/about.png</iconset>
|
||||||
|
</property>
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>&About</string>
|
<string>&About</string>
|
||||||
</property>
|
</property>
|
||||||
@ -57,6 +65,14 @@
|
|||||||
<string>Preferences</string>
|
<string>Preferences</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionAboutQt" >
|
||||||
|
<property name="icon" >
|
||||||
|
<iconset resource="ostinato.qrc" >:/icons/qt.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>About Qt</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="ostinato.qrc" />
|
<include location="ostinato.qrc" />
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/" >
|
<qresource prefix="/" >
|
||||||
|
<file>icons/about.png</file>
|
||||||
<file>icons/arrow_down.png</file>
|
<file>icons/arrow_down.png</file>
|
||||||
<file>icons/arrow_left.png</file>
|
<file>icons/arrow_left.png</file>
|
||||||
<file>icons/arrow_right.png</file>
|
<file>icons/arrow_right.png</file>
|
||||||
@ -14,6 +15,7 @@
|
|||||||
<file>icons/control_stop.png</file>
|
<file>icons/control_stop.png</file>
|
||||||
<file>icons/deco_exclusive.png</file>
|
<file>icons/deco_exclusive.png</file>
|
||||||
<file>icons/delete.png</file>
|
<file>icons/delete.png</file>
|
||||||
|
<file>icons/exit.png</file>
|
||||||
<file>icons/logo.png</file>
|
<file>icons/logo.png</file>
|
||||||
<file>icons/magnifier.png</file>
|
<file>icons/magnifier.png</file>
|
||||||
<file>icons/name.png</file>
|
<file>icons/name.png</file>
|
||||||
@ -25,6 +27,7 @@
|
|||||||
<file>icons/portstats_clear_all.png</file>
|
<file>icons/portstats_clear_all.png</file>
|
||||||
<file>icons/portstats_filter.png</file>
|
<file>icons/portstats_filter.png</file>
|
||||||
<file>icons/preferences.png</file>
|
<file>icons/preferences.png</file>
|
||||||
|
<file>icons/qt.png</file>
|
||||||
<file>icons/sound_mute.png</file>
|
<file>icons/sound_mute.png</file>
|
||||||
<file>icons/sound_none.png</file>
|
<file>icons/sound_none.png</file>
|
||||||
<file>icons/stream_add.png</file>
|
<file>icons/stream_add.png</file>
|
||||||
|
@ -55,6 +55,12 @@ PortsWindow::PortsWindow(PortGroupList *pgl, QWidget *parent)
|
|||||||
tvStreamList->addAction(actionEdit_Stream);
|
tvStreamList->addAction(actionEdit_Stream);
|
||||||
tvStreamList->addAction(actionDelete_Stream);
|
tvStreamList->addAction(actionDelete_Stream);
|
||||||
|
|
||||||
|
addActions(tvPortList->actions());
|
||||||
|
QAction *sep = new QAction(this);
|
||||||
|
sep->setSeparator(true);
|
||||||
|
addAction(sep);
|
||||||
|
addActions(tvStreamList->actions());
|
||||||
|
|
||||||
tvStreamList->setModel(plm->getStreamModel());
|
tvStreamList->setModel(plm->getStreamModel());
|
||||||
tvPortList->setModel(plm->getPortModel());
|
tvPortList->setModel(plm->getPortModel());
|
||||||
|
|
||||||
@ -220,7 +226,10 @@ void PortsWindow::updateStreamViewActions()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
qDebug("No selection");
|
qDebug("No selection");
|
||||||
actionNew_Stream->setEnabled(true);
|
if (plm->isPort(tvPortList->currentIndex()))
|
||||||
|
actionNew_Stream->setEnabled(true);
|
||||||
|
else
|
||||||
|
actionNew_Stream->setDisabled(true);
|
||||||
actionEdit_Stream->setDisabled(true);
|
actionEdit_Stream->setDisabled(true);
|
||||||
actionDelete_Stream->setDisabled(true);
|
actionDelete_Stream->setDisabled(true);
|
||||||
}
|
}
|
||||||
|
@ -227,7 +227,7 @@
|
|||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>Exclusive Control (EXPERIMENTAL)</string>
|
<string>Exclusive Port Control (EXPERIMENTAL)</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
|
||||||
class Preferences : public QDialog, public Ui::Preferences
|
class Preferences : public QDialog, private Ui::Preferences
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user