summaryrefslogtreecommitdiff
path: root/plugingui/mainwindow.cc
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2017-04-21 21:42:29 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2017-04-21 21:43:55 +0200
commit05bb6ad8f1ad6d3abf835a9ad91a5b42f90db920 (patch)
tree37c7e20c60a9d77ca809dc11b6a5299322e64fd5 /plugingui/mainwindow.cc
parent988aeacd6cf77a095a3afdde0ca32052cfe90a84 (diff)
Add AboutTab class instead of having a TextEdit widget as tab.
Diffstat (limited to 'plugingui/mainwindow.cc')
-rw-r--r--plugingui/mainwindow.cc52
1 files changed, 1 insertions, 51 deletions
diff --git a/plugingui/mainwindow.cc b/plugingui/mainwindow.cc
index c8cfb71..071bafe 100644
--- a/plugingui/mainwindow.cc
+++ b/plugingui/mainwindow.cc
@@ -30,7 +30,6 @@
#include <version.h>
#include "painter.h"
-#include "utf8.h"
#include <string>
@@ -50,12 +49,8 @@ MainWindow::MainWindow(Settings& settings, void* native_window)
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("About", &about_text_field);
-
- about_text_field.setText(getAboutText());
- about_text_field.setReadOnly(true);
+ tabs.addTab("About", &about_tab);
}
MainWindow::~MainWindow()
@@ -129,49 +124,4 @@ void MainWindow::closeEventHandler()
closing = true;
}
-std::string MainWindow::getAboutText()
-{
- std::string about_text;
-
- // About
- about_text.append(
- "=============\n"
- " About\n"
- "=============\n"
- "\n");
- about_text.append(about.data());
-
- // Version
- about_text.append(
- "\n"
- "\n"
- "=============\n"
- " Version\n"
- "=============\n"
- "\n");
- about_text.append(std::string(VERSION) + "\n");
-
- // Authors
- about_text.append(
- "\n"
- "\n"
- "=============\n"
- " Authors\n"
- "=============\n"
- "\n");
- about_text.append(UTF8().toLatin1(authors.data()));
-
- // GPL
- about_text.append(
- "\n"
- "\n"
- "=============\n"
- " License\n"
- "=============\n"
- "\n");
- about_text.append(gpl.data());
-
- return about_text;
-}
-
} // GUI::