emailuis/nmindicatorplugin/inc/nmindicator.h
changeset 20 ecc8def7944a
parent 18 578830873419
child 23 2dc6caa42ec3
equal deleted inserted replaced
18:578830873419 20:ecc8def7944a
    24 
    24 
    25 class NmMailboxInfo
    25 class NmMailboxInfo
    26 {
    26 {
    27 public:
    27 public:
    28     NmMailboxInfo();
    28     NmMailboxInfo();
    29     
    29 
    30 public:
    30 public:
    31     NmId mId;
    31     NmId mId;
    32     QString mName;
    32     QString mName;
    33     NmSyncState mSyncState;
    33     NmSyncState mSyncState;
    34     NmConnectState mConnectState;
    34     NmConnectState mConnectState;
    35     int mUnreadMails;
    35     int mUnreadMails;
       
    36     int mOutboxMails;
    36 };
    37 };
    37 
    38 
    38 class NmIndicator : public HbIndicatorInterface
    39 class NmIndicator : public HbIndicatorInterface
    39 {
    40 {
       
    41     Q_OBJECT
       
    42 
    40 public:
    43 public:
    41 
    44 
    42     NmIndicator(const QString &indicatorType);
    45     NmIndicator(const QString &indicatorType);
    43     ~NmIndicator();
    46     ~NmIndicator();
    44 
    47 
    45 public: // From HbIndicatorInterface
    48 public: // From HbIndicatorInterface
    46 
    49 
    47     bool handleInteraction(InteractionType type);
    50     bool handleInteraction(InteractionType type);
    48     QVariant indicatorData(int role) const;
    51     QVariant indicatorData(int role) const;
       
    52     HbIndicatorInterface::Category category() const;
       
    53     bool acceptIcon(bool sending);
       
    54     void updateGlobalStatus(bool sending);
    49 
    55 
    50 protected: // From HbIndicatorInterface
    56 protected: // From HbIndicatorInterface
    51 
    57 
    52     bool handleClientRequest(RequestType type, const QVariant &parameter);
    58     bool handleClientRequest(RequestType type, const QVariant &parameter);
    53 
    59 
       
    60 signals:
       
    61 
       
    62     void indicatorIconLost();
       
    63     void globalStatusChanged(bool sending);
       
    64     void mailboxLaunched(quint64 mailboxId);
       
    65 
       
    66 private slots:
       
    67 
       
    68     void hideSendIndicator();
       
    69     
    54 private:
    70 private:
    55 
    71 
    56     bool showMailbox(quint64 mailboxId);
       
    57     void storeMailboxData(QVariant mailboxData);
    72     void storeMailboxData(QVariant mailboxData);
       
    73     void showSendProgress();
       
    74     bool isSending() const;
    58 
    75 
    59 private:
    76 private:
    60 
    77 
    61 	NmMailboxInfo mMailbox;
    78 	NmMailboxInfo mMailbox;
       
    79     bool mShowIndicator;
       
    80     bool mSendingState;
       
    81     bool mShowSendProgress;
       
    82 	bool mActive;
    62 };
    83 };
    63 
    84 
    64 #endif // NMINDICATOR_H
    85 #endif // NMINDICATOR_H
    65 
    86