[rkward/work/optionset_experiments] rkward/misc: Experimental variations of optionset UI: Start working on tab-slide
Thomas Friedrichsmeier
thomas.friedrichsmeier at ruhr-uni-bochum.de
Fri Oct 23 19:08:27 UTC 2015
Git commit bcd24b14552d443c5a8d12cbbfdc97593abc772c by Thomas Friedrichsmeier.
Committed on 12/06/2015 at 13:03.
Pushed by tfry into branch 'work/optionset_experiments'.
Experimental variations of optionset UI: Start working on tab-slide
A +19 -0 rkward/misc/rktabslide.cpp [License: GPL (v2+)]
A +84 -0 rkward/misc/rktabslide.h [License: GPL (v2+)]
http://commits.kde.org/rkward/bcd24b14552d443c5a8d12cbbfdc97593abc772c
diff --git a/rkward/misc/rktabslide.cpp b/rkward/misc/rktabslide.cpp
new file mode 100644
index 0000000..ae2ce5e
--- /dev/null
+++ b/rkward/misc/rktabslide.cpp
@@ -0,0 +1,19 @@
+/***************************************************************************
+ rktabslide - description
+ -------------------
+ begin : Fri Jun 22 2015
+ copyright : (C) 2015 by Thomas Friedrichsmeier
+ email : thomas.friedrichsmeier at kdemail.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program 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 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "rktabslide.h"
+
diff --git a/rkward/misc/rktabslide.h b/rkward/misc/rktabslide.h
new file mode 100644
index 0000000..913dfc0
--- /dev/null
+++ b/rkward/misc/rktabslide.h
@@ -0,0 +1,84 @@
+/***************************************************************************
+ rktabslide - description
+ -------------------
+ begin : Fri Jun 22 2015
+ copyright : (C) 2015 by Thomas Friedrichsmeier
+ email : thomas.friedrichsmeier at kdemail.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program 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 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef RKTABSLIDE_H
+#define RKTABSLIDE_H
+
+#include <QWidget>
+#include <QScrollArea>
+#include <QPushButton>
+
+class RKTabSlideBar;
+class RKTabSlide : public QWidget {
+
+private:
+ RKTabSlideBar *tab_bar;
+ QSplitter *splitter;
+ QWidget *content;
+};
+
+class RKTabButton;
+class RKTabSlideBar : public QScrollArea {
+ Q_OBJECT
+public:
+ RKTabSlideBar (QWidget* parent);
+
+ void insertTab (int index, const QString &short_label, const QString &long_label, const QString &tip);
+ void changeTab (int index, const QString &short_label, const QString &long_label, const QString &tip);
+ void removeTab (int index);
+signals:
+ void deleteClicked (int index);
+ void insertClicked (int index);
+ void activated (int index);
+private:
+friend class RKTabButton;
+ void deleteClicked (RKTabButton*);
+ void insertClicked (RKTabButton*);
+ void editClicked (RKTabButton*);
+ int currentindex;
+ QList<RKTabButton*> tabs;
+ QWidget* vbox;
+ QVBoxLayout *vlayout;
+};
+
+class RKTabButton : public QPushButton {
+ Q_OBJECT
+private:
+friend class RKTabSlideBar;
+ RKTabButton (QWidget *parent, RKTabSlideBar *bar);
+
+ void change (const QString &short_label, const QString &long_label);
+ void setWide (bool make_wide);
+ enum InternalButtons {
+ Delete,
+ Insert,
+ Edit
+ };
+ void setInternalButtons (int buttons);
+protected:
+ void paintEvent (QPaintEvent *event);
+private:
+ QString short_label;
+ QString long_label;
+private slots:
+ void buttonClicked (); // To relay clicked()-signal without additional mapper
+ int index;
+};
+
+#endif
+
+
More information about the rkward-tracker
mailing list