• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

messagelist

  • sources
  • kde-4.12
  • kdepim
  • messagelist
  • utils
themeconfigbutton.cpp
Go to the documentation of this file.
1 /* Copyright 2009 James Bendig <james@imptalk.com>
2 
3  This program is free software; you can redistribute it and/or
4  modify it under the terms of the GNU General Public License as
5  published by the Free Software Foundation; either version 2 of
6  the License or (at your option) version 3 or any later version
7  accepted by the membership of KDE e.V. (or its successor approved
8  by the membership of KDE e.V.), which shall act as a proxy
9  defined in Section 14 of version 3 of the license.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 #include "messagelist/utils/themeconfigbutton.h"
20 
21 #include "messagelist/core/theme.h"
22 #include "messagelist/utils/themecombobox.h"
23 #include "messagelist/utils/themecombobox_p.h"
24 #include "messagelist/utils/configurethemesdialog.h"
25 #include "messagelist/core/manager.h"
26 
27 #include <klocale.h>
28 
29 using namespace MessageList::Core;
30 using namespace MessageList::Utils;
31 
32 class MessageList::Utils::ThemeConfigButtonPrivate
33 {
34 public:
35  ThemeConfigButtonPrivate( ThemeConfigButton *owner )
36  : q( owner ), mThemeComboBox( 0 ) { }
37 
38  ThemeConfigButton * const q;
39 
40  const ThemeComboBox * mThemeComboBox;
41 
42  void slotConfigureThemes();
43 };
44 
45 void ThemeConfigButtonPrivate::slotConfigureThemes()
46 {
47  QString currentThemeID;
48  if ( mThemeComboBox != 0 )
49  currentThemeID = mThemeComboBox->currentTheme();
50 
51  ConfigureThemesDialog *dialog = new ConfigureThemesDialog( q->window() );
52  dialog->selectTheme( currentThemeID );
53 
54  QObject::connect( dialog, SIGNAL(okClicked()),
55  q, SIGNAL(configureDialogCompleted()) );
56 
57  dialog->show();
58 }
59 
60 
61 ThemeConfigButton::ThemeConfigButton( QWidget * parent, const ThemeComboBox * themeComboBox )
62 : KPushButton( i18n( "Configure..." ), parent ), d( new ThemeConfigButtonPrivate( this ) )
63 {
64  d->mThemeComboBox = themeComboBox;
65  connect( this, SIGNAL(pressed()),
66  this, SLOT(slotConfigureThemes()) );
67 
68  //Keep theme combo up-to-date with any changes made in the configure dialog.
69  if ( d->mThemeComboBox != 0 )
70  connect( this, SIGNAL(configureDialogCompleted()),
71  d->mThemeComboBox, SLOT(slotLoadThemes()) );
72 }
73 
74 ThemeConfigButton::~ThemeConfigButton()
75 {
76  delete d;
77 }
78 
79 
80 #include "themeconfigbutton.moc"
KPushButton
themecombobox_p.h
QWidget
theme.h
MessageList::Utils::ThemeConfigButton::configureDialogCompleted
void configureDialogCompleted()
A signal emitted when configure dialog has been successfully completed.
themecombobox.h
MessageList::Utils::ThemeConfigButton::~ThemeConfigButton
~ThemeConfigButton()
Definition: themeconfigbutton.cpp:74
themeconfigbutton.h
MessageList::Utils::ThemeConfigButton
A specialized KPushButton that displays the theme configure dialog when pressed.
Definition: themeconfigbutton.h:38
configurethemesdialog.h
manager.h
MessageList::Utils::ConfigureThemesDialog
Definition: configurethemesdialog.h:45
MessageList::Utils::ConfigureThemesDialog::selectTheme
void selectTheme(const QString &themeId)
Definition: configurethemesdialog.cpp:179
MessageList::Utils::ThemeComboBox
A specialized KComboBox that lists all message list themes.
Definition: themecombobox.h:44
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:32 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

messagelist

Skip menu "messagelist"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal