kde5: convert KDE5SalGraphics to SvpSalGraphics
Change-Id: Id30494fa1b01510e300f39b985b3a49ea58d81bc
This commit is contained in:
committed by
Thorsten Behrens
parent
941373f56a
commit
b899ba17b8
@@ -351,8 +351,8 @@ void KDE5SalFrame::updateGraphics( bool bClear )
|
|||||||
Drawable aDrawable = bClear ? None : GetWindow();
|
Drawable aDrawable = bClear ? None : GetWindow();
|
||||||
for( int i = 0; i < nMaxGraphics; i++ )
|
for( int i = 0; i < nMaxGraphics; i++ )
|
||||||
{
|
{
|
||||||
if( m_aGraphics[i].bInUse )
|
/*if( m_aGraphics[i].bInUse )
|
||||||
m_aGraphics[i].pGraphics->SetDrawable( aDrawable, GetScreenNumber() );
|
m_aGraphics[i].pGraphics->SetDrawable( aDrawable, GetScreenNumber() );*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -367,8 +367,8 @@ SalGraphics* KDE5SalFrame::AcquireGraphics()
|
|||||||
m_aGraphics[i].bInUse = true;
|
m_aGraphics[i].bInUse = true;
|
||||||
if( ! m_aGraphics[i].pGraphics )
|
if( ! m_aGraphics[i].pGraphics )
|
||||||
{
|
{
|
||||||
m_aGraphics[i].pGraphics.reset( new KDE5SalGraphics );
|
m_aGraphics[i].pGraphics.reset( new KDE5SalGraphics( this, m_pWindow ) );
|
||||||
m_aGraphics[i].pGraphics->Init( this, GetWindow(), GetScreenNumber() );
|
//m_aGraphics[i].pGraphics->Init( this, GetWindow(), GetScreenNumber() );
|
||||||
}
|
}
|
||||||
return m_aGraphics[i].pGraphics.get();
|
return m_aGraphics[i].pGraphics.get();
|
||||||
}
|
}
|
||||||
|
@@ -25,6 +25,11 @@
|
|||||||
#include <unx/salframe.h>
|
#include <unx/salframe.h>
|
||||||
#include <unx/salgdi.h>
|
#include <unx/salgdi.h>
|
||||||
|
|
||||||
|
#include "KDE5SalGraphics.hxx"
|
||||||
|
|
||||||
|
class QWidget;
|
||||||
|
class KDE5SalGraphics;
|
||||||
|
|
||||||
class KDE5SalFrame : public X11SalFrame
|
class KDE5SalFrame : public X11SalFrame
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
@@ -32,7 +37,7 @@ class KDE5SalFrame : public X11SalFrame
|
|||||||
|
|
||||||
struct GraphicsHolder
|
struct GraphicsHolder
|
||||||
{
|
{
|
||||||
std::unique_ptr<X11SalGraphics> pGraphics;
|
std::unique_ptr<KDE5SalGraphics> pGraphics;
|
||||||
bool bInUse;
|
bool bInUse;
|
||||||
|
|
||||||
GraphicsHolder() : bInUse( false ) {}
|
GraphicsHolder() : bInUse( false ) {}
|
||||||
@@ -40,6 +45,8 @@ class KDE5SalFrame : public X11SalFrame
|
|||||||
|
|
||||||
GraphicsHolder m_aGraphics[ nMaxGraphics ];
|
GraphicsHolder m_aGraphics[ nMaxGraphics ];
|
||||||
|
|
||||||
|
QWidget* m_pWindow;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
KDE5SalFrame( SalFrame* pParent, SalFrameStyleFlags nStyle );
|
KDE5SalFrame( SalFrame* pParent, SalFrameStyleFlags nStyle );
|
||||||
|
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#undef Region
|
#undef Region
|
||||||
|
|
||||||
#include "KDE5SalGraphics.hxx"
|
#include "KDE5SalFrame.hxx"
|
||||||
#include "KDE5SalInstance.hxx"
|
#include "KDE5SalInstance.hxx"
|
||||||
|
|
||||||
#include <vcl/settings.hxx>
|
#include <vcl/settings.hxx>
|
||||||
@@ -70,6 +70,13 @@ QRect region2QRect( const tools::Rectangle& rControlRegion )
|
|||||||
return QRect(rControlRegion.Left(), rControlRegion.Top(), rControlRegion.GetWidth(), rControlRegion.GetHeight());
|
return QRect(rControlRegion.Left(), rControlRegion.Top(), rControlRegion.GetWidth(), rControlRegion.GetHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
KDE5SalGraphics::KDE5SalGraphics( KDE5SalFrame *pFrame, QWidget *pWindow )
|
||||||
|
: SvpSalGraphics(),
|
||||||
|
m_pWindow( pWindow ),
|
||||||
|
m_pFrame( pFrame )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
bool KDE5SalGraphics::IsNativeControlSupported( ControlType type, ControlPart part )
|
bool KDE5SalGraphics::IsNativeControlSupported( ControlType type, ControlPart part )
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
|
@@ -24,15 +24,19 @@
|
|||||||
#include <rtl/string.hxx>
|
#include <rtl/string.hxx>
|
||||||
#include <unx/saldisp.hxx>
|
#include <unx/saldisp.hxx>
|
||||||
#include <unx/salgdi.h>
|
#include <unx/salgdi.h>
|
||||||
|
#include <headless/svpgdi.hxx>
|
||||||
|
|
||||||
#include <QtGui/QImage>
|
#include <QtGui/QImage>
|
||||||
|
|
||||||
|
class KDE5SalFrame;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles native graphics requests and performs the needed drawing operations.
|
* Handles native graphics requests and performs the needed drawing operations.
|
||||||
*/
|
*/
|
||||||
class KDE5SalGraphics : public X11SalGraphics
|
class KDE5SalGraphics : public SvpSalGraphics
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
KDE5SalGraphics( KDE5SalFrame *pFrame, QWidget *pWindow);
|
||||||
virtual bool IsNativeControlSupported( ControlType, ControlPart ) override;
|
virtual bool IsNativeControlSupported( ControlType, ControlPart ) override;
|
||||||
|
|
||||||
virtual bool hitTestNativeControl( ControlType, ControlPart,
|
virtual bool hitTestNativeControl( ControlType, ControlPart,
|
||||||
@@ -46,6 +50,9 @@ public:
|
|||||||
const OUString&, tools::Rectangle&, tools::Rectangle& ) override;
|
const OUString&, tools::Rectangle&, tools::Rectangle& ) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
QWidget *m_pWindow;
|
||||||
|
KDE5SalFrame *m_pFrame;
|
||||||
|
|
||||||
std::unique_ptr<QImage> m_image;
|
std::unique_ptr<QImage> m_image;
|
||||||
QRect lastPopupRect;
|
QRect lastPopupRect;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user