/***************************************************************************
 * clipboard.h: implementation of Clipboard class
 *
 * This file is part of KTabEdit, a KDE tabulature editor
 *
 * copyright (C) 2003-2006 the KTabEdit development team <mrgwen@gmail.com>
 * copyright (C) 2002-2003 the KGuitar development team  <mrgwen@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.
 *
 * See the file COPYING for more information.
 ***************************************************************************/

#ifndef CLIPBOARD_H
#define CLIPBOARD_H

#include <QDialog>
#include <QWidget>
#include <QGridLayout>
#include <QLabel>
#include <QSpinBox>
#include <QPushButton>
#include <QCheckBox>

/**
	The Clipboard class. This class creates a dialog which permits the user
	to select a range bars.
*/
class Clipboard : public QDialog {
Q_OBJECT
public:
	/**
		Construct the clipboard dialog box.
		The constructor creates two spin box inside these the user can choose and range bars.
		@param begin the beginning of the range
		@param bar the number of bars
		@param parent the widget parent
		@param name the widget name
	*/
	Clipboard(uint begin, uint bar,QWidget* parent=0, const char* name=0);
	
	/**
		Destructor.
		It does nothing.
	*/
	~Clipboard();
	
	/**
		Return the beginning of the range.
		@result the beginning bar
	*/
	uint getFrom() const;
	
	/**
		Return the ending of the range.
		@result the ending bar
	*/
	uint getTo() const;
	
private slots:
	void okClick();
	void cancelClick();
	
private:
	QGridLayout mLayout;
	QLabel mFromLabel, mToLabel;
	QSpinBox mFrom, mTo;
	QPushButton mOk, mCancel;
	QCheckBox mToEnd;
	const uint mLastBar;
};

#endif
