File indexing completed on 2024-06-16 04:09:00

0001 /**
0002  * SPDX-FileCopyrightText: 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved.
0003  *
0004  * This file is part of the KD Chart library.
0005  *
0006  * SPDX-License-Identifier: GPL-2.0-or-later
0007  */
0008 
0009 #ifndef MAINWINDOW_H
0010 #define MAINWINDOW_H
0011 
0012 #include <QDialog>
0013 #include <QMap>
0014 
0015 #include "ui_mainwindow.h"
0016 #include "derivedaddlegenddialog.h"
0017 #include <TableModel.h>
0018 
0019 namespace KChart {
0020     class Chart;
0021     class LineDiagram;
0022 }
0023 
0024 class MainWindow : public QWidget, private Ui::MainWindow
0025 {
0026     Q_OBJECT
0027 
0028 public:
0029     MainWindow( QWidget* parent = nullptr );
0030 
0031 private Q_SLOTS:
0032     void on_addLegendPB_clicked();
0033     void on_editLegendPB_clicked();
0034     void on_removeLegendPB_clicked();
0035     void on_legendsTV_itemSelectionChanged();
0036 
0037 private:
0038     void initAddLegendDialog( DerivedAddLegendDialog& conf,
0039                               Qt::Alignment alignment ) const;
0040 
0041     KChart::Chart* m_chart;
0042     TableModel m_model;
0043     KChart::LineDiagram* m_lines;
0044     QMap<Qt::Alignment, QString> alignmentMap;
0045 };
0046 
0047 
0048 #endif /* MAINWINDOW_H */
0049