add reportabug 1.0.2

This commit is contained in:
arcan1s
2014-07-31 19:59:55 +04:00
parent 78a4aeb0eb
commit 0aa162b71b
27 changed files with 4196 additions and 196 deletions

View File

@ -13,6 +13,9 @@ include_directories (${CMAKE_CURRENT_SOURCE_DIR}/../../${PROJECT_LIBRARY}/includ
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR})
link_directories (${PROJECT_LIBRARY}/src/lib)
foreach (3RDPARTY ${GUI_3RDPARTY})
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/../../${3RDPARTY}/src)
endforeach ()
if (USE_QT5)
find_package(Qt5Core REQUIRED)
@ -21,6 +24,7 @@ if (USE_QT5)
add_definitions(${Qt5Core_DEFINITIONS})
add_definitions(${Qt5Widgets_DEFINITIONS})
add_definitions(${Qt5LinguistTools_DEFINITIONS})
include_directories (${Qt5Core_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
qt5_wrap_cpp (MOC_SOURCES ${HEADERS})
qt5_wrap_ui (UI_HEADERS ${FORMS})
qt5_add_resources (QRC_SOURCES ${RESOURCES})
@ -34,14 +38,6 @@ if (USE_QT5)
endforeach ()
add_custom_target (translations COMMAND ${Qt5_LUPDATE_EXECUTABLE} ${HEADERS} ${SOURCES} ${UI_HEADERS} -ts ${TRANSLATIONS})
add_custom_command (TARGET translations COMMAND ${Qt5_LRELEASE_EXECUTABLE} ${TRANSLATIONS})
source_group ("Header Files" FILES ${HEADERS})
source_group ("Source Files" FILES ${SOURCES})
source_group ("Generated Files" FILES ${MOC_SOURCES})
include_directories (${Qt5Core_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
add_executable (${SUBPROJECT} ${UI_HEADERS} ${HEADERS} ${SOURCES} ${MOC_SOURCES} ${QRC_SOURCES} ${TRANSLATIONS})
target_link_libraries (${SUBPROJECT} ${PROJECT_LIBRARY} ${Qt5Widgets_LIBRARIES} ${Qt5Core_LIBRARIES})
else ()
find_package (Qt4 REQUIRED)
include (${QT_USE_FILE})
@ -58,14 +54,9 @@ else ()
endforeach ()
add_custom_target (translations COMMAND ${QT_LUPDATE_EXECUTABLE} ${HEADERS} ${SOURCES} ${UI_HEADERS} -ts ${TRANSLATIONS})
add_custom_command (TARGET translations COMMAND ${QT_LRELEASE_EXECUTABLE} ${TRANSLATIONS})
source_group ("Header Files" FILES ${HEADERS})
source_group ("Source Files" FILES ${SOURCES})
source_group ("Generated Files" FILES ${MOC_SOURCES})
add_executable (${SUBPROJECT} ${UI_HEADERS} ${HEADERS} ${SOURCES} ${MOC_SOURCES} ${QRC_SOURCES} ${TRANSLATIONS})
target_link_libraries (${SUBPROJECT} ${PROJECT_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
endif()
add_executable (${SUBPROJECT} ${UI_HEADERS} ${HEADERS} ${SOURCES} ${MOC_SOURCES} ${QRC_SOURCES} ${TRANSLATIONS})
target_link_libraries (${SUBPROJECT} ${GUI_3RDPARTY} ${PROJECT_LIBRARY} ${Qt5Widgets_LIBRARIES} ${Qt5Core_LIBRARIES})
# install properties
install (TARGETS ${SUBPROJECT} DESTINATION bin)

View File

@ -24,6 +24,7 @@
#include <QProcess>
#include <netctlgui/netctlgui.h>
#include <reportabug/reportabug.h>
#include "aboutwindow.h"
#include "bridgewidget.h"
@ -91,6 +92,7 @@ MainWindow::MainWindow(QWidget *parent,
aboutWin = new AboutWindow(this, debug);
errorWin = new ErrorWindow(this, debug);
netctlAutoWin = new NetctlAutoWindow(this, debug, configuration);
reportWin = new Reportabug(this, debug);
// profile widgets
generalWid = new GeneralWidget(this, configuration);
ui->scrollAreaWidgetContents->layout()->addWidget(generalWid);
@ -173,6 +175,7 @@ MainWindow::~MainWindow()
delete errorWin;
delete netctlAutoWin;
delete settingsWin;
delete reportWin;
delete ui;
}
@ -231,6 +234,7 @@ void MainWindow::createActions()
connect(ui->actionNetctlAuto, SIGNAL(triggered(bool)), netctlAutoWin, SLOT(showWindow()));
connect(ui->actionSettings, SIGNAL(triggered(bool)), settingsWin, SLOT(showWindow()));
connect(ui->actionQuit, SIGNAL(triggered(bool)), this, SLOT(close()));
connect(ui->actionReport, SIGNAL(triggered(bool)), reportWin, SLOT(showWindow()));
// actions menu
connect(ui->menuActions, SIGNAL(aboutToShow()), this, SLOT(updateMenu()));

View File

@ -37,6 +37,7 @@ class NetctlProfile;
class PasswdWidget;
class PppoeWidget;
class SettingsWindow;
class Reportabug;
class TunnelWidget;
class TuntapWidget;
class VlanWidget;
@ -109,6 +110,7 @@ private:
AboutWindow *aboutWin;
ErrorWindow *errorWin;
NetctlAutoWindow *netctlAutoWin;
Reportabug *reportWin;
PasswdWidget *passwdWid;
SettingsWindow *settingsWin;
BridgeWidget *bridgeWid;

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>479</width>
<height>507</height>
<width>477</width>
<height>505</height>
</rect>
</property>
<property name="windowTitle">
@ -367,7 +367,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>479</width>
<width>477</width>
<height>22</height>
</rect>
</property>
@ -402,6 +402,7 @@
<property name="title">
<string>Help</string>
</property>
<addaction name="actionReport"/>
<addaction name="actionAbout"/>
</widget>
<addaction name="menuMenu"/>
@ -562,12 +563,22 @@
</action>
<action name="actionAbout">
<property name="icon">
<iconset theme="help-about"/>
<iconset theme="help-about">
<normaloff/>
</iconset>
</property>
<property name="text">
<string>About</string>
</property>
</action>
<action name="actionReport">
<property name="icon">
<iconset theme="tools-report-bug"/>
</property>
<property name="text">
<string>Report a bug</string>
</property>
</action>
</widget>
<tabstops>
<tabstop>tabWidget</tabstop>