2017-06-07 16:16:21 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsoptionsdialogbase.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-08 16:51:55 +01:00
|
|
|
class QgsSearchHighlightOptionWidget : QObject
|
|
|
|
{
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
|
|
|
Container for a widget to be used to search text in the option dialog
|
|
|
|
If the widget type is handled, it is valid.
|
|
|
|
It can perform a text search in the widget and highlight it in case of success.
|
|
|
|
This uses stylesheets.
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
2017-02-08 16:51:55 +01:00
|
|
|
%TypeHeaderCode
|
2017-06-07 16:16:21 +02:00
|
|
|
#include "qgsoptionsdialogbase.h"
|
2017-02-08 16:51:55 +01:00
|
|
|
%End
|
|
|
|
public:
|
2017-06-07 16:16:21 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
explicit QgsSearchHighlightOptionWidget( QWidget *widget = 0 );
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
|
|
|
Constructor
|
|
|
|
\param widget the widget used to search text into
|
|
|
|
%End
|
2017-02-08 16:51:55 +01:00
|
|
|
|
|
|
|
bool isValid();
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
|
|
|
Returns if it valid: if the widget type is handled and if the widget is not still available
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2017-02-08 16:51:55 +01:00
|
|
|
|
2017-06-07 16:16:21 +02:00
|
|
|
bool searchHighlight( const QString &searchText );
|
|
|
|
%Docstring
|
|
|
|
search for a text pattern and highlight the widget if the text is found
|
|
|
|
:return: true if the text pattern is found
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2017-02-08 16:51:55 +01:00
|
|
|
|
|
|
|
void reset();
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
|
|
|
reset the style to the original state
|
|
|
|
%End
|
2017-02-08 16:51:55 +01:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
QWidget *widget();
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
|
|
|
return the widget
|
|
|
|
:rtype: QWidget
|
|
|
|
%End
|
|
|
|
|
2017-02-08 16:51:55 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-22 19:37:41 +02:00
|
|
|
class QgsOptionsDialogBase : QDialog
|
|
|
|
{
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
|
|
|
A base dialog for options and properties dialogs that offers vertical tabs.
|
|
|
|
It handles saving/restoring of geometry, splitter and current tab states,
|
|
|
|
switching vertical tabs between icon/text to icon-only modes (splitter collapsed to left),
|
|
|
|
and connecting QDialogButtonBox's accepted/rejected signals to dialog's accept/reject slots
|
|
|
|
|
|
|
|
To use:
|
|
|
|
1) Start with copy of qgsoptionsdialog_template.ui and build options/properties dialog.
|
|
|
|
2) In source file for dialog, inherit this class instead of QDialog, then in constructor:
|
|
|
|
...
|
|
|
|
setupUi( this ); // set up .ui file objects
|
|
|
|
initOptionsBase( false ); // set up this class to use .ui objects, optionally restoring base ui
|
|
|
|
...
|
|
|
|
restoreOptionsBaseUi(); // restore the base ui with initOptionsBase or use this later on
|
|
|
|
%End
|
|
|
|
|
2013-06-22 19:37:41 +02:00
|
|
|
%TypeHeaderCode
|
2017-06-07 16:16:21 +02:00
|
|
|
#include "qgsoptionsdialogbase.h"
|
2013-06-22 19:37:41 +02:00
|
|
|
%End
|
|
|
|
public:
|
2017-06-07 16:16:21 +02:00
|
|
|
|
|
|
|
QgsOptionsDialogBase( const QString &settingsKey, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = 0, QgsSettings *settings = 0 );
|
|
|
|
%Docstring
|
|
|
|
Constructor
|
|
|
|
\param settingsKey QgsSettings subgroup key for saving/restore ui states, e.g. "ProjectProperties".
|
|
|
|
\param parent parent object (owner)
|
|
|
|
\param fl widget flags
|
|
|
|
\param settings custom QgsSettings pointer
|
|
|
|
%End
|
2013-06-22 19:37:41 +02:00
|
|
|
~QgsOptionsDialogBase();
|
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void initOptionsBase( bool restoreUi = true, const QString &title = QString() );
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
|
|
|
Set up the base ui connections for vertical tabs.
|
|
|
|
\param restoreUi Whether to restore the base ui at this time.
|
|
|
|
\param title the window title
|
|
|
|
%End
|
2013-06-22 19:37:41 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setSettings( QgsSettings *settings );
|
2014-03-02 11:28:45 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void restoreOptionsBaseUi( const QString &title = QString() );
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
|
|
|
Restore the base ui.
|
|
|
|
Sometimes useful to do at end of subclass's constructor.
|
|
|
|
\param title the window title (it does not need to be defined if previously given to initOptionsBase();
|
|
|
|
%End
|
2014-01-26 18:35:21 +01:00
|
|
|
|
|
|
|
bool iconOnly();
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
|
|
|
Determine if the options list is in icon only mode
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2013-06-22 19:37:41 +02:00
|
|
|
|
2017-02-08 16:51:55 +01:00
|
|
|
public slots:
|
|
|
|
|
2017-06-07 16:16:21 +02:00
|
|
|
void searchText( const QString &text );
|
|
|
|
%Docstring
|
|
|
|
searchText searches for a text in all the pages of the stacked widget and highlight the results
|
|
|
|
\param text the text to search
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
2017-02-08 16:51:55 +01:00
|
|
|
|
2013-06-22 19:37:41 +02:00
|
|
|
protected slots:
|
2017-11-06 14:26:43 +01:00
|
|
|
virtual void updateOptionsListVerticalTabs();
|
2017-11-06 17:45:46 +01:00
|
|
|
%Docstring
|
|
|
|
Update tabs on the splitter move
|
|
|
|
%End
|
2017-11-06 16:37:27 +01:00
|
|
|
virtual void optionsStackedWidget_CurrentChanged( int index );
|
2017-11-06 17:45:46 +01:00
|
|
|
%Docstring
|
|
|
|
Select relevant tab on current page change
|
|
|
|
%End
|
2017-11-06 16:37:27 +01:00
|
|
|
virtual void optionsStackedWidget_WidgetRemoved( int index );
|
2017-11-06 17:45:46 +01:00
|
|
|
%Docstring
|
|
|
|
Remove tab and unregister widgets on page remove
|
|
|
|
%End
|
2017-11-06 14:26:43 +01:00
|
|
|
|
2013-06-22 19:37:41 +02:00
|
|
|
void warnAboutMissingObjects();
|
|
|
|
|
|
|
|
protected:
|
2017-06-07 16:16:21 +02:00
|
|
|
virtual void showEvent( QShowEvent *e );
|
|
|
|
|
|
|
|
virtual void paintEvent( QPaintEvent *e );
|
|
|
|
|
2014-01-27 09:22:24 +01:00
|
|
|
|
|
|
|
virtual void updateWindowTitle();
|
2017-02-08 16:51:55 +01:00
|
|
|
|
|
|
|
void registerTextSearchWidgets();
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
|
|
|
register widgets in the dialog to search for text in it
|
|
|
|
it is automatically called if a line edit has "mSearchLineEdit" as object name.
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
|
|
|
|
2013-06-22 19:37:41 +02:00
|
|
|
};
|
2017-06-07 16:16:21 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsoptionsdialogbase.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|