ctkXnatLoginProfile.cpp 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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. #include "ctkXnatLoginProfile.h"
  16. //----------------------------------------------------------------------------
  17. class ctkXnatLoginProfilePrivate
  18. {
  19. public:
  20. ctkXnatLoginProfilePrivate();
  21. QString Name;
  22. QUrl ServerUrl;
  23. QString UserName;
  24. QString Password;
  25. bool Default;
  26. };
  27. //----------------------------------------------------------------------------
  28. ctkXnatLoginProfilePrivate::ctkXnatLoginProfilePrivate()
  29. {
  30. }
  31. //----------------------------------------------------------------------------
  32. ctkXnatLoginProfile::ctkXnatLoginProfile()
  33. : d_ptr(new ctkXnatLoginProfilePrivate())
  34. {
  35. Q_D(ctkXnatLoginProfile);
  36. d->Default = false;
  37. }
  38. //----------------------------------------------------------------------------
  39. ctkXnatLoginProfile::ctkXnatLoginProfile(const ctkXnatLoginProfile& otherLoginProfile)
  40. : d_ptr(new ctkXnatLoginProfilePrivate(*otherLoginProfile.d_ptr.data()))
  41. {
  42. }
  43. //----------------------------------------------------------------------------
  44. ctkXnatLoginProfile::~ctkXnatLoginProfile()
  45. {
  46. }
  47. //----------------------------------------------------------------------------
  48. QString ctkXnatLoginProfile::name() const
  49. {
  50. Q_D(const ctkXnatLoginProfile);
  51. return d->Name;
  52. }
  53. //----------------------------------------------------------------------------
  54. void ctkXnatLoginProfile::setName(const QString& name)
  55. {
  56. Q_D(ctkXnatLoginProfile);
  57. d->Name = name;
  58. }
  59. //----------------------------------------------------------------------------
  60. QUrl ctkXnatLoginProfile::serverUrl() const
  61. {
  62. Q_D(const ctkXnatLoginProfile);
  63. return d->ServerUrl;
  64. }
  65. //----------------------------------------------------------------------------
  66. void ctkXnatLoginProfile::setServerUrl(const QUrl& serverUrl)
  67. {
  68. Q_D(ctkXnatLoginProfile);
  69. d->ServerUrl = serverUrl;
  70. }
  71. //----------------------------------------------------------------------------
  72. QString ctkXnatLoginProfile::userName() const
  73. {
  74. Q_D(const ctkXnatLoginProfile);
  75. return d->UserName;
  76. }
  77. //----------------------------------------------------------------------------
  78. void ctkXnatLoginProfile::setUserName(const QString& userName)
  79. {
  80. Q_D(ctkXnatLoginProfile);
  81. d->UserName = userName;
  82. }
  83. //----------------------------------------------------------------------------
  84. QString ctkXnatLoginProfile::password() const
  85. {
  86. Q_D(const ctkXnatLoginProfile);
  87. return d->Password;
  88. }
  89. //----------------------------------------------------------------------------
  90. void ctkXnatLoginProfile::setPassword(const QString& password)
  91. {
  92. Q_D(ctkXnatLoginProfile);
  93. d->Password = password;
  94. }
  95. //----------------------------------------------------------------------------
  96. bool ctkXnatLoginProfile::isDefault() const
  97. {
  98. Q_D(const ctkXnatLoginProfile);
  99. return d->Default;
  100. }
  101. //----------------------------------------------------------------------------
  102. void ctkXnatLoginProfile::setDefault(bool default_)
  103. {
  104. Q_D(ctkXnatLoginProfile);
  105. d->Default = default_;
  106. }