wxWidgets/include/wx/qt/colour.h
Mariano Reingart 8fc5475e15 Update author's credits comments for wxQT
Commit history was lost in the git to svn merge for trunk, so this reflect work done in two GSOC projects and/or by several authors.
Lines changed by each user was the main metric used to ack major contributions.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-29 03:37:46 +00:00

48 lines
1.4 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Name: wx/qt/colour.h
// Purpose: wxColour class implementation for wxQt
// Author: Peter Most, Kolya Kosenko, Mariano Reingart
// Copyright: (c) 2010 wxWidgets dev team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_QT_COLOUR_H_
#define _WX_QT_COLOUR_H_
#include <QtGui/QColor>
class WXDLLIMPEXP_CORE wxColour : public wxColourBase
{
public:
DEFINE_STD_WXCOLOUR_CONSTRUCTORS
wxColour(const QColor& color) : m_qtColor(color) {}
virtual bool IsOk() const { return m_qtColor.isValid(); }
virtual ChannelType Red() const { return m_qtColor.red(); }
virtual ChannelType Green() const { return m_qtColor.green(); }
virtual ChannelType Blue() const { return m_qtColor.blue(); }
virtual ChannelType Alpha() const { return m_qtColor.alpha(); }
bool operator==(const wxColour& color) const
{ return m_qtColor == color.m_qtColor; }
bool operator!=(const wxColour& color) const
{ return m_qtColor != color.m_qtColor; }
int GetPixel() const;
QColor GetHandle() const { return m_qtColor; };
protected:
virtual void
InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a)
{ m_qtColor.setRgb(r, g, b, a); }
private:
QColor m_qtColor;
DECLARE_DYNAMIC_CLASS(wxColour)
};
#endif // _WX_QT_COLOUR_H_