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

List:       kde-commits
Subject:    playground/base/plasma/applets
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2008-09-30 23:23:41
Message-ID: 1222817021.253574.9686.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 866470 by aseigo:

add testapplet to the build, fix some things; may be a nice simple example, actually


 M  +1 -1      CMakeLists.txt  
 M  +8 -3      test/testapplet.cpp  
 M  +4 -1      test/testapplet.h  


--- trunk/playground/base/plasma/applets/CMakeLists.txt #866469:866470
@@ -33,7 +33,7 @@
    add_subdirectory(scriptedhtml)
 endif(QT_QTWEBKIT_FOUND)
 
-#add_subdirectory(test)
+add_subdirectory(test)
 add_subdirectory(timetracker)
 
 add_subdirectory(moodbar)
--- trunk/playground/base/plasma/applets/test/testapplet.cpp #866469:866470
@@ -35,9 +35,9 @@
     //m_icon->setMaximumSize(iconSize);
     m_icon->resize(iconSize);
 
-    //QGraphicsLinearLayout* layout = new QGraphicsLinearLayout;
-    //layout->addItem(m_icon);
-    //setLayout(layout);
+    QGraphicsLinearLayout* layout = new QGraphicsLinearLayout;
+    layout->addItem(m_icon);
+    setLayout(layout);
 
     resize(150, 50);
 
@@ -57,4 +57,9 @@
     }
 }
 
+void TestApplet::constraintsEvent(Plasma::Constraints)
+{
+    setBackgroundHints(NoBackground);
+}
+
 #include "testapplet.moc"
--- trunk/playground/base/plasma/applets/test/testapplet.h #866469:866470
@@ -34,7 +34,10 @@
         TestApplet(QObject *parent, const QVariantList &args);
         ~TestApplet();
 
-    public slots:
+    protected:
+        void constraintsEvent(Plasma::Constraints);
+
+    private slots:
         void buttonClicked();
 
     private:
[prev in list] [next in list] [prev in thread] [next in thread] 

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