• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

kmail

kcursorsaver.h

Go to the documentation of this file.
00001 #ifndef kcursorsaver_h
00002 #define kcursorsaver_h
00003 
00004 #include <QCursor>
00005 #include <QApplication>
00006 
00013 class KCursorSaver 
00014 {
00015 public:
00017     KCursorSaver(Qt::CursorShape shape) {
00018         QApplication::setOverrideCursor( QCursor(shape) );
00019         inited = true;
00020     }
00021 
00023     KCursorSaver( const KCursorSaver &rhs ) {
00024         *this = rhs;
00025     }
00026 
00028     ~KCursorSaver() {
00029         if (inited)
00030             QApplication::restoreOverrideCursor();
00031     }
00032 
00034     inline void restoreCursor(void) {
00035         QApplication::restoreOverrideCursor();
00036         inited = false;
00037     }
00038 
00039 protected:
00040     void operator=( const KCursorSaver &rhs ) {
00041         inited = rhs.inited;
00042         rhs.inited = false;
00043     }
00044 
00045 private:
00046     mutable bool inited;
00047 };
00048 
00052 namespace KBusyPtr {
00053     inline KCursorSaver idle() {
00054         return KCursorSaver(Qt::ArrowCursor);
00055     }
00056     inline KCursorSaver busy() {
00057         return KCursorSaver(Qt::WaitCursor);
00058     }
00059 }
00060 
00061 #endif /*kbusyptr_h_*/

kmail

Skip menu "kmail"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal