Skip to content
Permalink
Browse files

Add composer html class

  • Loading branch information
mhugent committed Jul 24, 2012
1 parent 1e2e9c4 commit 682d8b34b6d3afa48d1c223d5b25a4f53fd76975
@@ -133,6 +133,7 @@ SET(QGIS_CORE_SRCS
composer/qgsnumericscalebarstyle.cpp
composer/qgssingleboxscalebarstyle.cpp
composer/qgsticksscalebarstyle.cpp
composer/qgscomposerhtml.cpp
composer/qgscomposermultiframe.cpp
composer/qgscomposition.cpp

@@ -0,0 +1,29 @@
/***************************************************************************
qgscomposerhtml.cpp
------------------------------------------------------------
begin : Julli 2012
copyright : (C) 2012 by Marco Hugentobler
email : marco dot hugentobler at sourcepole dot ch
***************************************************************************
* *
* 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. *
* *
***************************************************************************/

#include "qgscomposerhtml.h"

QgsComposerHtml::QgsComposerHtml( QgsComposition* c ): QgsComposerMultiFrame( c )
{
}

QgsComposerHtml::~QgsComposerHtml()
{
}

QSizeF QgsComposerHtml::totalSize() const
{
return QSizeF(); //soon...
}
@@ -0,0 +1,37 @@
/***************************************************************************
qgscomposerhtml.h
------------------------------------------------------------
begin : Julli 2012
copyright : (C) 2012 by Marco Hugentobler
email : marco dot hugentobler at sourcepole dot ch
***************************************************************************
* *
* 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. *
* *
***************************************************************************/

#ifndef QGSCOMPOSERHTML_H
#define QGSCOMPOSERHTML_H

#include "qgscomposermultiframe.h"
#include <QUrl>

class QgsComposerHtml: public QgsComposerMultiFrame
{
public:
QgsComposerHtml( QgsComposition* c );
~QgsComposerHtml();

void setUrl( const QUrl& url ) { mUrl = url; }
const QUrl& url() const { return mUrl; }

QSizeF totalSize() const;

private:
QUrl mUrl;
};

#endif // QGSCOMPOSERHTML_H
@@ -1,3 +1,18 @@
/***************************************************************************
qgscomposermultiframe.cpp
------------------------------------------------------------
begin : Julli 2012
copyright : (C) 2012 by Marco Hugentobler
email : marco dot hugentobler at sourcepole dot ch
***************************************************************************
* *
* 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. *
* *
***************************************************************************/

#include "qgscomposermultiframe.h"

QgsComposerMultiFrame::QgsComposerMultiFrame( QgsComposition* c ): mComposition( c )
@@ -14,5 +29,5 @@ QgsComposerMultiFrame::~QgsComposerMultiFrame()

void QgsComposerMultiFrame::recalculateFrameSizes()
{
//todo...
//todo...
}
@@ -1,3 +1,18 @@
/***************************************************************************
qgscomposermultiframe.h
------------------------------------------------------------
begin : Julli 2012
copyright : (C) 2012 by Marco Hugentobler
email : marco dot hugentobler at sourcepole dot ch
***************************************************************************
* *
* 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. *
* *
***************************************************************************/

#ifndef QGSCOMPOSERMULTIFRAME_H
#define QGSCOMPOSERMULTIFRAME_H

@@ -11,26 +26,26 @@ class QgsComposition;
class QgsComposerMultiFrame: public QObject
{
Q_OBJECT
public:
public:

enum ResizeMode
{
ExtendToNextPage = 0, //duplicates last frame to next page to fit the total size
UseExistingFrames //
};
enum ResizeMode
{
ExtendToNextPage = 0, //duplicates last frame to next page to fit the total size
UseExistingFrames //
};

QgsComposerMultiFrame( QgsComposition* c );
virtual ~QgsComposerMultiFrame();
virtual QSizeF totalSize() = 0;
QgsComposerMultiFrame( QgsComposition* c );
virtual ~QgsComposerMultiFrame();
virtual QSizeF totalSize() const = 0;

protected:
QgsComposition* mComposition;
QList<QgsComposerItem*> mFrameItems;
protected:
QgsComposition* mComposition;
QList<QgsComposerItem*> mFrameItems;

void recalculateFrameSizes();
void recalculateFrameSizes();

private:
QgsComposerMultiFrame(); //forbidden
private:
QgsComposerMultiFrame(); //forbidden
};

#endif // QGSCOMPOSERMULTIFRAME_H

0 comments on commit 682d8b3

Please sign in to comment.
You can’t perform that action at this time.