umbrello API Documentation

umlroledialog.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) 2003-2007                                               *
00009  *   Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                  *
00010  ***************************************************************************/
00011 
00012 // own header
00013 #include "umlroledialog.h"
00014 
00015 // qt/kde  includes
00016 #include <qlayout.h>
00017 #include <kdebug.h>
00018 #include <klocale.h>
00019 
00020 // app includes
00021 #include "../umlrole.h"
00022 #include "umlroleproperties.h"
00023 
00024 UMLRoleDialog::UMLRoleDialog( QWidget * parent, UMLRole * pRole )
00025         : KDialogBase( Plain, i18n("Role Properties"), Help | Ok | Cancel , Ok, parent, "_UMLROLEDLG_", true, true)
00026 {
00027     m_pRole = pRole;
00028     setupDialog();
00029 }
00030 
00031 UMLRoleDialog::~UMLRoleDialog() {}
00032 
00033 void UMLRoleDialog::setupDialog() {
00034     //          UMLRoleDialogLayout = new QGridLayout( this, 1, 1, 11, 6, "UMLRoleLayout");
00035     m_pRoleProps = new UMLRoleProperties(this, m_pRole);
00036     setMainWidget( m_pRoleProps );
00037 
00038     resize( QSize(425, 620).expandedTo(minimumSizeHint()) );
00039 
00040     //  topLayout -> addWidget( m_pParmsGB);
00041 
00042 }
00043 
00044 bool UMLRoleDialog::apply() {
00045     if( m_pRoleProps ) {
00046         m_pRoleProps->updateObject();
00047         return true;
00048     }
00049     return false;
00050 }
00051 
00052 void UMLRoleDialog::slotApply() {
00053     apply();
00054 }
00055 
00056 void UMLRoleDialog::slotOk() {
00057     if ( apply() ) {
00058         accept();
00059     }
00060 }
00061 
00062 
00063 #include "umlroledialog.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:08:01 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003