1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
|
/**
*
* This file is part of Tulip (www.tulip-software.org)
*
* Authors: David Auber and the Tulip development Team
* from LaBRI, University of Bordeaux
*
* Tulip is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation, either version 3
* of the License, or (at your option) any later version.
*
* Tulip 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.
*
*/
#ifndef TABLEVIEW_H
#define TABLEVIEW_H
#include <tulip/ViewWidget.h>
#include <tulip/BooleanProperty.h>
#include <QModelIndex>
namespace Ui {
class TableViewWidget;
}
namespace tlp {
class GraphModel;
}
class TableViewConfiguration;
class PropertiesEditor;
class TableView : public tlp::ViewWidget {
Q_OBJECT
Ui::TableViewWidget* _ui;
PropertiesEditor* propertiesEditor;
tlp::GraphModel* _model;
bool isNewGraph;
bool filteringColumns;
public:
PLUGININFORMATION("Spreadsheet view","Tulip Team","04/17/2012","Spreadsheet view for raw data","4.0","")
TableView(tlp::PluginContext*);
virtual ~TableView();
std::string icon() const {
return ":/spreadsheet_view.png";
}
tlp::DataSet state() const;
void setState(const tlp::DataSet &);
void setupWidget();
QList<QWidget*> configurationWidgets() const;
public slots:
void readSettings();
void setPropertyVisible(tlp::PropertyInterface*,bool);
void filterChanged();
tlp::BooleanProperty* getFilteringProperty() const;
bool hasEffectiveFiltering();
protected:
void graphChanged(tlp::Graph *);
void graphDeleted(tlp::Graph *);
bool eventFilter(QObject* obj, QEvent* event);
protected slots:
void delHighlightedRows();
void toggleHighlightedRows();
void selectHighlightedRows();
bool setAllHighlightedRows(tlp::PropertyInterface*);
void setLabelsOfHighlightedRows(tlp::PropertyInterface*);
void setMatchProperty();
void setColumnsFilter(QString);
void setPropertiesFilter(QString);
void mapToGraphSelection();
void columnsInserted(const QModelIndex&,int,int);
void showCustomContextMenu(const QPoint & pos);
void showHorizontalHeaderCustomContextMenu(const QPoint & pos);
void dataChanged(const QModelIndex & topLeft, const QModelIndex & bottomRight);
};
#endif // TABLEVIEW_H
|