/***************************************************************************
 *   Copyright (C) 2006 by Oscar Ljunggren   *
 *   oscar.ljunggren@gmail.com   *
 *                                                                         *
 *   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.             *
 ***************************************************************************/


#include "kpersonaltrainer.h"
#include "settings.h"

#include <qdragobject.h>
#include <kprinter.h>
#include <qpainter.h>
#include <qpaintdevicemetrics.h>

#include <kconfigdialog.h>
#include <kglobal.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kdeversion.h>
#include <kmenubar.h>
#include <kstatusbar.h>
#include <kkeydialog.h>

#include <kedittoolbar.h>

#include <kstdaccel.h>
#include <kaction.h>
#include <kstdaction.h>
#include <kpersonaltrainer_handler.h>

kpersonaltrainer::kpersonaltrainer()
    : KMainWindow( 0, "KPersonalTrainer" ),
      m_view(new kpersonaltrainer_handler(this)),
      m_printer(0)
{
    m_view->setMinimumSize(870,690);
    // accept dnd
    setAcceptDrops(true); 

    setCentralWidget(m_view);

    setupActions();
    setAutoSaveSettings();

    
}

kpersonaltrainer::~kpersonaltrainer()
{
}

void kpersonaltrainer::setupActions()
{
    KStdAction::quit(kapp, SLOT(quit()), actionCollection());
    
    //m_toolbarAction = KStdAction::showToolbar(this, SLOT(optionsShowToolbar()), actionCollection());
    
    //KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
        
    KAction *exercises = new KAction(i18n("Exercises"), 0,
                         m_view, SLOT(manageExercises()),
                                  actionCollection(), "manageExercises");
    KAction *wReport = new KAction(i18n("Weekly Report"), 0,
                         m_view, SLOT(manageReport()),
                                  actionCollection(), "manageReport");
                                             
    
    createGUI();
    
}




#include "kpersonaltrainer.moc"

