// This file is generated by kconfig_compiler from kovpnconfig.kcfg. // All changes you do to this file will be lost. #ifndef KOVPNCONFIG_H #define KOVPNCONFIG_H #include #include class kovpnConfig : public KConfigSkeleton { public: static kovpnConfig *self(); ~kovpnConfig(); void readConfig(); /** Set This is a list of all connections available. */ static void setConnections( const QStringList & v ) { if ( !self() ->isImmutable( QString::fromLatin1( "connections" ) ) ) self() ->mConnections = v; } /** Get This is a list of all connections available. */ static QStringList connections() { return self() ->mConnections; } /** Set The maximum lines of history that is shown in the log window. */ static void setMaxHistoryLines( unsigned int v ) { if ( !self() ->isImmutable( QString::fromLatin1( "maxHistoryLines" ) ) ) self() ->mMaxHistoryLines = v; } /** Get The maximum lines of history that is shown in the log window. */ static unsigned int maxHistoryLines() { return self() ->mMaxHistoryLines; } /** Set Start with a hidden main window (this is the window showing the status)? */ static void setStartMinimized( bool v ) { if ( !self() ->isImmutable( QString::fromLatin1( "startMinimized" ) ) ) self() ->mStartMinimized = v; } /** Get Start with a hidden main window (this is the window showing the status)? */ static bool startMinimized() { return self() ->mStartMinimized; } /** Set Show more Information like Message log History or IP Addresses in the Popup Window. */ static void setShowMoreInformation( bool v ) { if ( !self() ->isImmutable( QString::fromLatin1( "showMoreInformation" ) ) ) self() ->mShowMoreInformation = v; } /** Get Show more Information like Message log History or IP Addresses in the Popup Window. */ static bool showMoreInformation() { return self() ->mShowMoreInformation; } /** Set Quiet mode for surpressing annoying information like connection status changes. */ static void setQuietMode( bool v ) { if ( !self() ->isImmutable( QString::fromLatin1( "quietMode" ) ) ) self() ->mQuietMode = v; } /** Get Quiet mode for surpressing annoying information like connection status changes. */ static bool quietMode() { return self() ->mQuietMode; } static void writeConfig() { static_cast( self() ) ->writeConfig(); } static QString id( const QString &id ) { return self() ->mConnectionMap[ id ] ->mId; } static QString host( const QString &id ) { return self() ->mConnectionMap[ id ] ->mHost; } static QString port( const QString &id ) { return self() ->mConnectionMap[ id ] ->mPort; } static bool saveMIPassword( const QString &id ) { return self() ->mConnectionMap[ id ] ->mSaveMIPassword; } static bool saveAccount( const QString &id ) { return self() ->mConnectionMap[ id ] ->mSaveAccount; } static bool savePassphrase( const QString &id ) { return self() ->mConnectionMap[ id ] ->mSavePassphrase; } static bool reconnect( const QString &id ) { return self() ->mConnectionMap[ id ] ->mReconnect; } static bool autoconnect( const QString &id ) { return self() ->mConnectionMap[ id ] ->mAutoconnect; } static bool disconnectOnExit( const QString &id ) { return self() ->mConnectionMap[ id ] ->mDisconnectOnExit; } protected: kovpnConfig(); static kovpnConfig *mSelf; // Openvpn QStringList mConnections; unsigned int mMaxHistoryLines; // General bool mStartMinimized; bool mShowMoreInformation; bool mQuietMode; struct tConnection { QString mId; /* this identifyes the connection */ QString mHost; QString mPort; bool mSaveAccount; bool mSaveMIPassword; bool mSavePassphrase; bool mReconnect; bool mAutoconnect; bool mDisconnectOnExit; }; QMap mConnectionMap; private: }; #endif