Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Modernise CharacterWidget API, move to sipify
- Loading branch information
1 parent
9b3539a
commit 5813eb1
Showing
7 changed files
with
221 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,113 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/symbology-ng/characterwidget.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
class CharacterWidget : QWidget | ||
{ | ||
%Docstring | ||
|
||
A widget for displaying characters available in a preset font, and allowing | ||
users to select an individual character. | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include <characterwidget.h> | ||
#include "characterwidget.h" | ||
%End | ||
|
||
public: | ||
|
||
CharacterWidget( QWidget *parent /TransferThis/ = 0 ); | ||
%Docstring | ||
Constructor for CharacterWidget. | ||
%End | ||
|
||
QSize sizeHint() const; | ||
|
||
int getColumns() const; | ||
int getSquareSize() const; | ||
int columns() const; | ||
%Docstring | ||
Returns the number of columns of characters shown in the widget. | ||
%End | ||
|
||
int squareSize() const; | ||
%Docstring | ||
Returns the size (in pixels) of the square used to render each character preview. | ||
%End | ||
|
||
QChar character() const; | ||
%Docstring | ||
Returns the currently selected character in the widget. | ||
\see setCharacter() | ||
.. versionadded:: 3.0 | ||
%End | ||
|
||
QFont font() const; | ||
%Docstring | ||
Returns the font shown in the widget | ||
\see setFont() | ||
.. versionadded:: 3.0 | ||
%End | ||
|
||
public slots: | ||
void updateFont( const QFont &font ); | ||
void updateSize( double fontSize ); | ||
void updateStyle( const QString &fontStyle ); | ||
|
||
void setFont( const QFont &font ); | ||
%Docstring | ||
Sets the \a font to show in the widget. | ||
\see font() | ||
.. versionadded:: 3.0 | ||
%End | ||
|
||
void setFontSize( double fontSize ); | ||
%Docstring | ||
Sets the font size (in points) to render in the widget. | ||
.. versionadded:: 3.0 | ||
%End | ||
|
||
void setFontStyle( const QString &fontStyle ); | ||
%Docstring | ||
Sets the font style to show in the widget. | ||
.. versionadded:: 3.0 | ||
%End | ||
|
||
void updateFontMerging( bool enable ); | ||
void updateColumns( int cols ); | ||
|
||
void setColumns( int columns ); | ||
%Docstring | ||
Sets the number of columns of characters to show in the widget. | ||
.. versionadded:: 3.0 | ||
%End | ||
|
||
void setCharacter( QChar character ); | ||
%Docstring | ||
Sets the currently selected \a character in the widget. | ||
\see character() | ||
\see characterSelected() | ||
%End | ||
|
||
signals: | ||
|
||
void characterSelected( QChar character ); | ||
%Docstring | ||
Emitted when a character is selected in the widget. | ||
%End | ||
|
||
protected: | ||
void mouseMoveEvent( QMouseEvent *event ); | ||
void mousePressEvent( QMouseEvent *event ); | ||
void paintEvent( QPaintEvent *event ); | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/symbology-ng/characterwidget.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.