/***************************************************************************
 *   Copyright (C) 2008 by Andreas Silberstorff   *
 *   taki@Rivendell   *
 *                                                                         *
 *   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.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#ifndef KALVA2_H
#define KALVA2_H

#include <kxmlguiwindow.h>

#include "ui_generalsettings_ui.h"

class kalvaview;

class KPrinter;
class KToggleAction;
class KUrl;
class QSize;
class KSystemTrayIcon;

/**
 * This class serves as the main window for kalva2.  It handles the
 * menus, toolbars, and status bars.
 *
 * @short Main window class
 * @author Andreas Silberstorff <ml@andreas-silberstorff.de>
 * @version 0.1
 */
class kalva2 : public KXmlGuiWindow
{
    Q_OBJECT
public:

	/**
	 * Default Constructor
	 */
	kalva2();

	/**
	 * Default Destructor
	 */
	virtual ~kalva2();

public slots:
	QSize minimumSizeHint() const;
	QSize maximumSizeHint() const;

private slots:
	void optionsPreferences();
//	void slotTipOfTheDay();
	void slotToggleSystemTray(bool enabled);

//	void changeStatusbar(const QString& text);
//	void changeCaption(const QString& text);
//	void slotConfigureKeys();
//	void slotConfigureToolbars();
//	void saveNewToolbarConfig(); 
	void slotAboutToQuit();
	void slotQuit();
	void readConfig();
	void saveConfig(); 
//	void slotSettingsChanged();

	virtual bool queryExit();
	virtual bool queryClose();

private:
	void setupSystemTray();
	void setupActions();

	Ui::GeneralSettings_UI _generalsettings_ui;

	kalvaview *m_view;

	bool m_startDocked;
	bool m_shuttingDown;

	KSystemTrayIcon *m_systemTray;

	KToggleAction *m_toggleSystemTrayAction;
	KToggleAction *m_toggleDockOnCloseAction;

	KToggleAction *m_toolbarAction;
	KToggleAction *m_statusbarAction;

};

#endif // _kalva2_H_
