• 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
  • layouts
ColumnLayout.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2007, 2008, 2009, 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_COLUMN_LAYOUT_H
21 #define LANCELOT_COLUMN_LAYOUT_H
22 
23 #include <lancelot/lancelot_export.h>
24 
25 #include <QtGui/QGraphicsLayout>
26 #include <QtGui/QGraphicsLayoutItem>
27 
28 namespace Lancelot
29 {
30 
49 class LANCELOT_EXPORT ColumnLayout: public QGraphicsLayout
50 {
51 public:
59  class ColumnSizer {
60  public:
69  virtual void init(int count) = 0;
70 
77  virtual qreal size() = 0;
78 
82  virtual ~ColumnSizer();
83 
84  enum SizerType {
85  EqualSizer,
86  GoldenSizer
87  };
88 
93  static ColumnSizer * create(SizerType type);
94  };
95 
100  ColumnLayout(QGraphicsLayoutItem * parent = 0);
101 
105  ~ColumnLayout();
106 
110  void setColumnCount(int count);
111 
115  int columnCount() const;
116 
120  void push(QGraphicsWidget * widget);
121 
126  QGraphicsWidget * pop();
127 
131  void setSizer(ColumnSizer * sizer);
132 
136  ColumnSizer * sizer() const;
137 
138  L_Override void setGeometry(const QRectF & rect);
139  L_Override int count() const;
140  L_Override QGraphicsLayoutItem * itemAt(int i) const;
141  L_Override QSizeF sizeHint(Qt::SizeHint which,
142  const QSizeF & constraint = QSizeF()) const;
143 
144  L_Override void removeAt(int index);
146 private:
147  class Private;
148  Private * const d;
149 };
150 
151 } // namespace Lancelot
152 
153 #endif /* LANCELOT_COLUMN_LAYOUT_H */
154 
Lancelot::ColumnLayout::ColumnSizer::SizerType
SizerType
Definition: ColumnLayout.h:84
Lancelot::ColumnLayout
This layout is not a general purpose layout, and should not be used as such.
Definition: ColumnLayout.h:49
L_Override
#define L_Override
Definition: lancelot_export.h:41
lancelot_export.h
Lancelot::ColumnLayout::ColumnSizer::EqualSizer
Sizer that returns the same size for all visible columns.
Definition: ColumnLayout.h:85
LANCELOT_EXPORT
#define LANCELOT_EXPORT
Definition: lancelot_export.h:32
QGraphicsWidget
Lancelot::ColumnLayout::ColumnSizer
Abstract interface for implementing column size calculation depending on the column count...
Definition: ColumnLayout.h:59
QSizeF
QRectF
QGraphicsLayout
QGraphicsLayoutItem
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