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

liblancelot

  • sources
  • kde-4.14
  • workspace
  • kdeplasma-addons
  • libs
  • lancelot
  • widgets
TabBar.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010 Ivan Cukic <ivan.cukic(at)kde.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser/Library General Public License version 2,
6  * or (at your option) any later version, as published by the Free
7  * Software Foundation
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser/Library General Public License for more details
13  *
14  * You should have received a copy of the GNU Lesser/Library General Public
15  * License along with this program; if not, write to the
16  * Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19 
20 #ifndef LANCELOT_TAB_BAR_H
21 #define LANCELOT_TAB_BAR_H
22 
23 #include <QtGui/QIcon>
24 
25 #include <Plasma/Plasma>
26 #include <Plasma/ItemBackground>
27 #include <Plasma/FrameSvg>
28 
29 #include <lancelot/lancelot_export.h>
30 
31 namespace Lancelot
32 {
33 
40 class LANCELOT_EXPORT TabBar: public QGraphicsWidget {
41  Q_OBJECT
42 
43  Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation)
44  Q_PROPERTY(Qt::Orientation textDirection READ textDirection WRITE setTextDirection)
45  Q_PROPERTY(QString currentTab READ currentTab WRITE setCurrentTab)
46  Q_PROPERTY(QSize tabIconSize READ tabIconSize WRITE setTabIconSize)
47 
48  // @puck L_WIDGET
49  // @puck L_INCLUDE(lancelot/widgets/TabBar.h QIcon QSize QString)
50 
51 public:
56  TabBar(QGraphicsWidget * parent = 0);
57 
61  ~TabBar();
62 
66  Qt::Orientation orientation() const;
67 
72  void setOrientation(Qt::Orientation value);
73 
78  Qt::Orientation textDirection() const;
79 
84  void setTextDirection(Qt::Orientation value);
85 
89  QString currentTab() const;
90 
97  void addTab(const QString & id, const QIcon & icon, const QString & title,
98  const QString & mimeType = QString::null, const QString & mimeData = QString::null);
99 
104  void removeTab(const QString & id);
105 
110  void setTabsGroupName(const QString & groupName);
111 
116  void setFlip(Plasma::Flip flip);
117 
121  Plasma::Flip flip() const;
122 
127  void setTabIconSize(const QSize & size);
128 
132  QSize tabIconSize() const;
133 
134 protected:
135  L_Override void resizeEvent(QGraphicsSceneResizeEvent * event);
136  L_Override bool sceneEventFilter(QGraphicsItem * watched, QEvent * event);
137 
138 
139 Q_SIGNALS:
144  void currentTabChanged(const QString & current);
145 
146 public Q_SLOTS:
150  void setCurrentTab(const QString & current);
151 
152 private:
153  class Private;
154  Private * const d;
155 
156 };
157 
158 } // namespace Lancelot
159 
160 #endif /* LANCELOT_TAB_BAR_H */
161 
QEvent
QGraphicsItem
L_Override
#define L_Override
Definition: lancelot_export.h:41
lancelot_export.h
Lancelot::TabBar
Provides a group of buttons representing tabs.
Definition: TabBar.h:40
LANCELOT_EXPORT
#define LANCELOT_EXPORT
Definition: lancelot_export.h:32
QGraphicsWidget
QString
QGraphicsSceneResizeEvent
QSize
QIcon
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:43:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

liblancelot

Skip menu "liblancelot"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

workspace API Reference

Skip menu "workspace API Reference"
  • kdeplasma-addons
  •       GroupingDesktop
  •     liblancelot

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