19 #include <QStackedWidget>
21 #include "ui_qgsdualviewbase.h"
44 class GUI_EXPORT
QgsDualView :
public QStackedWidget,
private Ui::QgsDualViewBase
80 Q_ENUM( FeatureListBrowsingAction )
105 bool loadFeatures =
true,
bool showFirstFeature =
true );
113 void setView( ViewMode view );
120 ViewMode view()
const;
142 void setSelectedOnTop(
bool selectedOnTop );
157 int filteredFeatureCount();
166 Q_DECL_DEPRECATED
void setFilteredFeatures(
const QgsFeatureIds &filteredFeatures );
218 void setSortExpression(
const QString &sortExpression, Qt::SortOrder sortOrder = Qt::AscendingOrder );
223 QString sortExpression()
const;
246 bool saveEditChanges();
248 void openConditionalStyles();
254 void setMultiEditEnabled(
bool enabled );
261 void toggleSearchMode(
bool enabled );
267 void copyCellContent()
const;
273 void cancelProgress( );
283 void parentFormValueChanged(
const QString &attribute,
const QVariant &value );
291 void displayExpressionChanged(
const QString &expression );
296 void filterChanged();
320 void hideEvent( QHideEvent *event )
override;
324 void featureListAboutToChangeEditSelection(
bool &ok );
331 void featureListCurrentEditSelectionChanged(
const QgsFeature &feat );
333 void previewExpressionBuilder();
335 void previewColumnChanged( QAction *previewAction,
const QString &expression );
337 void viewWillShowContextMenu( QMenu *menu,
const QModelIndex &atIndex );
339 void widgetWillShowContextMenu(
QgsActionMenu *menu,
const QModelIndex &atIndex );
341 void showViewHeaderMenu( QPoint point );
343 void organizeColumns();
345 void tableColumnResized(
int column,
int width );
351 void resizeAllColumns();
353 void autosizeColumn();
355 void autosizeAllColumns();
357 void previewExpressionChanged(
const QString &expression );
359 void onSortColumnChanged();
361 void updateSelectedFeatures();
362 void updateEditedAddedFeatures();
364 void extentChanged();
371 void featureFormAttributeChanged(
const QString &attribute,
const QVariant &value,
bool attributeChanged );
379 virtual void progress(
int i,
bool &cancel );
385 virtual void finished();
388 void zoomToCurrentFeature();
390 void panToCurrentFeature();
392 void flashCurrentFeature();
394 void rebuildFullLayerCache();
396 void panZoomGroupButtonToggled( QAbstractButton *button,
bool checked );
398 void flashButtonClicked(
bool clicked );
400 void filterError(
const QString &errorMessage );
409 void initAttributeForm(
const QgsFeature &feature );
414 void columnBoxInit();
415 void initLayerCache(
bool cacheGeometry );
417 void restoreRecentDisplayExpressions();
418 void saveRecentDisplayExpressions()
const;
419 void setDisplayExpression(
const QString &expression );
420 void insertRecentlyUsedDisplayExpression(
const QString &expression );
421 void updateEditSelectionProgress(
int progress,
int count );
424 void setBrowsingAutoPanScaleAllowed(
bool allowed );
436 QMenu *mPreviewColumnsMenu =
nullptr;
437 QMenu *mPreviewActionMenu =
nullptr;
438 QAction *mLastDisplayExpressionAction =
nullptr;
439 QMenu *mHorizontalHeaderMenu =
nullptr;
441 QPointer< QgsVectorLayer > mLayer =
nullptr;
442 QProgressDialog *mProgressDlg =
nullptr;
444 QString mDisplayExpression;
448 bool mBrowsingAutoPanScaleAllowed =
true;
449 ViewMode mPreviousView = AttributeTable;
451 friend class TestQgsDualView;
452 friend class TestQgsAttributeTable;
471 : QAction( name, dualView )
472 , mDualView( dualView )
474 , mFieldIdx( fieldIdx )
484 QModelIndex mFieldIdx;
497 : QAction( name, dualView )
498 , mDualView( dualView )
500 , mFieldIdx( fieldIdx )
509 QModelIndex mFieldIdx;
514 #endif // QGSDUALVIEW_H