You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
1.7 KiB
81 lines
1.7 KiB
//
|
|
// C++ Implementation:
|
|
//
|
|
// Description:
|
|
//
|
|
//
|
|
// Author: Christian Hubinger <chubinger@irrsinnig.org>, (C) 2004
|
|
//
|
|
// Copyright: See COPYING file that comes with this distribution
|
|
//
|
|
// License: GPL
|
|
//
|
|
|
|
|
|
#include "kmfdocumentinfo.h"
|
|
|
|
// TQt includes
|
|
#include <tqstring.h>
|
|
#include <tqtextedit.h>
|
|
#include <tqlineedit.h>
|
|
#include <tqpushbutton.h>
|
|
|
|
|
|
// KDE includes
|
|
#include <tdeapplication.h>
|
|
#include <kdebug.h>
|
|
|
|
// project includes
|
|
#include "../core/kmfdoc.h"
|
|
#include "../core/kmfnetwork.h"
|
|
#include "../core/kmfundoengine.h"
|
|
namespace KMF {
|
|
KMFDocumentInfo::KMFDocumentInfo(TQWidget* parent, const char* name, bool modal, WFlags fl)
|
|
: KMyFirewallDocumentInfo(parent,name, modal,fl) {
|
|
connect( b_help, TQ_SIGNAL( clicked() ),
|
|
this, TQ_SLOT( slotHelp() ) );
|
|
connect( b_saveAsTemplate, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotSaveAsTemplate() ) );
|
|
|
|
}
|
|
|
|
KMFDocumentInfo::~KMFDocumentInfo() {}
|
|
|
|
void KMFDocumentInfo::slotSaveAsTemplate() {
|
|
kdDebug() << "slotSaveAsTemplate()" << endl;
|
|
emit sigSaveAsTemplate();
|
|
}
|
|
|
|
/*$SPECIALIZATION$*/
|
|
void KMFDocumentInfo::accept() {
|
|
if ( ! txt_name->text().isNull() ) {
|
|
m_doc->setName( txt_name->text() );
|
|
// m_doc->changed();
|
|
// m_doc->network()->changed();
|
|
}
|
|
|
|
if ( ! txt_description->text().isNull() ) {
|
|
m_doc->setDescription( txt_description->text() );
|
|
// m_doc->changed();
|
|
// m_doc->network()->changed();
|
|
}
|
|
|
|
TQDialog::accept();
|
|
}
|
|
|
|
void KMFDocumentInfo::loadDoc( KMFDoc* doc ) {
|
|
m_doc = doc;
|
|
txt_name->setText( doc->name() );
|
|
txt_description->setText( doc->description() );
|
|
}
|
|
|
|
void KMFDocumentInfo::slotHelp() {
|
|
kdDebug() << "void KMFDocumentInfo::slotHelp()" << endl;
|
|
kapp->invokeHelp();
|
|
}
|
|
|
|
|
|
}
|
|
|
|
#include "kmfdocumentinfo.moc"
|
|
|