MotifEditor::MotifEditor(MussaRef m, QWidget *parent)
: QWidget(parent),
analysis(m),
- editor_layout(new QVBoxLayout(parent)),
- button_layout(new QHBoxLayout(parent)),
- table(new QTableView(this)),
- delegate(new MotifEditorDelegate(this)),
- applyButton(new QPushButton("apply")),
+ editor_layout(0),
+ button_layout(0),
+ table(0),
+ delegate(0),
+ applyButton(0),
model(0)
{
+ setupWidgets();
+
assert (m != 0);
const set<Sequence> &motif = analysis->motifs();
vector<Sequence> motif_seq(motif.begin(), motif.end());
updateModel();
}
+void MotifEditor::setupWidgets()
+{
+ editor_layout = new QVBoxLayout(this);
+ button_layout = new QHBoxLayout(this);
+ table = new QTableView(this);
+ delegate = new MotifEditorDelegate(this);
+ applyButton = new QPushButton("apply");
+}
+
void MotifEditor::updateModel()
{
MotifModel *new_model = new MotifModel(analysis);