From: <f-r...@us...> - 2011-02-09 01:10:00
|
Revision: 234 http://netemul.svn.sourceforge.net/netemul/?rev=234&view=rev Author: f-r-o-s-t Date: 2011-02-09 01:09:50 +0000 (Wed, 09 Feb 2011) Log Message: ----------- Apply names notation. Modified Paths: -------------- trunk/src/chips/abstractchip.cpp trunk/src/chips/interface.cpp trunk/src/commands/addcablecommand.cpp trunk/src/commands/addcablecommand.h trunk/src/commands/addcommand.cpp trunk/src/commands/addcommand.h trunk/src/commands/addtextcommand.cpp trunk/src/commands/addtextcommand.h trunk/src/commands/deletecommand.cpp trunk/src/commands/deletecommand.h trunk/src/commands/movecommand.cpp trunk/src/commands/movecommand.h trunk/src/controls/scenecontrol.cpp trunk/src/controls/scenecontrol.h trunk/src/delegats/ipaddressdelegate.cpp trunk/src/delegats/ipaddressdelegate.h trunk/src/delegats/macaddressdelegate.cpp trunk/src/delegats/macaddressdelegate.h trunk/src/devices/boxdevice.h trunk/src/devices/computer.cpp trunk/src/devices/computer.h trunk/src/devices/deviceimpl.cpp trunk/src/devices/deviceimpl.h trunk/src/devices/hubdevice.cpp trunk/src/devices/hubdevice.h trunk/src/devices/routerdevice.cpp trunk/src/devices/routerdevice.h trunk/src/devices/sharebus.cpp trunk/src/devices/sharebus.h trunk/src/devices/smartdevice.cpp trunk/src/devices/smartdevice.h trunk/src/devices/switchdevice.cpp trunk/src/devices/switchdevice.h trunk/src/dialogs/adapterproperty.cpp trunk/src/dialogs/adapterproperty.h trunk/src/dialogs/computerproperty.cpp trunk/src/dialogs/computerproperty.h trunk/src/dialogs/devicenotedialog.cpp trunk/src/dialogs/devicenotedialog.h trunk/src/dialogs/dhcpserverproperty.cpp trunk/src/dialogs/dhcpserverproperty.h trunk/src/dialogs/hubproperty.cpp trunk/src/dialogs/hubproperty.h trunk/src/dialogs/routerproperty.cpp trunk/src/dialogs/routerproperty.h trunk/src/dialogs/settingdialog.cpp trunk/src/dialogs/staticsdialog.cpp trunk/src/dialogs/staticsdialog.h trunk/src/dialogs/switchproperty.cpp trunk/src/dialogs/switchproperty.h trunk/src/dialogs/tableswitch.cpp trunk/src/dialogs/tableswitch.h trunk/src/dialogs/testdialog.cpp trunk/src/dialogs/virtualnetworkdialog.cpp trunk/src/dialogs/virtualnetworkdialog.h trunk/src/graphics/cabledev.cpp trunk/src/graphics/cabledev.h trunk/src/graphics/device.cpp trunk/src/graphics/device.h trunk/src/graphics/sendellipse.cpp trunk/src/interfaces/visualizable.h trunk/src/mainwindow.cpp trunk/src/mainwindow.h trunk/src/models/arpmodel.cpp trunk/src/models/dhcpservermodel.cpp trunk/src/models/dhcpservermodel.h trunk/src/models/switchmodel.cpp trunk/src/mycanvas.cpp trunk/src/mycanvas.h trunk/src/other/appsetting.cpp trunk/src/other/appsetting.h trunk/src/programms/dhcpdemon.cpp trunk/src/programms/dhcpdemon.h trunk/src/programms/dhcpserverprogramm.cpp trunk/src/programms/programms.pri trunk/src/states/abstractstate.cpp trunk/src/states/cablestate.cpp trunk/src/states/cablestate.h trunk/src/states/emptystate.h trunk/src/states/insertstate.cpp trunk/src/states/insertstate.h trunk/src/states/movestate.cpp trunk/src/states/movestate.h trunk/src/states/sendstate.cpp trunk/src/states/sendstate.h trunk/src/states/textstate.cpp trunk/src/states/textstate.h trunk/src/tools/scenexmlwriter.cpp trunk/src/tools/scenexmlwriter.h trunk/src/tools/statistics.h trunk/src/tools/statisticsscene.cpp trunk/src/tools/statisticsscene.h trunk/src/tools/tcpsocket.cpp Removed Paths: ------------- trunk/src/programms/programm.cpp trunk/src/programms/programm.h Modified: trunk/src/chips/abstractchip.cpp =================================================================== --- trunk/src/chips/abstractchip.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/chips/abstractchip.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -24,10 +24,8 @@ */ AbstractChip::AbstractChip(QObject *parent) : QObject(parent) { -#ifndef __TESTING__ myMac.setRandom(); resetStatics(); -#endif } //-------------------------------------------------------------- /*! Modified: trunk/src/chips/interface.cpp =================================================================== --- trunk/src/chips/interface.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/chips/interface.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -167,7 +167,7 @@ if ( --i->time ) continue; if ( i->count <= COUNT_AGAINST_SEND ) { i->count++; - i->time = qrand()%(appSetting::arpResponceTime()*i->count)+appSetting::arpResponceTime(); + i->time = qrand()%(AppSetting::arpResponceTime()*i->count)+AppSetting::arpResponceTime(); sendArpRequest( i->dest ); } else { myWaits.removeOne(i); @@ -226,7 +226,7 @@ waitPacket *t = new waitPacket; t->dest = a; t->packets << p; - t->time = appSetting::arpResponceTime(); + t->time = AppSetting::arpResponceTime(); t->count = 0; return t; } Modified: trunk/src/commands/addcablecommand.cpp =================================================================== --- trunk/src/commands/addcablecommand.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/commands/addcablecommand.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -21,26 +21,26 @@ #include "mycanvas.h" #include "cabledev.h" -addCableCommand::addCableCommand(MyCanvas *s, Cable *c) +AddCableCommand::AddCableCommand(MyCanvas *s, Cable *c) { scene = s; cable = c; setText(QObject::tr("Add cable")); } -addCableCommand::~addCableCommand() +AddCableCommand::~AddCableCommand() { if ( !isOnScene) delete cable; } -void addCableCommand::undo() +void AddCableCommand::undo() { // cable->unregisterCable(); scene->unregisterCable(cable); isOnScene = false; } -void addCableCommand::redo() +void AddCableCommand::redo() { // cable->registerCable(); scene->registerCable(cable); Modified: trunk/src/commands/addcablecommand.h =================================================================== --- trunk/src/commands/addcablecommand.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/commands/addcablecommand.h 2011-02-09 01:09:50 UTC (rev 234) @@ -25,11 +25,11 @@ class MyCanvas; class Cable; -class addCableCommand : public QUndoCommand +class AddCableCommand : public QUndoCommand { public: - addCableCommand(MyCanvas *s, Cable *c); - ~addCableCommand(); + AddCableCommand(MyCanvas *s, Cable *c); + ~AddCableCommand(); void redo(); void undo(); private: Modified: trunk/src/commands/addcommand.cpp =================================================================== --- trunk/src/commands/addcommand.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/commands/addcommand.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -21,7 +21,7 @@ #include "addcommand.h" #include "mycanvas.h" -addCommand::addCommand(MyCanvas *s, QPointF point , int type) +AddCommand::AddCommand(MyCanvas *s, QPointF point , int type) { scene = s; myDevice = 0; @@ -29,18 +29,18 @@ myType = type; } -addCommand::~addCommand() +AddCommand::~AddCommand() { if ( !isOnScene ) delete myDevice; } -void addCommand::undo() +void AddCommand::undo() { scene->unregisterDevice(myDevice); isOnScene = false; } -void addCommand::redo() +void AddCommand::redo() { if ( myDevice ) scene->registerDevice(myDevice); else { Modified: trunk/src/commands/addcommand.h =================================================================== --- trunk/src/commands/addcommand.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/commands/addcommand.h 2011-02-09 01:09:50 UTC (rev 234) @@ -25,11 +25,11 @@ class MyCanvas; class Device; -class addCommand : public QUndoCommand +class AddCommand : public QUndoCommand { public: - addCommand(MyCanvas *s , QPointF point , int type); - ~addCommand(); + AddCommand(MyCanvas *s , QPointF point , int type); + ~AddCommand(); void undo(); void redo(); private: Modified: trunk/src/commands/addtextcommand.cpp =================================================================== --- trunk/src/commands/addtextcommand.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/commands/addtextcommand.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -20,7 +20,7 @@ #include "addtextcommand.h" #include "mycanvas.h" -addTextCommand::addTextCommand(MyCanvas *s, QPointF p) +AddTextCommand::AddTextCommand(MyCanvas *s, QPointF p) { scene = s; point = p; @@ -28,18 +28,18 @@ setText(QObject::tr("Add note")); } -addTextCommand::~addTextCommand() +AddTextCommand::~AddTextCommand() { if ( !isOnScene ) delete text; } -void addTextCommand::undo() +void AddTextCommand::undo() { scene->unregisterText(text); isOnScene = false; } -void addTextCommand::redo() +void AddTextCommand::redo() { if ( isFirst ) { text = scene->createTextItem(point); Modified: trunk/src/commands/addtextcommand.h =================================================================== --- trunk/src/commands/addtextcommand.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/commands/addtextcommand.h 2011-02-09 01:09:50 UTC (rev 234) @@ -26,11 +26,11 @@ class MyCanvas; class TextItem; -class addTextCommand : public QUndoCommand +class AddTextCommand : public QUndoCommand { public: - addTextCommand(MyCanvas *s, QPointF p); - ~addTextCommand(); + AddTextCommand(MyCanvas *s, QPointF p); + ~AddTextCommand(); void undo(); void redo(); private: Modified: trunk/src/commands/deletecommand.cpp =================================================================== --- trunk/src/commands/deletecommand.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/commands/deletecommand.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -23,7 +23,7 @@ #include "device.h" #include "textitem.h" -deleteCommand::deleteCommand(MyCanvas *s, QList<QGraphicsItem*> list) +DeleteCommand::DeleteCommand(MyCanvas *s, QList<QGraphicsItem*> list) { scene = s; foreach ( QGraphicsItem *i, list) { @@ -38,7 +38,7 @@ setText(QObject::tr("Delete")); } -deleteCommand::~deleteCommand() +DeleteCommand::~DeleteCommand() { if ( isOnScene ) return; qDeleteAll(extractDevices); @@ -46,7 +46,7 @@ qDeleteAll(extractText); } -void deleteCommand::undo() +void DeleteCommand::undo() { foreach ( Device *i, extractDevices ) scene->registerDevice(i); foreach ( Cable *i, extractCables ) createConnection(i); @@ -54,7 +54,7 @@ isOnScene = true; } -void deleteCommand::redo() +void DeleteCommand::redo() { foreach ( Device *i, extractDevices ) scene->unregisterDevice(i); foreach ( Cable *i, extractCables ) deleteConnection(i); @@ -62,13 +62,13 @@ isOnScene = false; } -void deleteCommand::deleteConnection(Cable *cable) +void DeleteCommand::deleteConnection(Cable *cable) { // cable->unregisterCable(); scene->unregisterCable(cable); } -void deleteCommand::createConnection(Cable *cable) +void DeleteCommand::createConnection(Cable *cable) { // cable->registerCable(); scene->registerCable(cable); Modified: trunk/src/commands/deletecommand.h =================================================================== --- trunk/src/commands/deletecommand.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/commands/deletecommand.h 2011-02-09 01:09:50 UTC (rev 234) @@ -29,11 +29,11 @@ class Device; class TextItem; -class deleteCommand : public QUndoCommand +class DeleteCommand : public QUndoCommand { public: - deleteCommand(MyCanvas *s, QList<QGraphicsItem*> list); - ~deleteCommand(); + DeleteCommand(MyCanvas *s, QList<QGraphicsItem*> list); + ~DeleteCommand(); void undo(); void redo(); void deleteConnection(Cable *cable); Modified: trunk/src/commands/movecommand.cpp =================================================================== --- trunk/src/commands/movecommand.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/commands/movecommand.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -19,7 +19,7 @@ ****************************************************************************************/ #include "movecommand.h" -moveCommand::moveCommand(MyCanvas *s,mapWithCoords o,mapWithCoords r) +MoveCommand::MoveCommand(MyCanvas *s,mapWithCoords o,mapWithCoords r) { scene = s; old = o; @@ -27,12 +27,12 @@ setText(QObject::tr("Move")); } -void moveCommand::undo() +void MoveCommand::undo() { scene->putItems(old); } -void moveCommand::redo() +void MoveCommand::redo() { scene->putItems(recent); } Modified: trunk/src/commands/movecommand.h =================================================================== --- trunk/src/commands/movecommand.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/commands/movecommand.h 2011-02-09 01:09:50 UTC (rev 234) @@ -25,10 +25,10 @@ typedef QMap<QGraphicsItem*,QPointF> mapWithCoords; -class moveCommand : public QUndoCommand +class MoveCommand : public QUndoCommand { public: - moveCommand(MyCanvas *s,mapWithCoords o, mapWithCoords r); + MoveCommand(MyCanvas *s,mapWithCoords o, mapWithCoords r); void undo(); void redo(); private: Modified: trunk/src/controls/scenecontrol.cpp =================================================================== --- trunk/src/controls/scenecontrol.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/controls/scenecontrol.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -21,12 +21,12 @@ #include "device.h" #include "mycanvas.h" -sceneControl::sceneControl(QObject *parent , MyCanvas *s ) : QObject(parent) , scene(s) +SceneControl::SceneControl(QObject *parent , MyCanvas *s ) : QObject(parent) , scene(s) { connect( scene , SIGNAL(selectionChanged()) , SLOT(observeSelection()) ); } -void sceneControl::observeSelection() +void SceneControl::observeSelection() { if ( Device *t = scene->oneSelectedDevice() ) { emit selectTableDevice( t->hasTable() ); @@ -44,77 +44,77 @@ } } -QString sceneControl::tableName() const +QString SceneControl::tableName() const { return scene->oneSelectedDevice()->tableName(); } -void sceneControl::propertyDialog() const +void SceneControl::propertyDialog() const { Device *t = scene->oneSelectedDevice(); t->dialog(); } -void sceneControl::tableDialog() const +void SceneControl::tableDialog() const { Device *t = scene->oneSelectedDevice(); t->tableDialog(); } -void sceneControl::adapterDialog() const +void SceneControl::adapterDialog() const { Device *t = scene->oneSelectedDevice(); t->adapterDialog(); } -void sceneControl::programmsDialog() const +void SceneControl::programmsDialog() const { Device *t = scene->oneSelectedDevice(); t->programmsDialog(); } -void sceneControl::arpDialog() const +void SceneControl::arpDialog() const { Device *t = scene->oneSelectedDevice(); t->arpDialog(); } -void sceneControl::showLogDialog(logDialog *log) const +void SceneControl::showLogDialog(logDialog *log) const { Device *t = scene->oneSelectedDevice(); t->showLogDialog(log); } -void sceneControl::showDesignerDialog() const +void SceneControl::showDesignerDialog() const { Device *t = scene->oneSelectedDevice(); t->showDesignerDialog(); } -void sceneControl::showDeviceNoteDialog() const +void SceneControl::showDeviceNoteDialog() const { Device *t = scene->oneSelectedDevice(); t->showDeviceNoteDialog(); } -void sceneControl::showVirtualNetworkDialog() const +void SceneControl::showVirtualNetworkDialog() const { scene->oneSelectedDevice()->showVirtualNetworkDialog(); } -bool sceneControl::isSelect() const +bool SceneControl::isSelect() const { if ( scene->oneSelectedDevice() ) return true; return false; } -QString sceneControl::note() const +QString SceneControl::note() const { Device *t = scene->oneSelectedDevice(); return t->toolTip(); } -QIcon sceneControl::tableIcon() const +QIcon SceneControl::tableIcon() const { Device *t = scene->oneSelectedDevice(); if ( !t->hasTable() ) return QIcon(); @@ -122,13 +122,13 @@ else return QIcon(":/im/images/table_arp.png"); } -QString sceneControl::deviceName() const +QString SceneControl::deviceName() const { Device *t = scene->oneSelectedDevice(); return t->deviceName(); } -QStringList sceneControl::sockets() const +QStringList SceneControl::sockets() const { Device *t = scene->oneSelectedDevice(); return t->sockets(); Modified: trunk/src/controls/scenecontrol.h =================================================================== --- trunk/src/controls/scenecontrol.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/controls/scenecontrol.h 2011-02-09 01:09:50 UTC (rev 234) @@ -26,11 +26,11 @@ class MyCanvas; class logDialog; -class sceneControl : public QObject +class SceneControl : public QObject { Q_OBJECT public: - sceneControl(QObject *parent,MyCanvas *s); + SceneControl(QObject *parent,MyCanvas *s); bool isSelect() const; QString tableName() const; QString note() const; Modified: trunk/src/delegats/ipaddressdelegate.cpp =================================================================== --- trunk/src/delegats/ipaddressdelegate.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/delegats/ipaddressdelegate.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -21,24 +21,24 @@ #include <QLineEdit> #include <QStringList> -ipAddressDelegate::ipAddressDelegate(QObject *parent /* = 0 */) : QItemDelegate(parent) +IpAddressDelegate::IpAddressDelegate(QObject *parent /* = 0 */) : QItemDelegate(parent) { } -QWidget* ipAddressDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem&, const QModelIndex&) const +QWidget* IpAddressDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem&, const QModelIndex&) const { QLineEdit *line = new QLineEdit(parent); return line; } -void ipAddressDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const +void IpAddressDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const { QString data = index.model()->data(index,Qt::EditRole ).toString(); QLineEdit *line = static_cast<QLineEdit*>(editor); line->setText(data); } -void ipAddressDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,const QModelIndex &index) const +void IpAddressDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,const QModelIndex &index) const { QLineEdit *line = static_cast<QLineEdit*>(editor); QString data = line->text(); @@ -47,7 +47,7 @@ model->setData(index,data,Qt::EditRole); } -void ipAddressDelegate::updateEditorGeometry(QWidget *editor,const QStyleOptionViewItem &option,const QModelIndex&) const +void IpAddressDelegate::updateEditorGeometry(QWidget *editor,const QStyleOptionViewItem &option,const QModelIndex&) const { editor->setGeometry( option.rect ); } Modified: trunk/src/delegats/ipaddressdelegate.h =================================================================== --- trunk/src/delegats/ipaddressdelegate.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/delegats/ipaddressdelegate.h 2011-02-09 01:09:50 UTC (rev 234) @@ -22,10 +22,10 @@ #include <QItemDelegate> -class ipAddressDelegate : public QItemDelegate +class IpAddressDelegate : public QItemDelegate { public: - ipAddressDelegate(QObject *parent = 0); + IpAddressDelegate(QObject *parent = 0); QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem&, const QModelIndex&) const; Modified: trunk/src/delegats/macaddressdelegate.cpp =================================================================== --- trunk/src/delegats/macaddressdelegate.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/delegats/macaddressdelegate.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -20,33 +20,33 @@ #include "macaddressdelegate.h" #include <QLineEdit> -macAddressDelegate::macAddressDelegate(QObject *parent /* = 0 */) : QItemDelegate(parent) +MacAddressDelegate::MacAddressDelegate(QObject *parent /* = 0 */) : QItemDelegate(parent) { } -QWidget* macAddressDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem&, const QModelIndex&) const +QWidget* MacAddressDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem&, const QModelIndex&) const { QLineEdit *line = new QLineEdit(parent); line->setInputMask("HH:HH:HH:HH:HH:HH;_"); return line; } -void macAddressDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const +void MacAddressDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const { QString data = index.model()->data(index,Qt::EditRole ).toString(); QLineEdit *line = static_cast<QLineEdit*>(editor); line->setText(data); } -void macAddressDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,const QModelIndex &index) const +void MacAddressDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,const QModelIndex &index) const { QLineEdit *line = static_cast<QLineEdit*>(editor); QString data = line->text(); model->setData(index,data,Qt::EditRole); } -void macAddressDelegate::updateEditorGeometry(QWidget *editor,const QStyleOptionViewItem &option,const QModelIndex&) const +void MacAddressDelegate::updateEditorGeometry(QWidget *editor,const QStyleOptionViewItem &option,const QModelIndex&) const { editor->setGeometry( option.rect ); } Modified: trunk/src/delegats/macaddressdelegate.h =================================================================== --- trunk/src/delegats/macaddressdelegate.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/delegats/macaddressdelegate.h 2011-02-09 01:09:50 UTC (rev 234) @@ -22,11 +22,11 @@ #include <QItemDelegate> -class macAddressDelegate : public QItemDelegate +class MacAddressDelegate : public QItemDelegate { Q_OBJECT public: - macAddressDelegate(QObject *parent = 0); + MacAddressDelegate(QObject *parent = 0); QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem&, const QModelIndex&) const; Modified: trunk/src/devices/boxdevice.h =================================================================== --- trunk/src/devices/boxdevice.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/devices/boxdevice.h 2011-02-09 01:09:50 UTC (rev 234) @@ -29,8 +29,7 @@ Q_OBJECT Q_PROPERTY( bool isManual READ isManual WRITE setManual ) public: - friend class boxSetting; - BoxDevice(QObject *parent = 0); + BoxDevice(QObject *parent = 0); virtual ~BoxDevice(); bool isConnectSocket(const QString &socket) const { return myChip->isConnectSocket(socket); } QIcon isConnectSocketIcon(const QString &socket) const; @@ -66,12 +65,15 @@ bool myManual; BoxChip *myChip; virtual void write(QDataStream &stream) const; - virtual void read(QDataStream &stream); + virtual void read(QDataStream &stream); + +public: + friend class BoxSetting; }; -class boxSetting : public deviceSetting { +class BoxSetting : public DeviceSetting { public: - boxSetting(BoxDevice *h) : deviceSetting(h) , box(h) { } + BoxSetting(BoxDevice *h) : DeviceSetting(h) , box(h) { } int socketsCount() const { return box->myChip->socketsCount(); } QString snmpMac() const { return box->myChip->mac().toString(); } QString snmpIp() const { return box->myChip->ip().toString(); } Modified: trunk/src/devices/computer.cpp =================================================================== --- trunk/src/devices/computer.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/devices/computer.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -35,7 +35,7 @@ Computer* Computer::create(QObject *parent) { Computer *c = new Computer(parent); - c->setSocketsCount(appSetting::defaultComputerCount()); + c->setSocketsCount(AppSetting::defaultComputerCount()); c->setRouteModel( new RouteModel(c) ); c->routeModel()->addToTable("127.0.0.0","255.0.0.0","127.0.0.1","127.0.0.1",0,RouteModel::connectMode); c->setNote(tr("<b>Computer</b><!--You can use HTML.-->")); @@ -50,11 +50,9 @@ void Computer::dialog() { -#ifndef __TESTING__ computerProperty *d = new computerProperty; - d->setDevice( new computerSetting(this) ); + d->setDevice( new ComputerSetting(this) ); d->exec(); -#endif } void Computer::setSocketsCount(int n) Modified: trunk/src/devices/computer.h =================================================================== --- trunk/src/devices/computer.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/devices/computer.h 2011-02-09 01:09:50 UTC (rev 234) @@ -55,9 +55,9 @@ }; //--------------------------------------------- -class computerSetting : public smartSetting { +class ComputerSetting : public SmartSetting { public: - computerSetting( Computer *c ) : smartSetting(c) , cp(c) { } + ComputerSetting( Computer *c ) : SmartSetting(c) , cp(c) { } QString gateway() const { return cp->gateway().toString(); } void setGateway(const QString &str) { cp->setGateway(str); } private: Modified: trunk/src/devices/deviceimpl.cpp =================================================================== --- trunk/src/devices/deviceimpl.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/devices/deviceimpl.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -28,7 +28,7 @@ void DeviceImpl::showDeviceNoteDialog() { deviceNoteDialog *d = new deviceNoteDialog; - d->setDevice( new deviceSetting(this) ); + d->setDevice( new DeviceSetting(this) ); d->exec(); } Modified: trunk/src/devices/deviceimpl.h =================================================================== --- trunk/src/devices/deviceimpl.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/devices/deviceimpl.h 2011-02-09 01:09:50 UTC (rev 234) @@ -31,7 +31,7 @@ class logDialog; class DevicePort; -typedef QMap<QString,bool> featuresMap; +typedef QMap<QString,bool> FeaturesMap; class DeviceImpl : public QObject { @@ -46,7 +46,7 @@ virtual int type() const = 0; virtual QStringList sockets() const = 0; - virtual featuresMap featuresList() const { return featuresMap(); } + virtual FeaturesMap featuresList() const { return FeaturesMap(); } virtual bool isConnectSocket(const QString &socket) const = 0; virtual QIcon isConnectSocketIcon( const QString &socket) const = 0; virtual QString socketName(const Cable *c) const = 0; @@ -90,7 +90,7 @@ virtual bool isCanSend() const { return false; } - void setVisualizator( visualizable *view ) { myView = view; } + void setVisualizator( Visualizable *view ) { myView = view; } void updateView() const { myView->onImplChange(); } public: @@ -113,14 +113,14 @@ virtual quint64 sendFrameCount(const QString&) { return 0; } virtual quint64 receiveFrameCount(const QString&) { return 0; } protected: - visualizable *myView; + Visualizable *myView; private: QString myNote; }; -class deviceSetting { +class DeviceSetting { public: - deviceSetting(DeviceImpl *d) : dev(d) { } + DeviceSetting(DeviceImpl *d) : dev(d) { } QString note() const { return dev->note(); } void setNote(const QString &str) { dev->setNote(str); } private: Modified: trunk/src/devices/hubdevice.cpp =================================================================== --- trunk/src/devices/hubdevice.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/devices/hubdevice.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -32,8 +32,8 @@ { HubDevice *h = new HubDevice(parent); h->setBoxChip(new HubChip(h)); - h->setSocketsCount( appSetting::defaultHubCount() ); - h->setManual( appSetting::defaultHubManual() ); + h->setSocketsCount( AppSetting::defaultHubCount() ); + h->setManual( AppSetting::defaultHubManual() ); h->setNote(tr( "<b>Hub</b><!--You can use HTML.-->" ) ); return h; } @@ -66,7 +66,7 @@ void HubDevice::dialog() { hubProperty *d = new hubProperty; - hubSetting *set = new hubSetting(this); + HubSetting *set = new HubSetting(this); d->setHub(set); d->exec(); delete set; Modified: trunk/src/devices/hubdevice.h =================================================================== --- trunk/src/devices/hubdevice.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/devices/hubdevice.h 2011-02-09 01:09:50 UTC (rev 234) @@ -44,7 +44,7 @@ QString deviceName() const { return "hub"; } QString deviceCommandName() const { return tr("Hub"); } QString pixmapName() const { return ":/im/images/hub.png"; } - friend class hubSetting; + friend class HubSetting; protected: void write(QDataStream &stream) const; void read(QDataStream &stream); @@ -52,12 +52,12 @@ quint32 m_collision; }; -class hubSetting : public boxSetting +class HubSetting : public BoxSetting { public: - hubSetting(HubDevice *d) : boxSetting(d) , hd(d) { } + HubSetting(HubDevice *d) : BoxSetting(d) , hd(d) { } quint32 collisions() const { return hd->m_collision; } - void reset() { boxSetting::reset(); hd->m_collision = 0; } + void reset() { BoxSetting::reset(); hd->m_collision = 0; } private: HubDevice *hd; }; Modified: trunk/src/devices/routerdevice.cpp =================================================================== --- trunk/src/devices/routerdevice.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/devices/routerdevice.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -31,7 +31,7 @@ RouterDevice* RouterDevice::create(QObject *parent) { RouterDevice *r = new RouterDevice(parent); - r->setSocketsCount( appSetting::defaultRouterCount() ); + r->setSocketsCount( AppSetting::defaultRouterCount() ); r->setRouteModel( new RouteModel() ); r->setNote(tr("<b>Router</b><!--You can use HTML.-->")); return r; @@ -40,7 +40,7 @@ void RouterDevice::dialog() { routerProperty *d = new routerProperty; - routerSetting *set = new routerSetting(this); + RouterSetting *set = new RouterSetting(this); d->setRouter(set); d->exec(); delete d; Modified: trunk/src/devices/routerdevice.h =================================================================== --- trunk/src/devices/routerdevice.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/devices/routerdevice.h 2011-02-09 01:09:50 UTC (rev 234) @@ -42,10 +42,10 @@ void setSocketsCount(int n); }; -class routerSetting : public smartSetting +class RouterSetting : public SmartSetting { public: - routerSetting(RouterDevice *r) : smartSetting(r) , rd(r) { } + RouterSetting(RouterDevice *r) : SmartSetting(r) , rd(r) { } void setSocketsCount(int n) { rd->setSocketsCount(n); } private: RouterDevice *rd; Modified: trunk/src/devices/sharebus.cpp =================================================================== --- trunk/src/devices/sharebus.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/devices/sharebus.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -19,13 +19,13 @@ ****************************************************************************************/ #include "sharebus.h" -shareBus::shareBus(int c) +ShareBus::ShareBus(int c) { Q_UNUSED(c); widthDev = defaultWidth; } -DevicePort* shareBus::addInterface(QString str, int t) +DevicePort* ShareBus::addInterface(QString str, int t) { Q_UNUSED(str); Q_UNUSED(t); Modified: trunk/src/devices/sharebus.h =================================================================== --- trunk/src/devices/sharebus.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/devices/sharebus.h 2011-02-09 01:09:50 UTC (rev 234) @@ -28,11 +28,11 @@ // который унаследован от device , так как у общей шины будет отличаться // реализация и отображение от остальных устройств // -class shareBus : public DeviceImpl +class ShareBus : public DeviceImpl { public: enum { defaultWidth = 200 }; - shareBus(int c); + ShareBus(int c); DevicePort* addInterface(QString str,int t); void dialog() { } bool hasTable() const { return false; } Modified: trunk/src/devices/smartdevice.cpp =================================================================== --- trunk/src/devices/smartdevice.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/devices/smartdevice.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -41,7 +41,9 @@ SmartDevice::~SmartDevice() { qDeleteAll(mySockets); + mySockets.clear(); qDeleteAll(myInterfaces); + myInterfaces.clear(); } const Interface* SmartDevice::adapter(const QString &s) const @@ -290,44 +292,36 @@ void SmartDevice::showLogDialog(logDialog *log) const { -#ifndef __TESTING__ connect( log ,SIGNAL(changeInterface(QString)) , this ,SLOT(setCheckedSocket(QString)) ); foreach ( Interface *i , myInterfaces ) { connect( i , SIGNAL(receiveData(frame,QString)) , log , SLOT(receiveData(frame,QString)) ); connect( i , SIGNAL(sendData(frame,QString)) , log , SLOT(sendData(frame,QString)) ); } -#endif } void SmartDevice::adapterDialog() { -#ifndef __TESTING__ - adapterProperty *d = new adapterProperty( new adapterSetting(this) ); + adapterProperty *d = new adapterProperty( new AdapterSetting(this) ); d->show(); -#endif } void SmartDevice::programmsDialog() { -#ifndef __TESTING__ programmDialog *d = new programmDialog; d->setDevice(this); d->show(); -#endif } void SmartDevice::arpDialog() { -#ifndef __TESTING__ tableArp *d = new tableArp; d->setDevice(this); d->exec(); -#endif } -featuresMap SmartDevice::featuresList() const +FeaturesMap SmartDevice::featuresList() const { - featuresMap t; + FeaturesMap t; foreach ( Program *i , myPrograms ) t.insert(i->featureName(),i->isEnable()); return t; @@ -552,15 +546,15 @@ } connect( s , SIGNAL(imFinished(AbstractSocket*)) , this , SLOT(disposeSocket(AbstractSocket*)) ); mySockets << s; - qDebug("Socket %d created",type); return s; } void SmartDevice::disposeSocket(AbstractSocket *socket) { - qDebug("Socket removed"); - mySockets.removeOne(socket); - delete socket; + if ( mySockets.contains(socket) ) { + mySockets.removeOne(socket); + delete socket; + } } //------------------------------------------------------------------------------ @@ -569,7 +563,7 @@ /*! * Функция устанавливает текущий выбранный интерфейс в настройках адаптеров. */ -void adapterSetting::setCurrent(int n) +void AdapterSetting::setCurrent(int n) { cur = n; oldMask = sd->myInterfaces[cur]->mask(); @@ -579,7 +573,7 @@ /*! * Изменяет таблицу маршрутизации в соответсвии с новыми настройками интрефейсов. */ -void adapterSetting::connectedNet() +void AdapterSetting::connectedNet() { RouteRecord *t = sd->routeModel()->recordAt( oldMask & oldIp ); if ( t ) { // Удаляем запись со старыми натсройками @@ -589,13 +583,13 @@ } //-------------------------------------------------------------------------- -bool adapterSetting::isUnderDhcpControl() const +bool AdapterSetting::isUnderDhcpControl() const { DhcpClientProgram *t = qobject_cast<DhcpClientProgram*>( sd->programAt(Program::DHCPClient) ); return t->isUnderDhcpControl( sd->myInterfaces.at(cur)->name() ); } -void adapterSetting::setUnderDhcpControl(bool isUnder) +void AdapterSetting::setUnderDhcpControl(bool isUnder) { DhcpClientProgram *t = qobject_cast<DhcpClientProgram*>( sd->programAt( Program::DHCPClient) ); t->observeInterface( sd->myInterfaces.at(cur)->name() , isUnder ); Modified: trunk/src/devices/smartdevice.h =================================================================== --- trunk/src/devices/smartdevice.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/devices/smartdevice.h 2011-02-09 01:09:50 UTC (rev 234) @@ -67,7 +67,7 @@ QStringList interfacesIp() const; QList<Cable*> cableList() const; DevicePort* findPortByName(const QString &name) const; - featuresMap featuresList() const; + FeaturesMap featuresList() const; void addInterface(); bool isConnectSocket(const QString &socket) const { return adapter(socket)->isConnect(); } bool hasConnentSockets() const; @@ -139,15 +139,15 @@ virtual void read(QDataStream &stream); // FRIENDS: public: - friend class adapterSetting; + friend class AdapterSetting; }; //------------------------------------------------------------------- /*! Модель данных для настроек адаптеров. */ -class adapterSetting { +class AdapterSetting { public: - adapterSetting(SmartDevice *s) : sd(s) { } + AdapterSetting(SmartDevice *s) : sd(s) { } void setCurrent(int n); int current() const { return cur; } void resetStatics() { sd->myInterfaces.at(cur)->resetStatics(); } @@ -179,9 +179,9 @@ }; //------------------------------------------------------------- -class smartSetting : public deviceSetting { +class SmartSetting : public DeviceSetting { public: - smartSetting(SmartDevice *d) : deviceSetting(d) , sd(d) { } + SmartSetting(SmartDevice *d) : DeviceSetting(d) , sd(d) { } int socketsCount() const { return sd->socketsCount(); } bool isRouter() const { return sd->isRouter(); } void setRouter(bool b) { sd->setRouter(b); } Modified: trunk/src/devices/switchdevice.cpp =================================================================== --- trunk/src/devices/switchdevice.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/devices/switchdevice.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -33,8 +33,8 @@ { SwitchDevice *s = new SwitchDevice(parent); s->setBoxChip( SwitchChip::create(s) ); - s->setSocketsCount( appSetting::defaultSwitchCount() ); - s->setManual( appSetting::defaultSwitchManual() ); + s->setSocketsCount( AppSetting::defaultSwitchCount() ); + s->setManual( AppSetting::defaultSwitchManual() ); s->setNote(tr("<b>Switch</b><!--You can use HTML.-->")); return s; } @@ -58,13 +58,13 @@ void SwitchDevice::dialog() { switchProperty *d = new switchProperty; - d->setSwitch( new boxSetting(this) ); + d->setSwitch( new BoxSetting(this) ); d->show(); } void SwitchDevice::tableDialog() { - switchTableSetting *set = new switchTableSetting(this); + SwitchTableSetting *set = new SwitchTableSetting(this); TableSwitch *t = new TableSwitch(set); t->exec(); delete t; @@ -74,7 +74,7 @@ void SwitchDevice::showVirtualNetworkDialog() { virtualNetworkDialog *d = new virtualNetworkDialog; - d->setDevice( new virtualNetworkSetting(this) ); + d->setDevice( new VirtualNetworkSetting(this) ); d->show(); } @@ -90,7 +90,7 @@ //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- -SwitchModel* switchTableSetting::switchTable() +SwitchModel* SwitchTableSetting::switchTable() { return sw->concreteChip()->modelAt( sw->concreteChip()->vlanAt(0) ); } Modified: trunk/src/devices/switchdevice.h =================================================================== --- trunk/src/devices/switchdevice.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/devices/switchdevice.h 2011-02-09 01:09:50 UTC (rev 234) @@ -25,7 +25,7 @@ class frame; class SwitchModel; -class switchTableSetting; +class SwitchTableSetting; class SwitchChip; // Пока такое коротенькое объявление для свитча @@ -34,7 +34,6 @@ { Q_OBJECT public: - friend class switchTableSetting; enum { switchDev = 5 }; int type() const { return switchDev; } SwitchDevice(QObject *parent = 0); //Пока конструктор и прорисовка @@ -55,11 +54,14 @@ protected: void write(QDataStream &stream) const; void read(QDataStream &stream); + +public: + friend class SwitchTableSetting; }; -class switchTableSetting { +class SwitchTableSetting { public: - switchTableSetting(SwitchDevice *s) : sw(s) { } + SwitchTableSetting(SwitchDevice *s) : sw(s) { } SwitchModel* switchTable(); int socketsCount() const { return sw->myChip->socketsCount(); } void removeFromTable(int row); @@ -68,9 +70,9 @@ SwitchDevice *sw; }; -class virtualNetworkSetting { +class VirtualNetworkSetting { public: - virtualNetworkSetting( SwitchDevice *device ) : myDevice(device) { } + VirtualNetworkSetting( SwitchDevice *device ) : myDevice(device) { } private: SwitchDevice *myDevice; }; Modified: trunk/src/dialogs/adapterproperty.cpp =================================================================== --- trunk/src/dialogs/adapterproperty.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/dialogs/adapterproperty.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -29,7 +29,7 @@ /*! Конструктор создает основной интерфейс диалога. */ -adapterProperty::adapterProperty(adapterSetting *s) +adapterProperty::adapterProperty(AdapterSetting *s) { setWindowTitle(tr("Netcard")); sd = s; Modified: trunk/src/dialogs/adapterproperty.h =================================================================== --- trunk/src/dialogs/adapterproperty.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/dialogs/adapterproperty.h 2011-02-09 01:09:50 UTC (rev 234) @@ -30,7 +30,7 @@ class DevicePort; class ipEdit; -class adapterSetting; +class AdapterSetting; /** Класс диалога настройки адаптеров. @@ -40,7 +40,7 @@ Q_OBJECT Q_DISABLE_COPY(adapterProperty) public: - adapterProperty(adapterSetting *s); + adapterProperty(AdapterSetting *s); ~adapterProperty(); private slots: void updateTab(int n); @@ -51,7 +51,7 @@ void onAutoClicked(bool isAuto); void apply(); private: - adapterSetting *sd; + AdapterSetting *sd; QLabel *lb_statics; QTabBar *tab_interfaces; QLineEdit *le_name; Modified: trunk/src/dialogs/computerproperty.cpp =================================================================== --- trunk/src/dialogs/computerproperty.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/dialogs/computerproperty.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -49,7 +49,7 @@ delete comp; } -void computerProperty::setDevice(computerSetting *c) +void computerProperty::setDevice(ComputerSetting *c) { comp = c; gateway->setText( c->gateway() ); Modified: trunk/src/dialogs/computerproperty.h =================================================================== --- trunk/src/dialogs/computerproperty.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/dialogs/computerproperty.h 2011-02-09 01:09:50 UTC (rev 234) @@ -24,7 +24,7 @@ class QCheckBox; -class computerSetting; +class ComputerSetting; class ipEdit; class computerProperty : public dialogTemplate @@ -34,9 +34,9 @@ public: computerProperty(); ~computerProperty(); - void setDevice(computerSetting *c); + void setDevice(ComputerSetting *c); private: - computerSetting *comp; + ComputerSetting *comp; QCheckBox *cb_route; ipEdit *gateway; public slots: Modified: trunk/src/dialogs/devicenotedialog.cpp =================================================================== --- trunk/src/dialogs/devicenotedialog.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/dialogs/devicenotedialog.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -7,7 +7,7 @@ setAttribute(Qt::WA_DeleteOnClose); } -void deviceNoteDialog::setDevice(deviceSetting *device) +void deviceNoteDialog::setDevice(DeviceSetting *device) { myDevice = device; te_text->setPlainText( device->note() ); Modified: trunk/src/dialogs/devicenotedialog.h =================================================================== --- trunk/src/dialogs/devicenotedialog.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/dialogs/devicenotedialog.h 2011-02-09 01:09:50 UTC (rev 234) @@ -3,20 +3,20 @@ #include "ui_devicenotedialog.h" -class deviceSetting; +class DeviceSetting; class deviceNoteDialog : public QDialog, private Ui::deviceNoteDialog { Q_OBJECT public: deviceNoteDialog(QWidget *parent = 0); - void setDevice(deviceSetting *device); + void setDevice(DeviceSetting *device); ~deviceNoteDialog(); public slots: void apply(); protected: void changeEvent(QEvent *e); private: - deviceSetting *myDevice; + DeviceSetting *myDevice; }; #endif // DEVICENOTEDIALOG_H Modified: trunk/src/dialogs/dhcpserverproperty.cpp =================================================================== --- trunk/src/dialogs/dhcpserverproperty.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/dialogs/dhcpserverproperty.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -32,8 +32,8 @@ setAttribute(Qt::WA_DeleteOnClose); foreach ( Interface *i, device->interfaces() ) if ( i->isConnect() ) cb_interface->addItem( QIcon(":im/images/ok.png"), i->name() ); - macDelegate = new macAddressDelegate(this); - ipDelegate = new ipAddressDelegate(this); + macDelegate = new MacAddressDelegate(this); + ipDelegate = new IpAddressDelegate(this); tv_static->setItemDelegateForColumn(0, macDelegate ); for ( int i = 1 ; i <= 3 ; i++ ) tv_static->setItemDelegateForColumn(i,ipDelegate); Modified: trunk/src/dialogs/dhcpserverproperty.h =================================================================== --- trunk/src/dialogs/dhcpserverproperty.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/dialogs/dhcpserverproperty.h 2011-02-09 01:09:50 UTC (rev 234) @@ -24,10 +24,10 @@ #include "ipedit.h" class DhcpServerProgram; -class dhcpServerModel; +class DhcpServerModel; class SmartDevice; -class macAddressDelegate; -class ipAddressDelegate; +class MacAddressDelegate; +class IpAddressDelegate; class dhcpServerProperty : public QDialog, private Ui::dhspServerProperty { @@ -44,10 +44,10 @@ protected: void changeEvent(QEvent *e); private: - macAddressDelegate *macDelegate; - ipAddressDelegate *ipDelegate; + MacAddressDelegate *macDelegate; + IpAddressDelegate *ipDelegate; DhcpServerProgram *myProgramm; - dhcpServerModel *myModel; + DhcpServerModel *myModel; SmartDevice *device; }; Modified: trunk/src/dialogs/hubproperty.cpp =================================================================== --- trunk/src/dialogs/hubproperty.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/dialogs/hubproperty.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -69,7 +69,7 @@ { } -void hubProperty::setHub(hubSetting *s) +void hubProperty::setHub(HubSetting *s) { st = s; cb_count->setCurrentIndex( cb_count->findText( QString::number(st->socketsCount() ) )); Modified: trunk/src/dialogs/hubproperty.h =================================================================== --- trunk/src/dialogs/hubproperty.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/dialogs/hubproperty.h 2011-02-09 01:09:50 UTC (rev 234) @@ -28,7 +28,7 @@ class QPushButton; class ipEdit; -class hubSetting; +class HubSetting; class hubProperty : public dialogTemplate { @@ -36,9 +36,9 @@ public: hubProperty(); ~hubProperty(); - void setHub(hubSetting *s); + void setHub(HubSetting *s); private: - hubSetting *st; + HubSetting *st; QComboBox *cb_count; QLabel *lb_statics; QLabel *lb_mac; Modified: trunk/src/dialogs/routerproperty.cpp =================================================================== --- trunk/src/dialogs/routerproperty.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/dialogs/routerproperty.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -52,7 +52,7 @@ Задает диалогу устройство для работы. @param r - указатель на роутер. */ -void routerProperty::setRouter(routerSetting *r) +void routerProperty::setRouter(RouterSetting *r) { rt = r; cb_route->setChecked(r->isRouter()); Modified: trunk/src/dialogs/routerproperty.h =================================================================== --- trunk/src/dialogs/routerproperty.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/dialogs/routerproperty.h 2011-02-09 01:09:50 UTC (rev 234) @@ -22,7 +22,7 @@ #include "dialogtemplate.h" -class routerSetting; +class RouterSetting; class QCheckBox; class QGroupBox; class QComboBox; @@ -33,9 +33,9 @@ Q_DISABLE_COPY(routerProperty) public: routerProperty(); - void setRouter(routerSetting *r); + void setRouter(RouterSetting *r); private: - routerSetting *rt; + RouterSetting *rt; QCheckBox *cb_route; QComboBox *cb_count; public slots: Modified: trunk/src/dialogs/settingdialog.cpp =================================================================== --- trunk/src/dialogs/settingdialog.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/dialogs/settingdialog.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -29,38 +29,38 @@ void settingDialog::currentValues() { - sp_arpResponce->setValue( appSetting::arpResponceTime() ); + sp_arpResponce->setValue( AppSetting::arpResponceTime() ); - sp_ttlArp->setValue( appSetting::ttlArp() ); + sp_ttlArp->setValue( AppSetting::ttlArp() ); computerComboBox->setCurrentIndex( computerComboBox->findText(QString::number( - appSetting::defaultComputerCount() ) ) ); + AppSetting::defaultComputerCount() ) ) ); hubComboBox->setCurrentIndex( hubComboBox->findText( - QString::number( appSetting::defaultHubCount() ) ) ); + QString::number( AppSetting::defaultHubCount() ) ) ); switchComboBox->setCurrentIndex( switchComboBox->findText( - QString::number( appSetting::defaultSwitchCount() ) ) ); + QString::number( AppSetting::defaultSwitchCount() ) ) ); - sp_ttlMac->setValue( appSetting::ttlMac() ); + sp_ttlMac->setValue( AppSetting::ttlMac() ); routerComboBox->setCurrentIndex( routerComboBox->findText(QString::number( - appSetting::defaultRouterCount() ) ) ); + AppSetting::defaultRouterCount() ) ) ); - int s = appSetting::animateSpeed(); + int s = AppSetting::animateSpeed(); sl_speed->setValue(s); - languageBox->setCurrentIndex( appSetting::language() ); + languageBox->setCurrentIndex( AppSetting::language() ); - sb_send->setValue(appSetting::sendingNum()); + sb_send->setValue(AppSetting::sendingNum()); - sb_waitingTime->setValue(appSetting::waitingTime()); + sb_waitingTime->setValue(AppSetting::waitingTime()); - cb_opengl->setChecked( appSetting::hasOpengl() ); + cb_opengl->setChecked( AppSetting::hasOpengl() ); - cb_autosave->setChecked( appSetting::isAutosave() ); + cb_autosave->setChecked( AppSetting::isAutosave() ); - sb_autosave->setValue( appSetting::autosaveInterval() ); + sb_autosave->setValue( AppSetting::autosaveInterval() ); btn_apply->setEnabled(false); } @@ -72,20 +72,20 @@ void settingDialog::apply() { - appSetting::setDefaultComputerCount( computerComboBox->currentText().toInt() ); - appSetting::setDefaultHubCount( hubComboBox->currentText().toInt() ); - appSetting::setDefaultSwitchCount( switchComboBox->currentText().toInt() ); - appSetting::setDefaultRouterCount( routerComboBox->currentText().toInt() ); - appSetting::setTtlArp( sp_ttlArp->value() ); - appSetting::setArpResponceTime( sp_arpResponce->value() ); - appSetting::setTtlMac( sp_ttlMac->value() ); - appSetting::setAnimateSpeed(sl_speed->value()); - appSetting::setLanguage( languageBox->currentIndex() ); - appSetting::setSendingNum(sb_send->value()); - appSetting::setWaitingTime(sb_waitingTime->value()); - appSetting::setHasOpengl( cb_opengl->isChecked() ); - appSetting::setAutosaveInterval( sb_autosave->value() ); - appSetting::setAutosave( cb_autosave->isChecked() ); + AppSetting::setDefaultComputerCount( computerComboBox->currentText().toInt() ); + AppSetting::setDefaultHubCount( hubComboBox->currentText().toInt() ); + AppSetting::setDefaultSwitchCount( switchComboBox->currentText().toInt() ); + AppSetting::setDefaultRouterCount( routerComboBox->currentText().toInt() ); + AppSetting::setTtlArp( sp_ttlArp->value() ); + AppSetting::setArpResponceTime( sp_arpResponce->value() ); + AppSetting::setTtlMac( sp_ttlMac->value() ); + AppSetting::setAnimateSpeed(sl_speed->value()); + AppSetting::setLanguage( languageBox->currentIndex() ); + AppSetting::setSendingNum(sb_send->value()); + AppSetting::setWaitingTime(sb_waitingTime->value()); + AppSetting::setHasOpengl( cb_opengl->isChecked() ); + AppSetting::setAutosaveInterval( sb_autosave->value() ); + AppSetting::setAutosave( cb_autosave->isChecked() ); btn_apply->setEnabled(false); if ( sender() == btn_ok ) accept(); } @@ -97,7 +97,7 @@ void settingDialog::defaultSettings() { - appSetting::defaultNums(); + AppSetting::defaultNums(); currentValues(); } @@ -106,7 +106,7 @@ switch (e->type()) { case QEvent::LanguageChange: retranslateUi(this); - languageBox->setCurrentIndex( appSetting::language() ); + languageBox->setCurrentIndex( AppSetting::language() ); listWidget->setSpacing( listWidget->spacing() ); break; default: Modified: trunk/src/dialogs/staticsdialog.cpp =================================================================== --- trunk/src/dialogs/staticsdialog.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/dialogs/staticsdialog.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -21,7 +21,7 @@ #include "mycanvas.h" #include "statisticsscene.h" -staticsDialog::staticsDialog(statisticsScene *statistics, QWidget *parent) :QDialog(parent) +staticsDialog::staticsDialog(StatisticsScene *statistics, QWidget *parent) :QDialog(parent) { setupUi(this); deviceLabel->setText( statistics->devicesString() ); Modified: trunk/src/dialogs/staticsdialog.h =================================================================== --- trunk/src/dialogs/staticsdialog.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/dialogs/staticsdialog.h 2011-02-09 01:09:50 UTC (rev 234) @@ -23,13 +23,13 @@ #include "ui_staticsdialog.h" class MyCanvas; -class statisticsScene; +class StatisticsScene; class staticsDialog : public QDialog, private Ui::staticsDialog { Q_OBJECT Q_DISABLE_COPY(staticsDialog) public: - staticsDialog(statisticsScene *statistics, QWidget *parent = 0); + staticsDialog(StatisticsScene *statistics, QWidget *parent = 0); protected: void changeEvent(QEvent *e); }; Modified: trunk/src/dialogs/switchproperty.cpp =================================================================== --- trunk/src/dialogs/switchproperty.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/dialogs/switchproperty.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -72,7 +72,7 @@ delete sw; } -void switchProperty::setSwitch(boxSetting *d) +void switchProperty::setSwitch(BoxSetting *d) { sw = d; cb_count->setCurrentIndex( cb_count->findText( QString::number( d->socketsCount() ) ) ); Modified: trunk/src/dialogs/switchproperty.h =================================================================== --- trunk/src/dialogs/switchproperty.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/dialogs/switchproperty.h 2011-02-09 01:09:50 UTC (rev 234) @@ -27,7 +27,7 @@ class QLabel; class QCheckBox; -class boxSetting; +class BoxSetting; class ipEdit; class switchProperty : public dialogTemplate @@ -37,9 +37,9 @@ public: switchProperty(); ~switchProperty(); - void setSwitch(boxSetting *d); + void setSwitch(BoxSetting *d); private: - boxSetting *sw; + BoxSetting *sw; QComboBox *cb_count; QCheckBox *chb_manual; QLabel *lb_statics; Modified: trunk/src/dialogs/tableswitch.cpp =================================================================== --- trunk/src/dialogs/tableswitch.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/dialogs/tableswitch.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -21,7 +21,7 @@ #include "switchdevice.h" #include "switchmodel.h" -TableSwitch::TableSwitch(switchTableSetting *s) +TableSwitch::TableSwitch(SwitchTableSetting *s) { sw = s; t_sw = s->switchTable(); Modified: trunk/src/dialogs/tableswitch.h =================================================================== --- trunk/src/dialogs/tableswitch.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/dialogs/tableswitch.h 2011-02-09 01:09:50 UTC (rev 234) @@ -22,16 +22,16 @@ #include "ui_tableswitch.h" -class switchTableSetting; +class SwitchTableSetting; class SwitchModel; class TableSwitch : public QDialog , private Ui::tableSwitch { Q_OBJECT public: - explicit TableSwitch(switchTableSetting *s); + explicit TableSwitch(SwitchTableSetting *s); private: - switchTableSetting *sw; + SwitchTableSetting *sw; SwitchModel *t_sw; private slots: void addRecord(); Modified: trunk/src/dialogs/testdialog.cpp =================================================================== --- trunk/src/dialogs/testdialog.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/dialogs/testdialog.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -71,7 +71,7 @@ void testDialog::updateList() { listWidget->clear(); - QDir t(appSetting::scriptPath()); + QDir t(AppSetting::scriptPath()); QStringList h; h << "*.js"; QStringList s = t.entryList(h); @@ -114,7 +114,7 @@ bool testDialog::test(QString s) { qDebug() << s << " started"; - QString g = appSetting::scriptPath()+s+".js"; + QString g = AppSetting::scriptPath()+s+".js"; QFile file(g); file.open(QIODevice::ReadOnly); QString temporary = file.readAll(); @@ -144,10 +144,10 @@ void testDialog::setScriptPath() { QString name = QFileDialog::getExistingDirectory( this, - tr("Choose a directory with scripts"), appSetting::scriptPath() ); + tr("Choose a directory with scripts"), AppSetting::scriptPath() ); if ( name.isEmpty() ) return; if ( name.at( name.length() - 1 ) != '/' ) name.push_back('/'); - appSetting::setScriptPath(name); + AppSetting::setScriptPath(name); updateList(); } Modified: trunk/src/dialogs/virtualnetworkdialog.cpp =================================================================== --- trunk/src/dialogs/virtualnetworkdialog.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/dialogs/virtualnetworkdialog.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -6,7 +6,7 @@ setAttribute(Qt::WA_DeleteOnClose); } -void virtualNetworkDialog::setDevice( virtualNetworkSetting *device) +void virtualNetworkDialog::setDevice( VirtualNetworkSetting *device) { myDevice = device; } Modified: trunk/src/dialogs/virtualnetworkdialog.h =================================================================== --- trunk/src/dialogs/virtualnetworkdialog.h 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/dialogs/virtualnetworkdialog.h 2011-02-09 01:09:50 UTC (rev 234) @@ -3,17 +3,17 @@ #include "ui_virtualnetworkdialog.h" -class virtualNetworkSetting; +class VirtualNetworkSetting; class virtualNetworkDialog : public QDialog, private Ui::virtualNetworkDialog { Q_OBJECT public: virtualNetworkDialog(QWidget *parent = 0); - void setDevice( virtualNetworkSetting *device); + void setDevice( VirtualNetworkSetting *device); protected: void changeEvent(QEvent *e); private: - virtualNetworkSetting *myDevice; + VirtualNetworkSetting *myDevice; }; #endif // VIRTUALNETWORKDIALOG_H Modified: trunk/src/graphics/cabledev.cpp =================================================================== --- trunk/src/graphics/cabledev.cpp 2011-02-08 23:18:03 UTC (rev 233) +++ trunk/src/graphics/cabledev.cpp 2011-02-09 01:09:50 UTC (rev 234) @@ -20,13 +20,15 @@ #include "cabledev.h" #include "deviceport.h" -Cable::Cable(QGraphicsObject *parent) : QGraphicsObject(parent) , myStartPort(0) , - myEndPort(0) , - isCollision(false), myChecked(false) , - myShared(false) , mySpeed(5) +Cable::Cable(QGraphicsObject *parent) : QGraphicsObject(parent) , startItem(0), +endItem(0) , myStartPort(0) , +myEndPort(0) , +isCollision(false), myChecked(false) , +myShared(false) , mySpeed(5) {... [truncated message content] |