1 /***************************************************** vim:set ts=4 sw=4 sts=4:
3 A dialog for user to select one or more languages from the list
4 of KDE global languages.
7 (C) 2006 by Gary Cramblitt <garycramblitt@comcast.net>
9 Original author: Gary Cramblitt <garycramblitt@comcast.net>
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 ******************************************************************************/
26 #ifndef SELECTLANGUAGEDLG_H
27 #define SELECTLANGUAGEDLG_H
30 #include <QtGui/QWidget>
38 class KDE_EXPORT SelectLanguageDlg
: public KDialog
54 * @param parent The parent for this dialog.
55 * @param caption Displayed title for this dialog.
56 * @param languageCode A list of language codes that should start
57 * out selected when dialog is shown.
58 * @param selectMode 0 if user may choose more than one
59 * language in the list. 1 if only one
60 * language may be chosen.
61 * @param blankMode If 1, a blank row is displayed in the
62 * list and user may choose it.
66 const QString
& caption
= i18n("Select Language"),
67 const QStringList
& languageCodes
= QStringList(),
68 bool selectMode
= SingleSelect
,
69 bool blankMode
= BlankAllowed
);
74 ~SelectLanguageDlg() { }
77 * In single select mode, returns the language user chose.
79 QString
selectedLanguage();
82 * In single select mode, returns the language code user chose.
84 QString
selectedLanguageCode();
87 * In multiple select mode, returns list of languages user chose.
89 QStringList
selectedLanguages();
92 * In multiple select mode, returns the list of language codes
95 QStringList
selectedLanguageCodes();
98 QString
firstSelectedItem(int col
);
99 QStringList
allSelectedItems(int col
);
101 QTableWidget
* m_langList
;
104 #endif // SELECTLANGUAGEDLG_H