2012-07-10 19:39:12 +00:00
|
|
|
#ifndef _PAYSAGES_QT_BASEFORMLAYER_H_
|
|
|
|
#define _PAYSAGES_QT_BASEFORMLAYER_H_
|
|
|
|
|
|
|
|
/* Base form, with automatic layer control */
|
|
|
|
|
|
|
|
#include "baseform.h"
|
2012-07-10 20:00:44 +00:00
|
|
|
#include "../lib_paysages/layers.h"
|
2012-07-10 19:39:12 +00:00
|
|
|
|
|
|
|
class BaseFormLayer:public BaseForm
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2012-08-26 13:06:42 +00:00
|
|
|
BaseFormLayer(QWidget* parent, Layers* layers=NULL);
|
2012-07-10 20:00:44 +00:00
|
|
|
~BaseFormLayer();
|
2012-07-10 19:39:12 +00:00
|
|
|
|
2012-07-11 13:18:43 +00:00
|
|
|
public slots:
|
|
|
|
virtual void revertConfig();
|
|
|
|
virtual void applyConfig();
|
2012-12-06 14:04:04 +00:00
|
|
|
|
2012-07-10 20:00:44 +00:00
|
|
|
protected:
|
2012-08-26 13:06:42 +00:00
|
|
|
void setLayers(Layers* layers);
|
2012-12-06 14:04:04 +00:00
|
|
|
virtual void layerReadCurrentFrom(void* layer_definition) = 0;
|
|
|
|
virtual void layerWriteCurrentTo(void* layer_definition) = 0;
|
2012-08-08 14:44:37 +00:00
|
|
|
virtual void afterLayerAdded(void* layer_definition);
|
2012-07-11 13:18:43 +00:00
|
|
|
|
|
|
|
private:
|
2012-07-10 20:00:44 +00:00
|
|
|
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;
|
2012-07-10 19:39:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|