Image Component Library (ICL)
BorderBox.h
Go to the documentation of this file.
1 /********************************************************************
2 ** Image Component Library (ICL) **
3 ** **
4 ** Copyright (C) 2006-2013 CITEC, University of Bielefeld **
5 ** Neuroinformatics Group **
6 ** Website: www.iclcv.org and **
7 ** http://opensource.cit-ec.de/projects/icl **
8 ** **
9 ** File : ICLQt/src/ICLQt/BorderBox.h **
10 ** Module : ICLQt **
11 ** Authors: Christof Elbrechter **
12 ** **
13 ** **
14 ** GNU LESSER GENERAL PUBLIC LICENSE **
15 ** This file may be used under the terms of the GNU Lesser General **
16 ** Public License version 3.0 as published by the **
17 ** **
18 ** Free Software Foundation and appearing in the file LICENSE.LGPL **
19 ** included in the packaging of this file. Please review the **
20 ** following information to ensure the license requirements will **
21 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt **
22 ** **
23 ** The development of this software was supported by the **
24 ** Excellence Cluster EXC 277 Cognitive Interaction Technology. **
25 ** The Excellence Cluster EXC 277 is a grant of the Deutsche **
26 ** Forschungsgemeinschaft (DFG) in the context of the German **
27 ** Excellence Initiative. **
28 ** **
29 ********************************************************************/
30 
31 #pragma once
32 
33 #include <ICLUtils/CompatMacros.h>
34 #include <QGroupBox>
35 #include <QVBoxLayout>
36 
38 namespace icl{
39  namespace qt{
41  struct BorderBox : public QGroupBox{
42 
44 
47  BorderBox(const QString &label, QWidget *content, QWidget *parent) :
48  QGroupBox(label,parent), m_poContent(content){
49  m_poLayout = new QVBoxLayout;
50  m_poLayout->setMargin(3);
51  m_poLayout->addWidget(content);
52  setLayout(m_poLayout);
53  }
54 
56  QWidget *content() { return m_poContent; }
57 
58  private:
59  QVBoxLayout *m_poLayout; //<! layout
60  QWidget *m_poContent; //<! content widget
61  };
62  } // namespace qt
63 }
64 
65 
QWidget * m_poContent
Definition: BorderBox.h:60
undocument this line if you encounter any issues!
Definition: Any.h:37
QWidget * content()
returns the content of this widget (the child)
Definition: BorderBox.h:56
BorderBox(const QString &label, QWidget *content, QWidget *parent)
Create a new BorderBox Object.
Definition: BorderBox.h:47
ICLQt_API ImgQ label(const ImgQ &image, const string &text)
labels an image in the upper left corner (only available with Qt-Support)
QVBoxLayout * m_poLayout
Definition: BorderBox.h:59
A simple utility class (QWidget with titled border)
Definition: BorderBox.h:41