• Skip to content
  • Skip to link menu
KDE 4.2 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();
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     void setRatio(float ratio);
00034 
00035 protected:
00036     virtual void run();
00037 
00038 private:
00039     QMutex m_mutex; // to protect parameters
00040     QWaitCondition m_condition;
00041 
00042     // protected by mutex
00043     int m_current_token;
00044     QString m_file;
00045     QColor m_color;
00046     QSize m_size;
00047     float m_ratio;
00048     Background::ResizeMethod m_method;
00049     Qt::TransformationMode m_mode;
00050 
00051     bool m_abort;
00052     bool m_restart;
00053 
00054 signals:
00055     void done(int token, const QImage &pixmap);
00056 };
00057 
00058 #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
  •   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