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

Plasma

renderthread.h

Go to the documentation of this file.
00001 /*
00002   Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
00003 
00004   This program is free software; you can redistribute it and/or modify
00005   it under the terms of the GNU General Public License as published by
00006   the Free Software Foundation; either version 2 of the License, or
00007   (at your option) any later version.
00008 */
00009 
00010 #ifndef RENDERTHREAD_H
00011 #define RENDERTHREAD_H
00012 
00013 #include "backgroundpackage.h"
00014 #include <QColor>
00015 #include <QImage>
00016 #include <QMutex>
00017 #include <QThread>
00018 #include <QWaitCondition>
00019 
00020 class RenderThread : public QThread
00021 {
00022 Q_OBJECT
00023 public:
00024     RenderThread(const QSize &size, float ratio);
00025     virtual ~RenderThread();
00026     
00027     int render(const QString &file,
00028                const QColor &color,
00029                Background::ResizeMethod method,
00030                Qt::TransformationMode mode);
00031                
00032     void setSize(const QSize &size);
00033 protected:
00034     virtual void run();
00035 private:
00036     QMutex m_mutex; // to protect parameters
00037     QWaitCondition m_condition;
00038     
00039     // protected by mutex
00040     int m_current_token;
00041     QString m_file;
00042     QColor m_color;
00043     QSize m_size;
00044     float m_ratio;
00045     Background::ResizeMethod m_method;
00046     Qt::TransformationMode m_mode;
00047     
00048     bool m_abort;
00049     bool m_restart;
00050 signals:
00051     void done(int token, const QImage &pixmap);
00052 };
00053 
00054 #endif // RENDERTHREAD_H

Plasma

Skip menu "Plasma"
  • 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
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference 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