Exemplo n.º 1
0
static wxPenStyle ConvertPenStyle(Qt::PenStyle style)
{
    switch (style)
    {
    case Qt::SolidLine:
        return wxPENSTYLE_SOLID;

    case Qt::NoPen:
        return wxPENSTYLE_TRANSPARENT;

    case Qt::DotLine:
        return wxPENSTYLE_DOT;

    case Qt::DashLine:
        return wxPENSTYLE_SHORT_DASH;

    case Qt::DashDotLine:
        return wxPENSTYLE_DOT_DASH;

    case Qt::DashDotDotLine:
        wxMISSING_IMPLEMENTATION( "Qt::DashDotDotLine" );
        return wxPENSTYLE_DOT_DASH;

    case Qt::CustomDashLine:
        return wxPENSTYLE_USER_DASH;

    case Qt::MPenStyle:
        wxMISSING_IMPLEMENTATION( "Qt::MPenStyle" );
        break;
    }
    return wxPENSTYLE_SOLID;
}
Exemplo n.º 2
0
void wxAnyButton::DoSetBitmap(const wxBitmap& bitmap, State which)
{
    switch ( which )
    {
        case State_Normal:
            QtSetBitmap(bitmap);
            InvalidateBestSize();
            break;

        case State_Pressed:
            wxMISSING_IMPLEMENTATION( wxSTRINGIZE( State_Pressed ));
            break;

        case State_Current:
            wxMISSING_IMPLEMENTATION( wxSTRINGIZE( State_Current ));
            break;

        case State_Focused:
            wxMISSING_IMPLEMENTATION( wxSTRINGIZE( State_Focused ));
            break;

        case State_Disabled:
            wxMISSING_IMPLEMENTATION( wxSTRINGIZE( State_Disabled ));
            break;

        case State_Max:
            wxMISSING_IMPLEMENTATION( wxSTRINGIZE( State_Max ));

    }
}
Exemplo n.º 3
0
wxFontEncoding wxNativeFontInfo::GetEncoding() const
{
//    QFontInfo info = QFontInfo(m_qtFont);
    wxMISSING_IMPLEMENTATION( __FUNCTION__ );

    return wxFONTENCODING_MAX;
}
Exemplo n.º 4
0
wxFontEncoding wxFont::GetEncoding() const
{
    QFontInfo info = QFontInfo(M_FONTDATA);
    wxMISSING_IMPLEMENTATION( __FUNCTION__ );

    return wxFontEncoding();
}
Exemplo n.º 5
0
bool wxQtDCImpl::DoBlit(wxCoord xdest, wxCoord ydest,
                    wxCoord width, wxCoord height,
                    wxDC *source,
                    wxCoord xsrc, wxCoord ysrc,
                    wxRasterOperationMode rop,
                    bool useMask,
                    wxCoord WXUNUSED(xsrcMask),
                    wxCoord WXUNUSED(ysrcMask) )
{
    wxMISSING_IMPLEMENTATION( "wxDC::DoBlit Mask src" );

    wxQtDCImpl *implSource = (wxQtDCImpl*)source->GetImpl();
    
    QImage *qtSource = implSource->m_qtImage;
    
    // Not a CHECK on purpose
    if ( !qtSource )
        return false;

    QImage qtSourceConverted = *qtSource;
    if ( !useMask )
        qtSourceConverted = qtSourceConverted.convertToFormat( QImage::Format_RGB32 );

    // Change logical function
    wxRasterOperationMode savedMode = GetLogicalFunction();
    SetLogicalFunction( rop );
    
    m_qtPainter->drawImage( QRect( xdest, ydest, width, height ),
                           qtSourceConverted,
                           QRect( xsrc, ysrc, width, height ) );

    SetLogicalFunction( savedMode );

    return true;
}
Exemplo n.º 6
0
void wxCalendarCtrl::RefreshHolidays()
{
    if ( !m_qtCalendar )
        return;

    QTextCharFormat format;
    if ( m_windowStyle & wxCAL_SHOW_HOLIDAYS )
    {
        if ( m_colHolidayFg.IsOk() )
            format.setForeground(m_colHolidayFg.GetHandle());
        if ( m_colHolidayBg.IsOk() )
            format.setBackground(m_colHolidayBg.GetHandle());
    }
    else
    {
        format.setForeground(m_qtCalendar->weekdayTextFormat(Qt::Monday)
            .foreground().color());

        wxMISSING_IMPLEMENTATION( "Set holiday background color" );

        // Bug in Qt: returned background color is incorrect
        //format.setBackground(m_qtCalendar->weekdayTextFormat(Qt::Monday)
        //    .background().color());
    }
    m_qtCalendar->setWeekdayTextFormat(Qt::Saturday, format);
    m_qtCalendar->setWeekdayTextFormat(Qt::Sunday,   format);
}
Exemplo n.º 7
0
static wxPenJoin ConvertPenJoinStyle(Qt::PenJoinStyle style)
{
    switch (style)
    {
    case Qt::BevelJoin:
        return wxJOIN_BEVEL;

    case Qt::MiterJoin:
        return wxJOIN_MITER;

    case Qt::RoundJoin:
        return wxJOIN_ROUND;

    case Qt::SvgMiterJoin:
        wxMISSING_IMPLEMENTATION( "Qt::SvgMiterJoin" );
        return wxJOIN_MITER;

    case Qt::MPenJoinStyle:
        wxMISSING_IMPLEMENTATION( "Qt::MPenJoinStyle" );
        break;
    }
    return wxJOIN_BEVEL;
}
Exemplo n.º 8
0
bool wxCalendarCtrl::Create(wxWindow *parent, wxWindowID id, const wxDateTime& date,
    const wxPoint& pos, const wxSize& size, long style, const wxString& name )
{
    m_qtCalendar = new wxQtCalendarWidget( parent, this );
    m_qtCalendar->resize(m_qtCalendar->sizeHint());

    {
        // Init holiday colours
        const QTextCharFormat format = m_qtCalendar->weekdayTextFormat(Qt::Sunday);
        m_colHolidayFg = format.foreground().color();

        wxMISSING_IMPLEMENTATION( "Get holiday background color" );

        // Bug in Qt: returned background color is incorrect
        //m_colHolidayBg = format.background().color();
    }

    {
        // synchronize header colours
        QTextCharFormat format = m_qtCalendar->headerTextFormat();

        bool sync = false;

        if ( m_colHeaderFg.IsOk() )
            sync = true;
        else
            m_colHeaderFg = format.foreground().color();

        if ( m_colHeaderBg.IsOk() )
            sync = true;
        else
            m_colHeaderFg = format.background().color();

        if ( sync )
            SetHeaderColours(m_colHeaderFg, m_colHeaderBg);
    }

    UpdateStyle();

    if ( date.IsValid() )
        SetDate(date);

    return QtCreateControl( parent, id, pos, size, style, wxDefaultValidator, name );
}
Exemplo n.º 9
0
static wxPenCap ConvertPenCapStyle(Qt::PenCapStyle style)
{
    switch (style)
    {
    case Qt::FlatCap:
        return wxCAP_BUTT;

    case Qt::SquareCap:
        return wxCAP_PROJECTING;

    case Qt::RoundCap:
        return wxCAP_ROUND;

    case Qt::MPenCapStyle:
        wxMISSING_IMPLEMENTATION( "Qt::MPenCapStyle" );
        break;
    }
    return wxCAP_PROJECTING;
}
Exemplo n.º 10
0
void wxCalendarCtrl::SetAttr(size_t day, wxCalendarDateAttr *attr)
{
    wxCHECK_RET( day > 0 && day < 32, wxT("invalid day") );

    delete m_attrs[day - 1];
    m_attrs[day - 1] = attr;

    QDate date = m_qtCalendar->selectedDate();
    date.setDate(date.year(), date.month(), day);

    QTextCharFormat format = m_qtCalendar->dateTextFormat(date);
    if ( attr->HasTextColour() )
        format.setForeground(attr->GetTextColour().GetHandle());
    if ( attr->HasBackgroundColour() )
        format.setBackground(attr->GetBackgroundColour().GetHandle());

    wxMISSING_IMPLEMENTATION( "Setting font" );

    // wxFont is not implemented yet
    //if ( attr->HasFont() )
    //    format.setFont(attr->GetFont().GetQFont());
    
    m_qtCalendar->setDateTextFormat(date, format);
}
Exemplo n.º 11
0
void wxBitmap::SetPalette(const wxPalette& WXUNUSED(palette))
{
    wxMISSING_IMPLEMENTATION( "wxBitmap palettes" );
}
Exemplo n.º 12
0
void wxQtDCImpl::SetPalette(const wxPalette& WXUNUSED(palette))
{
    wxMISSING_IMPLEMENTATION(__FUNCTION__);
}
Exemplo n.º 13
0
wxPalette *wxBitmap::GetPalette() const
{
    wxMISSING_IMPLEMENTATION( "wxBitmap palettes" );
    return 0;
}
Exemplo n.º 14
0
wxGDIRefData *wxFont::CreateGDIRefData() const
{
    wxMISSING_IMPLEMENTATION( __FUNCTION__ );
    return NULL;
}
Exemplo n.º 15
0
bool wxNonOwnedWindow::DoSetPathShape(const wxGraphicsPath& path)
{
    wxMISSING_IMPLEMENTATION( __FUNCTION__ );
    return true;
}
Exemplo n.º 16
0
void wxFont::SetEncoding(wxFontEncoding WXUNUSED(encoding))
{
    wxMISSING_IMPLEMENTATION( __FUNCTION__ );
}
Exemplo n.º 17
0
const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
{
    wxMISSING_IMPLEMENTATION( __FUNCTION__ );

    return new wxNativeFontInfo();
}
Exemplo n.º 18
0
int wxColour::GetPixel() const
{
    wxMISSING_IMPLEMENTATION( "wxColour::GetPixel" );
    return 0;
}
Exemplo n.º 19
0
static Qt::PenStyle ConvertPenStyle(wxPenStyle style)
{
    switch(style)
    {
    case wxPENSTYLE_SOLID:
        return Qt::SolidLine;

    case wxPENSTYLE_TRANSPARENT:
        return Qt::NoPen;

    case wxPENSTYLE_DOT:
        return Qt::DotLine;

    case wxPENSTYLE_LONG_DASH:
    case wxPENSTYLE_SHORT_DASH:
        return Qt::DashLine;

    case wxPENSTYLE_DOT_DASH:
        return Qt::DotLine;

    case wxPENSTYLE_USER_DASH:
        return Qt::CustomDashLine;

    case wxPENSTYLE_STIPPLE:
        wxMISSING_IMPLEMENTATION( "wxPENSTYLE_STIPPLE" );
        break;

    case wxPENSTYLE_BDIAGONAL_HATCH:
        wxMISSING_IMPLEMENTATION( "wxPENSTYLE_BDIAGONAL_HATCH" );
        break;

    case wxPENSTYLE_CROSSDIAG_HATCH:
        wxMISSING_IMPLEMENTATION( "wxPENSTYLE_CROSSDIAG_HATCH" );
        break;

    case wxPENSTYLE_FDIAGONAL_HATCH:
        wxMISSING_IMPLEMENTATION( "wxPENSTYLE_FDIAGONAL_HATCH" );
        break;

    case wxPENSTYLE_CROSS_HATCH:
        wxMISSING_IMPLEMENTATION( "wxPENSTYLE_CROSS_HATCH" );
        break;

    case wxPENSTYLE_HORIZONTAL_HATCH:
        wxMISSING_IMPLEMENTATION( "wxPENSTYLE_HORIZONTAL_HATCH" );
        break;

    case wxPENSTYLE_VERTICAL_HATCH:
        wxMISSING_IMPLEMENTATION( "wxPENSTYLE_VERTICAL_HATCH" );
        break;

    case wxPENSTYLE_STIPPLE_MASK:
        wxMISSING_IMPLEMENTATION( "wxPENSTYLE_STIPPLE_MASK" );
        break;

    case wxPENSTYLE_STIPPLE_MASK_OPAQUE:
        wxMISSING_IMPLEMENTATION( "wxPENSTYLE_STIPPLE_MASK_OPAQUE" );
        break;

    case wxPENSTYLE_INVALID:
        wxFAIL_MSG( "Invalid pen style value" );
        break;
    }
    return Qt::SolidLine;
}
Exemplo n.º 20
0
void wxBitmap::UngetRawData(wxPixelDataBase& WXUNUSED(data))
{
    wxMISSING_IMPLEMENTATION( __FUNCTION__ );
}
Exemplo n.º 21
0
bool wxMask::Create(const wxBitmap& WXUNUSED(bitmap), int WXUNUSED(paletteIndex))
{
    wxMISSING_IMPLEMENTATION( __FUNCTION__ );
    return false;
}
Exemplo n.º 22
0
void wxWindowQt::SetDropTarget( wxDropTarget * WXUNUSED( dropTarget ) )
{
    wxMISSING_IMPLEMENTATION( __FUNCTION__ );
}