- Added version/revision info to both client and server UI
- Top level 'make clean' and 'make distclean' now do not stop in case of errors - 'make distclean' now removes the object_script.* generated files - Added the Logo to the About dialog and also the application icon
This commit is contained in:
parent
4dc3d2d7f9
commit
cbf114c29d
16
Makefile
16
Makefile
@ -10,16 +10,16 @@ release: qmake all
|
|||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(MAKE) -C rpc $@
|
-$(MAKE) -C client $@
|
||||||
$(MAKE) -C common $@
|
-$(MAKE) -C server $@
|
||||||
$(MAKE) -C server $@
|
-$(MAKE) -C common $@
|
||||||
$(MAKE) -C client $@
|
-$(MAKE) -C rpc $@
|
||||||
|
|
||||||
distclean:
|
distclean:
|
||||||
$(MAKE) -C rpc $@
|
-$(MAKE) -C client $@
|
||||||
$(MAKE) -C common $@
|
-$(MAKE) -C server $@
|
||||||
$(MAKE) -C server $@
|
-$(MAKE) -C common $@
|
||||||
$(MAKE) -C client $@
|
-$(MAKE) -C rpc $@
|
||||||
|
|
||||||
qmake:
|
qmake:
|
||||||
cd rpc && qmake $(QMAKE_CONFIG) && cd ..
|
cd rpc && qmake $(QMAKE_CONFIG) && cd ..
|
||||||
|
@ -5,10 +5,16 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>400</width>
|
<width>456</width>
|
||||||
<height>300</height>
|
<height>303</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizePolicy" >
|
||||||
|
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="windowTitle" >
|
<property name="windowTitle" >
|
||||||
<string>About</string>
|
<string>About</string>
|
||||||
</property>
|
</property>
|
||||||
@ -19,8 +25,34 @@
|
|||||||
<enum>QFrame::Box</enum>
|
<enum>QFrame::Box</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShadow" >
|
<property name="frameShadow" >
|
||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Sunken</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<layout class="QVBoxLayout" >
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" >
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label" >
|
||||||
|
<property name="sizePolicy" >
|
||||||
|
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="pixmap" >
|
||||||
|
<pixmap resource="ostinato.qrc" >:/icons/logo.png</pixmap>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="alignment" >
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
<layout class="QVBoxLayout" >
|
<layout class="QVBoxLayout" >
|
||||||
<item>
|
<item>
|
||||||
<spacer>
|
<spacer>
|
||||||
@ -29,19 +61,29 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" >
|
||||||
<size>
|
<size>
|
||||||
<width>360</width>
|
<width>20</width>
|
||||||
<height>51</height>
|
<height>21</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label" >
|
<widget class="QLabel" name="label_4" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
<string/>
|
||||||
p, li { white-space: pre-wrap; }
|
</property>
|
||||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
<property name="pixmap" >
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:29pt; font-weight:600;">Ostinato</span></p></body></html></string>
|
<pixmap resource="ostinato.qrc" >:/icons/name.png</pixmap>
|
||||||
|
</property>
|
||||||
|
<property name="alignment" >
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="versionLabel" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Version/Revision Placeholder</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment" >
|
<property name="alignment" >
|
||||||
<set>Qt::AlignCenter</set>
|
<set>Qt::AlignCenter</set>
|
||||||
@ -66,15 +108,20 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="sizeHint" >
|
<property name="sizeHint" >
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
<height>40</height>
|
<height>21</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_2" >
|
<widget class="QLabel" name="label_5" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>Icons (c): Mark James (http://www.famfamfam.com/lab/icons/silk/)</string>
|
<string>Logo (c): Dhiman Sengupta
|
||||||
|
Icons (c): Mark James (http://www.famfamfam.com/lab/icons/silk/)</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment" >
|
<property name="alignment" >
|
||||||
<set>Qt::AlignCenter</set>
|
<set>Qt::AlignCenter</set>
|
||||||
@ -96,7 +143,9 @@ p, li { white-space: pre-wrap; }
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources>
|
||||||
|
<include location="ostinato.qrc" />
|
||||||
|
</resources>
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
<connection>
|
||||||
<sender>buttonBox</sender>
|
<sender>buttonBox</sender>
|
||||||
|
BIN
client/icons/logo.ico
Normal file
BIN
client/icons/logo.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
BIN
client/icons/logo.png
Normal file
BIN
client/icons/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
BIN
client/icons/name.png
Normal file
BIN
client/icons/name.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
@ -12,6 +12,9 @@
|
|||||||
#include <QDockWidget>
|
#include <QDockWidget>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
|
|
||||||
|
extern const char* version;
|
||||||
|
extern const char* revision;
|
||||||
|
|
||||||
PortGroupList *pgl;
|
PortGroupList *pgl;
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent)
|
MainWindow::MainWindow(QWidget *parent)
|
||||||
@ -58,6 +61,8 @@ void MainWindow::on_actionHelpAbout_triggered()
|
|||||||
|
|
||||||
Ui::About about;
|
Ui::About about;
|
||||||
about.setupUi(aboutDialog);
|
about.setupUi(aboutDialog);
|
||||||
|
about.versionLabel->setText(
|
||||||
|
QString("Version: %1 Revision: %2").arg(version).arg(revision));
|
||||||
|
|
||||||
aboutDialog->exec();
|
aboutDialog->exec();
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
CONFIG += qt
|
CONFIG += qt
|
||||||
|
RC_FILE = ostinato.rc
|
||||||
QT += network script
|
QT += network script
|
||||||
INCLUDEPATH += "../rpc/" "../common/"
|
INCLUDEPATH += "../rpc/" "../common/"
|
||||||
LIBS += -lprotobuf
|
LIBS += -lprotobuf
|
||||||
@ -67,5 +68,10 @@ SOURCES += \
|
|||||||
streamlistdelegate.cpp \
|
streamlistdelegate.cpp \
|
||||||
streammodel.cpp
|
streammodel.cpp
|
||||||
|
|
||||||
|
|
||||||
|
QMAKE_DISTCLEAN += object_script.*
|
||||||
|
|
||||||
|
include(../version.pri)
|
||||||
|
|
||||||
# TODO(LOW): Test only
|
# TODO(LOW): Test only
|
||||||
include(modeltest.pri)
|
include(modeltest.pri)
|
||||||
|
@ -14,7 +14,9 @@
|
|||||||
<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/logo.png</file>
|
||||||
<file>icons/magnifier.png</file>
|
<file>icons/magnifier.png</file>
|
||||||
|
<file>icons/name.png</file>
|
||||||
<file>icons/portgroup_add.png</file>
|
<file>icons/portgroup_add.png</file>
|
||||||
<file>icons/portgroup_connect.png</file>
|
<file>icons/portgroup_connect.png</file>
|
||||||
<file>icons/portgroup_delete.png</file>
|
<file>icons/portgroup_delete.png</file>
|
||||||
|
1
client/ostinato.rc
Normal file
1
client/ostinato.rc
Normal file
@ -0,0 +1 @@
|
|||||||
|
IDI_ICON1 ICON DISCARDABLE "icons/logo.ico"
|
@ -99,3 +99,5 @@ protobuf_impl.depends = ${QMAKE_FILE_BASE}.pb.h
|
|||||||
protobuf_impl.commands = $$escape_expand(\n)
|
protobuf_impl.commands = $$escape_expand(\n)
|
||||||
protobuf_impl.variable_out = GENERATED_SOURCES
|
protobuf_impl.variable_out = GENERATED_SOURCES
|
||||||
QMAKE_EXTRA_COMPILERS += protobuf_impl
|
QMAKE_EXTRA_COMPILERS += protobuf_impl
|
||||||
|
|
||||||
|
QMAKE_DISTCLEAN += object_script.*
|
||||||
|
@ -7,11 +7,15 @@
|
|||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
extern int myport;
|
extern int myport;
|
||||||
|
extern const char* version;
|
||||||
|
extern const char* revision;
|
||||||
|
|
||||||
Drone::Drone(QWidget *parent)
|
Drone::Drone(QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
{
|
{
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
versionLabel->setText(
|
||||||
|
QString("Version: %1 Revision: %2").arg(version).arg(revision));
|
||||||
|
|
||||||
rpcServer = new RpcServer();
|
rpcServer = new RpcServer();
|
||||||
service = new MyService();
|
service = new MyService();
|
||||||
|
@ -38,3 +38,6 @@ SOURCES += \
|
|||||||
SOURCES += myservice.cpp
|
SOURCES += myservice.cpp
|
||||||
SOURCES += pcapextra.cpp
|
SOURCES += pcapextra.cpp
|
||||||
|
|
||||||
|
QMAKE_DISTCLEAN += object_script.*
|
||||||
|
|
||||||
|
include (../version.pri)
|
||||||
|
@ -42,6 +42,16 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="versionLabel" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Version/Revision Placeholder</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment" >
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_3" >
|
<widget class="QLabel" name="label_3" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
|
16
version.pri
Normal file
16
version.pri
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
APP_VERSION = 0.1
|
||||||
|
APP_VERSION_FILE = version.cpp
|
||||||
|
revtarget.target = $$APP_VERSION_FILE
|
||||||
|
win32:revtarget.commands = echo "const char *version = \"$$APP_VERSION\";" \
|
||||||
|
"const char *revision = \"$(shell svnversion .)\";" \
|
||||||
|
> $$APP_VERSION_FILE
|
||||||
|
unix:revtarget.commands = echo \
|
||||||
|
"\"const char *version = \\\"$$APP_VERSION\\\";" \
|
||||||
|
"const char *revision = \\\"$(shell svnversion .)\\\";\"" \
|
||||||
|
> $$APP_VERSION_FILE
|
||||||
|
revtarget.depends = $$SOURCES $$HEADERS $$FORMS $$POST_TARGETDEPS
|
||||||
|
|
||||||
|
SOURCES += $$APP_VERSION_FILE
|
||||||
|
QMAKE_EXTRA_TARGETS += revtarget
|
||||||
|
POST_TARGETDEPS += $$APP_VERSION_FILE
|
||||||
|
QMAKE_DISTCLEAN += $$APP_VERSION_FILE
|
Loading…
Reference in New Issue
Block a user