- 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)
|
||||
: QMainWindow (parent)
|
||||
{
|
||||
QString serverApp = QCoreApplication::applicationDirPath();
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
serverApp.append("/drone.exe");
|
||||
#else
|
||||
serverApp.append("/drone");
|
||||
#endif
|
||||
|
||||
localServer_ = new QProcess(this);
|
||||
localServer_->setProcessChannelMode(QProcess::ForwardedChannels);
|
||||
localServer_->start("./drone.exe");
|
||||
localServer_->start(serverApp);
|
||||
|
||||
pgl = new PortGroupList;
|
||||
|
||||
portsWindow = new PortsWindow(pgl, this);
|
||||
statsWindow = new PortStatsWindow(pgl, this);
|
||||
portsDock = new QDockWidget(tr("Ports"), this);
|
||||
statsDock = new QDockWidget(tr("Stats"), this);
|
||||
portsDock = new QDockWidget(tr("Ports and Streams"), this);
|
||||
statsDock = new QDockWidget(tr("Statistics"), this);
|
||||
|
||||
setupUi(this);
|
||||
|
||||
menuFile->insertActions(menuFile->actions().at(0), portsWindow->actions());
|
||||
|
||||
statsDock->setWidget(statsWindow);
|
||||
addDockWidget(Qt::BottomDockWidgetArea, statsDock);
|
||||
portsDock->setWidget(portsWindow);
|
||||
addDockWidget(Qt::TopDockWidgetArea, portsDock);
|
||||
|
||||
connect(actionFileExit, SIGNAL(triggered()), this, SLOT(close()));
|
||||
connect(actionAboutQt, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
|
||||
#if 0
|
||||
{
|
||||
DbgThread *dbg = new DbgThread(pgl);
|
||||
|
@ -26,6 +26,7 @@
|
||||
<property name="title" >
|
||||
<string>File</string>
|
||||
</property>
|
||||
<addaction name="separator" />
|
||||
<addaction name="actionPreferences" />
|
||||
<addaction name="actionFileExit" />
|
||||
</widget>
|
||||
@ -34,17 +35,24 @@
|
||||
<string>Help</string>
|
||||
</property>
|
||||
<addaction name="actionHelpAbout" />
|
||||
<addaction name="actionAboutQt" />
|
||||
</widget>
|
||||
<addaction name="menuFile" />
|
||||
<addaction name="menuHelp" />
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar" />
|
||||
<action name="actionFileExit" >
|
||||
<property name="icon" >
|
||||
<iconset resource="ostinato.qrc" >:/icons/exit.png</iconset>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>E&xit</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionHelpAbout" >
|
||||
<property name="icon" >
|
||||
<iconset resource="ostinato.qrc" >:/icons/about.png</iconset>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>&About</string>
|
||||
</property>
|
||||
@ -57,6 +65,14 @@
|
||||
<string>Preferences</string>
|
||||
</property>
|
||||
</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>
|
||||
<resources>
|
||||
<include location="ostinato.qrc" />
|
||||
|
@ -1,5 +1,6 @@
|
||||
<RCC>
|
||||
<qresource prefix="/" >
|
||||
<file>icons/about.png</file>
|
||||
<file>icons/arrow_down.png</file>
|
||||
<file>icons/arrow_left.png</file>
|
||||
<file>icons/arrow_right.png</file>
|
||||
@ -14,6 +15,7 @@
|
||||
<file>icons/control_stop.png</file>
|
||||
<file>icons/deco_exclusive.png</file>
|
||||
<file>icons/delete.png</file>
|
||||
<file>icons/exit.png</file>
|
||||
<file>icons/logo.png</file>
|
||||
<file>icons/magnifier.png</file>
|
||||
<file>icons/name.png</file>
|
||||
@ -25,6 +27,7 @@
|
||||
<file>icons/portstats_clear_all.png</file>
|
||||
<file>icons/portstats_filter.png</file>
|
||||
<file>icons/preferences.png</file>
|
||||
<file>icons/qt.png</file>
|
||||
<file>icons/sound_mute.png</file>
|
||||
<file>icons/sound_none.png</file>
|
||||
<file>icons/stream_add.png</file>
|
||||
|
@ -55,6 +55,12 @@ PortsWindow::PortsWindow(PortGroupList *pgl, QWidget *parent)
|
||||
tvStreamList->addAction(actionEdit_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());
|
||||
tvPortList->setModel(plm->getPortModel());
|
||||
|
||||
@ -220,7 +226,10 @@ void PortsWindow::updateStreamViewActions()
|
||||
else
|
||||
{
|
||||
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);
|
||||
actionDelete_Stream->setDisabled(true);
|
||||
}
|
||||
|
@ -227,7 +227,7 @@
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Exclusive Control (EXPERIMENTAL)</string>
|
||||
<string>Exclusive Port Control (EXPERIMENTAL)</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
|
@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
class Preferences : public QDialog, public Ui::Preferences
|
||||
class Preferences : public QDialog, private Ui::Preferences
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user