CTK 0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
ctkLanguageComboBox.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Library: CTK
4
5 Copyright (c) Kitware Inc.
6
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0.txt
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18
19=========================================================================*/
20
21#ifndef __ctkLanguageComboBox_h
22#define __ctkLanguageComboBox_h
23
24// QT includes
25#include <QComboBox>
26
27// CTK includes
28#include "ctkWidgetsExport.h"
29class ctkLanguageComboBoxPrivate;
30
43class CTK_WIDGETS_EXPORT ctkLanguageComboBox : public QComboBox
44{
45 Q_OBJECT
57 Q_PROPERTY(QString defaultLanguage READ defaultLanguage WRITE setDefaultLanguage)
58
59
62 Q_PROPERTY(QString directory READ directory WRITE setDirectory)
63
64
67 Q_PROPERTY(QString currentLanguage READ currentLanguage WRITE setCurrentLanguage NOTIFY currentLanguageNameChanged USER true)
68
69public:
70 typedef QComboBox Superclass;
72 ctkLanguageComboBox(QWidget *parent = 0);
75 ctkLanguageComboBox(const QString& defaultLanguage, QWidget *parent = 0);
77
80 QString defaultLanguage()const;
81
85 void setDefaultLanguage(const QString& language);
86
92 QString directory()const;
93 void setDirectory(const QString& dir);
94
97 QString currentLanguage()const;
98
99public Q_SLOTS:
102 void setCurrentLanguage(const QString& language);
103
104protected slots:
105 void onLanguageChanged(int index);
106
107signals:
110 void currentLanguageNameChanged(const QString&);
111
112protected:
113 QScopedPointer<ctkLanguageComboBoxPrivate> d_ptr;
114
115private:
116 Q_DECLARE_PRIVATE(ctkLanguageComboBox);
117 Q_DISABLE_COPY(ctkLanguageComboBox);
118};
119#endif // __ctkLanguageComboBox_h
120
void setDirectory(const QString &dir)
void setDefaultLanguage(const QString &language)
ctkLanguageComboBox(QWidget *parent=0)
Constructor of ctkLanguageComboBox.
QString defaultLanguage() const
QString currentLanguage() const
void setCurrentLanguage(const QString &language)
void onLanguageChanged(int index)
QScopedPointer< ctkLanguageComboBoxPrivate > d_ptr
virtual ~ctkLanguageComboBox()
void currentLanguageNameChanged(const QString &)
QString directory() const
ctkLanguageComboBox(const QString &defaultLanguage, QWidget *parent=0)