konqapplication.h 1.45 KB
Newer Older
David Faure's avatar
GPL  
David Faure committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/* This file is part of the KDE project
   Copyright (C) 2006 David Faure <faure@kde.org>

   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public
   License version 2 as published by the Free Software Foundation.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; see the file COPYING.  If not, write to
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301, USA.
*/

David Faure's avatar
David Faure committed
19 20
#ifndef KONQ_APPLICATION_H
#define KONQ_APPLICATION_H
21

22
#include "konqprivate_export.h"
David Faure's avatar
David Faure committed
23
#include <kapplication.h>
24 25 26 27

// 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.
28
class KONQ_TESTS_EXPORT KonquerorApplication : public KApplication
29
{
David Faure's avatar
David Faure committed
30
  Q_OBJECT
31
public:
David Faure's avatar
David Faure committed
32
  KonquerorApplication();
33 34 35 36 37 38 39

  bool closedByUser() const { return !closed_by_sm; }
  void commitData(QSessionManager& sm) {
    closed_by_sm = true;
    KApplication::commitData( sm );
    closed_by_sm = false;
  }
David Faure's avatar
David Faure committed
40 41 42

public slots:
  void slotReparseConfiguration();
43
  void slotUpdateProfileList();
44 45
private:
  bool closed_by_sm;
David Faure's avatar
David Faure committed
46

47 48 49
};

#endif