libtdepim

broadcaststatus.h
1 /*
2  broadcaststatus.h
3 
4  This file is part of TDEPIM.
5 
6  Copyright (C) 2000 Don Sanders <sanders@kde.org>
7 
8  License GPL
9 */
10 
11 #ifndef __kpim_broadcast_status_h
12 #define __kpim_broadcast_status_h
13 
14 #include <tqobject.h>
15 #include <tqmap.h>
16 
17 #include <tdemacros.h>
18 
19 #undef None
20 
21 namespace KPIM {
22 
23 class ProgressItem;
24 
32 class TDE_EXPORT BroadcastStatus : public TQObject
33 {
34 
35  TQ_OBJECT
36 
37 
38 public:
39  virtual ~BroadcastStatus();
40 
42  static BroadcastStatus *instance();
43 
45  TQString statusMsg() const { return mStatusMsg; }
47  void setStatusMsgWithTimestamp( const TQString& message );
49  void setStatusMsgTransmissionCompleted( int numMessages,
50  int numBytes = -1,
51  int numBytesRead = -1,
52  int numBytesToRead = -1,
53  bool mLeaveOnServer = false,
54  KPIM::ProgressItem* progressItem = 0 ); // set the same status in this progress item
55  void setStatusMsgTransmissionCompleted( const TQString& account,
56  int numMessages,
57  int numBytes = -1,
58  int numBytesRead = -1,
59  int numBytesToRead = -1,
60  bool mLeaveOnServer = false,
61  KPIM::ProgressItem* progressItem = 0 ); // set the same status in this progress item
62 
63 public slots:
66  void setStatusMsg( const TQString& message );
67 
72  void setTransienStatusMsg( const TQString& msg );
77  void reset();
78 
79 signals:
80 
82  void statusMsg( const TQString& );
83 
84 protected:
85 
87  TQString mStatusMsg;
88  bool mTransientActive;
89  static BroadcastStatus* instance_;
90 };
91 
92 
93 }
94 #endif
Provides a singleton which broadcasts status messages by emitting signals.
void statusMsg(const TQString &)
Emitted when setStatusMsg is called.
TQString statusMsg() const
Return the last status message from setStatusMsg()
TDEPIM classes for drag and drop of mails.