Added ReportBugDialog to Help menu.

- Also renamed "File" toolbar to "Quick Access" toolbar (#13).
This commit is contained in:
Jim Evins
2019-01-27 21:46:56 -05:00
parent 212578c380
commit 0e60c52d4c
11 changed files with 555 additions and 20 deletions
+1
View File
@@ -15,6 +15,7 @@ set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/"
# Version Information
#=======================================
set (WEBSITE "glabels.org")
set (BUG_WEBSITE "https://github.com/jimevins/glabels-qt/issues")
execute_process(
COMMAND git log -1 --format=%h
+3
View File
@@ -31,6 +31,7 @@ set (glabels_sources
PropertiesView.cpp
Preview.cpp
PreviewOverlayItem.cpp
ReportBugDialog.cpp
RollTemplatePath.cpp
SelectProductDialog.cpp
SimplePreview.cpp
@@ -61,6 +62,7 @@ set (glabels_qobject_headers
PrintView.h
PropertiesView.h
Preview.h
ReportBugDialog.h
SelectProductDialog.h
SimplePreview.h
StartupView.h
@@ -76,6 +78,7 @@ set (glabels_forms
ui/PreferencesDialog.ui
ui/PrintView.ui
ui/PropertiesView.ui
ui/ReportBugDialog.ui
ui/SelectProductDialog.ui
ui/StartupView.ui
ui/TemplateDesignerIntroPage.ui
+11
View File
@@ -21,6 +21,7 @@
#include "Help.h"
#include "AboutDialog.h"
#include "ReportBugDialog.h"
#include <QtDebug>
@@ -37,6 +38,16 @@ namespace glabels
}
///
/// Display Help->"Report Bug" Dialog
///
void Help::displayReportBug( QWidget *parent )
{
ReportBugDialog dialog( parent );
dialog.exec();
}
///
/// Display Help->About Dialog
///
+1
View File
@@ -35,6 +35,7 @@ namespace glabels
{
void displayContents( QWidget *parent );
void displayReportBug( QWidget *parent );
void displayAbout( QWidget *parent );
}
+19 -4
View File
@@ -384,14 +384,14 @@ namespace glabels
/* View actions */
viewFileToolBarAction = new QAction( tr("File"), this );
viewFileToolBarAction = new QAction( tr("Quick Access"), this );
viewFileToolBarAction->setCheckable( true );
viewFileToolBarAction->setStatusTip( tr("Change visibility of file toolbar in current window") );
viewFileToolBarAction->setStatusTip( tr("Change visibility of the \"Quick Access\" toolbar in current window") );
connect( viewFileToolBarAction, SIGNAL(toggled(bool)), this, SLOT(viewFileToolBar(bool)) );
viewEditorToolBarAction = new QAction( tr("Editor"), this );
viewEditorToolBarAction->setCheckable( true );
viewEditorToolBarAction->setStatusTip( tr("Change visibility of editor toolbar in current window") );
viewEditorToolBarAction->setStatusTip( tr("Change visibility of the \"Editor\" toolbar in current window") );
connect( viewEditorToolBarAction, SIGNAL(toggled(bool)), this, SLOT(viewEditorToolBar(bool)) );
@@ -536,12 +536,16 @@ namespace glabels
/* Help actions */
helpContentsAction = new QAction( tr("&Contents..."), this );
helpContentsAction = new QAction( tr("&User Manual..."), this );
helpContentsAction->setIcon( QIcon::fromTheme( "help-contents" ) );
helpContentsAction->setShortcut( QKeySequence::HelpContents );
helpContentsAction->setStatusTip( tr("Open gLabels manual") );
connect( helpContentsAction, SIGNAL(triggered()), this, SLOT(helpContents()) );
helpReportBugAction = new QAction( tr("&Report Bug..."), this );
helpReportBugAction->setStatusTip( tr("Report a bug to the developers") );
connect( helpReportBugAction, SIGNAL(triggered()), this, SLOT(helpReportBug()) );
helpAboutAction = new QAction( tr("&About..."), this );
helpAboutAction->setIcon( QIcon::fromTheme( "help-about" ) );
helpAboutAction->setStatusTip( tr("About gLabels") );
@@ -651,6 +655,7 @@ namespace glabels
helpMenu = menuBar()->addMenu( tr("&Help") );
helpMenu->addAction( helpContentsAction );
helpMenu->addAction( helpReportBugAction );
helpMenu->addAction( helpAboutAction );
contextMenu = new QMenu();
@@ -897,6 +902,7 @@ namespace glabels
// Help actions
helpContentsAction->setEnabled( true );
helpReportBugAction->setEnabled( true );
helpAboutAction->setEnabled( true );
// Special context actions
@@ -1530,6 +1536,15 @@ namespace glabels
}
///
/// Help->Report Bug Action
///
void MainWindow::helpReportBug()
{
Help::displayReportBug( this );
}
///
/// Help->About Action
///
+2
View File
@@ -143,6 +143,7 @@ namespace glabels
void objectsCenterVert();
void helpContents();
void helpReportBug();
void helpAbout();
void onContextMenuActivate();
@@ -291,6 +292,7 @@ namespace glabels
QAction* objectsCenterVertAction;
QAction* helpContentsAction;
QAction* helpReportBugAction;
QAction* helpAboutAction;
QAction* contextCutAction;
+103
View File
@@ -0,0 +1,103 @@
/* ReportBugDialog.cpp
*
* Copyright (C) 2019 Jim Evins <evins@snaught.com>
*
* This file is part of gLabels-qt.
*
* gLabels-qt is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* gLabels-qt is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with gLabels-qt. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ReportBugDialog.h"
#include "model/Version.h"
#include <QDesktopServices>
#include <QGuiApplication>
#include <QLocale>
#include <QSysInfo>
#include <QUrl>
#include <QtDebug>
namespace glabels
{
///
/// Constructor
///
ReportBugDialog::ReportBugDialog( QWidget *parent )
: QDialog(parent)
{
setupUi( this );
QString title = tr("How to Report a Bug");
titleLabel->setText( QString( "<span style='font-size:14pt;font-weight:bold;'>%1</span>" ).arg( title ) );
QString directionsP1 =
tr( "To submit a bug report, click on the button below. This will open a "
"web browser to the gLabels github issue tracking page." );
p1Label->setText( QString( "<p>%1</p>" ).arg( directionsP1 ) );
QString directionsP2 =
tr( "Before submitting a report, look through the existing issues for similar "
"or related bugs. If the issue has already been reported, please consider "
"contributing to its report instead. Otherwise, create a new issue report. "
"Please paste the following information into the issue description." );
p2Label->setText( QString( "<p>%1</p>" ).arg( directionsP2 ) );
infoText->append( "> GLABELS" );
infoText->append( "> Version: " + model::Version::STRING );
infoText->append( "> " );
infoText->append( "> SYSTEM INFO" );
infoText->append( "> OS: " + QSysInfo::prettyProductName() );
infoText->append( "> Kernel: " + QSysInfo::kernelType() + " " + QSysInfo::kernelVersion() );
infoText->append( "> Build CPU Architecture: " + QSysInfo::buildCpuArchitecture() );
infoText->append( "> Current CPU Architecture: " + QSysInfo::currentCpuArchitecture() );
infoText->append( "> " );
infoText->append( "> LOCALE" );
infoText->append( "> Name: " + QLocale::system().name() );
QString directionsP3 =
tr( "Be sure to include a detailed description of the problem and how to "
"recreate it. Attach any screenshots and/or example glabels project "
"files that may illustrate the problem." );
p3Label->setText( QString( "<p>%1</p>" ).arg( directionsP3 ) );
}
///
/// "Copy" Button Clicked Slot
///
void ReportBugDialog::onCopyButtonClicked()
{
infoText->selectAll();
infoText->copy();
}
///
/// "Website" Button Clicked Slot
///
void ReportBugDialog::onWebsiteButtonClicked()
{
QDesktopServices::openUrl( QUrl(model::Version::BUG_WEBSITE) );
}
} // namespace glabels
+58
View File
@@ -0,0 +1,58 @@
/* ReportBugDialog.h
*
* Copyright (C) 2019 Jim Evins <evins@snaught.com>
*
* This file is part of gLabels-qt.
*
* gLabels-qt is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* gLabels-qt is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with gLabels-qt. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ReportBugDialog_h
#define ReportBugDialog_h
#include "ui_ReportBugDialog.h"
namespace glabels
{
///
/// "Report Bug" Dialog Widget
///
class ReportBugDialog : public QDialog, public Ui_ReportBugDialog
{
Q_OBJECT
/////////////////////////////////
// Life Cycle
/////////////////////////////////
public:
ReportBugDialog( QWidget *parent = nullptr );
/////////////////////////////////
// Slots
/////////////////////////////////
private slots:
void onCopyButtonClicked();
void onWebsiteButtonClicked();
};
}
#endif // ReportBugDialog_h
+294
View File
@@ -0,0 +1,294 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ReportBugDialog</class>
<widget class="QDialog" name="ReportBugDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>586</width>
<height>675</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>575</width>
<height>675</height>
</size>
</property>
<property name="windowTitle">
<string>gLabels - Report a Bug</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>12</number>
</property>
<property name="leftMargin">
<number>12</number>
</property>
<property name="topMargin">
<number>12</number>
</property>
<property name="rightMargin">
<number>12</number>
</property>
<property name="bottomMargin">
<number>12</number>
</property>
<item>
<widget class="QLabel" name="titleLabel">
<property name="text">
<string notr="true">Title</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="p1Label">
<property name="text">
<string notr="true">pp1</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="websiteButton">
<property name="text">
<string>&amp;Launch Issue Tracker</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="p2Label">
<property name="text">
<string notr="true">pp2</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="frame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTextEdit" name="infoText">
<property name="minimumSize">
<size>
<width>400</width>
<height>250</height>
</size>
</property>
<property name="acceptRichText">
<bool>false</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::NoTextInteraction</set>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="copyButton">
<property name="text">
<string>Copy</string>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/flat/24x24/glabels-edit-copy.svg</normaloff>:/icons/flat/24x24/glabels-edit-copy.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="shortcut">
<string>Ctrl+C</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QLabel" name="p3Label">
<property name="text">
<string notr="true">pp3</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>118</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="../icons.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>ReportBugDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>230</x>
<y>649</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>ReportBugDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>298</x>
<y>655</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>websiteButton</sender>
<signal>clicked()</signal>
<receiver>ReportBugDialog</receiver>
<slot>onWebsiteButtonClicked()</slot>
<hints>
<hint type="sourcelabel">
<x>351</x>
<y>94</y>
</hint>
<hint type="destinationlabel">
<x>566</x>
<y>103</y>
</hint>
</hints>
</connection>
<connection>
<sender>copyButton</sender>
<signal>clicked()</signal>
<receiver>ReportBugDialog</receiver>
<slot>onCopyButtonClicked()</slot>
<hints>
<hint type="sourcelabel">
<x>330</x>
<y>437</y>
</hint>
<hint type="destinationlabel">
<x>514</x>
<y>500</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>onWebsiteButtonClicked()</slot>
<slot>onCopyButtonClicked()</slot>
</slots>
</ui>
+1
View File
@@ -30,6 +30,7 @@ namespace glabels
namespace Version
{
const QString WEBSITE = "http://@WEBSITE@";
const QString BUG_WEBSITE = "@BUG_WEBSITE@";
const int MAJOR = @glabels-qt_VERSION_MAJOR@;
const int MINOR = @glabels-qt_VERSION_MINOR@;
+62 -16
View File
@@ -644,6 +644,25 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ReportBugDialog</name>
<message>
<source>gLabels - Report a Bug</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Copy</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Launch Bug Report Webpage</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+C</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SelectProductDialog</name>
<message>
@@ -1365,22 +1384,10 @@
<source>Configure the application</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>File</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Change visibility of file toolbar in current window</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Editor</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Change visibility of editor toolbar in current window</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Grid</source>
<translation type="unfinished"></translation>
@@ -1597,10 +1604,6 @@
<source>Vertically center objects in label</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Contents...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Open gLabels manual</source>
<translation type="unfinished"></translation>
@@ -1705,6 +1708,30 @@
<source>Create Barcode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Quick Access</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Report Bug...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Report a bug to the developers</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Change visibility of the &quot;Quick Access&quot; toolbar in current window</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Change visibility of the &quot;Editor&quot; toolbar in current window</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;User Manual...</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>glabels::MergeView</name>
@@ -1906,6 +1933,25 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>glabels::ReportBugDialog</name>
<message>
<source>How to Report a Bug</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>To submit a bug report, click on the button below. This will open a web browser to the gLabels github issue tracking page.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Be sure to include a detailed description of the problem and how to recreate it. Attach any screenshots and/or example glabels project files that may illustrate the problem.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Before submitting a report, look through the existing issues for similar or related bugs. If the issue has already been reported, please consider contributing to its report instead. Otherwise, create a new issue report. Please paste the following information into the issue description.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>glabels::SimplePreview</name>
<message>