Michaël Lemaire
237040864d
git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@472 b1fd45b6-86a6-48da-8261-f70d1f35bdcc
43 lines
1.1 KiB
C++
43 lines
1.1 KiB
C++
#ifndef _PAYSAGES_QT_BASEFORMLAYER_H_
|
|
#define _PAYSAGES_QT_BASEFORMLAYER_H_
|
|
|
|
/* Base form, with automatic layer control */
|
|
|
|
#include "baseform.h"
|
|
#include "../lib_paysages/layers.h"
|
|
|
|
class BaseFormLayer:public BaseForm
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
BaseFormLayer(QWidget* parent, Layers* layers=NULL);
|
|
~BaseFormLayer();
|
|
|
|
public slots:
|
|
virtual void revertConfig();
|
|
virtual void applyConfig();
|
|
|
|
protected:
|
|
void setLayers(Layers* layers);
|
|
virtual void layerReadCurrentFrom(void* layer_definition) = 0;
|
|
virtual void layerWriteCurrentTo(void* layer_definition) = 0;
|
|
virtual void afterLayerAdded(void* layer_definition);
|
|
|
|
private:
|
|
virtual QStringList getLayers();
|
|
virtual void layerAddedEvent();
|
|
virtual void layerDeletedEvent(int layer);
|
|
virtual void layerMovedEvent(int layer, int new_position);
|
|
virtual void layerRenamedEvent(int layer, QString new_name);
|
|
virtual void layerSelectedEvent(int layer);
|
|
|
|
protected slots:
|
|
virtual void configChangeEvent();
|
|
|
|
private:
|
|
Layers* _layers_original;
|
|
Layers* _layers_modified;
|
|
};
|
|
|
|
#endif
|