#ifndef BUSPROPERTIES_H
#define BUSPROPERTIES_H

#include <QDialog>
#include "colorbutton.h"
#include "core.h"
#include "ui_bus_properties.h"


class BusProperties: public QDialog, public Ui::BusProperties {
	Q_OBJECT
public:
	explicit BusProperties(QWidget * parent = 0);
	~BusProperties();
	
	QDialog::DialogCode show(BlockBusItem * b);
	
private:
	void save();
	void load();
	
	BlockBusItem * bus;
	QList<QWidget*> _widgets;
	
public slots:
	
private slots:
	void accept();
	void reject();
	void on_buttonBox_clicked(QAbstractButton * button);
	void on_buttonRecreate_clicked();
	void on_buttonEditDB_clicked();
	void on_properties_resetStorageRequest(PropertyStorage * s);
	void on_actions__executeAction(SHPluginBase::PluginAction action);
	void on_actions__checkRequest(SHPluginBase::PluginAction action, bool * ret);

signals:
	void editDatabaseBus(int id);

};

#endif // BUSPROPERTIES_H
