summaryrefslogtreecommitdiff
path: root/plugingui/mainwindow.cc
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2017-02-10 20:35:44 +0100
committerAndré Nusser <andre.nusser@googlemail.com>2017-04-01 16:35:50 +0200
commita51479061c5fdcfbd9fabb14f4b597f2748d919d (patch)
treeb6ee3d7eb0ace245dffe5a3fd3f7e5fe492bde4d /plugingui/mainwindow.cc
parent3f5255f5362877d0a4d942a65df62f7b977fb547 (diff)
A very rough first version of the GUI.
Diffstat (limited to 'plugingui/mainwindow.cc')
-rw-r--r--plugingui/mainwindow.cc38
1 files changed, 37 insertions, 1 deletions
diff --git a/plugingui/mainwindow.cc b/plugingui/mainwindow.cc
index 3b951f5..51fd3a3 100644
--- a/plugingui/mainwindow.cc
+++ b/plugingui/mainwindow.cc
@@ -30,6 +30,31 @@
#include "painter.h"
+#include <string>
+
+namespace
+{
+
+std::string getGPLText()
+{
+ return
+ "DrumGizmo is free software; you can redistribute it and/or modify\n"
+ "it under the terms of the GNU Lesser General Public License as published by\n"
+ "the Free Software Foundation; either version 3 of the License, or\n"
+ "(at your option) any later version.\n"
+ "\n"
+ "DrumGizmo is distributed in the hope that it will be useful,\n"
+ "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+ "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
+ "GNU Lesser General Public License for more details.\n"
+ "\n"
+ "You should have received a copy of the GNU Lesser General Public License\n"
+ "along with DrumGizmo; if not, write to the Free Software\n"
+ "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.\n";
+}
+
+} // anonymous namespace
+
namespace GUI
{
@@ -39,8 +64,19 @@ MainWindow::MainWindow(Settings& settings, void* native_window)
{
CONNECT(this, sizeChangeNotifier, this, &MainWindow::sizeChanged);
CONNECT(eventHandler(), closeNotifier, this, &MainWindow::closeEventHandler);
- tabs.move(16, 0); // x-offset to make room for the left side bar.
+
+ // TODO: use fixed size?
+ // setFixedSize(450, 600);
setCaption("DrumGizmo v" VERSION);
+
+ tabs.move(16, 0); // x-offset to make room for the left side bar.
+
+ tabs.addTab("Main", &main_tab);
+ tabs.addTab("GPL", &gpl_text_field);
+
+ gpl_text_field.setText(getGPLText());
+ gpl_text_field.preprocessText();
+ gpl_text_field.setReadOnly(true);
}
bool MainWindow::processEvents()