ctkXnatLoginProfile.cpp 2.7 KB

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