• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libplasma

boxlayout.h

Go to the documentation of this file.
00001 /*
00002  *   Copyright 2007 by Matias Valdenegro T. <mvaldenegro@informatica.utem.cl>
00003  *   Copyright 2007 by Robert Knight <robertknight@gmail.com>
00004  *
00005  *   This program is free software; you can redistribute it and/or modify
00006  *   it under the terms of the GNU Library General Public License as
00007  *   published by the Free Software Foundation; either version 2, or
00008  *   (at your option) any later version.
00009 
00010  *
00011  *   This program is distributed in the hope that it will be useful,
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *   GNU General Public License for more details
00015  *
00016  *   You should have received a copy of the GNU Library General Public
00017  *   License along with this program; if not, write to the
00018  *   Free Software Foundation, Inc.,
00019  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00020  */
00021 
00022 #ifndef PLASMA_BOX_LAYOUT
00023 #define PLASMA_BOX_LAYOUT
00024 
00025 #include <QtCore/QList>
00026 
00027 #include <plasma/plasma_export.h>
00028 #include <plasma/layouts/layout.h>
00029 
00030 namespace Plasma
00031 {
00032 
00036 class PLASMA_EXPORT BoxLayout : public Layout
00037 {
00038     public:
00043         enum Direction
00044         {
00046             LeftToRight,
00048             RightToLeft,
00050             TopToBottom,
00052             BottomToTop
00053         };
00054 
00059         explicit BoxLayout(Direction direction , LayoutItem *parent = 0);
00060         ~BoxLayout();
00061 
00063         void setDirection(Direction direction);
00065         Direction direction() const;
00066 
00068         void insertItem(int index, LayoutItem *l);
00069         
00071         void setMultiRow(bool b);
00072 
00073         // reimplemented from Layout
00074         virtual void addItem(LayoutItem *l);
00075         virtual void removeItem(LayoutItem *l);
00076         virtual int indexOf(LayoutItem *l) const;
00077         virtual LayoutItem *itemAt(int i) const;
00078         virtual LayoutItem *takeAt(int i);
00079         virtual Qt::Orientations expandingDirections() const;
00080         virtual int count() const;
00081         virtual void setAnimator(LayoutAnimator* animator);
00082 
00083         virtual QSizeF minimumSize() const;
00084         virtual QSizeF maximumSize() const;
00085         virtual QSizeF sizeHint() const;
00086 
00087     protected:
00088         void relayout();
00089 
00090     private:
00091         class Private;
00092         Private *const d;
00093 };
00094 
00102 class PLASMA_EXPORT HBoxLayout : public BoxLayout 
00103 {
00104 public:
00105     explicit HBoxLayout(LayoutItem *parent = 0);
00106 };
00107 
00115 class PLASMA_EXPORT VBoxLayout : public BoxLayout 
00116 {
00117 public:
00118     explicit VBoxLayout(LayoutItem *parent = 0);
00119 };
00120 
00121 }
00122 
00123 #endif /* PLASMA_BOX_LAYOUT */

libplasma

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

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal