#ifndef LANDED_DIALOGS
#define LANDED_DIALOGS

#include <QObject>
#include <QDialog>
#include <QWidget>
#include <QScrollBar>
#include <QBoxLayout>
#include <QPushButton>
#include <QLabel>
#include <QSqlDatabase>
#include <QComboBox>

#define APPNAME "Liquid Argon Neutrino Detector Event Display"
#define SHORTAPPNAME "LANDED"

class HelpDialog : public QDialog
{
  Q_OBJECT
 public:
  HelpDialog(QWidget*);
  
 private:
  QVBoxLayout layout_;
  QLabel image_;
  QLabel text_;

};

//dialog for user to change surface opacity
class OpacityDialog : public QDialog
{
  Q_OBJECT
 public:
  OpacityDialog(QWidget*, float);

 private:
  QVBoxLayout layout_;
  QScrollBar bar_;
  QHBoxLayout box_;
  QPushButton btn_;

private slots:
  void cbBar(int);

signals:
  void changed(float);
};

//a simple dialog for the user to enter a colour
class ColourDialog : public QDialog
{
Q_OBJECT
public:
  ColourDialog(QWidget*, QString, float, float, float);

private:
  QVBoxLayout layout_;
  QLabel lblRed_, lblGreen_, lblBlue_;
  QHBoxLayout boxRed_, boxGreen_, boxBlue_;
  QScrollBar red_, green_, blue_;  
  QHBoxLayout box_;
  QPushButton btn_;

private slots:
  void cbBar(int);

signals:
  void changed(float, float, float);

};

class JumpDialog : public QDialog
{
  Q_OBJECT

 public:
  JumpDialog(QSqlDatabase& db, int);
  
 private:
  QSqlDatabase& db_;
  int record_;
  QVBoxLayout layout_;
  QHBoxLayout boxRecord_;
  QVBoxLayout boxRun_;
  QLabel lblRun_;
  QComboBox cbxRun_;
  QVBoxLayout boxSubRun_;
  QLabel lblSubRun_;
  QComboBox cbxSubRun_;
  QVBoxLayout boxEvent_;
  QLabel lblEvent_;
  QComboBox cbxEvent_;
  QHBoxLayout boxBtns_;
  QPushButton btnCancel_;
  QPushButton btnConfirm_;

 private:
  void setRun(int);
  void setSubRun(int);
  void setEvent(int);

 private slots:
  void cbRun(int);
  void cbSubRun(int);
  void cbEvent(int);

 public:
  int record(void);

};

#endif //ifndef LANDED_DIALOGS
