• 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
aggregationconfigbutton.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/aggregationconfigbutton.h"
20 
21 #include "messagelist/utils/aggregationcombobox.h"
22 #include "messagelist/utils/aggregationcombobox_p.h"
23 #include "messagelist/utils/configureaggregationsdialog.h"
24 #include "messagelist/core/manager.h"
25 
26 #include <klocale.h>
27 
28 using namespace MessageList::Core;
29 using namespace MessageList::Utils;
30 
31 class MessageList::Utils::AggregationConfigButtonPrivate
32 {
33 public:
34  AggregationConfigButtonPrivate( AggregationConfigButton *owner )
35  : q( owner ), mAggregationComboBox( 0 ) { }
36 
37  AggregationConfigButton * const q;
38 
39  const AggregationComboBox * mAggregationComboBox;
40 
41  void slotConfigureAggregations();
42 };
43 
44 AggregationConfigButton::AggregationConfigButton( QWidget * parent, const AggregationComboBox * aggregationComboBox )
45 : KPushButton( i18n( "Configure..." ), parent ), d( new AggregationConfigButtonPrivate( this ) )
46 {
47  d->mAggregationComboBox = aggregationComboBox;
48  connect( this, SIGNAL(pressed()),
49  this, SLOT(slotConfigureAggregations()) );
50 
51  // Keep aggregation combo up-to-date with any changes made in the configure dialog.
52  if ( d->mAggregationComboBox != 0 )
53  connect( this, SIGNAL(configureDialogCompleted()),
54  d->mAggregationComboBox, SLOT(slotLoadAggregations()) );
55 }
56 
57 AggregationConfigButton::~AggregationConfigButton()
58 {
59  delete d;
60 }
61 
62 void AggregationConfigButtonPrivate::slotConfigureAggregations()
63 {
64  QString currentAggregationID;
65  if ( mAggregationComboBox ) {
66  currentAggregationID = mAggregationComboBox->currentAggregation();
67  }
68 
69  ConfigureAggregationsDialog *dialog = new ConfigureAggregationsDialog( q->window() );
70  dialog->selectAggregation( currentAggregationID );
71 
72  QObject::connect( dialog, SIGNAL(okClicked()),
73  q, SIGNAL(configureDialogCompleted()) );
74 
75  dialog->show();
76 }
77 
78 #include "aggregationconfigbutton.moc"
KPushButton
MessageList::Utils::ConfigureAggregationsDialog
The dialog used for configuring MessageList::Aggregation sets.
Definition: configureaggregationsdialog.h:51
MessageList::Utils::AggregationConfigButton::~AggregationConfigButton
~AggregationConfigButton()
Definition: aggregationconfigbutton.cpp:57
QWidget
MessageList::Utils::AggregationConfigButton::configureDialogCompleted
void configureDialogCompleted()
A signal emitted when configure dialog has been successfully completed.
MessageList::Utils::ConfigureAggregationsDialog::selectAggregation
void selectAggregation(const QString &aggregationId)
Definition: configureaggregationsdialog.cpp:182
manager.h
MessageList::Utils::AggregationConfigButton
A specialized KPushButton that displays the aggregation configure dialog when pressed.
Definition: aggregationconfigbutton.h:38
MessageList::Utils::AggregationComboBox
A specialized KComboBox that lists all message list aggregations.
Definition: aggregationcombobox.h:43
configureaggregationsdialog.h
aggregationcombobox.h
aggregationcombobox_p.h
aggregationconfigbutton.h
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