- 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:
Srivats P. 2010-03-24 15:56:11 +00:00
parent 4dc3d2d7f9
commit cbf114c29d
14 changed files with 159 additions and 61 deletions

View File

@ -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 ..

View File

@ -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,62 +25,103 @@
<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" > <layout class="QVBoxLayout" >
<item> <item>
<spacer> <layout class="QHBoxLayout" >
<property name="orientation" > <item>
<enum>Qt::Vertical</enum> <widget class="QLabel" name="label" >
</property> <property name="sizePolicy" >
<property name="sizeHint" > <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<size> <horstretch>0</horstretch>
<width>360</width> <verstretch>0</verstretch>
<height>51</height> </sizepolicy>
</size> </property>
</property> <property name="text" >
</spacer> <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" >
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>21</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_4" >
<property name="text" >
<string/>
</property>
<property name="pixmap" >
<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 name="alignment" >
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>Copyright (c) 2007-2010 Srivats P.</string>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>21</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item> </item>
<item> <item>
<widget class="QLabel" name="label" > <widget class="QLabel" name="label_5" >
<property name="text" > <property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">&#xd; <string>Logo (c): Dhiman Sengupta
p, li { white-space: pre-wrap; }&#xd; Icons (c): Mark James (http://www.famfamfam.com/lab/icons/silk/)</string>
&lt;/style>&lt;/head>&lt;body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">&#xd;
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-size:29pt; font-weight:600;">Ostinato&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>Copyright (c) 2007-2010 Srivats P.</string>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>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; }&#xd;
</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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
client/icons/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
client/icons/name.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -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();

View File

@ -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)

View File

@ -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
View File

@ -0,0 +1 @@
IDI_ICON1 ICON DISCARDABLE "icons/logo.ico"

View File

@ -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.*

View File

@ -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();

View File

@ -38,3 +38,6 @@ SOURCES += \
SOURCES += myservice.cpp SOURCES += myservice.cpp
SOURCES += pcapextra.cpp SOURCES += pcapextra.cpp
QMAKE_DISTCLEAN += object_script.*
include (../version.pri)

View File

@ -42,6 +42,16 @@ p, li { white-space: pre-wrap; }&#xd;
</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
View 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