00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef WSCOUT_GUI_HEADER_FRAME_HXX_
00024 # define WSCOUT_GUI_HEADER_FRAME_HXX_
00025
00026 # include <cassert>
00027 # include <QtGui/QHBoxLayout>
00028
00029 # include "wscout_gui_header_frame.hh"
00030
00031 namespace wscout
00032 {
00033
00034 namespace gui
00035 {
00036
00037 inline
00038 HeaderFrame::HeaderFrame(QWidget* parent): QFrame (parent)
00039 {
00040 {
00041 QSizePolicy p (QSizePolicy::Minimum, QSizePolicy::Fixed);
00042
00043 setSizePolicy(p);
00044 }
00045 {
00046 QHBoxLayout* const l = new QHBoxLayout;
00047
00048 l->setMargin(header_margin);
00049 setLayout(l);
00050 }
00051 }
00052
00053 inline
00054 QBoxLayout*
00055 HeaderFrame::layout()
00056 {
00057 QLayout* const l = QFrame::layout();
00058 QBoxLayout* const r = dynamic_cast<QBoxLayout*> (l);
00059
00060 assert(not l or r);
00061 return r;
00062 }
00063
00064 }
00065
00066 }
00067
00068 #endif // ! WSCOUT_GUI_HEADER_FRAME_HXX_