#include "gui/importwidget.h"
#include "ui_importwidget.h"
#include "legacyapp.h"

ImportWidget::ImportWidget(LegacyApp *_app, QWidget *parent) :
    QWidget(parent), app(_app),
    ui(new Ui::ImportWidget)
{
    ui->setupUi(this);
    hideAllImportOptions();
    ui->database_import_widget->show();
}

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

void ImportWidget::hideAllImportOptions()
{
    ui->database_import_widget->hide();
    ui->file_import_widget->hide();
    ui->textfragment_import_widget->hide();
}


void ImportWidget::on_database_import_radiobutton_common_clicked()
{
    hideAllImportOptions();
    ui->database_import_widget->show();
}

void ImportWidget::on_file_import_radiobutton_common_clicked()
{
    hideAllImportOptions();
    ui->file_import_widget->show();
}

void ImportWidget::on_textfragment_import_radiobutton_common_clicked()
{
    hideAllImportOptions();
    ui->textfragment_import_widget->show();
}
