21 #ifndef QGSBROWSERDOCKWIDGET_P_H 22 #define QGSBROWSERDOCKWIDGET_P_H 36 #include "ui_qgsbrowserdockwidgetbase.h" 37 #include "ui_qgsbrowserlayerpropertiesbase.h" 38 #include "ui_qgsbrowserdirectorypropertiesbase.h" 39 #include "ui_qgsbrowserpropertiesdialogbase.h" 44 #include <QSortFilterProxyModel> 48 class QgsDockBrowserTreeView;
51 class QgsBrowserTreeFilterProxyModel;
58 class QgsBrowserPropertiesWrapLabel :
public QTextEdit
68 QgsBrowserPropertiesWrapLabel(
const QString &text, QWidget *parent =
nullptr );
71 void adjustHeight( QSizeF size );
77 class QgsBrowserPropertiesWidget :
public QWidget
86 explicit QgsBrowserPropertiesWidget( QWidget *parent =
nullptr );
88 static QgsBrowserPropertiesWidget *createWidget(
QgsDataItem *item, QWidget *parent =
nullptr );
90 virtual void setItem(
QgsDataItem *item ) { Q_UNUSED( item ) }
92 virtual void setWidget( QWidget *widget );
100 virtual void setCondensedMode(
bool condensedMode ) { Q_UNUSED( condensedMode ); }
106 class QgsBrowserLayerProperties :
public QgsBrowserPropertiesWidget,
private Ui::QgsBrowserLayerPropertiesBase
115 explicit QgsBrowserLayerProperties( QWidget *parent =
nullptr );
125 void setCondensedMode(
bool condensedMode )
override;
128 QgsBrowserPropertiesWrapLabel *mUriLabel =
nullptr;
134 class QgsBrowserDirectoryProperties :
public QgsBrowserPropertiesWidget,
private Ui::QgsBrowserDirectoryPropertiesBase
143 explicit QgsBrowserDirectoryProperties( QWidget *parent =
nullptr );
149 QgsBrowserPropertiesWrapLabel *mPathLabel =
nullptr;
155 class QgsBrowserPropertiesDialog :
public QDialog,
private Ui::QgsBrowserPropertiesDialogBase
165 QgsBrowserPropertiesDialog(
const QString &settingsSection, QWidget *parent =
nullptr );
166 ~QgsBrowserPropertiesDialog()
override;
172 QgsBrowserPropertiesWidget *mPropertiesWidget =
nullptr;
173 QString mSettingsSection;
195 explicit QgsDockBrowserTreeView( QWidget *parent );
197 void dragEnterEvent( QDragEnterEvent *e )
override;
199 void dragMoveEvent( QDragMoveEvent *e )
override;
201 void dropEvent( QDropEvent *e )
override;
204 void setAction( QDropEvent *e );
210 class QgsBrowserTreeFilterProxyModel :
public QSortFilterProxyModel
219 explicit QgsBrowserTreeFilterProxyModel( QObject *parent );
225 void setFilterSyntax(
const QString &syntax );
227 void setFilter(
const QString &filter );
229 void setCaseSensitive(
bool caseSensitive );
237 QVector<QRegExp> mREList;
238 QString mPatternSyntax;
239 Qt::CaseSensitivity mCaseSensitivity;
242 bool filterAcceptsString(
const QString &value )
const;
245 bool filterAcceptsRow(
int sourceRow,
const QModelIndex &sourceParent )
const override;
248 bool filterAcceptsAncestor(
const QModelIndex &sourceIndex )
const;
251 bool filterAcceptsDescendant(
const QModelIndex &sourceIndex )
const;
254 bool filterAcceptsItem(
const QModelIndex &sourceIndex )
const;
260 #endif // QGSBROWSERDOCKWIDGET_P_H
The QgsBrowserTreeView class extends QTreeView with save/restore tree state functionality.
Base class for all items in the model.
Item that represents a layer that can be opened with one of the providers.