Skip to content

Commit c3487c4

Browse files
committed
added link to project website in help menu
1 parent 77d11bd commit c3487c4

File tree

3 files changed

+32
-5
lines changed

3 files changed

+32
-5
lines changed

mainwindow.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include "accountdetail.h"
3838

3939
QString MainWindow::appPath = QString("");
40+
QUrl MainWindow::projectWebsite = QUrl("http://github.com/Raven24/FSugar");
4041
MainWindow* MainWindow::instance = NULL;
4142

4243
MainWindow::MainWindow(QWidget *parent) :
@@ -162,6 +163,8 @@ MainWindow::MainWindow(QWidget *parent) :
162163
this, SLOT(loadStyle()));
163164
connect(ui->actionAboutQt, SIGNAL(triggered()),
164165
qApp, SLOT(aboutQt()));
166+
connect(ui->actionWebsite, SIGNAL(triggered()),
167+
this, SLOT(openProjectHomepage()));
165168
connect(qApp, SIGNAL(aboutToQuit()),
166169
this, SLOT(cleanup()));
167170

@@ -412,3 +415,8 @@ void MainWindow::loadStyle()
412415
QString stylesheet(style.readAll());
413416
qApp->setStyleSheet(stylesheet);
414417
}
418+
419+
void MainWindow::openProjectHomepage()
420+
{
421+
QDesktopServices::openUrl(MainWindow::projectWebsite);
422+
}

mainwindow.h

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ class MainWindow : public QMainWindow {
5151
~MainWindow();
5252

5353
static QString appPath;
54+
static QUrl projectWebsite;
5455
static MainWindow* getInstance();
5556

5657
QTabWidget *mainWidget;
@@ -70,6 +71,7 @@ public slots:
7071
void displayCalendar();
7172
void displayPressList();
7273
void displaySettings();
74+
void openProjectHomepage();
7375

7476
void cleanup();
7577

mainwindow.ui

+22-5
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>796</width>
10-
<height>596</height>
9+
<width>900</width>
10+
<height>500</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
@@ -19,13 +19,13 @@
1919
<rect>
2020
<x>0</x>
2121
<y>0</y>
22-
<width>796</width>
23-
<height>26</height>
22+
<width>900</width>
23+
<height>22</height>
2424
</rect>
2525
</property>
2626
<widget class="QMenu" name="menuTest">
2727
<property name="title">
28-
<string>Datei</string>
28+
<string>Programm</string>
2929
</property>
3030
<addaction name="actionLogin"/>
3131
<addaction name="actionLogout"/>
@@ -47,6 +47,8 @@
4747
<property name="title">
4848
<string>Hilfe</string>
4949
</property>
50+
<addaction name="actionWebsite"/>
51+
<addaction name="separator"/>
5052
<addaction name="actionAboutQt"/>
5153
</widget>
5254
<addaction name="menuTest"/>
@@ -119,6 +121,21 @@
119121
<property name="text">
120122
<string>Style neu laden</string>
121123
</property>
124+
<property name="toolTip">
125+
<string>Stylesheet neu laden</string>
126+
</property>
127+
</action>
128+
<action name="actionWebsite">
129+
<property name="icon">
130+
<iconset resource="app.qrc">
131+
<normaloff>:/visit-website.png</normaloff>:/visit-website.png</iconset>
132+
</property>
133+
<property name="text">
134+
<string>Website</string>
135+
</property>
136+
<property name="toolTip">
137+
<string>Öffnet die Projektseite</string>
138+
</property>
122139
</action>
123140
</widget>
124141
<resources>

0 commit comments

Comments
 (0)