]> Creatis software - bbtk.git/blob - packages/qt/src/bbqtLayoutSplit.h
*** empty log message ***
[bbtk.git] / packages / qt / src / bbqtLayoutSplit.h
1 /*=========================================================================                                                                               
2   Program:   bbtk
3   Module:    $RCSfile: bbqtLayoutSplit.h,v $
4   Language:  C++
5   Date:      $Date: 2009/04/08 08:35:59 $
6   Version:   $Revision: 1.1 $
7 =========================================================================*/
8
9 /* ---------------------------------------------------------------------
10
11 * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
12 * Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
13 *
14 *  This software is governed by the CeCILL-B license under French law and 
15 *  abiding by the rules of distribution of free software. You can  use, 
16 *  modify and/ or redistribute the software under the terms of the CeCILL-B 
17 *  license as circulated by CEA, CNRS and INRIA at the following URL 
18 *  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
19 *  or in the file LICENSE.txt.
20 *
21 *  As a counterpart to the access to the source code and  rights to copy,
22 *  modify and redistribute granted by the license, users are provided only
23 *  with a limited warranty  and the software's author,  the holder of the
24 *  economic rights,  and the successive licensors  have only  limited
25 *  liability. 
26 *
27 *  The fact that you are presently reading this means that you have had
28 *  knowledge of the CeCILL-B license and that you accept its terms.
29 * ------------------------------------------------------------------------ */                                                                         
30
31
32 /**
33  */
34 /**
35  * \file 
36  * \brief Widget which splits a window into two parts 
37  */
38 /**
39  * \class bbqt::LayoutSplit
40  * \brief Widget which splits a window into two parts 
41  */
42
43
44 #ifdef USE_QT
45
46
47 #ifndef __bbqtQLayoutSplit_h__
48 #define __bbqtQLayoutSplit_h__
49
50 #include "bbtkQtBlackBox.h"
51 #include "bbqt_EXPORT.h"
52
53 namespace bbqt
54 {
55   
56   
57   
58   
59   //=================================================================
60   class bbqt_EXPORT LayoutSplit : public bbtk::QtBlackBox
61   {
62     
63     BBTK_BLACK_BOX_INTERFACE(LayoutSplit,bbtk::QtBlackBox);
64     BBTK_DECLARE_INPUT(Widget1,QWidget*);
65     BBTK_DECLARE_INPUT(Widget2,QWidget*);
66     BBTK_DECLARE_INPUT(Widget3,QWidget*);
67     BBTK_DECLARE_INPUT(Widget4,QWidget*);
68     BBTK_DECLARE_INPUT(Widget5,QWidget*);
69     BBTK_DECLARE_INPUT(Widget6,QWidget*);
70     BBTK_DECLARE_INPUT(Widget7,QWidget*);
71     BBTK_DECLARE_INPUT(Widget8,QWidget*);
72     BBTK_DECLARE_INPUT(Widget9,QWidget*);
73
74     BBTK_DECLARE_INPUT(Weight1,int);
75     BBTK_DECLARE_INPUT(Weight2,int);
76     BBTK_DECLARE_INPUT(Weight3,int);
77     BBTK_DECLARE_INPUT(Weight4,int);
78     BBTK_DECLARE_INPUT(Weight5,int);
79     BBTK_DECLARE_INPUT(Weight6,int);
80     BBTK_DECLARE_INPUT(Weight7,int);
81     BBTK_DECLARE_INPUT(Weight8,int);
82     BBTK_DECLARE_INPUT(Weight9,int);
83
84     BBTK_DECLARE_INPUT(Orientation,std::string);
85     //    BBTK_DECLARE_INPUT(Proportion,int);
86     BBTK_PROCESS(Process);
87     BBTK_CREATE_WIDGET(CreateWidget);
88     BBTK_ON_SHOW_WIDGET(OnShowWidget);
89     
90     void Process();
91     void CreateWidget(QWidget*);
92     void OnShowWidget();
93
94   protected:
95     virtual void bbUserConstructor();
96
97   };
98   //=================================================================
99   
100  
101   //=================================================================
102   // BlackBox description
103   BBTK_BEGIN_DESCRIBE_BLACK_BOX(LayoutSplit,bbtk::QtBlackBox);
104   BBTK_NAME("QLayoutSplit");
105   BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
106   BBTK_DESCRIPTION("Widget which splits a window in two resizable parts (QSplitter)");
107   BBTK_INPUT(LayoutSplit,Widget1,"First widget to layout (upper or left most)",QWidget*,"");
108   BBTK_INPUT(LayoutSplit,Widget2,"Second widget",QWidget*,"");
109   BBTK_INPUT(LayoutSplit,Widget3,"Third widget",QWidget*,"");
110   BBTK_INPUT(LayoutSplit,Widget4,"Fourth widget",QWidget*,"");
111   BBTK_INPUT(LayoutSplit,Widget5,"Fifth widget",QWidget*,"");
112   BBTK_INPUT(LayoutSplit,Widget6,"Sixth widget",QWidget*,"");
113   BBTK_INPUT(LayoutSplit,Widget7,"Seventh widget",QWidget*,"");
114   BBTK_INPUT(LayoutSplit,Widget8,"Eighth widget",QWidget*,"");
115   BBTK_INPUT(LayoutSplit,Widget9,"Nineth widget",QWidget*,"");
116
117   BBTK_INPUT(LayoutSplit,Weight1,"Weight of the widget 1",int,"");
118   BBTK_INPUT(LayoutSplit,Weight2,"Weight of the widget 2",int,"");
119   BBTK_INPUT(LayoutSplit,Weight3,"Weight of the widget 3",int,"");
120   BBTK_INPUT(LayoutSplit,Weight4,"Weight of the widget 4",int,"");
121   BBTK_INPUT(LayoutSplit,Weight5,"Weight of the widget 5",int,"");
122   BBTK_INPUT(LayoutSplit,Weight6,"Weight of the widget 6",int,"");
123   BBTK_INPUT(LayoutSplit,Weight7,"Weight of the widget 7",int,"");
124   BBTK_INPUT(LayoutSplit,Weight8,"Weight of the widget 8",int,"");
125   BBTK_INPUT(LayoutSplit,Weight9,"Weight of the widget 9",int,"");
126
127
128   BBTK_INPUT(LayoutSplit,Orientation,"Orientation (default H), 0=H=HORIZONTAL , 1=V=VERTICAL",std::string,"");
129   //  BBTK_INPUT(LayoutSplit,Proportion,"Proportion (in percent) of the first children in the window",int,"");
130   BBTK_END_DESCRIBE_BLACK_BOX(LayoutSplit);
131   //=================================================================
132 }
133
134 //namespace bbqt
135 #endif  //__bbqtQtLayoutSplit_h__
136
137 #endif //USE_QT