You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdegraphics/kview/kviewviewer/kviewviewer.h

147 lines
3.7 KiB

/* This file is part of the KDE project
Copyright (C) 1999 Simon Hausmann <hausmann@kde.org>
2001-2002 Matthias Kretz <kretz@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __kviewviewer_h__
#define __kviewviewer_h__
#include "kimageviewer/viewer.h"
#include "kviewkonqextension.h"
#include <tqvaluevector.h>
#include "kviewvieweriface.h"
#include <kdemacros.h>
namespace KImageViewer { class Canvas; }
namespace KIO { class Job; }
class KTempFile;
class KAction;
class KActionMenu;
class KToggleAction;
class KSelectAction;
class KAboutData;
class TQBuffer;
class TQSize;
class KDirWatch;
template<class T>
class TQCache;
class KDE_EXPORT KViewViewer : public KImageViewer::Viewer, public KViewViewerIface
{
Q_OBJECT
friend class KViewKonqExtension;
public:
KViewViewer( TQWidget * parentWidget, const char * widgetName,
TQObject * parent, const char * name, const TQStringList & );
virtual ~KViewViewer();
KImageViewer::Canvas * canvas() const { return m_pCanvas; }
static KAboutData * createAboutData();
virtual void setReadWrite( bool readwrite = true );
KParts::BrowserExtension * browserExtension() const { return m_pExtension; }
bool saveAs( const KURL & );
void setModified( bool );
public slots:
virtual bool openURL( const KURL & );
virtual bool closeURL();
virtual void newImage( const TQImage & );
virtual void reload();
protected:
bool eventFilter( TQObject *, TQEvent * ); // for DnD
void abortLoad();
virtual bool openFile();
virtual bool saveFile();
virtual void setupActions();
void guiActivateEvent( KParts::GUIActivateEvent * );
void writeSettings();
protected slots:
void readSettings();
void zoomChanged( double );
void slotJobFinished( KIO::Job * );
void slotData( KIO::Job *, const TQByteArray & );
void slotSave();
void slotSaveAs();
void slotZoomIn();
void slotZoomOut();
void setZoom( const TQString & );
void updateZoomMenu( double zoom );
void slotFlipH();
void slotFlipV();
void slotRotateCCW();
void slotRotateCW();
void slotFitToWin();
void slotDel();
void slotPopupMenu( const TQPoint & );
void slotResultSaveAs( KIO::Job * );
void slotFileDirty( const TQString & );
void slotReloadUnmodified();
void slotToggleScrollbars();
void loadPlugins();
void switchBlendEffect();
void hasImage( bool );
private:
TQWidget * m_pParentWidget;
KIO::Job * m_pJob;
KViewKonqExtension * m_pExtension;
KImageViewer::Canvas * m_pCanvas;
KTempFile * m_pTempFile;
TQBuffer * m_pBuffer;
KDirWatch * m_pFileWatch;
// Actions:
KAction * m_paZoomIn;
KAction * m_paZoomOut;
KSelectAction * m_paZoom;
KActionMenu * m_paFlipMenu;
KAction * m_paFlipH;
KAction * m_paFlipV;
KAction * m_paRotateCCW;
KAction * m_paRotateCW;
KAction * m_paSave;
KAction * m_paSaveAs;
KAction * m_paFitToWin;
KToggleAction * m_paShowScrollbars;
TQString m_popupDoc;
TQString m_mimeType;
TQString m_newMimeType;
TQString m_sCaption;
TQValueVector<unsigned int> m_vEffects;
};
// vim:sw=4:ts=4
#endif