HAL
content_anchor.cpp
Go to the documentation of this file.
6 
7 namespace hal {
8  int ContentAnchor::count() const
9  {
10  return mDockBar->count();
11  }
12 
14  {
16  for (int i=0; i<mDockBar->count(); i++)
17  {
18  const ContentWidget* cw = mDockBar->widgetAt(i);
19  widgets.append(cw);
20  }
22  }
23 
24  QString ContentLayout::positionToString(Position pos)
25  {
26  QMetaEnum me = QMetaEnum::fromType<Position>();
27  return QString(me.key(pos));
28  }
29 
31  {
32  QMetaEnum me = QMetaEnum::fromType<Position>();
33  for (int p = 0; p < 4; p++)
34  if (s == me.key(p))
35  {
36  return static_cast<Position>(p);
37  }
38  return Position::Right;
39  }
40 
41 }
void saveState() const
ContentLayout::Position mAnchorPosition
virtual int count() const
Abstract class for Widgets within HAL's ContentArea.
ContentWidget * widgetAt(int index)
Definition: dock_bar.cpp:463
void widgetsSaveGeometry(ContentLayout::Position anchorPos, QList< const ContentWidget * > &widgets)
static SettingsManager * instance()
Position positionFromString(const QString &s)
void append(const T &value)
const char * key(int index) const const