umbrello API Documentation

notedialog.cpp

00001 /***************************************************************************
00002  *                                                                         *
00003  *   This program is free software; you can redistribute it and/or modify  *
00004  *   it under the terms of the GNU General Public License as published by  *
00005  *   the Free Software Foundation; either version 2 of the License, or     *
00006  *   (at your option) any later version.                                   *
00007  *                                                                         *
00008  *   copyright (C) 2002-2007                                               *
00009  *   Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                  *
00010  ***************************************************************************/
00011 
00012 // own header
00013 #include "notedialog.h"
00014 
00015 // qt/kde includes
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"
KDE Logo
This file is part of the documentation for umbrello Version 3.1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 26 08:07:58 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003