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

mailcommon

  • sources
  • kde-4.12
  • kdepim
  • mailcommon
  • folder
folderselectiondialog.h
Go to the documentation of this file.
1 /* -*- mode: C++; c-file-style: "gnu" -*-
2 
3  Copyright (c) 2009 Montel Laurent <montel@kde.org>
4 
5  This program is free software; you can redistribute it and/or modify it
6  under the terms of the GNU General Public License, version 2, as
7  published by the Free Software Foundation.
8 
9  This program is distributed in the hope that it will be useful, but
10  WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License along
15  with this program; if not, write to the Free Software Foundation, Inc.,
16  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 
19 #ifndef MAILCOMMON_FOLDERSELECTIONDIALOG_H
20 #define MAILCOMMON_FOLDERSELECTIONDIALOG_H
21 
22 #include "mailcommon_export.h"
23 
24 #include <Akonadi/Collection>
25 
26 #include <KDialog>
27 
28 #include <QAbstractItemView>
29 
30 class KJob;
31 
32 namespace MailCommon {
33 
38 class MAILCOMMON_EXPORT FolderSelectionDialog : public KDialog
39 {
40  Q_OBJECT
41 
42  public:
43  enum SelectionFolderOption {
44  None = 0,
45  EnableCheck = 1,
46  ShowUnreadCount = 2,
47  HideVirtualFolder = 4,
48  NotAllowToCreateNewFolder = 8,
49  HideOutboxFolder = 16,
50  NotUseGlobalSettings = 64
51  };
52  Q_DECLARE_FLAGS( SelectionFolderOptions, SelectionFolderOption )
53 
54  FolderSelectionDialog( QWidget *parent, FolderSelectionDialog::SelectionFolderOptions options );
55  ~FolderSelectionDialog();
56 
57  void setSelectionMode( QAbstractItemView::SelectionMode mode );
58  QAbstractItemView::SelectionMode selectionMode() const;
59 
60  Akonadi::Collection selectedCollection() const;
61  void setSelectedCollection( const Akonadi::Collection &collection );
62 
63  Akonadi::Collection::List selectedCollections() const;
64 
65  private slots:
66  void slotSelectionChanged();
67  void slotAddChildFolder();
68  void collectionCreationResult( KJob * );
69  void rowsInserted( const QModelIndex &col, int, int );
70  void slotDoubleClick(const QModelIndex&);
71  void slotFolderTreeWidgetContextMenuRequested(const QPoint&);
72 
73  protected:
74  void focusTreeView();
75  void readConfig();
76  void writeConfig();
77  bool canCreateCollection( Akonadi::Collection &parentCol );
78 
79  /*reimp*/
80  void hideEvent( QHideEvent * );
81 
82  /*reimp*/
83  void showEvent( QShowEvent * );
84 
85  private:
86  class FolderSelectionDialogPrivate;
87  FolderSelectionDialogPrivate *const d;
88 };
89 
90 }
91 
92 #endif
QWidget
KDialog
mailcommon_export.h
MailCommon::FolderSelectionDialog::SelectionFolderOption
SelectionFolderOption
Definition: folderselectiondialog.h:43
MailCommon::FolderSelectionDialog
A dialog that lets the user select a folder.
Definition: folderselectiondialog.h:38
MAILCOMMON_EXPORT
#define MAILCOMMON_EXPORT
Definition: mailcommon_export.h:35
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:14 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

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