bool ret = screens_[orientation]->load(data, reader);
- if(ret && screens_.size() == 1)
- {
- currentOrientation_ = orientation;
- }
-
if(ret)
{
loadedScreens_.insert(orientation);
+
+ if(loadedScreens_.size() == 1)
+ {
+ currentOrientation_ = orientation;
+ setCurrentWidget(screens_[orientation]);
+ }
}
return ret;
}
+bool WidgetScreen::load(QDomNode const& data, Reader* reader)
+{
+ return load(LANDSCAPE, data, reader) && load(PORTRAIT, data, reader);
+}
+
+void WidgetScreen::setColor(Orientation orientation, QString const& color)
+{
+ if(screens_.find(orientation) != screens_.end())
+ {
+ screens_[orientation]->setColor(color);
+ }
+}
+
+void WidgetScreen::setColor(QString const& color)
+{
+ setColor(LANDSCAPE, color);
+ setColor(PORTRAIT, color);
+}
+
void WidgetScreen::addScreen(ThemeScreen* screen, Orientation orientation)
{
if(screens_.find(orientation) != screens_.end())
{
if(screens_.find(o) != screens_.end())
{
- setCurrentWidget(screens_[o]);
+ currentOrientation_ = o;
screens_[o]->reArrange();
+ setCurrentWidget(screens_[o]);
screens_[o]->forceRepaint();
- currentOrientation_ = o;
}
}
}
}
}
-void WidgetScreen::setColor(QString const& color)
-{
- Q_UNUSED(color);
-}
-
void WidgetScreen::clear()
{
for(QMap<Orientation, ThemeScreen*>::iterator it = screens_.begin();