Commit ca0823f9 authored by Hans-Christian Ebke's avatar Hans-Christian Ebke

Introduced branding of license through resource file.

Made about dialog a bit more convenient.
Updated year in standard copyright note.


git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@17090 383ad7c9-94d9-4d36-a494-682f7c89f535
parent a5bff932
......@@ -82,16 +82,23 @@ acg_qt4_autouic (uic_targets ${ui})
acg_qt4_automoc (moc_targets ${headers})
endif()
set(RC_SRC "")
if ( EXISTS ${CMAKE_SOURCE_DIR}/branding/branding.qrc )
QT4_ADD_RESOURCES(BRANDING_RC_SRC "${CMAKE_SOURCE_DIR}/branding/branding.qrc")
list(APPEND RC_SRC ${BRANDING_RC_SRC})
endif()
if (WIN32)
# add app icon rc file to windows build
acg_add_executable (OpenFlipper WIN32 ${CMAKE_CURRENT_SOURCE_DIR}/CoreApp.rc ${uic_targets} ${sources} ${headers} ${moc_targets})
acg_add_executable (OpenFlipper WIN32 ${CMAKE_CURRENT_SOURCE_DIR}/CoreApp.rc ${uic_targets} ${sources} ${headers} ${moc_targets} ${RC_SRC})
# link to qtmain library to get WinMain function for a non terminal app
target_link_libraries (OpenFlipper ${QT_QTMAIN_LIBRARY})
elseif (APPLE)
# generate bundle on mac
acg_add_executable (OpenFlipper MACOSX_BUNDLE ${uic_targets} ${sources} ${headers} ${moc_targets})
acg_add_executable (OpenFlipper MACOSX_BUNDLE ${uic_targets} ${sources} ${headers} ${moc_targets} ${RC_SRC})
else ()
acg_add_executable (OpenFlipper ${uic_targets} ${sources} ${headers} ${moc_targets})
acg_add_executable (OpenFlipper ${uic_targets} ${sources} ${headers} ${moc_targets} ${RC_SRC})
endif ()
# Mark this build part as building OpenFlippers Core
......
......@@ -46,6 +46,8 @@
#include <OpenFlipper/common/GlobalOptions.hh>
#include <iostream>
AboutWidget::AboutWidget(QWidget *parent )
: QMainWindow(parent)
{
......@@ -58,8 +60,25 @@ AboutWidget::AboutWidget(QWidget *parent )
setWindowTitle(tr("About %1").arg(TOSTRING(PRODUCT_NAME)));
const int idx = About->indexOf(tab_2);
About->setTabText(idx, tr(TOSTRING(PRODUCT_NAME), "about box tab title"));
OpenFlipperLicense->setHtml(OpenFlipperLicense->toHtml().arg(TOSTRING(PRODUCT_NAME)));
if (QFile::exists(":/branding/license_text.html")) {
OpenFlipperLicense->setText("");
QFile licenseTextFile(":/branding/license_text.html");
licenseTextFile.open(QFile::ReadOnly);
QByteArray licenseTextBA = licenseTextFile.readAll();
QString licenseText = QString::fromUtf8(licenseTextBA.data(), licenseTextBA.size());
OpenFlipperLicense->setHtml(licenseText.arg(TOSTRING(PRODUCT_NAME)));
} else {
OpenFlipperLicense->setHtml(OpenFlipperLicense->toHtml().arg(TOSTRING(PRODUCT_NAME)));
}
connect( actionClose , SIGNAL(triggered() ) , this, SLOT(hide()) );
connect( closeButton , SIGNAL(clicked() ) , this, SLOT(hide()) );
closeButton->setFocus();
}
void AboutWidget::keyPressEvent(QKeyEvent * event) {
if (event->key() == Qt::Key_Escape || event->key() == Qt::Key_Enter || event->key() == Qt::Key_Space) {
hide();
}
}
......@@ -56,5 +56,7 @@ class AboutWidget : public QMainWindow, public Ui::AboutWidget
public:
AboutWidget(QWidget *parent = 0);
void keyPressEvent(QKeyEvent * event);
};
......@@ -66,7 +66,7 @@ p, li { white-space: pre-wrap; }
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'DejaVu Sans'; font-size:11pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'DejaVu Sans'; font-size:11pt;&quot;&gt;=====================================&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'DejaVu Sans'; font-size:11pt;&quot;&gt;%1&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'DejaVu Sans'; font-size:11pt;&quot;&gt;Copyright (C) 2001-2011 by Computer Graphics Group, RWTH Aachen&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'DejaVu Sans'; font-size:11pt;&quot;&gt;Copyright (C) 2001-2013 by Computer Graphics Group, RWTH Aachen&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'DejaVu Sans'; font-size:11pt;&quot;&gt;www.openflipper.org&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'DejaVu Sans'; font-size:11pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'DejaVu Sans'; font-size:11pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
......@@ -120,6 +120,9 @@ p, li { white-space: pre-wrap; }
<property name="text">
<string>Close</string>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment