12 #ifndef CXBASEWIDGET_H_
13 #define CXBASEWIDGET_H_
15 #include "cxResourceWidgetsExport.h"
17 #include <QToolButton>
21 #include <boost/shared_ptr.hpp>
23 #include "boost/function.hpp"
41 class cxResourceWidgets_EXPORT
CXFrame :
public QFrame
45 CXFrame(QWidget* parent) : QFrame(parent) {}
93 BaseWidget(QWidget* parent, QString objectName, QString windowTitle);
96 QWidget* createMethodWidget(QWidget* inputWidget, QWidget* outputWidget, QString methodname,
97 bool inputChecked =
false,
bool outputVisible =
true);
99 QGroupBox* createGroupbox(QWidget* widget, QString boxname);
100 static QFrame* createHorizontalLine();
101 QGroupBox* wrapInGroupBox(QWidget* base, QString name);
102 CXFrame* wrapInFrame(QWidget* base);
108 QAction*
createAction2(QObject* parent, QIcon iconName, QString text, QString tip, QLayout* layout=NULL, QToolButton* button =
new QToolButton())
112 QAction* action =
new QAction(iconName, text, parent);
113 action->setStatusTip(tip);
114 action->setWhatsThis(tip);
115 action->setToolTip(tip);
118 button->setDefaultAction(action);
119 layout->addWidget(button);
129 QAction*
createAction(QObject* parent, QIcon iconName, QString text, QString tip, T slot, QLayout* layout=NULL, QToolButton* button =
new QToolButton())
131 QAction* action = createAction2(parent, iconName, text, tip, layout, button);
132 connect(action, SIGNAL(triggered()),
this, slot);
138 void adjustSizeSlot();
141 virtual void showEvent(QShowEvent* event);
145 QString mWindowTitle;