Main Page | Class List | File List | Class Members | File Members | Related Pages

grabber.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Bojan D.                                        *
00003  *   bojan_d@users.sourceforge.net                                         *
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  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 
00027 #ifndef GRABBER_H
00028 #define GRABBER_H
00029 
00030 #include <qobject.h>
00031 #include <qpixmap.h>
00032 
00033 #include <X11/Xlib.h>
00034 #include <X11/Xatom.h>
00035 
00036 #include "configuration.h"
00037 
00044 class Grabber : public QObject
00045 {
00046 Q_OBJECT
00047 public:
00048         
00050     Grabber(QObject *parent= 0, const char *name= 0);
00051 
00053     virtual ~Grabber();
00054         
00056         QPixmap capture();
00057         
00059         void saveFiles();
00060 
00061 signals:
00063         void startCapture();
00065         void finishCapture();
00067         void startSave();
00069         void finishSave();
00071         void message(const QString& msg, int type = Configuration::Normal);
00072         
00073 private:
00081         QImage drawCaption( const QImage & image );
00082         
00088         void saveMain( const QString & fileName );
00089                 
00095         void saveThumb( const QString & fileName );
00096         
00103         void saveImage( const QString & fileName, const QImage& image );
00104         
00106         Window findRealWindow( Window w, int depth = 0 );
00107 
00108         QPixmap m_snapshot;             
00109 };
00110 
00111 #endif

Generated on Mon Sep 5 12:52:33 2005 for kwebsnap.kdevelop by  doxygen 1.3.9.1