#ifndef QT_INPUT_CLOUDS_TAB_HPP
#define QT_INPUT_CLOUDS_TAB_HPP

#include <iostream>
#include <fstream>

#include <QWidget>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QScrollArea>
#include <QPushButton>
#include <QPalette>
#include <QMessageBox>

#include "qt/input_cloud.hpp"

#include "source.hpp"

class QtInputCloudsTab:public QWidget{
  Q_OBJECT
private:
  Source* source;
  QPushButton* add_button;
  QPushButton* refresh_button;
  QScrollArea* scroll_area;
  QVBoxLayout* clouds_layout;
  QWidget* clouds_widget;
  QVBoxLayout* main_layout;
  QHBoxLayout* button_layout;
  QWidget* button_widget;
public:
  QtInputCloudsTab(Source* source);
  ~QtInputCloudsTab();
  QWidget* validate();
  void save(fstream& file);
  void load(fstream& file);
public slots:
   void addCloud();
   void removeCloud(QtInputCloud*);
   void updateSources();
signals:
   void sourcesChanged();
};

inline
QtInputCloudsTab::~QtInputCloudsTab(){
}

#endif
