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