mainwindow.h 1.83 KB
Newer Older
1 2 3 4
/*
 * ark -- archiver for the KDE project
 *
 * Copyright (C) 2007 Henrique Pinto <henrique.pinto@kdemail.net>
5
 * Copyright (C) 2008 Harald Hvaal <haraldhv@stud.ntnu.no>
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * 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; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 */
Henrique Pinto's avatar
Henrique Pinto committed
22 23 24 25 26
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <KParts/MainWindow>
#include <KParts/ReadWritePart>
27 28 29
#include <KUrl>

class KRecentFilesAction;
Henrique Pinto's avatar
Henrique Pinto committed
30 31 32

class MainWindow: public KParts::MainWindow
{
33 34
    Q_OBJECT
public:
35
    explicit MainWindow(QWidget *parent = 0);
36 37
    ~MainWindow();
    bool loadPart();
Henrique Pinto's avatar
Henrique Pinto committed
38

39 40 41
    void dragEnterEvent(class QDragEnterEvent * event);
    void dropEvent(class QDropEvent * event);
    void dragMoveEvent(class QDragMoveEvent * event);
42

43 44 45
public slots:
    void openUrl(const KUrl& url);
    void setShowExtractDialog(bool);
46

47 48 49 50 51
private slots:
    void updateActions();
    void newArchive();
    void openArchive();
    void quit();
Henrique Pinto's avatar
Henrique Pinto committed
52

53 54
    void editKeyBindings();
    void editToolbars();
55

56 57
private:
    void setupActions();
Henrique Pinto's avatar
Henrique Pinto committed
58

59 60 61 62 63
    KParts::ReadWritePart *m_part;
    KRecentFilesAction    *m_recentFilesAction;
    QAction               *m_openAction;
    QAction               *m_newAction;
    KParts::OpenUrlArguments m_openArgs;
Henrique Pinto's avatar
Henrique Pinto committed
64 65 66
};

#endif // MAINWINDOW_H