/* -*- mode: c++; -*-
 *
 * This file is part of the Mango recipe management distribution.
 * Copyright (c) 2000-2003, Roland Jesse
 * All rights reserved.
 *
 * For license and copyright information see the file COPYRIGHT or 
 * <http://www.opensource.org/licenses/bsd-license.html>.
 *
 * $Id: StartupDialog.h,v 1.4 2003/01/12 16:19:56 rjesse Exp $
 */
 
#ifndef STARTUP_DIALOG_HPP
#define STARTUP_DIALOG_HPP

#include "StartupForm.h"

/*!
  This class implements the dialog shown to the user at program startup.
  It lets her choose whether to start from scratch (i.e. without any
  recipes at all), to open an existing cookbook or to continue where
  the action was left the last time.
*/
class StartupDialog : public StartupForm {
      Q_OBJECT
	  
   public:
	  StartupDialog( const int, QWidget* parent = 0, const char* name = 0);
	  
   signals:
	  void startNew();
	  void openExisting();
	  void continueFromLastTime();

   protected:
	  virtual void closeEvent( QCloseEvent*);

   protected slots:
      virtual void slotContinue();
      virtual void slotNew();
      virtual void slotOpen();
      void decreseTimeout();

   private:
      bool m_choiceMade;		//!< True if one of the buttons was clicked.
      int m_curTimeout;
      QTimer* m_timer;
};
#endif // STARTUP_DIALOG_HPP
