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
PyQGIS: added QgsColorButton and QgsColorButtonV2
git-svn-id: http://svn.osgeo.org/qgis/trunk@12771 c8812cc2-4d05-0410-92ff-de0c093fc19c
- Loading branch information
wonder
committed
Jan 15, 2010
1 parent
c7dcfed
commit eefb4ba
Showing
5 changed files
with
44 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
|
||
class QgsColorButton : QToolButton | ||
{ | ||
%TypeHeaderCode | ||
#include <qgscolorbutton.h> | ||
%End | ||
|
||
public: | ||
QgsColorButton( QWidget *parent = 0 ); | ||
~QgsColorButton(); | ||
|
||
void setColor( const QColor &color ); | ||
QColor color() const; | ||
|
||
protected: | ||
void paintEvent( QPaintEvent *e ); | ||
|
||
}; | ||
|
||
|
||
class QgsColorButtonV2 : QPushButton | ||
{ | ||
%TypeHeaderCode | ||
#include <qgscolorbutton.h> | ||
%End | ||
|
||
public: | ||
QgsColorButtonV2( QWidget* parent = 0 ); | ||
QgsColorButtonV2( QString text, QWidget* parent = 0 ); | ||
|
||
void setColor( const QColor &color ); | ||
QColor color() const; | ||
}; |
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