tdebase
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

konq_main.h 616B

123456789101112131415161718192021222324252627
  1. #ifndef __konq_main_h
  2. #define __konq_main_h
  3. #include <tdeapplication.h>
  4. // This is used to know if we are being closed by session management
  5. // or by the user. See KonqMainWindow::~KonqMainWindow.
  6. // Credits to Matthias Ettrich for the idea.
  7. class KonquerorApplication : public TDEApplication
  8. {
  9. public:
  10. KonquerorApplication() : TDEApplication(),
  11. closed_by_sm( false ) {}
  12. bool closedByUser() const { return !closed_by_sm; }
  13. void commitData(TQSessionManager& sm) {
  14. closed_by_sm = true;
  15. TDEApplication::commitData( sm );
  16. closed_by_sm = false;
  17. }
  18. private:
  19. bool closed_by_sm;
  20. };
  21. #endif