2016-11-02 01:34:45 +03:00
|
|
|
#ifndef CHARITEMEDITOR_H
|
|
|
|
#define CHARITEMEDITOR_H
|
|
|
|
|
|
|
|
#include "lrchartitem.h"
|
|
|
|
#include "lrcolorindicator.h"
|
2024-09-04 17:31:16 +03:00
|
|
|
|
2016-11-02 01:34:45 +03:00
|
|
|
#include <QTableWidgetItem>
|
|
|
|
#include <QToolButton>
|
2024-09-04 17:31:16 +03:00
|
|
|
#include <QWidget>
|
2016-11-02 01:34:45 +03:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class ChartItemEditor;
|
|
|
|
}
|
|
|
|
|
2024-09-04 17:31:16 +03:00
|
|
|
class ChartItemEditor: public QWidget {
|
2016-11-02 01:34:45 +03:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
ChartItemEditor(LimeReport::ChartItem* item, LimeReport::PageDesignIntf* page,
|
2024-09-04 17:31:16 +03:00
|
|
|
QSettings* settings = 0, QWidget* parent = 0);
|
2016-11-02 01:34:45 +03:00
|
|
|
~ChartItemEditor();
|
2024-09-04 17:31:16 +03:00
|
|
|
|
2016-11-02 01:34:45 +03:00
|
|
|
public:
|
2024-09-04 17:31:16 +03:00
|
|
|
QSettings* settings();
|
2016-11-02 01:34:45 +03:00
|
|
|
void rebuildTable();
|
2024-09-04 17:31:16 +03:00
|
|
|
|
2016-11-02 01:34:45 +03:00
|
|
|
protected:
|
2024-09-04 17:31:16 +03:00
|
|
|
void resizeEvent(QResizeEvent*);
|
|
|
|
void moveEvent(QMoveEvent*);
|
2020-01-31 20:00:28 +03:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void editingFinished();
|
|
|
|
|
2016-11-02 01:34:45 +03:00
|
|
|
private slots:
|
|
|
|
void on_splitter_splitterMoved(int, int);
|
|
|
|
void on_pbOk_clicked();
|
|
|
|
void slotAddSeries();
|
|
|
|
void slotDeleteSeries();
|
|
|
|
void on_tableWidget_itemSelectionChanged();
|
2024-09-04 17:31:16 +03:00
|
|
|
void on_seriesNameLineEdit_textChanged(const QString& arg1);
|
|
|
|
void on_valuesFieldComboBox_currentTextChanged(const QString& arg1);
|
|
|
|
void on_labelsFieldComboBox_currentTextChanged(const QString& arg1);
|
2016-11-02 01:34:45 +03:00
|
|
|
void slotChangeSeriesColor();
|
2024-09-04 17:31:16 +03:00
|
|
|
void on_seriesTypeComboBox_currentIndexChanged(const QString& arg1);
|
|
|
|
void on_xAxisFieldComboBox_currentTextChanged(const QString& arg1);
|
|
|
|
void on_tableWidget_itemChanged(QTableWidgetItem* item);
|
2022-01-28 09:05:55 +03:00
|
|
|
|
2016-11-02 01:34:45 +03:00
|
|
|
private:
|
|
|
|
void readSetting();
|
|
|
|
void writeSetting();
|
|
|
|
void init();
|
|
|
|
void enableSeriesEditor();
|
|
|
|
void disableSeriesEditor();
|
|
|
|
LimeReport::SeriesItem* currentSeries();
|
2024-09-04 17:31:16 +03:00
|
|
|
|
2016-11-02 01:34:45 +03:00
|
|
|
private:
|
2024-09-04 17:31:16 +03:00
|
|
|
Ui::ChartItemEditor* ui;
|
2016-11-02 01:34:45 +03:00
|
|
|
LimeReport::ChartItem* m_charItem;
|
|
|
|
LimeReport::PageDesignIntf* m_page;
|
|
|
|
QSettings* m_settings;
|
|
|
|
bool m_ownedSettings;
|
|
|
|
bool m_isReadingSetting;
|
|
|
|
QToolButton* m_colorButton;
|
|
|
|
ColorIndicator* m_colorIndicator;
|
|
|
|
bool m_initing;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CHARITEMEDITOR_H
|