#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QBoxLayout>
#include <QColorDialog>

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
	ui(new Ui::MainWindow),
	colordialog(new QColorDialog)
{
    ui->setupUi(this);

	connect(ui->pushButton, SIGNAL(clicked(bool)), this, SLOT(onColorPickerActivate()));
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::addViewer(Viewer* viewer)
{
    QLayout *layout = new QHBoxLayout;
    layout->addWidget(viewer);
    ui->frame->setLayout(layout);

}

void MainWindow::onColorPickerActivate(){
	colordialog->open();
}
