Changeset View
Changeset View
Standalone View
Standalone View
tests/kfontchooserdialogtest.cpp
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | Copyright (C) 1996 Bernd Johannes Wuebben | ||||
3 | wuebben@math.cornell.edu | ||||
4 | | ||||
5 | This program is free software; you can redistribute it and/or modify | ||||
6 | it under the terms of the GNU General Public License as published by | ||||
7 | the Free Software Foundation; either version 2 of the License, or | ||||
8 | (at your option) any later version. | ||||
9 | | ||||
10 | This program 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 | ||||
13 | GNU General Public License for more details. | ||||
14 | | ||||
15 | You should have received a copy of the GNU General Public License | ||||
16 | along with this program; if not, write to the Free Software | ||||
17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
18 | | ||||
19 | */ | ||||
20 | | ||||
21 | #include "kfontchooserdialog.h" | ||||
22 | | ||||
23 | #include <QApplication> | ||||
24 | #include <QDebug> | ||||
25 | | ||||
26 | int main(int argc, char **argv) | ||||
27 | { | ||||
28 | QApplication::setApplicationName(QStringLiteral("KFontChooserDialogTest")); | ||||
29 | | ||||
30 | QApplication app(argc, argv); | ||||
31 | | ||||
32 | app.setFont(QFont(QStringLiteral("DejaVu Sans"), 12)); | ||||
33 | | ||||
34 | // QFont font = QFont("Times",18,QFont::Bold); | ||||
35 | | ||||
36 | QFont font; | ||||
37 | int nRet = KFontChooserDialog::getFont(font); | ||||
38 | qDebug() << font.toString(); | ||||
39 | | ||||
40 | KFontChooser::FontDiffFlags diffFlags; | ||||
41 | nRet = KFontChooserDialog::getFontDiff(font, diffFlags); | ||||
42 | qDebug() << font.toString(); | ||||
43 | | ||||
44 | return nRet; | ||||
45 | } |