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

kmail

  • sources
  • kde-4.12
  • kdepim
  • kmail
vacationmanager.cpp
Go to the documentation of this file.
1 /*
2  Copyright (c) 2013 Montel Laurent <montel@kde.org>
3 
4  This program is free software; you can redistribute it and/or modify it
5  under the terms of the GNU General Public License, version 2, as
6  published by the Free Software Foundation.
7 
8  This program is distributed in the hope that it will be useful, but
9  WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License along
14  with this program; if not, write to the Free Software Foundation, Inc.,
15  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 
18 #include "vacationmanager.h"
19 #include "ksieveui/vacation/vacation.h"
20 
21 #include <KMessageBox>
22 #include <KLocale>
23 
24 #include <QWidget>
25 
26 using namespace KMail;
27 
28 VacationManager::VacationManager(QWidget *parent)
29  : QObject(parent),
30  mWidget(parent)
31 {
32 }
33 
34 VacationManager::~VacationManager()
35 {
36 }
37 
38 void VacationManager::checkVacation()
39 {
40  delete mCheckVacation;
41 
42  mCheckVacation = new KSieveUi::Vacation( this, true /* check only */ );
43  connect( mCheckVacation, SIGNAL(scriptActive(bool,QString)), SIGNAL(updateVacationScriptStatus(bool,QString)) );
44  connect( mCheckVacation, SIGNAL(requestEditVacation()), SIGNAL(editVacation()) );
45 }
46 
47 void VacationManager::slotEditVacation()
48 {
49  if ( mVacation ) {
50  mVacation->showVacationDialog();
51  return;
52  }
53 
54  mVacation = new KSieveUi::Vacation( this );
55  connect( mVacation, SIGNAL(scriptActive(bool,QString)), SIGNAL(updateVacationScriptStatus(bool,QString)) );
56  connect( mVacation, SIGNAL(requestEditVacation()), SLOT(slotEditVacation()) );
57  if ( mVacation->isUsable() ) {
58  connect( mVacation, SIGNAL(result(bool)), mVacation, SLOT(deleteLater()) );
59  } else {
60  const QString msg = i18n("KMail's Out of Office Reply functionality relies on "
61  "server-side filtering. You have not yet configured an "
62  "IMAP server for this.\n"
63  "You can do this on the \"Filtering\" tab of the IMAP "
64  "account configuration.");
65  KMessageBox::sorry( mWidget, msg, i18n("No Server-Side Filtering Configured") );
66 
67  delete mVacation; // QGuardedPtr sets itself to 0!
68  }
69 }
70 
71 
72 #include "vacationmanager.moc"
KMail::VacationManager::updateVacationScriptStatus
void updateVacationScriptStatus(bool, const QString &)
QWidget
QObject
vacationmanager.h
KMail::VacationManager::VacationManager
VacationManager(QWidget *parent)
Definition: vacationmanager.cpp:28
KMail::VacationManager::~VacationManager
~VacationManager()
Definition: vacationmanager.cpp:34
KMail::VacationManager::editVacation
void editVacation()
KMail::VacationManager::slotEditVacation
void slotEditVacation()
Definition: vacationmanager.cpp:47
KMail::VacationManager::checkVacation
void checkVacation()
Definition: vacationmanager.cpp:38
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kmail

Skip menu "kmail"
  • 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