1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-21 10:47:16 +01:00

see #2163 code that imports addresses from a file in /etc/hosts format moved to its own wizard; using QWizard and QWizardPage classes with correct implementation of page sequencing and validation; old discovery druid has been disabled

This commit is contained in:
Vadim Kurland 2011-03-01 17:14:26 -08:00
parent 7e312722dc
commit bebfd9fbff
26 changed files with 1694 additions and 234 deletions

View File

@ -1,179 +0,0 @@
/*
Firewall Builder
Copyright (C) 2001 NetCitadel, LLC
Author: Vadim Zaliva lord@crocodile.org
$Id$
This program is free software which we release under the GNU General Public
License. You may redistribute and/or modify this program under the terms
of that license as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
To get a copy of the GNU General Public License, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <fwbuilder/libfwbuilder-config.h>
#include <fwbuilder/HostsFile.h>
#include <fwbuilder/Tools.h>
#include <iostream>
#include <fstream>
#include <sstream>
using namespace std;
using namespace libfwbuilder;
void HostsFile::parse(const string &filename) throw(FWException)
{
ifstream f(filename.c_str(), ios::in);
if(!f)
throw FWException("Can't open file '"+filename+"'");
else
parse(f);
}
/**
* Does actuall parsing.
*/
void HostsFile::parse(istream &from) throw(FWException)
{
enum
{
s_ip,
s_iws,
s_ws,
s_name,
s_rest
} state;
state = s_iws;
InetAddr ip ;
string name ;
vector<string> names ;
char c ;
int ln = 1;
while(from.get(c))
{
switch(state)
{
case s_iws:
if(c=='#')
{
state=s_rest;
break;
} else if(c!='\n')
{
state=s_ip;
} else
break;
case s_ip:
if(c=='#')
{
ostringstream err;
err << "Comment started in IP address field at line " << ln;
throw FWException(err.str());
} else if(c==' ' || c=='\t')
{
// if IP address is invalid, it will
// throw exception here.
try
{
ip = InetAddr(name);
names.clear();
name="";
state=s_ws;
} catch(FWNotSupportedException &v6)
{
// IPv6 addresses are not supported
// thus, we just skip it.
state=s_rest;
}
} else
{
name+=c;
}
break;
case s_ws:
if(c=='#')
{
// IP ends with comment without name
if(names.empty())
{
ostringstream err;
err << "Address: '" << name
<< "' without host name at line " << ln;
throw FWException(err.str());
} else
{
state=s_rest;
break;
}
} else if(c==' ' || c=='\t')
{
break;
} else if(c=='\n')
{
if(names.empty())
{
ostringstream err;
err << "Address: '" << name
<< "' without host name at line " << ln;
throw FWException(err.str());
}
} else
{
state=s_name;
name = "";
}
//Fallthrough
case s_name:
if(c==' ' || c=='\t' || c=='#' || c=='\n')
{
names.push_back(name);
name="";
if(c=='#')
{
data[ip] = names;
state=s_rest;
} else if(c=='\n')
{
data[ip] = names;
state=s_iws;
}
break;
} else
{
name+=c;
break;
}
case s_rest:
if(c=='\n')
{
ln++;
name = "";
state = s_iws;
}
break;
}
}
}

View File

@ -34,7 +34,6 @@ SOURCES = InetAddr.cpp \
FWServiceReference.cpp \
Group.cpp \
Host.cpp \
HostsFile.cpp \
ICMPService.cpp \
ICMP6Service.cpp \
Interface.cpp \
@ -107,7 +106,6 @@ HEADERS = inet_net.h \
FWServiceReference.h \
Group.h \
Host.h \
HostsFile.h \
ICMPService.h \
ICMP6Service.h \
Interface.h \

View File

@ -662,12 +662,12 @@
</widget>
<widget class="QWidget" name="page_35">
<layout class="QGridLayout" name="gridLayout_40">
<property name="margin">
<number>0</number>
</property>
<property name="horizontalSpacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="MetricEditorPanel" name="w_MetricEditorPanel" native="true"/>
</item>
@ -742,7 +742,7 @@
<x>0</x>
<y>0</y>
<width>1144</width>
<height>24</height>
<height>26</height>
</rect>
</property>
<widget class="QMenu" name="editMenu">
@ -773,7 +773,7 @@
<string>Tools</string>
</property>
<addaction name="fileCompareAction"/>
<addaction name="DiscoveryDruidAction"/>
<addaction name="ImportAddressesFromFileAction"/>
</widget>
<widget class="QMenu" name="helpMenu">
<property name="title">
@ -1374,6 +1374,11 @@
<string>Inspect</string>
</property>
</action>
<action name="ImportAddressesFromFileAction">
<property name="text">
<string>Import Addresses From File</string>
</property>
</action>
</widget>
<layoutdefault spacing="0" margin="11"/>
<customwidgets>
@ -1633,22 +1638,6 @@
</hint>
</hints>
</connection>
<connection>
<sender>DiscoveryDruidAction</sender>
<signal>triggered()</signal>
<receiver>FWBMainWindow_q</receiver>
<slot>toolsDiscoveryDruid()</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>editCopyAction</sender>
<signal>triggered()</signal>
@ -2257,6 +2246,22 @@
</hint>
</hints>
</connection>
<connection>
<sender>ImportAddressesFromFileAction</sender>
<signal>triggered()</signal>
<receiver>FWBMainWindow_q</receiver>
<slot>toolsImportAddressesFromFile()</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>571</x>
<y>422</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>clearRecentFilesMenu()</slot>
@ -2270,5 +2275,6 @@
<slot>showSummary()</slot>
<slot>showTutorial()</slot>
<slot>inspect()</slot>
<slot>toolsImportAddressesFromFile()</slot>
</slots>
</ui>

View File

@ -52,7 +52,7 @@
#include "PrefsDialog.h"
#include "LibExportDialog.h"
#include "findDialog.h"
#include "DiscoveryDruid.h"
#include "importAddressListWizard/ImportAddressListWizard.h"
#include "FindObjectWidget.h"
#include "FindWhereUsedWidget.h"
#include "CompilerOutputPanel.h"
@ -858,15 +858,16 @@ void FWWindow::fileExit()
app->quit();
}
void FWWindow::toolsDiscoveryDruid()
void FWWindow::toolsImportAddressesFromFile()
{
if (activeProject())
{
DiscoveryDruid druid(this);
druid.exec();
ImportAddressListWizard wiz(this);
wiz.exec();
}
}
void FWWindow::importPolicy()
{
if (activeProject())
@ -874,8 +875,8 @@ void FWWindow::importPolicy()
if (!activeProject()->m_panel->om->isObjectAllowed(Firewall::TYPENAME))
return;
DiscoveryDruid druid(this, true);
druid.exec();
// DiscoveryDruid druid(this, true);
// druid.exec();
}
}
@ -1000,7 +1001,6 @@ void FWWindow::prepareFileMenu()
void FWWindow::prepareToolsMenu()
{
m_mainWindow->DiscoveryDruidAction->setEnabled(db()!=NULL);
}
void FWWindow::prepareWindowsMenu()

View File

@ -231,8 +231,8 @@ public slots:
virtual void prepareRulesMenu();
virtual void cleanRulesMenu();
virtual void toolsDiscoveryDruid();
virtual void toolsImportAddressesFromFile();
virtual void checkForUpgrade(const QString&);
virtual void projectWindowClosed();

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -1,5 +1,6 @@
<RCC>
<qresource prefix="/" >
<file>Images/fwbuilder3-72x72.png</file>
<file>Images/network_zone_dialog.png</file>
<file>Images/logo1.png</file>
<file>Images/library_switch_screenshot.png</file>

View File

@ -0,0 +1,88 @@
/*
Firewall Builder
Copyright (C) 2011 NetCitadel, LLC
Author: Vadim Kurland vadim@fwbuilder.org
This program is free software which we release under the GNU General Public
License. You may redistribute and/or modify this program under the terms
of that license as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
To get a copy of the GNU General Public License, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../../config.h"
#include "global.h"
#include "ObjectDescriptor.h"
using namespace std;
using namespace libfwbuilder;
ObjectDescriptor::ObjectDescriptor() {}
ObjectDescriptor::ObjectDescriptor(const ObjectDescriptor& od)
{
have_snmpd = od.have_snmpd;
descr = od.descr;
contact = od.contact;
location = od.location;
sysname = od.sysname;
interfaces = od.interfaces;
MAC_addr = od.MAC_addr;
dns_info.name = od.dns_info.name;
dns_info.aliases = od.dns_info.aliases;
addr = od.addr;
type = od.type;
isSelected = od.isSelected;
netmask = od.netmask;
}
#ifdef HAVE_LIBSNMP
ObjectDescriptor::ObjectDescriptor(const libfwbuilder::CrawlerFind& cf)
{
have_snmpd = cf.have_snmpd;
descr = cf.descr;
contact = cf.contact;
location = cf.location;
sysname = cf.sysname;
interfaces = cf.interfaces;
MAC_addr = cf.found_phys_addr;
dns_info.name = cf.name;
dns_info.aliases = cf.aliases;
}
#endif
ObjectDescriptor::~ObjectDescriptor() {};
ObjectDescriptor& ObjectDescriptor::operator=(const ObjectDescriptor& od) {
have_snmpd = od.have_snmpd;
descr = od.descr;
contact = od.contact;
location = od.location;
sysname = od.sysname;
interfaces = od.interfaces;
MAC_addr = od.MAC_addr;
dns_info.name = od.dns_info.name;
dns_info.aliases = od.dns_info.aliases;
addr = od.addr;
type = od.type;
isSelected = od.isSelected;
netmask = od.netmask;
return *this;
}

View File

@ -0,0 +1,76 @@
/*
Firewall Builder
Copyright (C) 2011 NetCitadel, LLC
Author: Vadim Kurland vadim@fwbuilder.org
This program is free software which we release under the GNU General Public
License. You may redistribute and/or modify this program under the terms
of that license as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
To get a copy of the GNU General Public License, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __OBJECTDESCRIPTOR_H_
#define __OBJECTDESCRIPTOR_H_
#include "fwbuilder/InterfaceData.h"
#include "fwbuilder/dns.h"
#include "fwbuilder/snmp.h"
#include <string>
#include <map>
class ObjectDescriptor
{
public:
bool have_snmpd ;
std::string descr, contact, location, sysname ;
std::string type;
bool isSelected;
std::map<int, libfwbuilder::InterfaceData> interfaces ;
std::string MAC_addr ;
libfwbuilder::HostEnt dns_info ;
libfwbuilder::InetAddr addr ;
libfwbuilder::InetAddr netmask ;
ObjectDescriptor();
ObjectDescriptor(const ObjectDescriptor& od);
std::string toString()
{
std::ostringstream ost;
ost << sysname;
//if(interfaces.size()>1)
// ost <<" [" <<interfaces.size() <<"]";
ost <<" (" << addr.toString() <<")";
return ost.str();
}
#ifdef HAVE_LIBSNMP
ObjectDescriptor(const libfwbuilder::CrawlerFind& cf);
#endif
virtual ~ObjectDescriptor();
ObjectDescriptor& operator=(const ObjectDescriptor& od);
};
#endif

View File

@ -0,0 +1,197 @@
/*
Firewall Builder
Copyright (C) 2011 NetCitadel, LLC
Author: Vadim Kurland vadim@fwbuilder.org
This program is free software which we release under the GNU General Public
License. You may redistribute and/or modify this program under the terms
of that license as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
To get a copy of the GNU General Public License, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../../config.h"
#include "global.h"
#include "ChooseObjectsPage.h"
#include "HostsFile.h"
#include "ObjectDescriptor.h"
#include <QProgressDialog>
#include <QMessageBox>
#include <QListWidgetItem>
#include <QtDebug>
using namespace std;
using namespace libfwbuilder;
ChooseObjectsPage::ChooseObjectsPage(QWidget *parent) : QWizardPage(parent)
{
m_dialog = new Ui::ChooseObjectsPage_q;
m_dialog->setupUi(this);
flt_obj = new Filter();
flt_obj_d = new FilterDialog(this);
flt_obj_d->setFilter(flt_obj);
registerField("objectsToUse*", this, "objectsToUse");
// setField("objects_to_use", objects_to_use);
}
void ChooseObjectsPage::initializePage()
{
if (fwbdebug)
qDebug() << "ChooseObjectsPage::initializePage()"
<< "file name" << field("fileName").toString();
try
{
HostsFile importer(field("fileName").toString());
importer.parse();
reverse_hosts = importer.getAll();
fillListOfObjects();
} catch (FWException &ex)
{
QMessageBox::critical( NULL , "Firewall Builder",
ex.toString().c_str(),
QString::null,QString::null);
}
}
bool ChooseObjectsPage::validatePage()
{
if (fwbdebug) qDebug() << "ChooseObjectsPage::validatePage()";
return true;
}
void ChooseObjectsPage::updateObjectsToUse()
{
QListWidgetItem* item = m_dialog->objectList->item(0);
while (item != NULL)
{
QString name = item->text().split(" ")[0];
QString addr = item->data(Qt::UserRole).toString();
objects_to_use << name << addr;
item = m_dialog->objectList->item(m_dialog->objectList->row(item)+1);
}
//setField("objects_to_use", objects_to_use);
}
bool ChooseObjectsPage::isComplete() const
{
if (fwbdebug) qDebug() << "ChooseObjectsPage::isComplete()";
return (objects_to_use.count() > 0);
}
void ChooseObjectsPage::fillListOfObjects()
{
m_dialog->objectResultList->clear();
map<InetAddr, QStringList>::iterator i;
for (i=reverse_hosts.begin(); i!=reverse_hosts.end(); ++i)
{
ObjectDescriptor od;
od.addr = i->first;
od.sysname = i->second.front().toUtf8().constData();
QString addr = i->first.toString().c_str();
QString name = i->second.front();
if ( flt_obj->test(od) )
{
QString item_text("%1 %2");
QListWidgetItem *itm = new QListWidgetItem(item_text.arg(name).arg(addr));
itm->setData(Qt::UserRole, QVariant(addr));
m_dialog->objectResultList->addItem(itm);
}
}
updateObjectsToUse();
emit completeChanged();
}
void ChooseObjectsPage::addFilter()
{
flt_obj_d->exec();
fillListOfObjects();
}
void ChooseObjectsPage::removeFilter()
{
flt_obj->clear();
fillListOfObjects();
}
void ChooseObjectsPage::selectAllResults()
{
m_dialog->objectResultList->selectAll();
}
void ChooseObjectsPage::unselectAllResults()
{
m_dialog->objectResultList->clearSelection();
}
void ChooseObjectsPage::selectAllUsed()
{
m_dialog->objectList->selectAll();
}
void ChooseObjectsPage::unselectAllUsed()
{
m_dialog->objectList->clearSelection();
}
void ChooseObjectsPage::addObject()
{
QListWidgetItem* item = (QListWidgetItem*)m_dialog->objectResultList->item(0);
int i = 0;
while (item)
{
if (item->isSelected())
{
QString addr = item->data(Qt::UserRole).toString();
QListWidgetItem *item2 = new QListWidgetItem(item->text());
item2->setData(Qt::UserRole, QVariant(addr));
m_dialog->objectList->addItem(item2);
}
i++;
item = (QListWidgetItem*)m_dialog->objectResultList->item(i);
}
updateObjectsToUse();
emit completeChanged();
}
void ChooseObjectsPage::removeObject()
{
QListWidgetItem* item1 = m_dialog->objectList->item(0);
QListWidgetItem* item2;
while (item1!=0)
{
item2 = m_dialog->objectList->item(m_dialog->objectList->row(item1)+1);
if (item1->isSelected())
{
delete item1;
}
item1 = item2;
}
updateObjectsToUse();
emit completeChanged();
}

View File

@ -0,0 +1,82 @@
/*
Firewall Builder
Copyright (C) 2011 NetCitadel, LLC
Author: Vadim Kurland vadim@fwbuilder.org
This program is free software which we release under the GNU General Public
License. You may redistribute and/or modify this program under the terms
of that license as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
To get a copy of the GNU General Public License, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __CHOOSEOBJECTSPAGE_H_
#define __CHOOSEOBJECTSPAGE_H_
#include "../../config.h"
#include "ui_chooseobjectspage_q.h"
#include "fwbuilder/InetAddr.h"
#include "FilterDialog.h"
#include <QStringList>
class ChooseObjectsPage : public QWizardPage
{
Q_OBJECT;
Ui::ChooseObjectsPage_q *m_dialog;
Filter * flt_obj;
FilterDialog * flt_obj_d;
std::map<libfwbuilder::InetAddr, QStringList> reverse_hosts;
QStringList objects_to_use;
// configure this as a proprty so it can be accessed as a field after
// registering with registerField(). Now it can be accessed from
// other pages of the wizard
Q_PROPERTY(QStringList objectsToUse READ getObjectsToUse WRITE setObjectsToUse);
public:
ChooseObjectsPage(QWidget *parent);
virtual ~ChooseObjectsPage() {}
virtual void initializePage();
virtual bool validatePage();
virtual bool isComplete() const;
void fillListOfObjects();
void updateObjectsToUse();
QStringList getObjectsToUse() { return objects_to_use; }
void setObjectsToUse(const QStringList &lst) { objects_to_use = lst; }
public slots:
void addFilter();
void removeFilter();
void selectAllResults();
void unselectAllResults();
void selectAllUsed();
void unselectAllUsed();
void addObject();
void removeObject();
};
#endif

View File

@ -0,0 +1,120 @@
/*
Firewall Builder
Copyright (C) 2011 NetCitadel, LLC
Author: Vadim Kurland vadim@fwbuilder.org
This program is free software which we release under the GNU General Public
License. You may redistribute and/or modify this program under the terms
of that license as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
To get a copy of the GNU General Public License, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../../config.h"
#include "global.h"
#include "events.h"
#include "CreateObjectsPage.h"
#include "FWWindow.h"
#include "ProjectPanel.h"
#include "fwbuilder/IPv4.h"
#include "fwbuilder/IPv6.h"
#include <QStringList>
#include <QtDebug>
using namespace std;
using namespace libfwbuilder;
CreateObjectsPage::CreateObjectsPage(QWidget *parent) : QWizardPage(parent)
{
m_dialog = new Ui::CreateObjectsPage_q;
m_dialog->setupUi(this);
}
void CreateObjectsPage::initializePage()
{
if (fwbdebug) qDebug() << "CreateObjectsPage::initializePage()";
int lib_index = field("libIndex").toInt();
QStringList libraries = field("libraries").toStringList();
QStringList objects = field("objectsToUse").toStringList();
if (fwbdebug)
{
qDebug() << "libraries=" << libraries;
qDebug() << "objects=" << objects;
}
m_dialog->progressBar->setFormat("%v / %m");
m_dialog->progressBar->setMaximum(objects.size() / 2);
FWObject *last_object = NULL;
QString name;
QString addr;
int counter = 1;
while (objects.size() > 0)
{
name = objects.front(); objects.pop_front();
addr = objects.front(); objects.pop_front();
QString type;
try
{
InetAddr(AF_INET6, addr.toLatin1().constData() );
type = IPv6::TYPENAME;
} catch (FWException &ex)
{
}
if (type.isEmpty())
{
try
{
InetAddr(AF_INET, addr.toLatin1().constData() );
type = IPv4::TYPENAME;
} catch (FWException &ex)
{
}
}
if (! type.isEmpty())
{
Address *obj = Address::cast(mw->createObject(type, name));
assert(obj!=NULL);
obj->setName(name.toUtf8().constData());
obj->setAddress(InetAddr(addr.toStdString()));
obj->setNetmask(InetAddr(InetAddr::getAllOnes()));
mw->moveObject(libraries[lib_index], obj);
last_object = obj;
}
m_dialog->progressBar->setValue(counter);
qApp->processEvents();
counter++;
}
ProjectPanel *pp = mw->activeProject();
QString filename = pp->getFileName();
QCoreApplication::postEvent(mw, new reloadObjectTreeEvent(filename));
QCoreApplication::postEvent(
mw->activeProject(), new openLibraryForObjectEvent(
filename, last_object->getId()));
}

View File

@ -0,0 +1,49 @@
/*
Firewall Builder
Copyright (C) 2011 NetCitadel, LLC
Author: Vadim Kurland vadim@fwbuilder.org
This program is free software which we release under the GNU General Public
License. You may redistribute and/or modify this program under the terms
of that license as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
To get a copy of the GNU General Public License, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __CREATEOBJECTSPAGE_H_
#define __CREATEOBJECTSPAGE_H_
#include "../../config.h"
#include "ui_createobjectspage_q.h"
class CreateObjectsPage : public QWizardPage
{
Q_OBJECT;
Ui::CreateObjectsPage_q *m_dialog;
public:
CreateObjectsPage(QWidget *parent);
virtual ~CreateObjectsPage() {}
virtual void initializePage();
public slots:
};
#endif

View File

@ -0,0 +1,92 @@
/*
Firewall Builder
Copyright (C) 2011 NetCitadel, LLC
Author: Vadim Kurland vadim@fwbuilder.org
This program is free software which we release under the GNU General Public
License. You may redistribute and/or modify this program under the terms
of that license as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
To get a copy of the GNU General Public License, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../../config.h"
#include "global.h"
#include "FileNamePage.h"
#include "FWBSettings.h"
#include <QFileInfo>
#include <QFileDialog>
#include <QMessageBox>
#include <QtDebug>
using namespace std;
//using namespace libfwbuilder;
FileNamePage::FileNamePage(QWidget *parent) : QWizardPage(parent)
{
m_dialog = new Ui::FileNamePage_q;
m_dialog->setupUi(this);
registerField("fileName*", m_dialog->fileName);
}
void FileNamePage::selectAddressListFile()
{
QString dir;
dir = st->getWDir();
if (dir.isEmpty()) dir = st->getOpenFileDir();
if (dir.isEmpty()) dir = "~";
QString s = QFileDialog::getOpenFileName(
this,
"Choose a file",
dir,
"All files (*)");
if (!s.isEmpty())
{
m_dialog->fileName->setText(s);
}
}
bool FileNamePage::validatePage()
{
if (fwbdebug) qDebug() << "FileNamePage::validatePage()";
QString file_name = m_dialog->fileName->text();
QFileInfo f(file_name);
if ( ! f.exists())
{
QMessageBox::critical( NULL , "Firewall Builder",
tr("File %1 does not exist").arg(file_name),
QString::null,QString::null);
return false;
}
if ( ! f.isReadable())
{
QMessageBox::critical( NULL , "Firewall Builder",
tr("Can not read file %1").arg(file_name),
QString::null,QString::null);
return false;
}
return true;
}

View File

@ -0,0 +1,50 @@
/*
Firewall Builder
Copyright (C) 2011 NetCitadel, LLC
Author: Vadim Kurland vadim@fwbuilder.org
This program is free software which we release under the GNU General Public
License. You may redistribute and/or modify this program under the terms
of that license as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
To get a copy of the GNU General Public License, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __FILENAMEPAGE_H_
#define __FILENAMEPAGE_H_
#include "../../config.h"
#include "ui_filenamepage_q.h"
class FileNamePage : public QWizardPage
{
Q_OBJECT;
Ui::FileNamePage_q *m_dialog;
public:
FileNamePage(QWidget *parent);
virtual ~FileNamePage() {}
virtual bool validatePage();
public slots:
void selectAddressListFile();
};
#endif

View File

@ -0,0 +1,86 @@
/*
Firewall Builder
Copyright (C) 2001 NetCitadel, LLC
Author: Vadim Zaliva lord@crocodile.org
This program is free software which we release under the GNU General Public
License. You may redistribute and/or modify this program under the terms
of that license as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
To get a copy of the GNU General Public License, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../../config.h"
#include "global.h"
#include "HostsFile.h"
#include <QFile>
#include <QRegExp>
#include <QtDebug>
using namespace std;
using namespace libfwbuilder;
void HostsFile::parse() throw(FWException)
{
QFile file(file_name);
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
throw FWException("Can't open file '" + file_name.toStdString() + "'");
data.clear();
QRegExp comment("^\\s*#");
QRegExp hosts_line("(\\S+)\\s+(.*)$");
while ( ! file.atEnd())
{
QString line = QString::fromUtf8(file.readLine().trimmed());
if (fwbdebug) qDebug() << "Line: " << line;
if (comment.indexIn(line) > -1) continue;
if (hosts_line.indexIn(line) > -1)
{
QString addr_s = hosts_line.cap(1);
QStringList names = hosts_line.cap(2).split(",");
if (fwbdebug)
qDebug() << "cap(1)=" << hosts_line.cap(1)
<< "cap(2)=" << hosts_line.cap(2)
<< "cap(3)=" << hosts_line.cap(3);
try
{
InetAddr addr(AF_INET6, addr_s.toStdString());
foreach(QString name, names) data[addr] << name.trimmed();
} catch (FWException &ex)
{
try
{
InetAddr addr(addr_s.toStdString());
foreach(QString name, names) data[addr] << name.trimmed();
} catch (FWException &ex)
{
string err = ex.toString() +
"\nIn line: " + line.toStdString();
throw FWException(err);
}
}
}
}
}

View File

@ -2,12 +2,9 @@
Firewall Builder
Copyright (C) 2001 NetCitadel, LLC
Author: Vadim Zaliva lord@crocodile.org
$Id$
Copyright (C) 2011 NetCitadel, LLC
Author: Vadim Kurland vadim@fwbuilder.org
This program is free software which we release under the GNU General Public
License. You may redistribute and/or modify this program under the terms
@ -30,13 +27,8 @@
#include <fwbuilder/FWException.h>
#include <fwbuilder/InetAddr.h>
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <QStringList>
namespace libfwbuilder
{
/**
* This class is parser for file in hosts(5) format
@ -44,20 +36,22 @@ namespace libfwbuilder
*/
class HostsFile
{
public:
QString file_name;
public:
void parse(const std::string &filename) throw(FWException);
void parse(std::istream &from) throw(FWException);
HostsFile(const QString &file_name) { this->file_name = file_name; }
void parse() throw(libfwbuilder::FWException);
// Returns all hosts found
std::map<InetAddr, std::vector<std::string> > getAll() { return data; }
std::map<libfwbuilder::InetAddr, QStringList> getAll() { return data; }
private:
std::map<InetAddr, std::vector<std::string> > data;
std::map<libfwbuilder::InetAddr, QStringList> data;
};
}
#endif // _HOSTS_FILE_HH_

View File

@ -0,0 +1,57 @@
/*
Firewall Builder
Copyright (C) 2011 NetCitadel, LLC
Author: Vadim Kurland vadim@fwbuilder.org
This program is free software which we release under the GNU General Public
License. You may redistribute and/or modify this program under the terms
of that license as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
To get a copy of the GNU General Public License, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../../config.h"
#include "global.h"
#include "ImportAddressListWizard.h"
#include "FileNamePage.h"
#include "ChooseObjectsPage.h"
#include "SelectLibraryPage.h"
#include "CreateObjectsPage.h"
#include <QtDebug>
using namespace std;
//using namespace libfwbuilder;
ImportAddressListWizard::ImportAddressListWizard(QWidget *parent) : QWizard(parent)
{
QPixmap pm;
pm.load(":/Images/fwbuilder3-72x72.png");
setPixmap(QWizard::LogoPixmap, pm);
setWindowTitle(tr("Import address objects from a text file in /etc/hosts format"));
addPage(new FileNamePage(this));
addPage(new ChooseObjectsPage(this));
addPage(new SelectLibraryPage(this));
addPage(new CreateObjectsPage(this));
// adjustSize();
resize(700, 400);
// setDefaultProperty("QListWidget", "itemChanged", SIGNAL(itemChanged(QListWidgetItem*)));
}

View File

@ -0,0 +1,45 @@
/*
Firewall Builder
Copyright (C) 2011 NetCitadel, LLC
Author: Vadim Kurland vadim@fwbuilder.org
This program is free software which we release under the GNU General Public
License. You may redistribute and/or modify this program under the terms
of that license as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
To get a copy of the GNU General Public License, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __IMPORTADDRESSLISTWIZARD_H_
#define __IMPORTADDRESSLISTWIZARD_H_
#include "../../config.h"
#include <QWizard>
class ImportAddressListWizard : public QWizard
{
Q_OBJECT;
public:
ImportAddressListWizard(QWidget *parent);
virtual ~ImportAddressListWizard() {}
public slots:
};
#endif

View File

@ -0,0 +1,59 @@
/*
Firewall Builder
Copyright (C) 2011 NetCitadel, LLC
Author: Vadim Kurland vadim@fwbuilder.org
This program is free software which we release under the GNU General Public
License. You may redistribute and/or modify this program under the terms
of that license as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
To get a copy of the GNU General Public License, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../../config.h"
#include "global.h"
#include "SelectLibraryPage.h"
#include "platforms.h"
#include "FWWindow.h"
#include <QtDebug>
using namespace std;
//using namespace libfwbuilder;
SelectLibraryPage::SelectLibraryPage(QWidget *parent) : QWizardPage(parent)
{
m_dialog = new Ui::SelectLibraryPage_q;
m_dialog->setupUi(this);
registerField("libIndex*", m_dialog->libs);
registerField("libraries", this, "libraries");
setCommitPage(true);
}
void SelectLibraryPage::initializePage()
{
if (fwbdebug)
qDebug() << "SelectLibraryPage::initializePage()";
fillLibraries(m_dialog->libs, mw->activeProject()->db());
for (int i=0; i < m_dialog->libs->count(); ++i)
libraries << m_dialog->libs->itemText(i);
}

View File

@ -0,0 +1,54 @@
/*
Firewall Builder
Copyright (C) 2011 NetCitadel, LLC
Author: Vadim Kurland vadim@fwbuilder.org
This program is free software which we release under the GNU General Public
License. You may redistribute and/or modify this program under the terms
of that license as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
To get a copy of the GNU General Public License, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __SELECTLIBRARYPAGE_H_
#define __SELECTLIBRARYPAGE_H_
#include "../../config.h"
#include "ui_selectlibrarypage_q.h"
class SelectLibraryPage : public QWizardPage
{
Q_OBJECT;
Ui::SelectLibraryPage_q *m_dialog;
QStringList libraries;
Q_PROPERTY(QStringList libraries READ getLibraries WRITE setLibraries);
public:
SelectLibraryPage(QWidget *parent);
virtual ~SelectLibraryPage() {}
virtual void initializePage();
QStringList getLibraries() { return libraries; }
void setLibraries(const QStringList &l) { libraries = l; }
public slots:
};
#endif

View File

@ -0,0 +1,319 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ChooseObjectsPage_q</class>
<widget class="QWizardPage" name="ChooseObjectsPage_q">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>696</width>
<height>475</height>
</rect>
</property>
<property name="windowTitle">
<string>WizardPage</string>
</property>
<property name="title">
<string>Choose objects you wish to use</string>
</property>
<property name="subTitle">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="textLabel18">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout" name="_5">
<property name="margin">
<number>6</number>
</property>
<item>
<layout class="QVBoxLayout" name="_6">
<property name="margin">
<number>6</number>
</property>
<item>
<widget class="QListWidget" name="objectResultList">
<property name="selectionMode">
<enum>QAbstractItemView::MultiSelection</enum>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="_7">
<property name="margin">
<number>6</number>
</property>
<item row="0" column="1">
<widget class="QPushButton" name="remObjFilterButton">
<property name="text">
<string>Remove Filter</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="selAllResButton">
<property name="text">
<string>Select All</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QPushButton" name="objFilterButton">
<property name="text">
<string>Filter ...</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="unselAllResButton">
<property name="text">
<string>Unselect All</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="_8">
<property name="margin">
<number>6</number>
</property>
<item>
<widget class="QPushButton" name="addObjButton">
<property name="text">
<string>-&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="remObjButton">
<property name="text">
<string>&lt;-</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>240</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="_9">
<property name="margin">
<number>6</number>
</property>
<item>
<widget class="QListWidget" name="objectList">
<property name="selectionMode">
<enum>QAbstractItemView::MultiSelection</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="_10">
<property name="margin">
<number>6</number>
</property>
<item>
<widget class="QPushButton" name="selAllObjButton">
<property name="text">
<string>Select All</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="unselAllObjButton">
<property name="text">
<string>Unselect All</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<tabstops>
<tabstop>objectResultList</tabstop>
<tabstop>objFilterButton</tabstop>
<tabstop>remObjFilterButton</tabstop>
<tabstop>selAllResButton</tabstop>
<tabstop>unselAllResButton</tabstop>
<tabstop>addObjButton</tabstop>
<tabstop>remObjButton</tabstop>
<tabstop>objectList</tabstop>
<tabstop>selAllObjButton</tabstop>
<tabstop>unselAllObjButton</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
<sender>addObjButton</sender>
<signal>clicked()</signal>
<receiver>ChooseObjectsPage_q</receiver>
<slot>addObject()</slot>
<hints>
<hint type="sourcelabel">
<x>348</x>
<y>54</y>
</hint>
<hint type="destinationlabel">
<x>347</x>
<y>237</y>
</hint>
</hints>
</connection>
<connection>
<sender>objFilterButton</sender>
<signal>clicked()</signal>
<receiver>ChooseObjectsPage_q</receiver>
<slot>addFilter()</slot>
<hints>
<hint type="sourcelabel">
<x>89</x>
<y>399</y>
</hint>
<hint type="destinationlabel">
<x>347</x>
<y>237</y>
</hint>
</hints>
</connection>
<connection>
<sender>remObjButton</sender>
<signal>clicked()</signal>
<receiver>ChooseObjectsPage_q</receiver>
<slot>removeObject()</slot>
<hints>
<hint type="sourcelabel">
<x>348</x>
<y>89</y>
</hint>
<hint type="destinationlabel">
<x>347</x>
<y>237</y>
</hint>
</hints>
</connection>
<connection>
<sender>remObjFilterButton</sender>
<signal>clicked()</signal>
<receiver>ChooseObjectsPage_q</receiver>
<slot>removeFilter()</slot>
<hints>
<hint type="sourcelabel">
<x>224</x>
<y>399</y>
</hint>
<hint type="destinationlabel">
<x>347</x>
<y>237</y>
</hint>
</hints>
</connection>
<connection>
<sender>selAllObjButton</sender>
<signal>clicked()</signal>
<receiver>ChooseObjectsPage_q</receiver>
<slot>selectAllUsed()</slot>
<hints>
<hint type="sourcelabel">
<x>472</x>
<y>434</y>
</hint>
<hint type="destinationlabel">
<x>347</x>
<y>237</y>
</hint>
</hints>
</connection>
<connection>
<sender>selAllResButton</sender>
<signal>clicked()</signal>
<receiver>ChooseObjectsPage_q</receiver>
<slot>selectAllResults()</slot>
<hints>
<hint type="sourcelabel">
<x>89</x>
<y>434</y>
</hint>
<hint type="destinationlabel">
<x>347</x>
<y>237</y>
</hint>
</hints>
</connection>
<connection>
<sender>unselAllObjButton</sender>
<signal>clicked()</signal>
<receiver>ChooseObjectsPage_q</receiver>
<slot>unselectAllUsed()</slot>
<hints>
<hint type="sourcelabel">
<x>606</x>
<y>434</y>
</hint>
<hint type="destinationlabel">
<x>347</x>
<y>237</y>
</hint>
</hints>
</connection>
<connection>
<sender>unselAllResButton</sender>
<signal>clicked()</signal>
<receiver>ChooseObjectsPage_q</receiver>
<slot>unselectAllResults()</slot>
<hints>
<hint type="sourcelabel">
<x>224</x>
<y>434</y>
</hint>
<hint type="destinationlabel">
<x>347</x>
<y>237</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>addFilter()</slot>
<slot>removeFilter()</slot>
<slot>selectAllResults()</slot>
<slot>unselectAllResults()</slot>
<slot>selectAllUsed()</slot>
<slot>unselectAllUsed()</slot>
<slot>addObject()</slot>
<slot>removeObject()</slot>
</slots>
</ui>

View File

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CreateObjectsPage_q</class>
<widget class="QWizardPage" name="CreateObjectsPage_q">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>WizardPage</string>
</property>
<property name="title">
<string>Adding new objects to library</string>
</property>
<property name="subTitle">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="textLabel1_4">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QProgressBar" name="progressBar">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="2" column="0">
<spacer name="spacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>228</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>FileNamePage_q</class>
<widget class="QWizardPage" name="FileNamePage_q">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>465</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>WizardPage</string>
</property>
<property name="title">
<string>Enter full path and file name below or click &quot;Browse&quot; to find it</string>
</property>
<property name="subTitle">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="textLabel1_2">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox1">
<property name="title">
<string>File in hosts format</string>
</property>
<layout class="QVBoxLayout">
<property name="margin">
<number>6</number>
</property>
<item>
<layout class="QHBoxLayout" name="_2">
<item>
<widget class="QLineEdit" name="fileName"/>
</item>
<item>
<widget class="QPushButton" name="browseButton">
<property name="text">
<string>Browse ...</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<spacer name="spacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>444</width>
<height>181</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>browseButton</sender>
<signal>clicked()</signal>
<receiver>FileNamePage_q</receiver>
<slot>selectAddressListFile()</slot>
<hints>
<hint type="sourcelabel">
<x>409</x>
<y>73</y>
</hint>
<hint type="destinationlabel">
<x>199</x>
<y>149</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>selectAddressListFile()</slot>
</slots>
</ui>

View File

@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SelectLibraryPage_q</class>
<widget class="QWizardPage" name="SelectLibraryPage_q">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>469</width>
<height>393</height>
</rect>
</property>
<property name="windowTitle">
<string>WizardPage</string>
</property>
<property name="title">
<string>Select library where objects should be created</string>
</property>
<property name="subTitle">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="3">
<widget class="QLabel" name="label_2">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Object Library:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="libs">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>198</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0">
<spacer name="spacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>308</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -146,7 +146,6 @@ HEADERS += ../../config.h \
TagServiceDialog.h \
ActionsDialog.h \
SimpleTextView.h \
DiscoveryDruid.h \
BlankDialog.h \
DNSNameDialog.h \
instOptionsDialog.h \
@ -193,7 +192,16 @@ HEADERS += ../../config.h \
FWBApplication.h \
WorkflowIcons.h \
FirewallCodeViewer.h \
networkZoneManager.h
networkZoneManager.h \
\
ObjectDescriptor.h \
\
importAddressListWizard/ChooseObjectsPage.h \
importAddressListWizard/CreateObjectsPage.h \
importAddressListWizard/FileNamePage.h \
importAddressListWizard/SelectLibraryPage.h \
importAddressListWizard/ImportAddressListWizard.h \
importAddressListWizard/HostsFile.h \
SOURCES += ProjectPanel.cpp \
ProjectPanel_events.cpp \
@ -333,7 +341,6 @@ SOURCES += ProjectPanel.cpp \
TagServiceDialog.cpp \
ActionsDialog.cpp \
SimpleTextView.cpp \
DiscoveryDruid.cpp \
BlankDialog.cpp \
DNSNameDialog.cpp \
ObjectTreeViewItem.cpp \
@ -381,7 +388,16 @@ SOURCES += ProjectPanel.cpp \
FWBApplication.cpp \
WorkflowIcons.cpp \
FirewallCodeViewer.cpp \
networkZoneManager.cpp
networkZoneManager.cpp \
\
ObjectDescriptor.cpp \
\
importAddressListWizard/ChooseObjectsPage.cpp \
importAddressListWizard/CreateObjectsPage.cpp \
importAddressListWizard/FileNamePage.cpp \
importAddressListWizard/SelectLibraryPage.cpp \
importAddressListWizard/ImportAddressListWizard.cpp \
importAddressListWizard/HostsFile.cpp \
FORMS = FWBMainWindow_q.ui \
compileroutputpanel_q.ui \
@ -460,7 +476,6 @@ FORMS = FWBMainWindow_q.ui \
actionsdialog_q.ui \
simpletextview_q.ui \
helpview_q.ui \
discoverydruid_q.ui \
filterdialog_q.ui \
natruleoptionsdialog_q.ui \
instoptionsdialog_q.ui \
@ -488,7 +503,13 @@ FORMS = FWBMainWindow_q.ui \
ClusterInterfaceWidget.ui \
TutorialDialog.ui \
WorkflowIcons.ui \
FirewallCodeViewer.ui
FirewallCodeViewer.ui \
\
importAddressListWizard/chooseobjectspage_q.ui \
importAddressListWizard/createobjectspage_q.ui \
importAddressListWizard/filenamepage_q.ui \
importAddressListWizard/selectlibrarypage_q.ui \
# fwtransfer stuff.
HEADERS += transferDialog.h