//--------------------------------------------------------------------------------------
void BaseLayout::loadLayout(MyGUI::Widget* _parent)
{
    if(mMainWidgetName.empty())
        mMainWidgetName = "_Main";

    mPrefix = MyGUI::utility::toString(this, "_");

    mMainWidget = loadLayoutPart(mLayoutName, mMainWidgetName, mPrefix, _parent);
    mMainWidget->setVisible(true);

    // get parameters from user strings of the main widget
    if(mConfigSection.empty())
    {
        String userStr = mMainWidget->getUserString("ConfigSection");
        if(!userStr.empty())
            setConfigSection(userStr);
    }

    if(mDefaultCoord == MyGUI::FloatCoord())
    {
        String userStr = mMainWidget->getUserString("DefaultCoord");
        if(!userStr.empty())
        {
            StrStream ss(userStr, StrStream::DONT_COPY);
            ss >> mDefaultCoord.left;
            ss >> mDefaultCoord.top;
            ss >> mDefaultCoord.width;
            ss >> mDefaultCoord.height;
        }
Example #2
0
QString BtLineEdit::configSection()
{ 
   if ( _section.isEmpty() ) {
      setConfigSection("");
   }

   return _section;
}