• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

rocs/App

  • sources
  • kde-4.12
  • kdeedu
  • rocs
  • App
  • Ui
TabWidget.h
Go to the documentation of this file.
1 /*
2  This file is part of Rocs.
3  Copyright 2008-2010 Tomaz Canabrava <tomaz.canabrava@gmail.com>
4  Copyright 2008 Ugo Sangiori <ugorox@gmail.com>
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public License as
8  published by the Free Software Foundation; either version 2 of
9  the License, or (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef TABWIDGET_H
21 #define TABWIDGET_H
22 
23 #include <QWidget>
24 #include <QString>
25 #include <KIcon>
26 
27 class KMultiTabBar;
28 class QStackedWidget;
29 class QBoxLayout;
30 class KAction;
31 
32 class TabWidget : public QWidget
33 {
34  Q_OBJECT
35  KAction* _runAction;
36 public:
37  enum Orientation {TabOnLeft, TabOnRight, TabOnTop, TabOnBottom};
38  explicit TabWidget(TabWidget::Orientation o, QWidget *parent = 0);
39  void addWidget(QWidget *w, const QString& text, const KIcon& icon);
40  void addAction(KAction *a);
41 
42 private:
43  void createLayout();
44  KMultiTabBar *m_tabs;
45  QStackedWidget *m_widgets;
46  Orientation m_orientation;
47  QBoxLayout *m_layout;
48  int m_activeTab;
49  int m_numOfTabs; // kmultitabbar is silly and doesn't let me query how much tabs I have.
50  int m_numOfActions; // same
51 
52 signals:
53  void widgetActivated(int id);
54  void actionTriggered(int id);
55 
56 private slots:
57  void releaseButton(int id);
58  void releaseActionButton(int id);
59  void controlPanel(int id);
60 };
61 
62 #endif
TabWidget::TabOnLeft
Definition: TabWidget.h:37
TabWidget
Definition: TabWidget.h:32
TabWidget::actionTriggered
void actionTriggered(int id)
TabWidget::addAction
void addAction(KAction *a)
Definition: TabWidget.cpp:99
TabWidget::TabOnBottom
Definition: TabWidget.h:37
QWidget
TabWidget::widgetActivated
void widgetActivated(int id)
TabWidget::TabOnTop
Definition: TabWidget.h:37
TabWidget::Orientation
Orientation
Definition: TabWidget.h:37
TabWidget::addWidget
void addWidget(QWidget *w, const QString &text, const KIcon &icon)
Definition: TabWidget.cpp:86
TabWidget::TabWidget
TabWidget(TabWidget::Orientation o, QWidget *parent=0)
Definition: TabWidget.cpp:30
TabWidget::TabOnRight
Definition: TabWidget.h:37
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:42:22 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

rocs/App

Skip menu "rocs/App"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal