wxWidgets/include/wx/qt/colour.h
Vadim Zeitlin df13791078 Merge wxQT branch into the trunk.
This merges in the latest sources from GSoC 2014 wxQt project with just a few
minor corrections, mostly undoing wrong changes to common files in that branch
(results of a previous bad merge?) and getting rid of whitespace-only changes.
Also remove debug logging from wxGrid.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 01:50:11 +00:00

49 lines
1.4 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Name: wx/qt/colour.h
// Purpose: wxColour class implementation for wxQt
// Author: Peter Most, Kolya Kosenko
// Created: 2010-05-12
// Copyright: (C) 2010 Kolya Kosenko
// 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_