Changeset View
Changeset View
Standalone View
Standalone View
conf/dlgaccessibility.cpp
1 | /*************************************************************************** | 1 | /*************************************************************************** | ||
---|---|---|---|---|---|
2 | * Copyright (C) 2006 by Pino Toscano <toscano.pino@tiscali.it> * | 2 | * Copyright (C) 2006 by Pino Toscano <toscano.pino@tiscali.it> * | ||
3 | * * | 3 | * * | ||
4 | * This program is free software; you can redistribute it and/or modify * | 4 | * This program is free software; you can redistribute it and/or modify * | ||
5 | * it under the terms of the GNU General Public License as published by * | 5 | * it under the terms of the GNU General Public License as published by * | ||
6 | * the Free Software Foundation; either version 2 of the License, or * | 6 | * the Free Software Foundation; either version 2 of the License, or * | ||
7 | * (at your option) any later version. * | 7 | * (at your option) any later version. * | ||
8 | ***************************************************************************/ | 8 | ***************************************************************************/ | ||
9 | 9 | | |||
10 | #include "dlgaccessibility.h" | 10 | #include "dlgaccessibility.h" | ||
11 | 11 | | |||
12 | #include "ui_dlgaccessibilitybase.h" | 12 | #include "ui_dlgaccessibilitybase.h" | ||
13 | 13 | | |||
14 | #include "settings.h" | ||||
15 | | ||||
16 | #include <QtTextToSpeech> | ||||
17 | | ||||
14 | DlgAccessibility::DlgAccessibility( QWidget * parent ) | 18 | DlgAccessibility::DlgAccessibility( QWidget * parent ) | ||
15 | : QWidget( parent ), m_selected( 0 ) | 19 | : QWidget( parent ), m_selected( 0 ) | ||
16 | { | 20 | { | ||
17 | m_dlg = new Ui_DlgAccessibilityBase(); | 21 | m_dlg = new Ui_DlgAccessibilityBase(); | ||
18 | m_dlg->setupUi( this ); | 22 | m_dlg->setupUi( this ); | ||
19 | 23 | | |||
20 | // ### not working yet, hide for now | 24 | // ### not working yet, hide for now | ||
21 | m_dlg->kcfg_HighlightImages->hide(); | 25 | m_dlg->kcfg_HighlightImages->hide(); | ||
22 | 26 | | |||
23 | m_color_pages.append( m_dlg->page_invert ); | 27 | m_color_pages.append( m_dlg->page_invert ); | ||
24 | m_color_pages.append( m_dlg->page_paperColor ); | 28 | m_color_pages.append( m_dlg->page_paperColor ); | ||
25 | m_color_pages.append( m_dlg->page_darkLight ); | 29 | m_color_pages.append( m_dlg->page_darkLight ); | ||
26 | m_color_pages.append( m_dlg->page_bw ); | 30 | m_color_pages.append( m_dlg->page_bw ); | ||
27 | foreach ( QWidget * page, m_color_pages ) | 31 | foreach ( QWidget * page, m_color_pages ) | ||
28 | page->hide(); | 32 | page->hide(); | ||
29 | m_color_pages[ m_selected ]->show(); | 33 | m_color_pages[ m_selected ]->show(); | ||
30 | 34 | | |||
35 | // Populate tts engines | ||||
36 | const QStringList engines = QTextToSpeech::availableEngines(); | ||||
aacid: const | |||||
37 | for (const QString &engine: engines) { | ||||
aacid: use for ( : ) | |||||
38 | m_dlg->kcfg_ttsEngine->addItem (engine); | ||||
39 | } | ||||
40 | m_dlg->kcfg_ttsEngine->setProperty("kcfg_property", QByteArray("currentText")); | ||||
41 | | ||||
This doesn't follow the coding style in the rest of the file: There should be a whitespace right after '(' and before ')'. sander: This doesn't follow the coding style in the rest of the file: There should be a whitespace… | |||||
31 | connect(m_dlg->kcfg_RenderMode, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &DlgAccessibility::slotColorMode); | 42 | connect(m_dlg->kcfg_RenderMode, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &DlgAccessibility::slotColorMode); | ||
32 | } | 43 | } | ||
33 | 44 | | |||
34 | DlgAccessibility::~DlgAccessibility() | 45 | DlgAccessibility::~DlgAccessibility() | ||
35 | { | 46 | { | ||
36 | delete m_dlg; | 47 | delete m_dlg; | ||
37 | } | 48 | } | ||
38 | 49 | | |||
Show All 9 Lines |
const