void Note::init(ScriptingEnv *env) { autoExec = false; QDateTime dt = QDateTime::currentDateTime (); setBirthDate(dt.toString(Qt::LocalDate)); te = new ScriptEdit(env, this, name()); te->setContext(this); QVBoxLayout* hlayout = new QVBoxLayout(this,0,0, "hlayout1"); hlayout->addWidget(te); setGeometry(0, 0, 500, 200); connect(te, SIGNAL(textChanged()), this, SLOT(modifiedNote())); }
void Note::init(ScriptingEnv *env) { autoExec = false; te = new ScriptEdit(env, this, name()); te->setContext(this); d_line_number = new LineNumberDisplay(te, this); d_frame = new QWidget(this); QHBoxLayout *hbox = new QHBoxLayout(d_frame); hbox->setMargin(0); hbox->setSpacing(0); hbox->addWidget(d_line_number); hbox->addWidget(te); setWidget(d_frame); setGeometry(0, 0, 500, 200); connect(te, SIGNAL(textChanged()), this, SLOT(modifiedNote())); connect(te, SIGNAL(dirPathChanged(const QString& )), this, SIGNAL(dirPathChanged(const QString&))); }