notedialog.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "notedialog.h"
00014
00015
00016 #include <qlineedit.h>
00017 #include <qgroupbox.h>
00018 #include <qtextedit.h>
00019 #include <qlayout.h>
00020 #include <qlabel.h>
00021 #include <klocale.h>
00022 #include <kmessagebox.h>
00023
00024
00025 NoteDialog::NoteDialog( QWidget * parent, NoteWidget * pNote ) : KDialogBase(Plain, i18n("Note Documentation"), Help | Ok | Cancel , Ok, parent, "_NOTEDIALOG_", true, true) {
00026 m_pNoteWidget = pNote;
00027 int margin = fontMetrics().height();
00028
00029 m_pDocGB = new QGroupBox(i18n("Documentation"), plainPage());
00030 QVBoxLayout * mainLayout = new QVBoxLayout(plainPage());
00031 mainLayout -> addWidget(m_pDocGB);
00032 mainLayout -> setSpacing(10);
00033 mainLayout -> setMargin(margin);
00034
00035 QHBoxLayout * docLayout = new QHBoxLayout(m_pDocGB);
00036 docLayout -> setSpacing(10);
00037 docLayout -> setMargin(margin);
00038
00039 m_pDocTE = new QTextEdit( m_pDocGB );
00040 m_pDocTE -> setFocus();
00041 docLayout -> addWidget( m_pDocTE );
00042 m_pDocTE -> setText( pNote -> getDoc() );
00043 setMinimumSize(330, 160);
00044 }
00045
00046 NoteDialog::~NoteDialog() {}
00047
00048 void NoteDialog::slotOk() {
00049 m_pNoteWidget -> setDoc( m_pDocTE -> text() );
00050 accept();
00051 }
00052
00053 #include "notedialog.moc"
This file is part of the documentation for umbrello Version 3.1.0.