- 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:
$(MAKE) -C rpc $@
$(MAKE) -C common $@
$(MAKE) -C server $@
$(MAKE) -C client $@
-$(MAKE) -C client $@
-$(MAKE) -C server $@
-$(MAKE) -C common $@
-$(MAKE) -C rpc $@
distclean:
$(MAKE) -C rpc $@
$(MAKE) -C common $@
$(MAKE) -C server $@
$(MAKE) -C client $@
-$(MAKE) -C client $@
-$(MAKE) -C server $@
-$(MAKE) -C common $@
-$(MAKE) -C rpc $@
qmake:
cd rpc && qmake $(QMAKE_CONFIG) && cd ..

View File

@ -5,10 +5,16 @@
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
<width>456</width>
<height>303</height>
</rect>
</property>
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle" >
<string>About</string>
</property>
@ -19,62 +25,103 @@
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
<enum>QFrame::Sunken</enum>
</property>
<layout class="QVBoxLayout" >
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>360</width>
<height>51</height>
</size>
</property>
</spacer>
<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" >
<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>
<widget class="QLabel" name="label" >
<widget class="QLabel" name="label_5" >
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">&#xd;
p, li { white-space: pre-wrap; }&#xd;
&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>
<string>Logo (c): Dhiman Sengupta
Icons (c): Mark James (http://www.famfamfam.com/lab/icons/silk/)</string>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
@ -96,7 +143,9 @@ p, li { white-space: pre-wrap; }&#xd;
</item>
</layout>
</widget>
<resources/>
<resources>
<include location="ostinato.qrc" />
</resources>
<connections>
<connection>
<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 <QProcess>
extern const char* version;
extern const char* revision;
PortGroupList *pgl;
MainWindow::MainWindow(QWidget *parent)
@ -58,6 +61,8 @@ void MainWindow::on_actionHelpAbout_triggered()
Ui::About about;
about.setupUi(aboutDialog);
about.versionLabel->setText(
QString("Version: %1 Revision: %2").arg(version).arg(revision));
aboutDialog->exec();

View File

@ -1,5 +1,6 @@
TEMPLATE = app
CONFIG += qt
RC_FILE = ostinato.rc
QT += network script
INCLUDEPATH += "../rpc/" "../common/"
LIBS += -lprotobuf
@ -67,5 +68,10 @@ SOURCES += \
streamlistdelegate.cpp \
streammodel.cpp
QMAKE_DISTCLEAN += object_script.*
include(../version.pri)
# TODO(LOW): Test only
include(modeltest.pri)

View File

@ -14,7 +14,9 @@
<file>icons/control_stop.png</file>
<file>icons/deco_exclusive.png</file>
<file>icons/delete.png</file>
<file>icons/logo.png</file>
<file>icons/magnifier.png</file>
<file>icons/name.png</file>
<file>icons/portgroup_add.png</file>
<file>icons/portgroup_connect.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.variable_out = GENERATED_SOURCES
QMAKE_EXTRA_COMPILERS += protobuf_impl
QMAKE_DISTCLEAN += object_script.*

View File

@ -7,11 +7,15 @@
#include <QMessageBox>
extern int myport;
extern const char* version;
extern const char* revision;
Drone::Drone(QWidget *parent)
: QWidget(parent)
{
setupUi(this);
versionLabel->setText(
QString("Version: %1 Revision: %2").arg(version).arg(revision));
rpcServer = new RpcServer();
service = new MyService();

View File

@ -38,3 +38,6 @@ SOURCES += \
SOURCES += myservice.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>
</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" >

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