optionsmodel cleanup

- cleanup optionsmodel before adding new proxy options
- place SOCKS version stuff below proxy port (IP, Port, SOCKS version)
- simplyfy some parts of the code (e.g. don't check IP and port, as this
  is done in optionsdialog anyway, remove unneeded {} in switch/case)
- small cosmetic changes in the header for better readability
This commit is contained in:
Philip Kaufmann
2012-07-09 13:40:22 +02:00
parent 45aa01fe89
commit 144bfd9c53
2 changed files with 36 additions and 58 deletions

View File

@@ -12,23 +12,24 @@
class OptionsModel : public QAbstractListModel
{
Q_OBJECT
public:
explicit OptionsModel(QObject *parent = 0);
enum OptionID {
StartAtStartup, // bool
MinimizeToTray, // bool
MapPortUPnP, // bool
MinimizeOnClose, // bool
ProxyUse, // bool
StartAtStartup, // bool
MinimizeToTray, // bool
MapPortUPnP, // bool
MinimizeOnClose, // bool
ProxyUse, // bool
ProxyIP, // QString
ProxyPort, // int
ProxySocksVersion, // int
ProxyIP, // QString
ProxyPort, // int
Fee, // qint64
DisplayUnit, // BitcoinUnits::Unit
DisplayAddresses, // bool
DetachDatabases, // bool
Language, // QString
Fee, // qint64
DisplayUnit, // BitcoinUnits::Unit
DisplayAddresses, // bool
DetachDatabases, // bool
Language, // QString
OptionIDRowCount,
};
@@ -48,17 +49,16 @@ public:
int getDisplayUnit();
bool getDisplayAddresses();
QString getLanguage() { return language; }
private:
int nDisplayUnit;
bool bDisplayAddresses;
bool fMinimizeToTray;
bool fMinimizeOnClose;
QString language;
signals:
void displayUnitChanged(int unit);
public slots:
};
#endif // OPTIONSMODEL_H