#include "checklistdialog.h"
#include <QCheckBox>

CheckListDialog::CheckListDialog() : ButtonSelectionDialog()
{

}

DialogBase *CheckListDialog::createWidget( const QString &text, const QString &listHeight, const QStringList &tags, const QStringList &labels, QList<bool> areChecked, const QStringList &helps, bool noTags )
{
    if( tags.size() != labels.size() )
        return 0;

    if( tags.size() != areChecked.size() )
        return 0;

    bool isNumber = false;
    int height = listHeight.toInt(&isNumber);

    CheckListDialog *dlg = new CheckListDialog;
    dlg->setupDialog<QCheckBox>(false, text, height, tags, labels, areChecked, helps, noTags );

    return dlg;
}

