diff --git a/qucs/qucs/dialogs/CMakeLists.txt b/qucs/qucs/dialogs/CMakeLists.txt
index dfbb2b2671..af9e56b361 100755
--- a/qucs/qucs/dialogs/CMakeLists.txt
+++ b/qucs/qucs/dialogs/CMakeLists.txt
@@ -7,6 +7,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}
#INCLUDES = $(X11_INCLUDES) $(QT_INCLUDES) -I$(top_srcdir)/qucs
SET(DIALOGS_HDRS
+aboutdialog.h
changedialog.h
digisettingsdialog.h
exportdialog.h
@@ -35,9 +36,11 @@ importdialog.cpp savedialog.cpp labeldialog.cpp
searchdialog.cpp librarydialog.cpp settingsdialog.cpp
matchdialog.cpp simmessage.cpp newprojdialog.cpp
sweepdialog.cpp exportdialog.cpp loaddialog.cpp
+aboutdialog.cpp
)
SET(DIALOGS_MOC_HDRS
+aboutdialog.h
changedialog.h
digisettingsdialog.h
exportdialog.h
diff --git a/qucs/qucs/dialogs/Makefile.am b/qucs/qucs/dialogs/Makefile.am
index d355845166..e6be37e3c4 100644
--- a/qucs/qucs/dialogs/Makefile.am
+++ b/qucs/qucs/dialogs/Makefile.am
@@ -28,7 +28,7 @@ MOCHEADERS = settingsdialog.h simmessage.h qucssettingsdialog.h \
labeldialog.h changedialog.h matchdialog.h digisettingsdialog.h \
sweepdialog.h searchdialog.h librarydialog.h importdialog.h \
packagedialog.h savedialog.h vasettingsdialog.h \
- exportdialog.h loaddialog.h newprojdialog.h
+ exportdialog.h loaddialog.h newprojdialog.h aboutdialog.h
MOCFILES = $(MOCHEADERS:.h=.moc.cpp)
@@ -40,8 +40,8 @@ libdialogs_a_SOURCES = settingsdialog.cpp newprojdialog.cpp \
simmessage.cpp qucssettingsdialog.cpp labeldialog.cpp changedialog.cpp \
matchdialog.cpp sweepdialog.cpp digisettingsdialog.cpp searchdialog.cpp \
librarydialog.cpp importdialog.cpp packagedialog.cpp \
- savedialog.cpp vasettingsdialog.cpp \
- exportdialog.cpp loaddialog.cpp
+ savedialog.cpp vasettingsdialog.cpp exportdialog.cpp loaddialog.cpp \
+ aboutdialog.cpp
nodist_libdialogs_a_SOURCES = $(MOCFILES)
diff --git a/qucs/qucs/dialogs/aboutdialog.cpp b/qucs/qucs/dialogs/aboutdialog.cpp
new file mode 100644
index 0000000000..750f784e07
--- /dev/null
+++ b/qucs/qucs/dialogs/aboutdialog.cpp
@@ -0,0 +1,258 @@
+/*
+ * aboutdialog.cpp - customary about dialog showing various info
+ *
+ * Copyright (C) 2015, Qucs team (see AUTHORS file)
+ *
+ * This file is part of Qucs
+ *
+ * Qucs 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 2, or (at your option)
+ * any later version.
+ *
+ * This software 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 Qucs. If not, see .
+ *
+ */
+
+/*!
+ * \file aboutdialog.cpp
+ * \brief Implementation of the About dialog
+ */
+
+#include
+#include
+#include
+
+#include
+#include
+
+#ifdef HAVE_CONFIG_H
+# include
+#endif
+#include "aboutdialog.h"
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+
+AboutDialog::AboutDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ currAuths = {{
+ tr("Guilherme Brondani Torri - GUI programmer, Verilog-A dynamic loader"),
+ tr("Mike Brinson - testing, modelling and documentation, tutorial contributor"),
+ tr("Richard Crozier - testing, modelling, Octave."),
+ tr("Bastien Roucaries - bondwire and rectangular waveguide model implementation"),
+ tr("Frans Schreuder - GUI programmer, release"),
+ tr("Clemens Novak - GUI programmer"),
+ tr("Vadim Kuznetsov - filter synthesis (qucs-activefilter), SPICE integration (NGSPICE, Xyce)"),
+ tr("You-Tang Lee (YodaLee) - GUI programmer, Qt4 porter"),
+ tr("Claudio Girardi - testing, general fixes")
+ }};
+
+ prevDevs = {{
+ tr("Michael Margraf - founder of the project, GUI programmer"),
+ tr("Stefan Jahn - Programmer of simulator"),
+ tr("Jens Flucke - webpages and translator"),
+ tr("Raimund Jacob - tester and applyer of Stefan's patches, author of documentation"),
+ tr("Vincent Habchi - coplanar line and filter synthesis code, documentation contributor"),
+ tr("Toyoyuki Ishikawa - some filter synthesis code and attenuator synthesis"),
+ tr("Gopala Krishna A - GUI programmer, Qt4 porter"),
+ tr("Helene Parruitte - programmer of the Verilog-AMS interface"),
+ tr("Gunther Kraut - equation solver contributions, exponential sources, author of documentation"),
+ tr("Andrea Zonca - temperature model for rectangular waveguide")
+ }};
+
+ trAuths = {{
+ tr("German by Stefan Jahn"),
+ tr("Polish by Dariusz Pienkowski"),
+ tr("Romanian by Radu Circa"),
+ tr("French by Vincent Habchi, F5RCS"),
+ tr("Portuguese by Luciano Franca, Helio de Sousa, Guilherme Brondani Torri"),
+ tr("Spanish by Jose L. Redrejo Rodriguez"),
+ tr("Japanese by Toyoyuki Ishikawa"),
+ tr("Italian by Giorgio Luparia and Claudio Girardi"),
+ tr("Hebrew by Dotan Nahum"),
+ tr("Swedish by Markus Gothe and Peter Landgren"),
+ tr("Turkish by Onur and Ozgur Cobanoglu"),
+ tr("Hungarian by Jozsef Bus"),
+ tr("Russian by Igor Gorbounov"),
+ tr("Czech by Marek Straka and Martin Stejskal"),
+ tr("Catalan by Antoni Subirats"),
+ tr("Ukrainian by Dystryk"),
+ tr("Arabic by Chabane Noureddine"),
+ tr("Kazakh by Erbol Keshubaev")
+ }};
+
+
+ std::shuffle(currAuths.begin(), currAuths.end(), rng);
+
+ QLabel *lbl;
+
+ setWindowTitle(tr("About Qucs"));
+
+ all = new QVBoxLayout(this);
+ //all->setContentsMargins(0,0,0,0);
+ //all->setSpacing(0);
+
+ QLabel *iconLabel = new QLabel();
+ iconLabel->setPixmap(QPixmap(QString(":/bitmaps/hicolor/128x128/apps/qucs.png")));
+
+ QWidget *hbox = new QWidget();
+ QHBoxLayout *hl = new QHBoxLayout(hbox);
+ hl->setContentsMargins(0,0,0,0);
+
+ hl->addWidget(iconLabel);
+ all->addWidget(hbox);
+
+ QWidget *vbox = new QWidget();
+ QVBoxLayout *vl = new QVBoxLayout(vbox);
+ //vl->setContentsMargins(0,0,0,0);
+ hl->addWidget(vbox);
+
+ QString versionText;
+ versionText = tr("Version")+" "+PACKAGE_VERSION+
+#ifdef GIT
+ " ("+GIT+") " +
+#endif
+ "\n";
+
+ vl->addWidget(new QLabel("Quite Universal Circuit Simulator"));
+ lbl = new QLabel(versionText);
+ lbl->setAlignment(Qt::AlignHCenter);
+ vl->addWidget(lbl);
+ vl->addWidget(new QLabel(tr("Copyright (C)")+" 2003-2009 "+
+ tr("by Michael Margraf")+"\n"+
+ tr("Copyright (C)")+" 2011-2015 "+
+ tr("Qucs Team")));
+
+ lbl = new QLabel("\nThis is free software; see the source for copying conditions."
+ "\nThere is NO warranty; not even for MERCHANTABILITY or "
+ "\nFITNESS FOR A PARTICULAR PURPOSE.\n");
+ lbl->setAlignment(Qt::AlignHCenter);
+ all->addWidget(lbl);
+
+ QTabWidget *t = new QTabWidget();
+ all->addWidget(t);
+ connect(t, SIGNAL(currentChanged(int)), this, SLOT(currentChangedSlot(int)));
+
+ authorsBrowser = new QTextBrowser;
+ // the Ctrl-Wheel event we would like to filter is handled by the viewport
+ authorsBrowser->viewport()->installEventFilter(this);
+ trBrowser = new QTextBrowser;
+ trBrowser->viewport()->installEventFilter(this);
+
+ QString supportText;
+ // link to home page, help mailing list, IRC ?
+ supportText = tr("Home Page") + " : http://qucs.sourceforge.net/
"+
+ tr("Documentation start page") + " : http://qucs.sourceforge.net/docs.html
" +
+ tr("Components reference manual") + " : http://qucs.github.io/qucs-manual/
" +
+ tr("If you need help on using Qucs, please join the") + "
" +
+ tr("help mailing list") + " : " + tr("qucs-help on SourceForge") + "
" +
+ "(" + tr("please attach the schematic you are having problems with") + ")
" +
+ // use http://webchat.freenode.net/?channels=qucs ?
+ tr("IRC general discussion channel") + " : #qucs on freenode.net
" +
+ tr("Additional resources") + " : https://github.com/Qucs/qucs#resources";
+
+ QTextBrowser *supportBrowser = new QTextBrowser;
+ supportBrowser->viewport()->installEventFilter(this);
+ supportBrowser->setOpenExternalLinks(true);
+ supportBrowser->setHtml(supportText);
+
+ QString licenseText;
+ licenseText = "Qucs 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 2, or (at your option) any later version.
This software 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 Qucs, see the file COPYING. If not see http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,Boston, MA 02110-1301, USA.";
+
+ QTextBrowser *licenseBrowser = new QTextBrowser;
+ licenseBrowser->viewport()->installEventFilter(this);
+ licenseBrowser->setOpenExternalLinks(true);
+ licenseBrowser->setHtml(licenseText);
+
+ t->addTab(authorsBrowser, tr("Authors"));
+ t->addTab(trBrowser, tr("Translations"));
+ t->addTab(supportBrowser, tr("Support"));
+ t->addTab(licenseBrowser, tr("License"));
+
+ QWidget *hbBtn = new QWidget();
+ QHBoxLayout *hlBtn = new QHBoxLayout(hbBtn);
+ hlBtn->setContentsMargins(0,0,0,0);
+ all->addWidget(hbBtn);
+
+ QPushButton *okButton = new QPushButton(tr("&OK"), parent);
+ okButton->setFocus();
+ connect(okButton, SIGNAL(clicked()), this, SLOT(close()));
+ hlBtn->addStretch();
+ hlBtn->addWidget(okButton);
+
+ setAuthorsText();
+ setTrText();
+ prevTab = 0; // first Tab is selected by default
+}
+
+void AboutDialog::currentChangedSlot(int index) {
+ if (prevTab == 0) { // deselected tab with current and previous authors
+ // shuffle them
+ std::shuffle(currAuths.begin(), currAuths.end(), rng);
+ std::shuffle(prevDevs.begin(), prevDevs.end(), rng);
+ setAuthorsText();
+ } else if (prevTab == 1) {// deselected tab with translators
+ std::shuffle(trAuths.begin(), trAuths.end(), rng);
+ setTrText();
+ }
+
+ prevTab = index;
+}
+
+void AboutDialog::setAuthorsText() {
+
+ QString authorsText;
+ authorsText = tr("Current Qucs Team:") + "";
+
+ for(QString& tStr : currAuths) {
+ authorsText += ("- " + tStr + "
");
+ }
+ authorsText += "
";
+ authorsText += tr("Previous Developers") + "";
+ for(QString& tStr : prevDevs) {
+ authorsText += ("- " + tStr + "
");
+ }
+ authorsText += "
";
+
+ authorsBrowser->setHtml(authorsText);
+}
+
+void AboutDialog::setTrText() {
+ QString trText;
+ trText = tr("GUI translations :") + "";
+ for(QString& tStr : trAuths) {
+ trText += ("- " + tStr + "
");
+ }
+ trText += "
";
+
+ trBrowser->setHtml(trText);
+}
+
+// event filter to remove the Ctrl-Wheel (text zoom) event
+bool AboutDialog::eventFilter(QObject *obj, QEvent *event) {
+ if ((event->type() == QEvent::Wheel) &&
+ (QApplication::keyboardModifiers() & Qt::ControlModifier )) {
+ return true; // eat Ctrl-Wheel event
+ } else {
+ // pass the event on to the parent class
+ return QDialog::eventFilter(obj, event);
+ }
+}
+
+
diff --git a/qucs/qucs/dialogs/aboutdialog.h b/qucs/qucs/dialogs/aboutdialog.h
new file mode 100644
index 0000000000..785c814d08
--- /dev/null
+++ b/qucs/qucs/dialogs/aboutdialog.h
@@ -0,0 +1,65 @@
+/*
+ * aboutdialog.h - customary about dialog showing various info
+ *
+ * Copyright (C) 2015, Qucs team (see AUTHORS file)
+ *
+ * This file is part of Qucs
+ *
+ * Qucs 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 2, or (at your option)
+ * any later version.
+ *
+ * This software 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 Qucs. If not, see .
+ *
+ */
+
+#ifndef ABOUTDIALOG_H
+#define ABOUTDIALOG_H
+
+#include
+#include
+
+#include
+#include
+
+class QString;
+class QTextBrowser;
+
+class AboutDialog : public QDialog {
+ Q_OBJECT
+
+public:
+ AboutDialog(QWidget *parent = 0);
+
+protected:
+ bool eventFilter(QObject *obj, QEvent *ev);
+
+private:
+ void setAuthorsText(void);
+ void setTrText(void);
+
+ std::array currAuths; // current Qucs authors
+ std::array prevDevs; // previous Qucs developers
+ std::array trAuths; // Qucs translators
+
+ QVBoxLayout *all;
+ QTextBrowser *authorsBrowser; // to show authors
+ QTextBrowser *trBrowser; // to show translators
+
+ int prevTab; // previously selected tab
+
+ std::mt19937 rng {std::random_device{}()}; // random number generator
+
+public slots:
+ void currentChangedSlot(int index); // tab selection changed
+
+};
+
+#endif
diff --git a/qucs/qucs/qucs.qrc b/qucs/qucs/qucs.qrc
index 4838bdc895..33e2226cdd 100644
--- a/qucs/qucs/qucs.qrc
+++ b/qucs/qucs/qucs.qrc
@@ -235,5 +235,6 @@
bitmaps/tick.png
bitmaps/error.png
bitmaps/mutualx.png
+ bitmaps/hicolor/128x128/apps/qucs.png
diff --git a/qucs/qucs/qucs_actions.cpp b/qucs/qucs/qucs_actions.cpp
index 91cadc115c..31c228b3c5 100644
--- a/qucs/qucs/qucs_actions.cpp
+++ b/qucs/qucs/qucs_actions.cpp
@@ -55,6 +55,7 @@
#include "dialogs/loaddialog.h"
#include "dialogs/importdialog.h"
#include "dialogs/packagedialog.h"
+#include "dialogs/aboutdialog.h"
#include "module.h"
// for editing component name on schematic
@@ -1595,3 +1596,10 @@ void QucsApp::slotBuildModule()
messageDock->msgDock->show();
}
+
+// ----------------------------------------------------------
+void QucsApp::slotHelpAbout()
+{
+ AboutDialog *ad = new AboutDialog(this);
+ ad->exec();
+}
diff --git a/qucs/qucs/qucs_init.cpp b/qucs/qucs/qucs_init.cpp
index 2f28da7caa..a68d1305ce 100644
--- a/qucs/qucs/qucs_init.cpp
+++ b/qucs/qucs/qucs_init.cpp
@@ -1054,46 +1054,3 @@ void QucsApp::slotToggleOctave(bool on)
viewOctaveDock->blockSignals(false);
}
-// ----------------------------------------------------------
-void QucsApp::slotHelpAbout()
-{
- QMessageBox::about(this, tr("About..."),
- tr("Qucs Version")+" "+PACKAGE_VERSION+
-#ifdef GIT
- " ("+GIT+") " +
-#endif
- "\n"+
- tr("Quite Universal Circuit Simulator")+"\n"+
- tr("Copyright (C)")+" 2003-2009 "+
- tr("by Michael Margraf")+"\n"+
- tr("Copyright (C)")+" 2011-2015 "+
- tr("Qucs Team")+"\n"+
- "\nThis is free software; see the source for copying conditions."
- "\nThere is NO warranty; not even for MERCHANTABILITY or "
- "\nFITNESS FOR A PARTICULAR PURPOSE.\n\n"+
- tr("Simulator by Stefan Jahn")+"\n"+
- tr("VHDL simulator 'FreeHDL' by Edwin Naroska and Marius Vollmer")+"\n"+
- tr("Special thanks to Jens Flucke and Raimund Jacob")+"\n"+
- tr("Many thanks to Mike Brinson for correcting the VHDL output")+"\n"+
- tr("GUI improvements by Gopala Krishna A")+"\n"+
- tr("Verilog-AMS interface by Helene Parruitte")+"\n"+
- tr("Verilog-AMS dynamic loader by Guilherme Brondani Torri")+"\n\n"+
- tr("Translations:")+"\n"+
- tr("German by Stefan Jahn")+"\n"+
- tr("Polish by Dariusz Pienkowski")+"\n"+
- tr("Romanian by Radu Circa")+"\n"+
- tr("French by Vincent Habchi, F5RCS")+"\n"+
- tr("Portuguese by Luciano Franca, Helio de Sousa, Guilherme Brondani Torri")+"\n"+
- tr("Spanish by Jose L. Redrejo Rodriguez")+"\n"+
- tr("Japanese by Toyoyuki Ishikawa")+"\n"+
- tr("Italian by Giorgio Luparia and Claudio Girardi")+"\n"+
- tr("Hebrew by Dotan Nahum")+"\n"+
- tr("Swedish by Peter Landgren")+"\n"+
- tr("Turkish by Onur and Ozgur Cobanoglu")+"\n"+
- tr("Hungarian by Jozsef Bus")+"\n"+
- tr("Russian by Igor Gorbounov")+"\n"+
- tr("Czech by Marek Straka")+"\n"+
- tr("Catalan by Antoni Subirats")+"\n"+
- tr("Arabic by Chabane Noureddine")+"\n"+
- tr("Kazakh by Erbol Keshubaev"));
-}