2006-03-31 15:14:47 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2006 by Pino Toscano <toscano.pino@tiscali.it> *
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#include "dlgaccessibility.h"
|
|
|
|
|
2007-04-19 18:30:20 +00:00
|
|
|
#include "ui_dlgaccessibilitybase.h"
|
|
|
|
|
2006-03-31 15:14:47 +00:00
|
|
|
DlgAccessibility::DlgAccessibility( QWidget * parent )
|
2007-09-13 20:16:19 +00:00
|
|
|
: QWidget( parent ), m_selected( 0 )
|
2006-03-31 15:14:47 +00:00
|
|
|
{
|
2007-09-13 20:16:19 +00:00
|
|
|
m_dlg = new Ui_DlgAccessibilityBase();
|
|
|
|
m_dlg->setupUi( this );
|
|
|
|
|
2008-01-01 00:46:54 +00:00
|
|
|
// ### not working yet, hide for now
|
|
|
|
m_dlg->kcfg_HighlightImages->hide();
|
|
|
|
|
2007-09-13 20:16:19 +00:00
|
|
|
m_color_pages.append( m_dlg->page_invert );
|
|
|
|
m_color_pages.append( m_dlg->page_paperColor );
|
|
|
|
m_color_pages.append( m_dlg->page_darkLight );
|
|
|
|
m_color_pages.append( m_dlg->page_bw );
|
|
|
|
foreach ( QWidget * page, m_color_pages )
|
|
|
|
page->hide();
|
|
|
|
m_color_pages[ m_selected ]->show();
|
|
|
|
|
2014-10-01 12:02:01 +00:00
|
|
|
connect(m_dlg->kcfg_RenderMode, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &DlgAccessibility::slotColorMode);
|
2007-09-13 20:16:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DlgAccessibility::~DlgAccessibility()
|
|
|
|
{
|
|
|
|
delete m_dlg;
|
2006-03-31 15:14:47 +00:00
|
|
|
}
|
2007-09-13 20:16:19 +00:00
|
|
|
|
|
|
|
void DlgAccessibility::slotColorMode( int mode )
|
|
|
|
{
|
|
|
|
m_color_pages[ m_selected ]->hide();
|
|
|
|
m_color_pages[ mode ]->show();
|
|
|
|
|
|
|
|
m_selected = mode;
|
|
|
|
}
|
|
|
|
|
2014-08-08 22:00:07 +00:00
|
|
|
#include "moc_dlgaccessibility.cpp"
|