/*
   Copyright (c) 2000 Stefan Schimanski <1Stein@gmx.de>                 

   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, 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., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#ifndef USERINTERFACE_H
#define USERINTERFACE_H

#include <plugin.h>
#include <noatunapp.h>
#include <kmainwindow.h>
#include "style.h"


#define DEFAULT_SKIN "car-preset"


class Player;

/**
 * @short Main window class
 * @author Stefan Schimanski <1Stein@gmx.de>
 * @version 0.1
 */
class Kaiman : public KMainWindow, public UserInterface
{
Q_OBJECT
NOATUNPLUGIND
 public:
    Kaiman();
    virtual ~Kaiman();
	
    bool changeStyle( const QString &style, const QString &desc=QString::null );    
 public slots:
    void dropEvent( QDropEvent * );
    void doDropEvent( QDropEvent * );
    void dragEnterEvent( QDragEnterEvent * );
    void closeEvent(QCloseEvent*);

 protected slots:
    void seekStart( int );
    void seekDrag( int );
    void seekStop( int );
    void seek( int );
    void toggleSkin();

    void setVolume( int vol );
    void volumeUp();
    void volumeDown();

    void execMixer();


    void timeout();
    void loopTypeChange( int t );
    void newSongLen( int mins, int sec );
    void newSong();
    void updateMode();

 protected:
    bool loadStyle( const QString &style, const QString &desc );
    

    bool _seeking;
    bool _altSkin;
    KaimanStyle *_style;
};


#endif
