[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kde-workspace/plasma/sreich/tasks-qml] plasma/desktop/applets/tasks: demonstrate the model works pr
From:       Aaron Seigo <aseigo () kde ! org>
Date:       2012-02-11 17:19:29
Message-ID: 20120211171929.EAEFEA60BE () git ! kde ! org
[Download RAW message or body]

Git commit bba70c860b63cf3cf5475fe7dc45ce753d069945 by Aaron Seigo.
Committed on 11/02/2012 at 10:45.
Pushed by aseigo into branch 'plasma/sreich/tasks-qml'.

demonstrate the model works properly

M  +8    -3    plasma/desktop/applets/tasks/tasks.cpp
M  +3    -0    plasma/desktop/applets/tasks/tasks.h

http://commits.kde.org/kde-workspace/bba70c860b63cf3cf5475fe7dc45ce753d069945

diff --git a/plasma/desktop/applets/tasks/tasks.cpp \
b/plasma/desktop/applets/tasks/tasks.cpp index 6d81657..38b4ffd 100644
--- a/plasma/desktop/applets/tasks/tasks.cpp
+++ b/plasma/desktop/applets/tasks/tasks.cpp
@@ -82,9 +82,8 @@ void Tasks::init()
     m_groupManager->setShowOnlyCurrentScreen(false);
     m_groupManager->setShowOnlyMinimized(false);
 
-    kDebug() << "row coutn%%%%%%%%%%%%%%: " << m_tasksModel->rowCount();
-    kDebug() << "column coutn%%%%%%%%%%%%%%: " << m_tasksModel->columnCount();
-    
+    // check the model contents for debugging purposes when the data changes
+    connect(m_tasksModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, \
SLOT(checkModel()));  
     Plasma::PackageStructure::Ptr structure = \
                Plasma::PackageStructure::load("Plasma/Generic");
     m_package = new Plasma::Package(QString(), "org.kde.tasks", structure);
@@ -92,6 +91,12 @@ void Tasks::init()
     m_declarativeWidget->engine()->rootContext()->setContextProperty("tasksModel", \
QVariant::fromValue(m_tasksModel));  }
 
+void Tasks::checkModel()
+{
+    kDebug() << "row count %%%%%%%%%%%%%%: " << m_tasksModel->rowCount();
+    kDebug() << "column count %%%%%%%%%%%%%%: " << m_tasksModel->columnCount();
+}
+
 //NOTE: NEVER CALLED, JUST YET
 void Tasks::configChanged()
 {
diff --git a/plasma/desktop/applets/tasks/tasks.h \
b/plasma/desktop/applets/tasks/tasks.h index 2ceebd3..a636738 100644
--- a/plasma/desktop/applets/tasks/tasks.h
+++ b/plasma/desktop/applets/tasks/tasks.h
@@ -43,6 +43,9 @@ public:
 
     void configChanged();
 
+private Q_SLOTS:
+    void checkModel();
+
 private:
     Plasma::Package *m_package;
     Plasma::DeclarativeWidget *m_declarativeWidget;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic