desktop.files += src/data/$${TARGET}.desktop
themes.path = $$THEMEDIR
- themes.files += src/data/themes/graphical.jspeed
+ themes.files += src/data/themes/graphical.jspeed \
+ src/data/themes/white.jspeed
icon26.path = $$DATADIR/icons/hicolor/26x26/apps
icon26.files += src/data/26x26/$${TARGET}.png
public:
DetailScreen(QWidget* parent = 0);
- void setColor(QString const& color);
+ virtual void setColor(QString const& color);
public slots:
virtual void update();
ok = ok && screen->load(WidgetScreen::LANDSCAPE, data, reader_);
+ if(ok && !color.isNull())
+ {
+ screen->setColor(WidgetScreen::LANDSCAPE, color.toAttr().value());
+ }
+
}
else if(type == "portrait")
{
}
ok = ok && screen->load(WidgetScreen::PORTRAIT, data, reader_);
+
+ if(ok && !color.isNull())
+ {
+ screen->setColor(WidgetScreen::PORTRAIT, color.toAttr().value());
+ }
}
else if(type == "both")
{
ok = false;
}
- ok = ok && screen->load(WidgetScreen::PORTRAIT, data, reader_);
- ok = ok && screen->load(WidgetScreen::LANDSCAPE, data, reader_);
+ ok = ok && screen->load(data, reader_);
+
+ if(ok && !color.isNull())
+ {
+ screen->setColor(color.toAttr().value());
+ }
}
else
{
error_ = "Invalid orientation: " + type;
ok = false;
}
-
- if(ok && !color.isNull())
- {
- screen->setColor(color.toAttr().value());
- }
}
return ok;
elements_.at(i)->update();
}
}
+
+void ThemeScreen::setColor(QString const& color)
+{
+ Q_UNUSED(color);
+}
bool load(QDomNode const& data, Reader* reader);
virtual void update();
void removeElements();
+ virtual void setColor(QString const& color);
private:
QList<GraphicsElement*> elements_;
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())
}
}
-void WidgetScreen::setColor(QString const& color)
-{
- Q_UNUSED(color);
-}
-
void WidgetScreen::clear()
{
for(QMap<Orientation, ThemeScreen*>::iterator it = screens_.begin();
~WidgetScreen();
void addScreen(ThemeScreen* screen, Orientation orientation);
bool load(Orientation orientation, QDomNode const& data, Reader* reader);
+ bool load(QDomNode const& data, Reader* reader);
bool orientationEnabled(Orientation orientation) const;
bool orientationLoaded(Orientation orientation) const;
- virtual void setColor(QString const& color);
+ void setColor(Orientation orientation, QString const& color);
+ void setColor(QString const& color);
public slots:
virtual void reArrange();