Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
e3169172
Kaydet (Commit)
e3169172
authored
Eki 27, 2017
tarafından
Jan-Marek Glogowski
Kaydeden (comit)
Thorsten Behrens
Kas 06, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
KF5 add QWidget to Kf5Frame
Change-Id: I53845519d0dda324c9544f057b18c6afd4cf858a
üst
c33b45c7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
142 additions
and
11 deletions
+142
-11
CustomTarget_kf5_moc.mk
vcl/CustomTarget_kf5_moc.mk
+1
-0
Library_vclplug_kf5.mk
vcl/Library_vclplug_kf5.mk
+1
-0
Kf5Frame.cxx
vcl/unx/kf5/Kf5Frame.cxx
+51
-5
Kf5Frame.hxx
vcl/unx/kf5/Kf5Frame.hxx
+12
-4
Kf5Instance.cxx
vcl/unx/kf5/Kf5Instance.cxx
+3
-2
Kf5Widget.cxx
vcl/unx/kf5/Kf5Widget.cxx
+34
-0
Kf5Widget.hxx
vcl/unx/kf5/Kf5Widget.hxx
+40
-0
No files found.
vcl/CustomTarget_kf5_moc.mk
Dosyayı görüntüle @
e3169172
...
@@ -11,6 +11,7 @@ $(eval $(call gb_CustomTarget_CustomTarget,vcl/unx/kf5))
...
@@ -11,6 +11,7 @@ $(eval $(call gb_CustomTarget_CustomTarget,vcl/unx/kf5))
$(call gb_CustomTarget_get_target,vcl/unx/kf5) : \
$(call gb_CustomTarget_get_target,vcl/unx/kf5) : \
$(call gb_CustomTarget_get_workdir,vcl/unx/kf5)/Kf5Timer.moc \
$(call gb_CustomTarget_get_workdir,vcl/unx/kf5)/Kf5Timer.moc \
$(call gb_CustomTarget_get_workdir,vcl/unx/kf5)/Kf5Widget.moc \
$(call gb_CustomTarget_get_workdir,vcl/unx/kf5)/%.moc : \
$(call gb_CustomTarget_get_workdir,vcl/unx/kf5)/%.moc : \
$(SRCDIR)/vcl/unx/kf5/%.hxx \
$(SRCDIR)/vcl/unx/kf5/%.hxx \
...
...
vcl/Library_vclplug_kf5.mk
Dosyayı görüntüle @
e3169172
...
@@ -87,6 +87,7 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_kf5,\
...
@@ -87,6 +87,7 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_kf5,\
vcl/unx/kf5/Kf5Printer \
vcl/unx/kf5/Kf5Printer \
vcl/unx/kf5/Kf5Timer \
vcl/unx/kf5/Kf5Timer \
vcl/unx/kf5/Kf5VirtualDevice \
vcl/unx/kf5/Kf5VirtualDevice \
vcl/unx/kf5/Kf5Widget \
))
))
ifeq ($(OS),LINUX)
ifeq ($(OS),LINUX)
...
...
vcl/unx/kf5/Kf5Frame.cxx
Dosyayı görüntüle @
e3169172
...
@@ -19,14 +19,61 @@
...
@@ -19,14 +19,61 @@
#include "Kf5Frame.hxx"
#include "Kf5Frame.hxx"
Kf5Frame
::
Kf5Frame
::
Kf5Frame
(
Kf5Instance
*
pInstance
,
#include "Kf5Instance.hxx"
SalFrame
*
pParent
,
#include "Kf5Widget.hxx"
SalFrameStyleFlags
nSalFrameStyle
)
{
#include <QtGui/QWindow>
Kf5Frame
::
Kf5Frame
(
Kf5Frame
*
pParent
,
SalFrameStyleFlags
nStyle
)
{
Kf5Instance
*
pInst
=
static_cast
<
Kf5Instance
*>
(
GetSalData
()
->
m_pInstance
);
pInst
->
insertFrame
(
this
);
if
(
nStyle
&
SalFrameStyleFlags
::
DEFAULT
)
// ensure default style
{
nStyle
|=
SalFrameStyleFlags
::
MOVEABLE
|
SalFrameStyleFlags
::
SIZEABLE
|
SalFrameStyleFlags
::
CLOSEABLE
;
nStyle
&=
~
SalFrameStyleFlags
::
FLOAT
;
}
m_nStyle
=
nStyle
;
m_pParent
=
pParent
;
Qt
::
WindowFlags
aWinFlags
;
if
(
!
(
nStyle
&
SalFrameStyleFlags
::
SYSTEMCHILD
)
)
{
if
(
nStyle
&
SalFrameStyleFlags
::
INTRO
)
aWinFlags
|=
Qt
::
SplashScreen
;
else
if
(
nStyle
&
(
SalFrameStyleFlags
::
FLOAT
|
SalFrameStyleFlags
::
TOOLTIP
)
)
aWinFlags
|=
Qt
::
ToolTip
;
else
if
(
(
nStyle
&
SalFrameStyleFlags
::
FLOAT
)
&&
!
(
nStyle
&
SalFrameStyleFlags
::
OWNERDRAWDECORATION
)
)
aWinFlags
|=
Qt
::
Popup
;
else
if
(
nStyle
&
SalFrameStyleFlags
::
DIALOG
&&
pParent
)
aWinFlags
|=
Qt
::
Dialog
;
else
if
(
nStyle
&
SalFrameStyleFlags
::
TOOLWINDOW
)
aWinFlags
|=
Qt
::
Tool
;
else
if
(
(
nStyle
&
SalFrameStyleFlags
::
OWNERDRAWDECORATION
)
)
aWinFlags
|=
Qt
::
Window
|
Qt
::
FramelessWindowHint
|
Qt
::
WindowDoesNotAcceptFocus
;
else
aWinFlags
|=
Qt
::
Window
;
}
m_pQWidget
.
reset
(
new
Kf5Widget
(
*
this
,
pParent
?
pParent
->
GetQWidget
()
:
nullptr
,
aWinFlags
)
);
if
(
pParent
&&
!
(
pParent
->
m_nStyle
&
SalFrameStyleFlags
::
PLUG
))
{
QWindow
*
pParentWindow
=
pParent
->
GetQWidget
()
->
window
()
->
windowHandle
();
QWindow
*
pChildWindow
=
m_pQWidget
->
window
()
->
windowHandle
();
if
(
pParentWindow
!=
pChildWindow
)
pChildWindow
->
setTransientParent
(
pParentWindow
);
}
}
}
Kf5Frame
::~
Kf5Frame
()
Kf5Frame
::~
Kf5Frame
()
{
{
Kf5Instance
*
pInst
=
static_cast
<
Kf5Instance
*>
(
GetSalData
()
->
m_pInstance
);
pInst
->
eraseFrame
(
this
);
}
}
SalGraphics
*
Kf5Frame
::
AcquireGraphics
()
SalGraphics
*
Kf5Frame
::
AcquireGraphics
()
...
@@ -38,7 +85,6 @@ void Kf5Frame::ReleaseGraphics( SalGraphics* pGraphics )
...
@@ -38,7 +85,6 @@ void Kf5Frame::ReleaseGraphics( SalGraphics* pGraphics )
{
{
}
}
bool
Kf5Frame
::
PostEvent
(
ImplSVEvent
*
pData
)
bool
Kf5Frame
::
PostEvent
(
ImplSVEvent
*
pData
)
{
{
return
false
;
return
false
;
...
...
vcl/unx/kf5/Kf5Frame.hxx
Dosyayı görüntüle @
e3169172
...
@@ -21,16 +21,24 @@
...
@@ -21,16 +21,24 @@
#include <salframe.hxx>
#include <salframe.hxx>
#include <memory>
class
Kf5Instance
;
class
Kf5Instance
;
class
Kf5Widget
;
class
VCL_DLLPUBLIC
Kf5Frame
:
public
SalFrame
class
Kf5Frame
:
public
SalFrame
{
{
std
::
unique_ptr
<
Kf5Widget
>
m_pQWidget
;
SalFrameStyleFlags
m_nStyle
;
Kf5Frame
*
m_pParent
;
public
:
public
:
Kf5Frame
(
Kf5Instance
*
pInstance
,
Kf5Frame
(
Kf5Frame
*
pParent
,
SalFrameStyleFlags
nSalFrameStyle
);
SalFrame
*
pParent
,
SalFrameStyleFlags
nSalFrameStyle
);
virtual
~
Kf5Frame
()
override
;
virtual
~
Kf5Frame
()
override
;
Kf5Widget
*
GetQWidget
()
const
{
return
m_pQWidget
.
get
();
}
virtual
SalGraphics
*
AcquireGraphics
()
override
;
virtual
SalGraphics
*
AcquireGraphics
()
override
;
virtual
void
ReleaseGraphics
(
SalGraphics
*
pGraphics
)
override
;
virtual
void
ReleaseGraphics
(
SalGraphics
*
pGraphics
)
override
;
...
...
vcl/unx/kf5/Kf5Instance.cxx
Dosyayı görüntüle @
e3169172
...
@@ -63,12 +63,13 @@ Kf5Instance::~Kf5Instance()
...
@@ -63,12 +63,13 @@ Kf5Instance::~Kf5Instance()
SalFrame
*
Kf5Instance
::
CreateChildFrame
(
SystemParentData
*
/*pParent*/
,
SalFrameStyleFlags
nStyle
)
SalFrame
*
Kf5Instance
::
CreateChildFrame
(
SystemParentData
*
/*pParent*/
,
SalFrameStyleFlags
nStyle
)
{
{
return
new
Kf5Frame
(
this
,
nullptr
,
nStyle
);
return
new
Kf5Frame
(
nullptr
,
nStyle
);
}
}
SalFrame
*
Kf5Instance
::
CreateFrame
(
SalFrame
*
pParent
,
SalFrameStyleFlags
nStyle
)
SalFrame
*
Kf5Instance
::
CreateFrame
(
SalFrame
*
pParent
,
SalFrameStyleFlags
nStyle
)
{
{
return
new
Kf5Frame
(
this
,
pParent
,
nStyle
);
assert
(
!
pParent
||
dynamic_cast
<
Kf5Frame
*>
(
pParent
)
);
return
new
Kf5Frame
(
static_cast
<
Kf5Frame
*>
(
pParent
),
nStyle
);
}
}
void
Kf5Instance
::
DestroyFrame
(
SalFrame
*
pFrame
)
void
Kf5Instance
::
DestroyFrame
(
SalFrame
*
pFrame
)
...
...
vcl/unx/kf5/Kf5Widget.cxx
0 → 100644
Dosyayı görüntüle @
e3169172
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "Kf5Widget.hxx"
#include <Kf5Widget.moc>
Kf5Widget
::
Kf5Widget
(
Kf5Frame
&
rFrame
,
QWidget
*
parent
,
Qt
::
WindowFlags
f
)
:
QWidget
(
parent
,
f
)
,
m_pFrame
(
&
rFrame
)
{
create
();
}
Kf5Widget
::~
Kf5Widget
()
{
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/unx/kf5/Kf5Widget.hxx
0 → 100644
Dosyayı görüntüle @
e3169172
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#pragma once
#include <QtWidgets/QWidget>
class
Kf5Frame
;
class
Kf5Widget
:
public
QWidget
{
Q_OBJECT
Kf5Frame
*
m_pFrame
;
public
:
Kf5Widget
(
Kf5Frame
&
rFrame
,
QWidget
*
parent
=
Q_NULLPTR
,
Qt
::
WindowFlags
f
=
Qt
::
WindowFlags
()
);
virtual
~
Kf5Widget
()
override
;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment