Files
qelectrotech-source-mirror/sources/elementprovider.h
Claveau Joshua 871b0d9ee9 Table can be splitted and and row number limited
1.Table can have a name.
2.User can define the maximum row to display.
3.Table can be linked together, this is useful when there is a large
data to display in a single table.

Point 1, 2 and 3 work like this :

-Name a table (point 1).
-Limit the number of row to display to fit the table into a diagram
(point 2).
-Create a second table in a new folio.
-Link the second table to first table, you can search by table name
(point 3).
-the new table start to display where the first table end.
The number of linked table is unlimited.
2020-04-10 21:27:47 +02:00

51 lines
1.5 KiB
C++

/*
Copyright 2006-2019 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ELEMENTPROVIDER_H
#define ELEMENTPROVIDER_H
#include <QUuid>
#include <QList>
#include <QAbstractTableModel>
class QETProject;
class Diagram;
class Element;
class QetGraphicsTableItem;
/**
this class can search in the given diagram or project some kind of element
like 'folio report' or 'master' and return it.
We can get element element with specific status like 'free'.
*/
class ElementProvider
{
public:
ElementProvider(QETProject *prj, Diagram *diagram=nullptr);
ElementProvider(Diagram *diag);
QList <Element *> freeElement(const int filter) const;
QList <Element *> fromUuids(QList <QUuid>) const;
QList <Element *> find(const int filter) const;
QVector <QetGraphicsTableItem *> table(QetGraphicsTableItem *table = nullptr, QAbstractItemModel *model = nullptr);
private:
QList <Diagram *> m_diagram_list;
};
#endif // ELEMENTPROVIDER_H