123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- #ifndef MYSETTINGS_H
- #define MYSETTINGS_H
- #include <QSettings>
- class MySettings : public QSettings
- {
- Q_OBJECT
- QString group_main;
- QString group_gui;
- QString group_xmpp;
- QString group_accounts;
- QString key_jid;
- QString key_passwd;
- QString key_showGroup;
- QString key_lastPresence;
- QString key_accounts;
- QString key_resource;
- QString key_status_text;
- QString key_status;
- QString key_default;
- QString key_host;
- QString key_port;
- QString key_useHostPort;
- QString key_sndIncomingMsg;
- QString key_sndOutcomingMsg;
- QString key_notifyConnection;
- QString key_notifyOnline;
- QString key_notifyOffline;
- QString key_notifyMessage;
- QString key_notifyTyping;
- QString key_sndBuddyLogsIn;
- QString key_sndBuddyLogsOut;
- QString key_keepAliveInterval;
- QString key_reconnectOnError;
- QString key_sndChatSome1SaysMyName;
- QString key_sndChatPersonEnters;
- QString key_sndChatPersonLeaves;
- QString key_sndChatITalk;
- QString key_sndChatOthersTalk;
- QString key_vibrMessageRecv;
- QString key_vibrMessageSent;
- QString key_vibrChatSaysMyName;
- QString key_vibrChatOthersTalk;
- QString key_smilesTheme;
- protected:
- void addAccount( const QString& acc );
- QStringList getListAccounts();
- void remAccount( const QString& acc );
- public:
- explicit MySettings(QObject *parent = 0);
- static QString appName;
- static QString pathMeegIMHome;
- static QString pathMeegIMCache;
- static QString fileConfig;
- QString getPasswd( const QString &jid );
- void setPasswd( const QString &jid, const QString& passwd );
- QString getResource( const QString &jid );
- void setResource( const QString &jid, const QString& resource );
- QString getHost( const QString &jid );
- void setHost( const QString &jid, const QString& host );
- int getPort( const QString &jid );
- void setPort( const QString &jid, const int port );
- bool isAccDefault( const QString &jid );
- void setAccDefault( const QString &jid, const bool& def );
-
- QString getStatus();
- void setStatus( const QString& status );
- QString getStatusText();
- void setStatusText( const QString& status_text );
- bool isHostPortManually( const QString &jid );
- void setHostPortManually( const QString &jid, const bool& def );
- /* incomming msg */
- QString getSndIncomingMsg();
- void setSndIncomingMsg( const QString &f );
- /* outcoming msg */
- QString getSndOutcomingMsg();
- void setSndOutcomingMsg( const QString &f );
- bool notifyConnection();
- void setNotifyConnection( const bool isSet );
- bool notifyOnline();
- void setNotifyOnline( const bool isSet );
- bool notifyOffline();
- void setNotifyOffline( const bool isSet );
- bool notifyMessage();
- void setNotifyMessage( const bool isSet );
- bool notifyTyping();
- void setNotifyTyping( const bool isSet );
- QString getSndBuddyLogsIn();
- void setSndBuddyLogsIn( const QString &f );
- QString getSndBuddyLogsOut();
- void setSndBuddyLogsOut( const QString &f );
- bool reconnectWhenError();
- void setReconnectWhenError( const bool isSet );
- int keepAliveInterval();
- void setKeepAliveInterval( const int isSet );
- QString getSndChatSaysMyName();
- void setSndChatSaysMyName( const QString &f );
- QString getSndChatPersonEnters();
- void setSndChatPersonEnters( const QString &f );
- QString getSndChatPersonLeaves();
- void setSndChatPersonLeaves( const QString &f );
- QString getSndChatITalk();
- void setSndChatITalk( const QString &f );
- QString getSndChatOthersTalk();
- void setSndChatOthersTalk( const QString &f );
- bool vibrationMessageRecv();
- void setVibrationMessageRecv( const bool isSet );
- bool vibrationMessageSent();
- void setVibrationMessageSent( const bool isSet );
- bool vibrationChatSaysMyName();
- void setVibrationChatSaysMyName( const bool isSet );
- bool vibrationChatOthersTalk();
- void setVibrationChatOthersTalk( const bool isSet );
- QString getSmilesTheme();
- void setSmilesTheme( const QString &f );
- signals:
-
- public slots:
-
- };
- #endif // MYSETTINGS_H
|