File indexing completed on 2024-05-26 05:06:51

0001 #ifndef PLASMA_APPLET_ONLINEQUOTE_HEADER
0002 #define PLASMA_APPLET_ONLINEQUOTE_HEADER
0003 
0004 #include <KIcon>
0005 // Here we avoid loading the header multiple times
0006 #include <Plasma/Applet>
0007 #include <Plasma/Svg>
0008  
0009 class QSizeF;
0010 
0011 class MyWidget;
0012 class AlkOnlineQuotesProfile;
0013 
0014 // KF5
0015 class KConfigDialog;
0016 class QStyleOptionGraphicsItem;
0017 
0018 // Define our plasma Applet
0019 class PlasmaOnlineQuote : public Plasma::Applet
0020 {
0021     Q_OBJECT
0022 public:
0023     // Basic Create/Destroy
0024     PlasmaOnlineQuote(QObject *parent, const QVariantList &args);
0025     ~PlasmaOnlineQuote();
0026 
0027 protected Q_SLOTS:
0028     void slotConfigAccepted();
0029     void slotFetchQuote();
0030     void slotReceivedQuote(const QString &id, const QString &symbol, const QDate &data, const double &price);
0031     void slotLogStatus(const QString &s);
0032     void slotLogError(const QString &s);
0033     void slotLogFailed(const QString &id, const QString &symbol);
0034     void slotProfileChanged(const QString &name);
0035 protected:
0036     // The paintInterface procedure paints the applet to screen
0037     void paintInterface(QPainter *p, const QStyleOptionGraphicsItem *option, const QRect& contentsRect);
0038     void init();
0039     void configChanged();
0040     void createConfigurationInterface(KConfigDialog *parent);
0041     Plasma::Svg m_svg;
0042     KIcon m_icon;
0043     MyWidget *m_widget;
0044     QDate m_date;
0045     double m_price;
0046     AlkOnlineQuotesProfile *m_profile;
0047 };
0048 #endif