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

kalarm

resourceselector.h

Go to the documentation of this file.
00001 /*
00002  *  resourceselector.cpp  -  alarm calendar resource selection widget
00003  *  Program:  kalarm
00004  *  Copyright © 2006,2007 by David Jarvie <djarvie@kde.org>
00005  *  Based on KOrganizer's ResourceView class and KAddressBook's ResourceSelection class,
00006  *  Copyright (C) 2003,2004 Cornelius Schumacher <schumacher@kde.org>
00007  *  Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
00008  *  Copyright (c) 2004 Tobias Koenig <tokoe@kde.org>
00009  *
00010  *  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version.
00014  *
00015  *  This program is distributed in the hope that it will be useful,
00016  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00018  *  GNU General Public License for more details.
00019  *
00020  *  You should have received a copy of the GNU General Public License along
00021  *  with this program; if not, write to the Free Software Foundation, Inc.,
00022  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00023  */
00024 
00025 #ifndef RESOURCESELECTOR_H
00026 #define RESOURCESELECTOR_H
00027 
00028 #include <QModelIndex>
00029 #include <QFrame>
00030 #include <QSize>
00031 #include "alarmresource.h"
00032 #include "alarmresources.h"
00033 
00034 class QPushButton;
00035 class QResizeEvent;
00036 class KAction;
00037 class KActionCollection;
00038 class KToggleAction;
00039 class KComboBox;
00040 class KMenu;
00041 class ResourceView;
00042 using KCal::ResourceCalendar;
00043 
00044 
00048 class ResourceSelector : public QFrame
00049 {
00050     Q_OBJECT
00051     public:
00052     explicit ResourceSelector(AlarmResources*, QWidget* parent = 0);
00053     AlarmResources* calendar() const    { return mCalendar; }
00054     void  initActions(KActionCollection*);
00055     void  setContextMenu(KMenu*);
00056 
00057     signals:
00058     void  resized(const QSize& oldSize, const QSize& newSize);
00059 
00060     protected:
00061     virtual void resizeEvent(QResizeEvent*);
00062 
00063     private slots:
00064     void  alarmTypeSelected();
00065     void  addResource();
00066     void  editResource();
00067     void  removeResource();
00068     void  selectionChanged();
00069     void  contextMenuRequested(const QPoint&);
00070     void  reloadResource();
00071     void  saveResource();
00072     void  setStandard();
00073     void  setColour();
00074     void  clearColour();
00075     void  importCalendar();
00076     void  showInfo();
00077     void  archiveDaysChanged(int days);
00078 
00079     private:
00080     AlarmResource* currentResource() const;
00081 
00082     AlarmResources* mCalendar;
00083     KComboBox*      mAlarmType;
00084     ResourceView*   mListView;
00085     QPushButton*    mAddButton;
00086     QPushButton*    mDeleteButton;
00087     QPushButton*    mEditButton;
00088     QList<AlarmResource*> mResourcesToClose;
00089     AlarmResource::Type mCurrentAlarmType;
00090     KMenu*          mContextMenu;
00091     KAction*        mActionReload;
00092     KAction*        mActionSave;
00093     KAction*        mActionShowDetails;
00094     KAction*        mActionSetColour;
00095     KAction*        mActionClearColour;
00096     KAction*        mActionEdit;
00097     KAction*        mActionRemove;
00098     KAction*        mActionImport;
00099     KToggleAction*  mActionSetDefault;
00100 };
00101 
00102 #endif

kalarm

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

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal