summaryrefslogtreecommitdiff
path: root/src/widgetinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgetinfo.cpp')
-rw-r--r--src/widgetinfo.cpp77
1 files changed, 77 insertions, 0 deletions
diff --git a/src/widgetinfo.cpp b/src/widgetinfo.cpp
new file mode 100644
index 0000000..f8cd78a
--- /dev/null
+++ b/src/widgetinfo.cpp
@@ -0,0 +1,77 @@
+#include "widgetinfo.h"
+
+WidgetInfo::WidgetInfo(QObject *parent)
+ : QObject(parent)
+{
+
+}
+
+bool WidgetInfo::valid() const
+{
+ return !_url.isEmpty();
+}
+
+QUrl WidgetInfo::url() const
+{
+ return _url;
+}
+
+void WidgetInfo::setUrl(const QUrl &url)
+{
+ if (url != _url) {
+ _url = url;
+ emit urlChanged();
+ }
+}
+
+bool WidgetInfo::invert() const
+{
+ return _invert;
+}
+
+void WidgetInfo::setInvert(bool invert)
+{
+ if (invert != _invert) {
+ _invert = invert;
+ emit invertChanged();
+ }
+}
+
+int WidgetInfo::page() const
+{
+ return _page;
+}
+
+void WidgetInfo::setPage(int page)
+{
+ if (page != _page) {
+ _page = page;
+ emit pageChanged();
+ }
+}
+
+WidgetInfo::WidgetSize WidgetInfo::size() const
+{
+ return _size;
+}
+
+void WidgetInfo::setSize(const WidgetSize &size)
+{
+ if (size != _size) {
+ _size = size;
+ emit sizeChanged();
+ }
+}
+
+WidgetInfo::WidgetPosition WidgetInfo::position() const
+{
+ return _pos;
+}
+
+void WidgetInfo::setPosition(const WidgetPosition &pos)
+{
+ if (pos != _pos) {
+ _pos = pos;
+ emit positionChanged();
+ }
+}