|
|
|
@ -97,11 +97,11 @@ KMyFirewall::KMyFirewall( TQWidget* parent, const char *name ) : KMFMainWindow(
|
|
|
|
|
|
|
|
|
|
/* childproc = new TDEProcess();
|
|
|
|
|
|
|
|
|
|
connect( childproc, TQT_SIGNAL( processExited( TDEProcess* ) ), TQT_TQOBJECT(this), TQT_SLOT( slotProcessExited( TDEProcess* ) ) ) ;
|
|
|
|
|
connect( childproc, TQT_SIGNAL( processExited( TDEProcess* ) ), this, TQT_SLOT( slotProcessExited( TDEProcess* ) ) ) ;
|
|
|
|
|
|
|
|
|
|
connect( childproc, TQT_SIGNAL( receivedStdout( TDEProcess*, char*, int ) ), TQT_TQOBJECT(this), TQT_SLOT( slotReceivedOutput( TDEProcess*, char*, int ) ) );
|
|
|
|
|
connect( childproc, TQT_SIGNAL( receivedStdout( TDEProcess*, char*, int ) ), this, TQT_SLOT( slotReceivedOutput( TDEProcess*, char*, int ) ) );
|
|
|
|
|
|
|
|
|
|
connect( childproc, TQT_SIGNAL( receivedStderr( TDEProcess*, char*, int ) ), TQT_TQOBJECT(this), TQT_SLOT( slotReceivedError( TDEProcess*, char*, int ) ) );*/
|
|
|
|
|
connect( childproc, TQT_SIGNAL( receivedStderr( TDEProcess*, char*, int ) ), this, TQT_SLOT( slotReceivedError( TDEProcess*, char*, int ) ) );*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -111,7 +111,7 @@ KMyFirewall::KMyFirewall( TQWidget* parent, const char *name ) : KMFMainWindow(
|
|
|
|
|
m_configDlg = new KMFConfigDialog( this, "config" );
|
|
|
|
|
m_configDlg->setNetwork( network() );
|
|
|
|
|
connect ( m_configDlg, TQT_SIGNAL( sigConfigChanged() ),
|
|
|
|
|
TQT_TQOBJECT(this), TQT_SLOT( slotConfigChanged() ) );
|
|
|
|
|
this, TQT_SLOT( slotConfigChanged() ) );
|
|
|
|
|
|
|
|
|
|
// Initialize error object
|
|
|
|
|
m_err = new KMFError();
|
|
|
|
@ -288,7 +288,7 @@ void KMyFirewall::setOutputWidget( TQWidget* wid ) {
|
|
|
|
|
if ( strcmp(wid->className(), "KMFObjectInfo") ) {
|
|
|
|
|
KPushButton * close = new KPushButton( i18n( "Return to Editor View" ), widget );
|
|
|
|
|
connect( close, TQT_SIGNAL( clicked() ),
|
|
|
|
|
TQT_TQOBJECT(this), TQT_SLOT( slotShowEditor() ) );
|
|
|
|
|
this, TQT_SLOT( slotShowEditor() ) );
|
|
|
|
|
layout->addWidget( close, 1, 0 );
|
|
|
|
|
}
|
|
|
|
|
m_outputWidget = widget;
|
|
|
|
@ -299,50 +299,50 @@ void KMyFirewall::initActions() {
|
|
|
|
|
kdDebug() << "Init Actions..." << endl;
|
|
|
|
|
// Custom Actions
|
|
|
|
|
|
|
|
|
|
actionEditDocInfo = new TDEAction( i18n( "&Edit Document Information" ), "edit", 0 , TQT_TQOBJECT(this), TQT_SLOT( slotEditDocInfo() ), actionCollection(), "edit_doc_info" );
|
|
|
|
|
actionEditDocInfo = new TDEAction( i18n( "&Edit Document Information" ), "edit", 0 , this, TQT_SLOT( slotEditDocInfo() ), actionCollection(), "edit_doc_info" );
|
|
|
|
|
|
|
|
|
|
// KStdAction
|
|
|
|
|
actionNew = KStdAction::openNew( TQT_TQOBJECT(this), TQT_SLOT( slotFileNew() ),
|
|
|
|
|
actionNew = KStdAction::openNew( this, TQT_SLOT( slotFileNew() ),
|
|
|
|
|
actionCollection(), "new" );
|
|
|
|
|
|
|
|
|
|
actionClose = KStdAction::close( TQT_TQOBJECT(this), TQT_SLOT( slotFileClose() ),
|
|
|
|
|
actionClose = KStdAction::close( this, TQT_SLOT( slotFileClose() ),
|
|
|
|
|
actionCollection(), "close" );
|
|
|
|
|
|
|
|
|
|
actionOpen = KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT( slotFileOpen() ),
|
|
|
|
|
actionOpen = KStdAction::open( this, TQT_SLOT( slotFileOpen() ),
|
|
|
|
|
actionCollection(), "open" );
|
|
|
|
|
|
|
|
|
|
actionSave = KStdAction::save( TQT_TQOBJECT(this), TQT_SLOT( slotFileSave() ),
|
|
|
|
|
actionSave = KStdAction::save( this, TQT_SLOT( slotFileSave() ),
|
|
|
|
|
actionCollection(), "save" );
|
|
|
|
|
|
|
|
|
|
actionSaveAs = KStdAction::saveAs( TQT_TQOBJECT(this), TQT_SLOT( slotFileSaveAs() ),
|
|
|
|
|
actionSaveAs = KStdAction::saveAs( this, TQT_SLOT( slotFileSaveAs() ),
|
|
|
|
|
actionCollection(), "save_as" );
|
|
|
|
|
actionSaveAs->setEnabled( false );
|
|
|
|
|
|
|
|
|
|
actionQuit = KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT( slotQuitApp() ),
|
|
|
|
|
actionQuit = KStdAction::quit( this, TQT_SLOT( slotQuitApp() ),
|
|
|
|
|
actionCollection(), "quit" );
|
|
|
|
|
|
|
|
|
|
actionUndo = KStdAction::undo( TQT_TQOBJECT(this), TQT_SLOT( slotUndo() ),
|
|
|
|
|
actionUndo = KStdAction::undo( this, TQT_SLOT( slotUndo() ),
|
|
|
|
|
actionCollection(), "undo" );
|
|
|
|
|
|
|
|
|
|
actionRedo = KStdAction::redo( TQT_TQOBJECT(this), TQT_SLOT( slotRedo() ),
|
|
|
|
|
actionRedo = KStdAction::redo( this, TQT_SLOT( slotRedo() ),
|
|
|
|
|
actionCollection(), "redo" );
|
|
|
|
|
|
|
|
|
|
actionExportTargetConfig = new TDEAction( i18n( "&Export Target Configuration..." ), "wizard", 0 , TQT_TQOBJECT(this), TQT_SLOT( slotExportTargetConfig() ),
|
|
|
|
|
actionExportTargetConfig = new TDEAction( i18n( "&Export Target Configuration..." ), "wizard", 0 , this, TQT_SLOT( slotExportTargetConfig() ),
|
|
|
|
|
actionCollection(), "export_tagret_config" );
|
|
|
|
|
|
|
|
|
|
actionImportTargetConfig = new TDEAction( i18n( "&Import Target Configuration..." ), "wizard", 0 , TQT_TQOBJECT(this), TQT_SLOT( slotImportTargetConfig() ),
|
|
|
|
|
actionImportTargetConfig = new TDEAction( i18n( "&Import Target Configuration..." ), "wizard", 0 , this, TQT_SLOT( slotImportTargetConfig() ),
|
|
|
|
|
actionCollection(), "import_tagret_config" );
|
|
|
|
|
|
|
|
|
|
actionShowTransactionLog = new TDEAction( i18n( "&Show Transaction Log..." ), "wizard", 0 , TQT_TQOBJECT(this), TQT_SLOT( slotShowTransactionLog() ),
|
|
|
|
|
actionShowTransactionLog = new TDEAction( i18n( "&Show Transaction Log..." ), "wizard", 0 , this, TQT_SLOT( slotShowTransactionLog() ),
|
|
|
|
|
actionCollection(), "show_transaction_log" );
|
|
|
|
|
|
|
|
|
|
actionLoadTemplate = new TDEAction( i18n( "&Load Template..." ), "wizard", 0 , TQT_TQOBJECT(this), TQT_SLOT( slotLoadTemplate() ),
|
|
|
|
|
actionLoadTemplate = new TDEAction( i18n( "&Load Template..." ), "wizard", 0 , this, TQT_SLOT( slotLoadTemplate() ),
|
|
|
|
|
actionCollection(), "load_template" );
|
|
|
|
|
|
|
|
|
|
// KStdAction::showToolbar( TQT_TQOBJECT(this), TQT_SLOT( toggleToolBar() ) , actionCollection() );
|
|
|
|
|
KStdAction::showStatusbar( TQT_TQOBJECT(this), TQT_SLOT( toggleStatusBar() ), actionCollection() );
|
|
|
|
|
KStdAction::preferences( TQT_TQOBJECT(this), TQT_SLOT( slotConfigureKMF() ), actionCollection() );
|
|
|
|
|
KStdAction::configureToolbars( TQT_TQOBJECT(this), TQT_SLOT( slotConfigureToolbars() ), actionCollection() );
|
|
|
|
|
// KStdAction::showToolbar( this, TQT_SLOT( toggleToolBar() ) , actionCollection() );
|
|
|
|
|
KStdAction::showStatusbar( this, TQT_SLOT( toggleStatusBar() ), actionCollection() );
|
|
|
|
|
KStdAction::preferences( this, TQT_SLOT( slotConfigureKMF() ), actionCollection() );
|
|
|
|
|
KStdAction::configureToolbars( this, TQT_SLOT( slotConfigureToolbars() ), actionCollection() );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -362,7 +362,7 @@ void KMyFirewall::slotExportTargetConfig() {
|
|
|
|
|
void KMyFirewall::slotConfigureToolbars() {
|
|
|
|
|
saveMainWindowSettings( TDEGlobal::config(), "KMyFirewall" );
|
|
|
|
|
KEditToolbar dlg( factory() );
|
|
|
|
|
connect( &dlg, TQT_SIGNAL( newToolbarConfig() ), TQT_TQOBJECT(this), TQT_SLOT( slotNewToolbarConfig() ) );
|
|
|
|
|
connect( &dlg, TQT_SIGNAL( newToolbarConfig() ), this, TQT_SLOT( slotNewToolbarConfig() ) );
|
|
|
|
|
dlg.exec();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -491,7 +491,7 @@ void KMyFirewall::slotEnableSave() {
|
|
|
|
|
void KMyFirewall::slotEditDocInfo() {
|
|
|
|
|
KMFDocumentInfo * dlg = new KMFDocumentInfo( this, "KMFObjectInfo", true );
|
|
|
|
|
dlg->loadDoc( network()->currentDoc() );
|
|
|
|
|
connect( dlg,TQT_SIGNAL( sigSaveAsTemplate() ) , TQT_TQOBJECT(this), TQT_SLOT( slotFileSaveAsTemplate() ) );
|
|
|
|
|
connect( dlg,TQT_SIGNAL( sigSaveAsTemplate() ) , this, TQT_SLOT( slotFileSaveAsTemplate() ) );
|
|
|
|
|
dlg->exec();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -580,9 +580,9 @@ void KMyFirewall::slotLoadTemplate() {
|
|
|
|
|
|
|
|
|
|
// dlg->parseTemplates();
|
|
|
|
|
connect( dlg, TQT_SIGNAL( sigLoadTemplate( const TQString& ) ),
|
|
|
|
|
TQT_TQOBJECT(this), TQT_SLOT( slotLoadFile( const TQString& ) ) );
|
|
|
|
|
this, TQT_SLOT( slotLoadFile( const TQString& ) ) );
|
|
|
|
|
/* connect( dlg, TQT_SIGNAL( sigLoadEmptyDocument() ),
|
|
|
|
|
TQT_TQOBJECT(this), TQT_SLOT( slotLoadFile( const TQString& ) ) );*/
|
|
|
|
|
this, TQT_SLOT( slotLoadFile( const TQString& ) ) );*/
|
|
|
|
|
dlg->exec();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -921,9 +921,9 @@ void KMyFirewall::slotFileNew() {
|
|
|
|
|
KMFNewDocDlg *dlg = new KMFNewDocDlg( 0, "KMyFirewall - New Document", TQWidget::WDestructiveClose | TQWidget::WStyle_Customize | TQWidget::WStyle_NoBorder );
|
|
|
|
|
dlg->show() ;
|
|
|
|
|
dlg->raise();
|
|
|
|
|
connect( dlg, TQT_SIGNAL( sigNewDocLoadTemplate() ), TQT_TQOBJECT(this), TQT_SLOT( slotLoadTemplate() ) );
|
|
|
|
|
connect( dlg, TQT_SIGNAL( sigNewDocLoadEmpty() ), TQT_TQOBJECT(this), TQT_SLOT( slotLoadEmptyRuleset() ) );
|
|
|
|
|
connect( dlg, TQT_SIGNAL( sigNewDocLoadSaved() ), TQT_TQOBJECT(this), TQT_SLOT( slotFileOpen() ) );
|
|
|
|
|
connect( dlg, TQT_SIGNAL( sigNewDocLoadTemplate() ), this, TQT_SLOT( slotLoadTemplate() ) );
|
|
|
|
|
connect( dlg, TQT_SIGNAL( sigNewDocLoadEmpty() ), this, TQT_SLOT( slotLoadEmptyRuleset() ) );
|
|
|
|
|
connect( dlg, TQT_SIGNAL( sigNewDocLoadSaved() ), this, TQT_SLOT( slotFileOpen() ) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void KMyFirewall::slotLoadEmptyRuleset() {
|
|
|
|
|