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

libtaskmanager

task.h

Go to the documentation of this file.
00001 /*****************************************************************
00002 
00003 Copyright (c) 2000-2001 Matthias Elter <elter@kde.org>
00004 Copyright (c) 2001 Richard Moore <rich@kde.org>
00005 
00006 Permission is hereby granted, free of charge, to any person obtaining a copy
00007 of this software and associated documentation files (the "Software"), to deal
00008 in the Software without restriction, including without limitation the rights
00009 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00010 copies of the Software, and to permit persons to whom the Software is
00011 furnished to do so, subject to the following conditions:
00012 
00013 The above copyright notice and this permission notice shall be included in
00014 all copies or substantial portions of the Software.
00015 
00016 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00017 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00018 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
00019 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
00020 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00021 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00022 
00023 ******************************************************************/
00024 
00025 #ifndef TASK_H
00026 #define TASK_H
00027 
00028 // Qt
00029 #include <QtGui/QDrag>
00030 #include <QtGui/QPixmap>
00031 #include <QtGui/QWidget>
00032 #include <QtGui/QIcon>
00033 
00034 // KDE
00035 #include <KDE/KSharedPtr>
00036 #include <KDE/KWindowSystem>
00037 #include <KDE/NETWinInfo>
00038 
00039 #include <taskmanager/taskmanager.h>
00040 #include <taskmanager/taskmanager_export.h>
00041 
00042 namespace TaskManager
00043 {
00044 
00050 class TASKMANAGER_EXPORT Task : public QObject, public KShared
00051 {
00052     Q_OBJECT
00053     Q_PROPERTY( QString visibleName READ visibleName )
00054     Q_PROPERTY( QString name READ name )
00055     Q_PROPERTY( QString className READ className )
00056     Q_PROPERTY( QString visibleNameWithState READ visibleNameWithState )
00057     Q_PROPERTY( QPixmap pixmap READ pixmap )
00058     Q_PROPERTY( bool maximized READ isMaximized )
00059     Q_PROPERTY( bool minimized READ isMinimized )
00060     // KDE4 deprecated
00061     Q_PROPERTY( bool iconified READ isIconified )
00062     Q_PROPERTY( bool shaded READ isShaded WRITE setShaded )
00063     Q_PROPERTY( bool active READ isActive )
00064     Q_PROPERTY( bool onCurrentDesktop READ isOnCurrentDesktop )
00065     Q_PROPERTY( bool onAllDesktops READ isOnAllDesktops )
00066     Q_PROPERTY( bool alwaysOnTop READ isAlwaysOnTop WRITE setAlwaysOnTop )
00067     Q_PROPERTY( bool modified READ isModified )
00068     Q_PROPERTY( bool demandsAttention READ demandsAttention )
00069     Q_PROPERTY( int desktop READ desktop )
00070 
00071 public:
00072     Task(WId win, QObject *parent, const char *name = 0);
00073     virtual ~Task();
00074 
00075     WId window() const;
00076     KWindowInfo info() const;
00077 
00078     QString visibleName() const;
00079     QString visibleNameWithState() const;
00080     QString name() const;
00081     QString className() const;
00082     QString classClass() const;
00083 
00088     WindowList transients() const;
00089 
00095     QPixmap pixmap() const;
00096 
00110     QPixmap bestIcon( int size, bool &isStaticIcon );
00111 
00121     QPixmap icon( int width, int height, bool allowResize = false );
00122 
00126     QIcon icon();
00127 
00132     static bool idMatch(const QString &, const QString &);
00133 
00134     // state
00135 
00139     bool isMaximized() const;
00140 
00144     bool isMinimized() const;
00145 
00150     bool isIconified() const;
00151 
00155     bool isShaded() const;
00156 
00160     bool isActive() const;
00161 
00166     bool isOnTop() const;
00167 
00171     bool isOnCurrentDesktop() const;
00172 
00176     bool isOnAllDesktops() const;
00177 
00182     bool isAlwaysOnTop() const;
00183 
00188     bool isKeptBelowOthers() const;
00189 
00193     bool isFullScreen() const;
00194 
00201     bool isModified() const ;
00202 
00206     int desktop() const;
00207 
00211     bool demandsAttention() const;
00212 
00213 
00217     bool isOnScreen( int screen ) const;
00218 
00222     bool showInTaskbar() const;
00223 
00227     bool showInPager() const;
00228 
00232     QRect geometry() const;
00233 
00234     // internal
00235 
00236     //* @internal
00237     ::TaskManager::TaskChanges refresh(unsigned int dirty);
00238     //* @internal
00239     void addTransient( WId w, const NETWinInfo& info );
00240     //* @internal
00241     void removeTransient( WId w );
00242     //* @internal
00243     bool hasTransient(WId w) const;
00244     //* @internal
00245     void updateDemandsAttentionState( WId w );
00246     //* @internal
00247     void setActive(bool a);
00248 
00252     void addMimeData(QMimeData *mimeData) const;
00253 
00257     static QString mimetype();
00258 
00262     static QString groupMimetype();
00263 
00268     static WId idFromMimeData(const QMimeData *mimeData, bool *ok = 0);
00269 
00274     static QList<WId> idsFromMimeData(const QMimeData *mimeData, bool *ok = 0);
00275 
00276 public Q_SLOTS:
00280     void setMaximized(bool);
00281     void toggleMaximized();
00282 
00286     void restore();
00287 
00291     void move();
00292 
00296     void resize();
00297 
00301     void setIconified(bool);
00302     void toggleIconified();
00303 
00307     void close();
00308 
00312     void raise();
00313 
00317     void lower();
00318 
00322     void activate();
00323 
00329     void activateRaiseOrIconify();
00330 
00334     void setAlwaysOnTop(bool);
00335     void toggleAlwaysOnTop();
00336 
00340     void setKeptBelowOthers(bool);
00341     void toggleKeptBelowOthers();
00342 
00346     void setFullScreen(bool);
00347     void toggleFullScreen();
00348 
00353     void setShaded(bool);
00354     void toggleShaded();
00355 
00359     void toDesktop(int);
00360 
00364     void toCurrentDesktop();
00365 
00371     void publishIconGeometry(QRect);
00372 
00373 Q_SIGNALS:
00377     void changed(::TaskManager::TaskChanges change);
00378 
00382     void activated();
00383 
00387     void deactivated();
00388 
00389 protected:
00390     void findWindowFrameId();
00391     void timerEvent(QTimerEvent *event);
00392     //* @internal */
00393     void refreshIcon();
00394 
00395 private:
00396     class Private;
00397     Private * const d;
00398 };
00399 
00400 } // TaskManager namespace
00401 
00402 #endif

libtaskmanager

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

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