aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/src-qml/test/ListData.h
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2017-11-14 00:04:49 +0000
committerWeblate <noreply@weblate.org>2017-11-14 00:04:49 +0000
commitdc40a01ae695b47f87daff7ee08f3519d79b12ae (patch)
tree6e1d58f23d4537f8f501ba7e531f9ed90f269dda /src-qt5/src-qml/test/ListData.h
parentTranslated using Weblate (German) (diff)
parentAdd a special rule for Ubuntu Linux: (diff)
downloadlumina-dc40a01ae695b47f87daff7ee08f3519d79b12ae.tar.gz
lumina-dc40a01ae695b47f87daff7ee08f3519d79b12ae.tar.bz2
lumina-dc40a01ae695b47f87daff7ee08f3519d79b12ae.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/src-qml/test/ListData.h')
-rw-r--r--src-qt5/src-qml/test/ListData.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/src-qt5/src-qml/test/ListData.h b/src-qt5/src-qml/test/ListData.h
new file mode 100644
index 00000000..7dd6f6e2
--- /dev/null
+++ b/src-qt5/src-qml/test/ListData.h
@@ -0,0 +1,41 @@
+#include <QDebug>
+#include <QApplication>
+#include <QQuickView>
+#include <QQmlEngine>
+#include <QQmlContext>
+#include <QObject>
+#include <QStringList>
+#include <QTimer>
+
+class ListData : public QObject{
+ Q_OBJECT
+ Q_PROPERTY(QList<QScreen*> list READ list NOTIFY listchanged);
+signals:
+ void listchanged();
+
+private:
+ QStringList m_list;
+ //QTimer *timer;
+ //bool increasing;
+
+private slots:
+ void changeList(){
+ /*if(m_list.isEmpty()){ increasing = true; }
+ else if(m_list.length() == 5){ increasing = false; }
+ if(increasing){ m_list << "Text - "+QString::number( m_list.length()+1 ); }
+ else{ m_list.takeAt(m_list.count()-1); }
+ emit listchanged();*/
+ }
+
+public:
+ ListData() : QObject(){
+ /*increasing = true;
+ timer = new QTimer(this);
+ timer->setInterval(1000);
+ timer->setSingleShot(false);
+ connect(timer, SIGNAL(timeout()), this, SLOT(changeList()) );
+ timer->start();*/
+ }
+
+ QList<QScreen*> list() { return QApplication::screens(); } //m_list; }
+};
bgstack15