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

mailcommon

  • sources
  • kde-4.14
  • kdepim
  • mailcommon
  • collectionpage
incidencesforwidget.cpp
Go to the documentation of this file.
1 /*
2  Copyright (c) 2014-2015 Montel Laurent <montel@kde.org>
3 
4  This library is free software; you can redistribute it and/or modify it
5  under the terms of the GNU Library General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or (at your
7  option) any later version.
8 
9  This library is distributed in the hope that it will be useful, but WITHOUT
10  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12  License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to the
16  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  02110-1301, USA.
18 
19 */
20 
21 #include "incidencesforwidget.h"
22 #include <QLabel>
23 #include <QHBoxLayout>
24 #include <KLocalizedString>
25 #include <KComboBox>
26 
27 using namespace MailCommon;
28 
29 IncidencesForWidget::IncidencesForWidget(QWidget *parent)
30  : QWidget(parent)
31 {
32  QHBoxLayout *hbox = new QHBoxLayout(this);
33  hbox->setMargin(0);
34 
35  QLabel *label = new QLabel( i18n( "Generate free/&busy and activate alarms for:" ), this );
36  label->setObjectName(QLatin1String("contentstypelabel"));
37  hbox->addWidget(label);
38 
39  mIncidencesForComboBox = new KComboBox( this );
40  label->setBuddy( mIncidencesForComboBox );
41  hbox->addWidget(mIncidencesForComboBox);
42 
43  mIncidencesForComboBox->addItem( i18n( "Nobody" ) );
44  mIncidencesForComboBox->addItem( i18n( "Admins of This Folder" ) );
45  mIncidencesForComboBox->addItem( i18n( "All Readers of This Folder" ) );
46  const QString whatsThisForMyOwnFolders =
47  i18n( "This setting defines which users sharing "
48  "this folder should get \"busy\" periods in their freebusy lists "
49  "and should see the alarms for the events or tasks in this folder. "
50  "The setting applies to Calendar and Task folders only "
51  "(for tasks, this setting is only used for alarms).\n\n"
52  "Example use cases: if the boss shares a folder with his secretary, "
53  "only the boss should be marked as busy for his meetings, so he should "
54  "select \"Admins\", since the secretary has no admin rights on the folder.\n"
55  "On the other hand if a working group shares a Calendar for "
56  "group meetings, all readers of the folders should be marked "
57  "as busy for meetings.\n"
58  "A company-wide folder with optional events in it would use \"Nobody\" "
59  "since it is not known who will go to those events." );
60 
61  mIncidencesForComboBox->setObjectName(QLatin1String("contentstypecombobox"));
62  mIncidencesForComboBox->setWhatsThis( whatsThisForMyOwnFolders );
63  connect(mIncidencesForComboBox, SIGNAL(currentIndexChanged(int)), SIGNAL(currentIndexChanged(int)));
64 }
65 
66 IncidencesForWidget::~IncidencesForWidget()
67 {
68 
69 }
70 
71 int IncidencesForWidget::currentIndex() const
72 {
73  return mIncidencesForComboBox->currentIndex();
74 }
75 
76 void IncidencesForWidget::setCurrentIndex(int index)
77 {
78  mIncidencesForComboBox->setCurrentIndex(index);
79 }
80 
QWidget
QHBoxLayout
QLabel::setBuddy
void setBuddy(QWidget *buddy)
QBoxLayout::addWidget
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
MailCommon::IncidencesForWidget::setCurrentIndex
void setCurrentIndex(int index)
Definition: incidencesforwidget.cpp:76
QObject::setObjectName
void setObjectName(const QString &name)
MailCommon::IncidencesForWidget::currentIndexChanged
void currentIndexChanged(int value)
QString
QLayout::setMargin
void setMargin(int margin)
MailCommon::IncidencesForWidget::currentIndex
int currentIndex() const
Definition: incidencesforwidget.cpp:71
incidencesforwidget.h
MailCommon::IncidencesForWidget::~IncidencesForWidget
~IncidencesForWidget()
Definition: incidencesforwidget.cpp:66
QLatin1String
MailCommon::IncidencesForWidget::IncidencesForWidget
IncidencesForWidget(QWidget *parent=0)
Definition: incidencesforwidget.cpp:29
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QLabel
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

mailcommon

Skip menu "mailcommon"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

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
  • pimprint

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