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

lokalize

  • sources
  • kde-4.14
  • kdesdk
  • lokalize
  • src
  • common
flowlayout.h
Go to the documentation of this file.
1 /* ****************************************************************************
2  This file is part of Lokalize
3 
4  Copyright (C) 2007 by Nick Shaforostoff <shafff@ukr.net>
5  Copyright (C) 2004-2007 Trolltech ASA. All rights reserved.
6 
7  This program is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 2 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 
21  In addition, as a special exception, the copyright holders give
22  permission to link the code of this program with any edition of
23  the Qt library by Trolltech AS, Norway (or with modified versions
24  of Qt that use the same license as Qt), and distribute linked
25  combinations including the two. You must obey the GNU General
26  Public License in all respects for all of the code used other than
27  Qt. If you modify this file, you may extend this exception to
28  your version of the file, but you are not obligated to do so. If
29  you do not wish to do so, delete this exception statement from
30  your version.
31 
32 **************************************************************************** */
33 #ifndef FLOWLAYOUT_H
34 #define FLOWLAYOUT_H
35 
36 #include "glossary.h"
37 
38 #include <QLayout>
39 #include <QVector>
40 class KAction;
41 
47 class FlowLayout: public QLayout
48 {
49 public:
50 
51  enum User
52  {
53  glossary,
54  webquery,
55  standard
56  };
57 
61  FlowLayout(User user=standard, QWidget *signalingWidget = 0,
62  const QVector<KAction*>& actions=QVector<KAction*>(), int margin = 0, int spacing = -1);
63 
64  ~FlowLayout();
65 
66  void addItem(QLayoutItem *item);
67  Qt::Orientations expandingDirections() const;
68  bool hasHeightForWidth() const;
69  int heightForWidth(int) const;
70  int count() const;
71  QLayoutItem *itemAt(int index) const;
72  QSize minimumSize() const;
73  void setGeometry(const QRect &rect);
74  QSize sizeHint() const;
75  QLayoutItem *takeAt(int index);
76 
81  void addTerm(const QString& term, const QByteArray& entryId, bool capFirst=false);
82  void clearTerms();
83 
84 private:
85  int doLayout(const QRect &rect, bool testOnly) const;
86 
87  QList<QLayoutItem *> itemList;
88  int m_index; //of the nearest free label ; or the next index of btn
89  QWidget *m_receiver;
90 };
91 
92 
93 #endif
QWidget
Qt::Orientations
typedef Orientations
QByteArray
QLayout
FlowLayout::addTerm
void addTerm(const QString &term, const QByteArray &entryId, bool capFirst=false)
Definition: flowlayout.cpp:180
FlowLayout::itemAt
QLayoutItem * itemAt(int index) const
Definition: flowlayout.cpp:108
FlowLayout::heightForWidth
int heightForWidth(int) const
Definition: flowlayout.cpp:118
term
static const QString term
Definition: glossary.cpp:48
FlowLayout::~FlowLayout
~FlowLayout()
Definition: flowlayout.cpp:93
FlowLayout::User
User
Definition: flowlayout.h:51
QLayoutItem
FlowLayout::glossary
Definition: flowlayout.h:53
QRect
FlowLayout::FlowLayout
FlowLayout(User user=standard, QWidget *signalingWidget=0, const QVector< KAction * > &actions=QVector< KAction * >(), int margin=0, int spacing=-1)
c'tor for glossary view
Definition: flowlayout.cpp:44
FlowLayout::setGeometry
void setGeometry(const QRect &rect)
Definition: flowlayout.cpp:124
FlowLayout::addItem
void addItem(QLayoutItem *item)
Definition: flowlayout.cpp:113
FlowLayout::sizeHint
QSize sizeHint() const
Definition: flowlayout.cpp:130
FlowLayout::clearTerms
void clearTerms()
Definition: flowlayout.cpp:171
QString
FlowLayout::standard
Definition: flowlayout.h:55
QList< QLayoutItem * >
QLayout::margin
int margin() const
glossary.h
FlowLayout::minimumSize
QSize minimumSize() const
Definition: flowlayout.cpp:135
QSize
QVector< KAction * >
FlowLayout::expandingDirections
Qt::Orientations expandingDirections() const
Definition: flowlayout.cpp:115
FlowLayout::takeAt
QLayoutItem * takeAt(int index)
Definition: flowlayout.cpp:100
QLayout::spacing
int spacing() const
FlowLayout::hasHeightForWidth
bool hasHeightForWidth() const
Definition: flowlayout.cpp:116
FlowLayout
used in glossary and kross views
Definition: flowlayout.h:47
FlowLayout::count
int count() const
Definition: flowlayout.cpp:114
FlowLayout::webquery
Definition: flowlayout.h:54
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

lokalize

Skip menu "lokalize"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • umbrello
  •   umbrello

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