source: trunk/examples/customlayout/flow.h@ 10

Last change on this file since 10 was 2, checked in by dmik, 20 years ago

Imported xplatform parts of the official release 3.3.1 from Trolltech

  • Property svn:keywords set to Id
File size: 1.4 KB
Line 
1/****************************************************************************
2** $Id: flow.h 2 2005-11-16 15:49:26Z dmik $
3**
4** Definition of simple flow layout for custom layout example
5**
6** Created : 979899
7**
8** Copyright (C) 1997 by Trolltech AS. All rights reserved.
9**
10** This file is part of an example program for Qt. This example
11** program may be used, distributed and modified without limitation.
12**
13*****************************************************************************/
14
15#ifndef FLOW_H
16#define FLOW_H
17
18#include <qlayout.h>
19#include <qptrlist.h>
20
21class SimpleFlow : public QLayout
22{
23public:
24 SimpleFlow( QWidget *parent, int border=0, int space=-1,
25 const char *name=0 )
26 : QLayout( parent, border, space, name ),
27 cached_width(0) {}
28 SimpleFlow( QLayout* parent, int space=-1, const char *name=0 )
29 : QLayout( parent, space, name ),
30 cached_width(0) {}
31 SimpleFlow( int space=-1, const char *name=0 )
32 : QLayout( space, name ),
33 cached_width(0) {}
34
35 ~SimpleFlow();
36
37 void addItem( QLayoutItem *item);
38 bool hasHeightForWidth() const;
39 int heightForWidth( int ) const;
40 QSize sizeHint() const;
41 QSize minimumSize() const;
42 QLayoutIterator iterator();
43 QSizePolicy::ExpandData expanding() const;
44
45protected:
46 void setGeometry( const QRect& );
47
48private:
49 int doLayout( const QRect&, bool testonly = FALSE );
50 QPtrList<QLayoutItem> list;
51 int cached_width;
52 int cached_hfw;
53
54};
55
56#endif
Note: See TracBrowser for help on using the repository browser.