summaryrefslogtreecommitdiffstats
path: root/konqueror/konq_main.h
blob: 92dbdd3b2b0796ec7b55d8c5e7788857e261eb55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef __konq_main_h
#define __konq_main_h

#include <kapplication.h>

// This is used to know if we are being closed by session management
// or by the user. See KonqMainWindow::~KonqMainWindow.
// Credits to Matthias Ettrich for the idea.
class KonquerorApplication : public KApplication
{
public:
  KonquerorApplication() : KApplication(),
      closed_by_sm( false ) {}

  bool closedByUser() const { return !closed_by_sm; }
  void commitData(TQSessionManager& sm) {
    closed_by_sm = true;
    KApplication::commitData( sm );
    closed_by_sm = false;
  }
 
private:
  bool closed_by_sm;
 
};

#endif