Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Copyright (c) 2010, Stijn Leenknegt
- All rights reserved.
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * Neither the name of the KHL nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
- THIS SOFTWARE IS PROVIDED BY Stijn Leenknegt ''AS IS'' AND ANY
- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL Stijn Leenknegt BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- #ifndef KHLUURROOSTER_HEADER
- #define KHLUURROOSTER_HEADER
- #include <Plasma/Applet>
- #include <kconfigdialog.h>
- #include <QString>
- #include <QTimer>
- #include <QDate>
- #include <QTime>
- #include <QGraphicsGridLayout>
- #include <QGraphicsLinearLayout>
- #include <Plasma/Label>
- #include <Plasma/PushButton>
- #include <Plasma/ScrollWidget>
- #include <QGraphicsWidget>
- #include "ui_config.h"
- #include "uurrooster.h"
- class QSizeF;
- // Define our plasma Applet
- class KHLUurrooster : public Plasma::Applet
- {
- Q_OBJECT
- public:
- // Basic Create/Destroy
- KHLUurrooster(QObject *parent, const QVariantList &args);
- ~KHLUurrooster();
- // The paintInterface procedure paints the applet to screen
- void paintInterface(QPainter *painter, const QStyleOptionGraphicsItem *option, const QRect& contentsRect);
- void init();
- void displayError(const QString &error);
- private slots:
- void configAccepted();
- void updateRoosters();
- void sendNextIcalLink();
- public slots:
- void createConfigurationInterface(KConfigDialog *parent);
- void configChanged();
- void roosterError(const QString &error);
- void nextDate();
- void prevDate();
- private:
- Ui::config ui;
- QDate date;
- int ical_busy;
- QString ical_1;
- QString ical_2;
- QString ical_3;
- QString ical_1_color;
- QString ical_2_color;
- QString ical_3_color;
- QTimer *timer;
- QGraphicsGridLayout *layout;
- Uurrooster *rooster;
- Plasma::Label *headerLabel;
- Plasma::PushButton *vorigeButton;
- Plasma::PushButton *volgendeButton;
- Plasma::ScrollWidget *m_scrollWidget;
- QGraphicsWidget *m_scroller;
- QGraphicsLinearLayout *m_scrollerLayout;
- void displayEntries();
- void readConfig();
- };
- // This is the command that links your applet to the .desktop file
- K_EXPORT_PLASMA_APPLET(khluurrooster, KHLUurrooster)
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement