ctkXnatLoginProfile.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /*=============================================================================
  2. Library: XNAT/Core
  3. Copyright (c) University College London,
  4. Centre for Medical Image Computing
  5. Licensed under the Apache License, Version 2.0 (the "License");
  6. you may not use this file except in compliance with the License.
  7. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. =============================================================================*/
  15. #ifndef ctkXnatLoginProfile_h
  16. #define ctkXnatLoginProfile_h
  17. #include "ctkXNATCoreExport.h"
  18. #include <QScopedPointer>
  19. #include <QUrl>
  20. class ctkXnatLoginProfilePrivate;
  21. /**
  22. * @ingroup XNAT_Core
  23. *
  24. * @brief A login profile for XNAT sessions
  25. */
  26. class CTK_XNAT_CORE_EXPORT ctkXnatLoginProfile
  27. {
  28. public:
  29. ctkXnatLoginProfile();
  30. ctkXnatLoginProfile(const ctkXnatLoginProfile& otherLoginProfile);
  31. ~ctkXnatLoginProfile();
  32. /**
  33. * @brief Get the name for this profile.
  34. * @return The profile name.
  35. */
  36. QString name() const;
  37. /**
  38. * @brief Set the name for this profile.
  39. * @param profileName The new profile name.
  40. */
  41. void setName(const QString& profileName);
  42. /**
  43. * @brief Get the XNAT server URL.
  44. * @return The XNAT server URL.
  45. */
  46. QUrl serverUrl() const;
  47. /**
  48. * @brief Set the XNAT server URL.
  49. * @param serverUri The new XNAT server URL.
  50. */
  51. void setServerUrl(const QUrl& serverUri);
  52. /**
  53. * @brief Get the login user name.
  54. * @return The user name.
  55. */
  56. QString userName() const;
  57. /**
  58. * @brief Set the login user name.
  59. * @param userName The new user name.
  60. */
  61. void setUserName(const QString& userName);
  62. /**
  63. * @brief Get the login password.
  64. * @return The password.
  65. */
  66. QString password() const;
  67. /**
  68. * @brief Set the login password.
  69. * @param password The new password.
  70. */
  71. void setPassword(const QString& password);
  72. /**
  73. * @brief Returns a boolean value indicating if this login profile is the default profile.
  74. * @return \c true if this is the default login profile, \c false
  75. * otherwise.
  76. */
  77. bool isDefault() const;
  78. /**
  79. * @brief Set the default login profile to this profile.
  80. * @param default_ If \c true, marks this login profile as the default profile.
  81. */
  82. void setDefault(bool default_);
  83. private:
  84. /// \brief d pointer of the pimpl pattern
  85. QScopedPointer<ctkXnatLoginProfilePrivate> d_ptr;
  86. Q_DECLARE_PRIVATE(ctkXnatLoginProfile)
  87. };
  88. #endif