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.
76 lines
2.1 KiB
76 lines
2.1 KiB
15 years ago
|
/*
|
||
|
* This file is part of the KDE libraries
|
||
13 years ago
|
* Copyright (c) 2001-2002 Michael Goffioul <tdeprint@swing.be>
|
||
15 years ago
|
*
|
||
|
* This library is free software; you can redistribute it and/or
|
||
|
* modify it under the terms of the GNU Library General Public
|
||
|
* License version 2 as published by the Free Software Foundation.
|
||
|
*
|
||
|
* This library 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
|
||
|
* Library General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU Library General Public License
|
||
|
* along with this library; see the file COPYING.LIB. If not, write to
|
||
|
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
* Boston, MA 02110-1301, USA.
|
||
|
**/
|
||
|
|
||
|
#ifndef POSTERPREVIEW_H
|
||
|
#define POSTERPREVIEW_H
|
||
|
|
||
14 years ago
|
#include <tqframe.h>
|
||
|
#include <tqvaluelist.h>
|
||
15 years ago
|
|
||
|
class KProcess;
|
||
|
|
||
14 years ago
|
class PosterPreview : public TQFrame
|
||
15 years ago
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
14 years ago
|
PosterPreview( TQWidget *parent = 0, const char *name = 0 );
|
||
|
PosterPreview( const TQString& postersize, const TQString& mediasize, TQWidget *parent = 0, const char *name = 0 );
|
||
15 years ago
|
~PosterPreview();
|
||
|
|
||
|
public slots:
|
||
|
void setPosterSize( int );
|
||
14 years ago
|
void setPosterSize( const TQString& );
|
||
15 years ago
|
void setMediaSize( int );
|
||
14 years ago
|
void setMediaSize( const TQString& );
|
||
15 years ago
|
void setCutMargin( int );
|
||
|
void updatePoster();
|
||
14 years ago
|
void setSelectedPages( const TQString& );
|
||
15 years ago
|
|
||
|
signals:
|
||
14 years ago
|
void selectionChanged( const TQString& );
|
||
15 years ago
|
|
||
|
protected:
|
||
|
void parseBuffer();
|
||
14 years ago
|
void drawContents( TQPainter* );
|
||
15 years ago
|
void init();
|
||
|
void setDirty();
|
||
14 years ago
|
void mouseMoveEvent( TQMouseEvent* );
|
||
|
void mousePressEvent( TQMouseEvent* );
|
||
15 years ago
|
void emitSelectedPages();
|
||
|
|
||
|
protected slots:
|
||
|
void slotProcessStderr( KProcess*, char*, int );
|
||
|
void slotProcessExited( KProcess* );
|
||
|
|
||
|
private:
|
||
|
int m_rows, m_cols;
|
||
|
int m_pw, m_ph; // page size
|
||
|
int m_mw, m_mh; // cur margins
|
||
14 years ago
|
TQRect m_posterbb; // poster bounding box (without any margin)
|
||
15 years ago
|
KProcess *m_process;
|
||
14 years ago
|
TQString m_buffer;
|
||
|
TQString m_postersize, m_mediasize;
|
||
15 years ago
|
int m_cutmargin;
|
||
|
bool m_dirty;
|
||
14 years ago
|
TQRect m_boundingrect;
|
||
|
TQValueList<int> m_selectedpages;
|
||
15 years ago
|
};
|
||
|
|
||
|
#endif /* POSTERPREVIEW_H */
|