• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

Plasma

  • plasma
  • animations
stackedlayout.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2009 Igor Trindade Oliveira <igor.oliveira@indt.org.br>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 This library 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 GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef STACKEDLAYOUT_H
19#define STACKEDLAYOUT_H
20
21/* TODO: document the methods */
22
23#include <QGraphicsLayout>
24#include <QList>
25#include <QObject>
26
27class StackedLayout : public QObject, public QGraphicsLayout
28{
29 Q_OBJECT
30 Q_INTERFACES(QGraphicsLayout)
31
32public:
33 explicit StackedLayout(QGraphicsLayoutItem *parent = 0);
34 ~StackedLayout();
35
36 void setGeometry(const QRectF &rect);
37 QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint=QSizeF()) const;
38 int count() const;
39 QGraphicsLayoutItem *itemAt(int i) const;
40
41 void insertWidget(QGraphicsLayoutItem *item, int pos);
42 void addWidget(QGraphicsLayoutItem *item);
43
44 void removeAt(int index);
45
46 qint32 currentWidgetIndex() const;
47 void setCurrentWidgetIndex(qint32 index);
48
49 private:
50 QList<QGraphicsLayoutItem *> items;
51 qint32 m_currentWidgetIndex;
52};
53
54#endif
QGraphicsLayout
QObject
StackedLayout
Definition: stackedlayout.h:28
StackedLayout::currentWidgetIndex
qint32 currentWidgetIndex() const
Definition: stackedlayout.cpp:105
StackedLayout::setGeometry
void setGeometry(const QRectF &rect)
Definition: stackedlayout.cpp:34
StackedLayout::insertWidget
void insertWidget(QGraphicsLayoutItem *item, int pos)
Definition: stackedlayout.cpp:72
StackedLayout::~StackedLayout
~StackedLayout()
Definition: stackedlayout.cpp:30
StackedLayout::addWidget
void addWidget(QGraphicsLayoutItem *item)
Definition: stackedlayout.cpp:84
StackedLayout::removeAt
void removeAt(int index)
Definition: stackedlayout.cpp:89
StackedLayout::itemAt
QGraphicsLayoutItem * itemAt(int i) const
Definition: stackedlayout.cpp:67
StackedLayout::setCurrentWidgetIndex
void setCurrentWidgetIndex(qint32 index)
Definition: stackedlayout.cpp:94
StackedLayout::sizeHint
QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint=QSizeF()) const
Definition: stackedlayout.cpp:45
StackedLayout::count
int count() const
Definition: stackedlayout.cpp:62
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Plasma

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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