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();
|
||||
for( int i = 0; i < nMaxGraphics; i++ )
|
||||
{
|
||||
if( m_aGraphics[i].bInUse )
|
||||
m_aGraphics[i].pGraphics->SetDrawable( aDrawable, GetScreenNumber() );
|
||||
/*if( m_aGraphics[i].bInUse )
|
||||
m_aGraphics[i].pGraphics->SetDrawable( aDrawable, GetScreenNumber() );*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -367,8 +367,8 @@ SalGraphics* KDE5SalFrame::AcquireGraphics()
|
||||
m_aGraphics[i].bInUse = true;
|
||||
if( ! m_aGraphics[i].pGraphics )
|
||||
{
|
||||
m_aGraphics[i].pGraphics.reset( new KDE5SalGraphics );
|
||||
m_aGraphics[i].pGraphics->Init( this, GetWindow(), GetScreenNumber() );
|
||||
m_aGraphics[i].pGraphics.reset( new KDE5SalGraphics( this, m_pWindow ) );
|
||||
//m_aGraphics[i].pGraphics->Init( this, GetWindow(), GetScreenNumber() );
|
||||
}
|
||||
return m_aGraphics[i].pGraphics.get();
|
||||
}
|
||||
|
@@ -25,6 +25,11 @@
|
||||
#include <unx/salframe.h>
|
||||
#include <unx/salgdi.h>
|
||||
|
||||
#include "KDE5SalGraphics.hxx"
|
||||
|
||||
class QWidget;
|
||||
class KDE5SalGraphics;
|
||||
|
||||
class KDE5SalFrame : public X11SalFrame
|
||||
{
|
||||
private:
|
||||
@@ -32,7 +37,7 @@ class KDE5SalFrame : public X11SalFrame
|
||||
|
||||
struct GraphicsHolder
|
||||
{
|
||||
std::unique_ptr<X11SalGraphics> pGraphics;
|
||||
std::unique_ptr<KDE5SalGraphics> pGraphics;
|
||||
bool bInUse;
|
||||
|
||||
GraphicsHolder() : bInUse( false ) {}
|
||||
@@ -40,6 +45,8 @@ class KDE5SalFrame : public X11SalFrame
|
||||
|
||||
GraphicsHolder m_aGraphics[ nMaxGraphics ];
|
||||
|
||||
QWidget* m_pWindow;
|
||||
|
||||
public:
|
||||
KDE5SalFrame( SalFrame* pParent, SalFrameStyleFlags nStyle );
|
||||
|
||||
|
@@ -26,7 +26,7 @@
|
||||
|
||||
#undef Region
|
||||
|
||||
#include "KDE5SalGraphics.hxx"
|
||||
#include "KDE5SalFrame.hxx"
|
||||
#include "KDE5SalInstance.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());
|
||||
}
|
||||
|
||||
KDE5SalGraphics::KDE5SalGraphics( KDE5SalFrame *pFrame, QWidget *pWindow )
|
||||
: SvpSalGraphics(),
|
||||
m_pWindow( pWindow ),
|
||||
m_pFrame( pFrame )
|
||||
{
|
||||
}
|
||||
|
||||
bool KDE5SalGraphics::IsNativeControlSupported( ControlType type, ControlPart part )
|
||||
{
|
||||
switch (type)
|
||||
|
@@ -24,15 +24,19 @@
|
||||
#include <rtl/string.hxx>
|
||||
#include <unx/saldisp.hxx>
|
||||
#include <unx/salgdi.h>
|
||||
#include <headless/svpgdi.hxx>
|
||||
|
||||
#include <QtGui/QImage>
|
||||
|
||||
class KDE5SalFrame;
|
||||
|
||||
/**
|
||||
* Handles native graphics requests and performs the needed drawing operations.
|
||||
*/
|
||||
class KDE5SalGraphics : public X11SalGraphics
|
||||
class KDE5SalGraphics : public SvpSalGraphics
|
||||
{
|
||||
public:
|
||||
KDE5SalGraphics( KDE5SalFrame *pFrame, QWidget *pWindow);
|
||||
virtual bool IsNativeControlSupported( ControlType, ControlPart ) override;
|
||||
|
||||
virtual bool hitTestNativeControl( ControlType, ControlPart,
|
||||
@@ -46,6 +50,9 @@ public:
|
||||
const OUString&, tools::Rectangle&, tools::Rectangle& ) override;
|
||||
|
||||
private:
|
||||
QWidget *m_pWindow;
|
||||
KDE5SalFrame *m_pFrame;
|
||||
|
||||
std::unique_ptr<QImage> m_image;
|
||||
QRect lastPopupRect;
|
||||
};
|
||||
|
Reference in New Issue
Block a user