/*
    Copyright (c) 2008 Louai Al-Khanji

    This file is part of Safra.

    Safra 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.

    Safra 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 Safra; see the file COPYING. If not, see
    <http://www.gnu.org/licenses/>.
*/

#ifndef SAFRA_MAINWINDOW_H
#define SAFRA_MAINWINDOW_H

#include <KXmlGuiWindow>

class KLineEdit;
class KAnimatedButton;
class MainWidget;

class MainWindow : public KXmlGuiWindow
{
    Q_OBJECT
    public:
        MainWindow(QStringList urls = QStringList(), QWidget* parent = 0);

    public slots:
        void openLinkInNewTab(const QString& link);
        void openLinkInCurrentTab(const QString& link);

    protected:
        void closeEvent(QCloseEvent* event);

    private slots:
        void jumpTo();
        void locationRequested();
        void showConfigDialog();
        void reload();
        void back();
        void forward();
        void stop();
        void home();
        void newView();

    private:
        void createActions();

        MainWidget* m_main;
        KLineEdit* m_locationEdit;
        KAnimatedButton* m_spinner;
};

#endif // SAFRA_MAINWINDOW_H
