gwenhywfar 5.14.1
qt4/w_vline.cpp
Go to the documentation of this file.
1/***************************************************************************
2 begin : Mon Feb 15 2010
3 copyright : (C) 2010 by Martin Preuss
4 email : martin@libchipcard.de
5
6 ***************************************************************************
7 * Please see toplevel file COPYING for license details *
8 ***************************************************************************/
9
10
11#include <gwen-gui-cpp/cppwidget.hpp>
12
13
15public:
18
19
20
22 }
23
24
25
26 virtual int setup() {
27 QFrame *qw;
28 uint32_t flags;
29 GWEN_WIDGET *wParent;
30 QSizePolicy::Policy hpolicy=QSizePolicy::Minimum;
31 QSizePolicy::Policy vpolicy=QSizePolicy::Minimum;
32 const char *s;
33 QString text;
34
36 wParent=GWEN_Widget_Tree_GetParent(_widget);
38 if (s)
39 text=QString::fromUtf8(s);
40
41 qw=new QFrame();
42 qw->setFrameShape(QFrame::VLine);
43 qw->setFrameShadow(QFrame::Sunken);
44
45 /* handle flags */
46 if (flags & GWEN_WIDGET_FLAGS_FILLX)
47 hpolicy=QSizePolicy::Expanding;
48 if (flags & GWEN_WIDGET_FLAGS_FILLY)
49 vpolicy=QSizePolicy::Expanding;
50 qw->setSizePolicy(hpolicy, vpolicy);
51
53
54 if (wParent)
56 return 0;
57 }
58
59};
60
61
62
63
64
65
66
GWEN_WIDGET * _widget
Definition cppwidget.hpp:66
virtual int setup()
Qt4_W_VLine(GWEN_WIDGET *w)
Qt4_W_Widget(GWEN_WIDGET *w)
#define GWEN_WIDGET_FLAGS_FILLY
Definition dialog.h:62
#define GWEN_WIDGET_FLAGS_FILLX
Definition dialog.h:61
#define QT4_DIALOG_WIDGET_REAL
int GWEN_Widget_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild)
Definition widget.c:836
void GWEN_Widget_SetImplData(GWEN_WIDGET *w, int index, void *ptr)
Store a pointer with the widget.
Definition widget.c:136
const char * GWEN_Widget_GetText(const GWEN_WIDGET *w, int idx)
Definition widget.c:293
uint32_t GWEN_Widget_GetFlags(const GWEN_WIDGET *w)
Definition widget.c:149
struct GWEN_WIDGET GWEN_WIDGET
Definition widget_be.h:34