networksettingsdialog.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #ifndef NETWORKSETTINGSDIALOG_H
  2. #define NETWORKSETTINGSDIALOG_H
  3. #include <QDialog>
  4. namespace Ui {
  5. class NetworkSettingsDialog;
  6. }
  7. class RcSession;
  8. /**
  9. * For Forum Nokia account and proxy settings.
  10. *
  11. * If RcSession is not NULL, then the dialog can be
  12. * used for signing in or out, depending on what
  13. * the current sign in state is
  14. * (cf bool RcSession::isSignedOn()).
  15. *
  16. * If RcSession is NULL, then this is used only
  17. * for persisting settings.
  18. */
  19. class NetworkSettingsDialog : public QDialog {
  20. Q_OBJECT
  21. public:
  22. /**
  23. * @param rcSession the RcSession instance to use to
  24. * sign in / out. It may be NULL, the dialog
  25. * is not used for signing in/out, only for
  26. * persisting settings.
  27. */
  28. NetworkSettingsDialog(RcSession * rcSession,
  29. QWidget * parent = 0);
  30. ~NetworkSettingsDialog();
  31. bool justSignedIn() const;
  32. public slots:
  33. virtual void accept();
  34. private slots:
  35. void on_manualProxy_toggled(bool toggle);
  36. void rcSessionSignedInSlot(bool success);
  37. protected:
  38. void changeEvent(QEvent *e);
  39. private:
  40. Ui::NetworkSettingsDialog * ui;
  41. RcSession * m_rcSession;
  42. bool m_justSignedIn;
  43. void setEnableManualProxyWidgets(bool enabled);
  44. void persistSettings();
  45. void updateSignedOnAppearance();
  46. };
  47. #endif // NETWORKSETTINGSDIALOG_H