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

Applets

tasks.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2007 by Robert Knight <robertknight@gmail.com>          *
00003  *   Copyright (C) 2008 by Alexis Ménard <darktears31@gmail.com>           *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA .        *
00019  ***************************************************************************/
00020 
00021 #ifndef TASKS_H
00022 #define TASKS_H
00023 
00024 // Own
00025 #include "ui_tasksConfig.h"
00026 
00027 // Qt
00028 #include <QTimer>
00029 #include <QSize>
00030 
00031 // KDE
00032 #include <taskmanager/taskmanager.h>
00033 #include <taskmanager/abstractgroupableitem.h>
00034 #include <taskmanager/groupmanager.h>
00035 #include <taskmanager/taskitem.h>
00036 #include <taskmanager/startup.h>
00037 #include <KDialog>
00038 
00039 // Plasma
00040 #include <Plasma/Applet>
00041 
00042 class QGraphicsLinearLayout;
00043 
00044 class KColorScheme;
00045 
00046 namespace Plasma
00047 {
00048     class LayoutAnimator;
00049     class FrameSvg;
00050 } // namespace Plasma
00051 
00052 class WindowTaskItem;
00053 class TaskGroupItem;
00054 class AbstractTaskItem;
00055 
00056 using TaskManager::StartupPtr;
00057 using TaskManager::TaskPtr;
00058 using TaskManager::StartupPtr;
00059 using TaskManager::GroupPtr;
00060 using TaskManager::AbstractItemPtr;
00061 using TaskManager::AbstractGroupableItem;
00062 using TaskManager::GroupManager;
00063 using TaskManager::TaskItem;
00064 using TaskManager::TaskGroup;
00065 
00073 class Tasks : public Plasma::Applet
00074 {
00075     Q_OBJECT
00076 public:
00081         explicit Tasks(QObject *parent, const QVariantList &args = QVariantList());
00082         ~Tasks();
00083 
00084         void init();
00085 
00086         void constraintsEvent(Plasma::Constraints constraints);
00087 
00088         Plasma::FrameSvg *itemBackground();
00089         KColorScheme *colorScheme();
00090 
00091         qreal itemLeftMargin() { return m_leftMargin; }
00092         qreal itemRightMargin() { return m_rightMargin; }
00093         qreal itemTopMargin() { return m_topMargin; }
00094         qreal itemBottomMargin() { return m_bottomMargin; }
00095         void resizeItemBackground(const QSizeF &newSize);
00096 
00097         TaskGroupItem*  rootGroupItem();
00098 
00099         TaskManager::GroupManager &groupManager() const;
00100 
00101         Qt::KeyboardModifiers groupModifierKey() const;
00102 
00103         bool showTooltip() const;
00104 
00105 
00106 signals:
00110     void constraintsChanged(Plasma::Constraints);
00111 
00112     void desktopChanged(int,int);
00113     void settingsChanged();
00114 
00115 protected slots:
00116         void configAccepted();
00117         void themeRefresh();
00118 
00119 protected:
00120         void createConfigurationInterface(KConfigDialog *parent);
00121         QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint = QSizeF()) const;
00122         void adjustGroupingStrategy();
00123 
00124 private slots:
00128         void reload();
00129         //void groupRemoved(TaskGroup *item);
00130         void changeSizeHint(Qt::SizeHint which);
00131         void dialogGroupingChanged(int index);
00132 
00133 private:
00134         bool m_showTooltip;
00135         Plasma::LayoutAnimator *m_animator;
00136         QGraphicsLinearLayout *layout;
00137 
00138         Ui::tasksConfig m_ui;
00139         QTimer m_screenTimer;
00140 
00141         Plasma::FrameSvg *m_taskItemBackground;
00142         KColorScheme *m_colorScheme;
00143         qreal m_leftMargin;
00144         qreal m_topMargin;
00145         qreal m_rightMargin;
00146         qreal m_bottomMargin;
00147 
00148         TaskGroupItem *m_rootGroupItem;
00149         GroupManager *m_groupManager;
00150         TaskManager::GroupManager::TaskGroupingStrategy m_groupingStrategy;
00151         bool m_groupWhenFull;
00152         Qt::KeyboardModifier m_groupModifierKey;
00153 
00154         int m_currentDesktop;
00155 
00156 };
00157 
00158 #endif

Applets

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

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.7
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