From 05bb6ad8f1ad6d3abf835a9ad91a5b42f90db920 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Fri, 21 Apr 2017 21:42:29 +0200 Subject: Add AboutTab class instead of having a TextEdit widget as tab. --- plugingui/mainwindow.cc | 52 +------------------------------------------------ 1 file changed, 1 insertion(+), 51 deletions(-) (limited to 'plugingui/mainwindow.cc') 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 #include "painter.h" -#include "utf8.h" #include @@ -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:: -- cgit v1.2.3