QtDcmPreferences.h
Go to the documentation of this file.
1 /*
2  QtDcm is a C++ Qt based library for communication and conversion of Dicom images.
3  Copyright (C) 2011 Alexandre Abadie <Alexandre.Abadie@univ-rennes1.fr>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19 
20 
21 #ifndef QTDCMPREFERENCES_H_
22 #define QTDCMPREFERENCES_H_
23 
24 #include "qtdcmExports.h"
25 #include <QtGui>
26 #include <QtDcmServer.h>
27 
50 class QTDCM_EXPORT QtDcmPreferences : public QObject
51 {
52  Q_OBJECT
53 
54 public:
55  static QtDcmPreferences * instance();
56  static void destroy();
57 
62  void readSettings();
63 
68  void writeSettings();
69 
70  void setIniFile ( const QString ini );
71 
72  QString iniFile ( void );
73 
79  QString aetitle() const;
80 
86  QString port() const;
87 
94  QList<QtDcmServer> servers() const;
95 
101  void setHostname ( const QString & hostname );
102 
103  QString hostname() const;
104 
110  void setAetitle ( const QString & aetitle );
111 
117  void setPort ( const QString & port );
118 
119 
120  QString dcm2niiPath() const;
121 
122  void setDcm2niiPath ( const QString & path );
123 
124  bool useDcm2nii() const;
125 
126  void setUseDcm2nii ( bool use );
127 
131  void addServer(const QtDcmServer& server);
132 
138  void removeServer ( int index );
139 
146  void setServers ( const QList<QtDcmServer> & servers );
147 
148 signals:
149  void preferencesUpdated();
150 
151 private:
155  QtDcmPreferences(QObject * parent = 0);
156  virtual ~QtDcmPreferences();
157 
161  void setDefaultIniFile();
162 
163  static QtDcmPreferences * _instance;
165 };
166 
167 #endif /* QTDCMPREFERENCES_H_ */
#define QTDCM_EXPORT
Definition: qtdcmExports.h:11
This class is a representation of a Dicom PACS server.
Definition: QtDcmServer.h:30
Class that manages the settings of QtDcm.