#ifndef QMEDIABIBLIOTHEK_H
#define QMEDIABIBLIOTHEK_H
//
#include <QMainWindow>
#include <QFrame>
#include <QPushButton>
#include <QLabel>
#include <QFont>
#include <QMenuBar>
#include <QTableWidget>
#include <QMenu>
#include <QAction>
#include <QSlider>
#include <QLineEdit>
#include <QFileDialog>
#include <QProgressDialog>
#include <QComboBox>
#include <QTextEdit>
#include <QMessageBox>
#include <QProcess>
#include <QInputDialog>
#include <QToolBar>
#include <QPrinter>
#include <QPrintDialog>
#include <QPainter>
#include <QContextMenuEvent>
#include <videowidget.h>
#include <mediaobject.h>
#include <audiooutput.h>
#include "ui_QMediaBibliothek.h"
#include "genresetup.h"
#include "multiadddialog.h"
#include "setupdialog.h"
#include "copydialog.h"
//
class QMediaBibliothek : public QMainWindow, public Ui::QMediaBibliothek
{
Q_OBJECT
public:
	QMediaBibliothek( QWidget * parent = 0, Qt::WFlags f = 0 );
	~QMediaBibliothek();
	Phonon::MediaObject	* mediaObject;
	Phonon::VideoWidget	* videoWidget;
	Phonon::AudioOutput	* audioOutput;
	QFrame				* mediaPlayerFrame;
	QFrame				* inputFrame;
	QToolBar			* toolBar;
	QPushButton			* beginButton;
	QPushButton			* rewindButton;
	QPushButton			* playButton;
	QPushButton			* pauseButton;
	QPushButton			* stopButton;
	QPushButton			* ffButton;
	QPushButton			* endButton;
	QPushButton			* submitButton;
	QPushButton			* fileSelectButton;
	QPushButton			* addButton;
	QPushButton			* delButton;
	QPushButton			* modifyButton;
	QPushButton			* playFullScreenButton;
	QPushButton			* lookupButton;
	QPushButton			* printButton;
	QLabel				* playTimeLabel;
	QLabel				* hitLabel;
	QLabel				* searchEditLabel;
	QLabel				* filenameLabel;
	QLabel				* titleLabel;
	QLabel				* genreLabel;
	QLabel				* timeLabel;
	QLabel				* timeLabelLabel;
	QLabel				* descriptionLabel;
	QLabel				* toolBarSortByLabel;
	QLabel				* toolBarWebSourcesLabel;
	QLineEdit			* searchEdit;
	QLineEdit			* filenameEdit;
	QLineEdit			* titleEdit;
	QTextEdit			* commentEdit;
	QSlider				* progress;
	QMenuBar			* mainMenu;
	QMenu				* fileMenu;
	QMenu				* optionMenu;
	QMenu				* orderByMenu;
	QMenu				* recentlyUsedMenu;
	QMenu				* helpMenu;
	QAction				* actionOpen;
	QAction				* actionSave;
	QAction				* actionSaveAs;
	QAction				* actionQuit;
	QAction				* actionOrderByTitle;
	QAction				* actionOrderByGenre;
	QAction				* actionOrderByTime;
	QAction				* actionGenreSetup;
	QAction				* actionMultiAddMovies;
	QAction				* actionSetup;
	QAction				* actionNewDatabase;
	QAction				* actionAboutQt;
	QAction				* actionHelp;
	QAction				* actionAboutQMediaBibliothek;
	QAction				* toolBarActionNew;
	QAction				* toolBarActionOpen;
	QAction				* toolBarActionSave;
	QAction				* toolBarActionQuit;
	QAction				* toolBarActionCopy;
	QAction				* actionRecentlyUsed1;
	QAction				* actionRecentlyUsed;
	QAction				* actionRecentlyUsed2;
	QAction				* actionRecentlyUsed3;
	QAction				* actionRecentlyUsed4;
	QAction				* actionRecentlyUsed5;
	QAction				* actionConsistencyCheck;
	QTableWidget		* movieTable;
	QComboBox			* genreComboBox;
	QComboBox			* webLookupSources;
	QComboBox			* sortByComboBox;
	QString				  dataset;
	QString				  filename;
	QString				  basePath;
	QString				  oldDataSet;
	QString				  defaultMediaPlayer;
	QString				  defaultDatabase;
	QString				  webLookupSource;
	QString				  defaultBrowser;
	QString				  recentlyUsed;
	QString				  version;
	QStringList			  genre;
	int					  sortBy;
	int					  dataModified;
	void resizeEvent(QResizeEvent * );
	void fillTableSelected(QString, bool);
	QString calcPlayTime(long int);
	void setup();
	void saveSetup();
	void loadDatabase(QString);
	void rebuildRecentlyUsedMenu();
private slots:
	void slot_ffButtonClicked();
	void slot_rewindButtonClicked();
	void slot_tickInterval(qint64);
	void slot_sliderMoved(int);
	void slot_beginButtonClicked();
	void slot_endButtonClicked();
	void slot_openActionActivated();
	void slot_submitButtonClicked();
	void slot_fileSelectButtonClicked();
	void slot_movieTableDoubleClicked(QModelIndex);
	void slot_addButtonClicked();
	void slot_modifyButtonClicked();
	void slot_delButtonClicked();
	void slot_saveActionActivated();
	void slot_saveAsActionActivated();
	void slot_playFullScreenButtonClicked();
	void slot_actionOrderByTitleActivated();
	void slot_actionOrderByGenreActivated();
	void slot_actionOrderByTimeActivated();
	void slot_actionGenreSetupActivated();
	void slot_actionMultiAddMoviesActivated();
	void slot_actionSetupActivated();
	void slot_actionNewDatabaseActivated();
	void slot_lookupButtonClicked();
	void slot_orderByComboBoxActivated(int);
	void slot_aboutQt();
	void slot_aboutMediaBibliothek();
	void slot_actionRecentlyUsed1Activated();
	void slot_actionRecentlyUsed2Activated();
	void slot_actionRecentlyUsed3Activated();
	void slot_actionRecentlyUsed4Activated();
	void slot_actionRecentlyUsed5Activated();
	void slot_playButtonClicked();
	void slot_pauseButtonClicked();
	void slot_consistencyCheckActivated();
	void slot_actionHelpActivated();
	void slot_copyActionActivated();
	void slot_printButtonClicked();
};
#endif




