annotate layout_builder.h @ 11:98485ebbdb86 default tip

LayoutView: WidgetViewBox fix
author Goffi <goffi@goffi.org>
date Sat, 27 Aug 2011 00:31:20 +0200
parents c63d67895cbe
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
1 /*
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
2 Bellaciao: a Salut à Toi frontend
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
3 Copyright (C) 2011 Jérôme Poisson (goffi@goffi.org)
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
4
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
5 This program is free software: you can redistribute it and/or modify
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
6 it under the terms of the GNU Affero General Public License as published by
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
7 the Free Software Foundation, either version 3 of the License, or
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
8 (at your option) any later version.
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
9
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
10 This program is distributed in the hope that it will be useful,
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
13 GNU Affero General Public License for more details.
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
14
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
15 You should have received a copy of the GNU Affero General Public License
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
17 */
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
18
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
19 #ifndef LAYOUT_BUILDER_H
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
20 #define LAYOUT_BUILDER_H
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
21
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
22
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
23 #include <QtGui>
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
24 #include "ui_layout_builder.h"
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
25 #include "layout_widget.h"
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
26
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
27 typedef enum
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
28 {
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
29 CONTACT_LIST, CONTACT_ITEM
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
30 } LayoutType;
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
31
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
32 class LayoutBuilder : public QWidget, protected Ui::LayoutBuilderUI
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
33 {
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
34 Q_OBJECT
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
35
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
36 public:
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
37 LayoutBuilder(QWidget* parent=0);
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
38 virtual ~LayoutBuilder();
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
39 const QHash<QString, LayoutWidget*>& getLayoutWidgetsDict();
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
40
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
41 protected:
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
42 void addWidget(LayoutWidget* widget);
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
43
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
44 };
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
45
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
46 class LayoutBuilderContactList : public LayoutBuilder
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
47 {
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
48 Q_OBJECT
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
49
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
50 public:
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
51 LayoutBuilderContactList(QWidget* parent=0);
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
52 ~LayoutBuilderContactList();
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
53 };
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
54
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
55 class LayoutBuilderFactory
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
56 {
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
57 public:
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
58 LayoutBuilder* Create(LayoutType type=CONTACT_ITEM, QWidget* parent=0);
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
59
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
60 };
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
61
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
62
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
63
c63d67895cbe layout designer: first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
64 #endif