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
b971f2cc
Kaydet (Commit)
b971f2cc
authored
May 24, 2018
tarafından
Katarina Behrens
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Basic structure of a slot to dispatch commands from menu
Change-Id: If3a134f67f59d3238c27eb0fef99bf49a8970433
üst
cd762c36
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
CustomTarget_qt5_moc.mk
vcl/CustomTarget_qt5_moc.mk
+1
-0
Qt5Menu.hxx
vcl/inc/qt5/Qt5Menu.hxx
+5
-1
Qt5Menu.cxx
vcl/qt5/Qt5Menu.cxx
+7
-1
No files found.
vcl/CustomTarget_qt5_moc.mk
Dosyayı görüntüle @
b971f2cc
...
...
@@ -12,6 +12,7 @@ $(eval $(call gb_CustomTarget_CustomTarget,vcl/qt5))
$(call gb_CustomTarget_get_target,vcl/qt5) : \
$(call gb_CustomTarget_get_workdir,vcl/qt5)/Qt5FilePicker.moc \
$(call gb_CustomTarget_get_workdir,vcl/qt5)/Qt5Instance.moc \
$(call gb_CustomTarget_get_workdir,vcl/qt5)/Qt5Menu.moc \
$(call gb_CustomTarget_get_workdir,vcl/qt5)/Qt5Timer.moc \
$(call gb_CustomTarget_get_workdir,vcl/qt5)/Qt5Widget.moc \
...
...
vcl/inc/qt5/Qt5Menu.hxx
Dosyayı görüntüle @
b971f2cc
...
...
@@ -17,8 +17,9 @@ class QMenuBar;
class
Qt5MenuItem
;
class
Qt5Frame
;
class
Qt5Menu
:
public
SalMenu
class
Qt5Menu
:
public
QObject
,
public
SalMenu
{
Q_OBJECT
private
:
std
::
vector
<
Qt5MenuItem
*
>
maItems
;
VclPtr
<
Menu
>
mpVCLMenu
;
...
...
@@ -53,6 +54,9 @@ public:
Menu
*
GetMenu
()
{
return
mpVCLMenu
;
}
unsigned
GetItemCount
()
{
return
maItems
.
size
();
}
Qt5MenuItem
*
GetItemAtPos
(
unsigned
nPos
)
{
return
maItems
[
nPos
];
}
private
slots
:
void
DispatchCommand
();
};
class
Qt5MenuItem
:
public
SalMenuItem
...
...
vcl/qt5/Qt5Menu.cxx
Dosyayı görüntüle @
b971f2cc
...
...
@@ -9,6 +9,7 @@
#include "Qt5Frame.hxx"
#include "Qt5Menu.hxx"
#include <Qt5Menu.moc>
#include <QtWidgets/QtWidgets>
...
...
@@ -62,7 +63,6 @@ void Qt5Menu::SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned
pQSubMenu
->
mpParentSalMenu
=
this
;
pItem
->
mpSubMenu
=
pQSubMenu
;
}
void
Qt5Menu
::
SetFrame
(
const
SalFrame
*
pFrame
)
...
...
@@ -114,6 +114,7 @@ void Qt5Menu::DoFullMenuUpdate( Menu* pMenuBar, QMenu* pParentMenu )
// leaf menu
QAction
*
pAction
=
pQMenu
->
addAction
(
toQString
(
aText
)
);
pAction
->
setShortcut
(
toQString
(
nAccelKey
.
GetName
(
GetFrame
()
->
GetWindow
())
)
);
connect
(
pAction
,
&
QAction
::
triggered
,
this
,
&
Qt5Menu
::
DispatchCommand
);
}
}
}
...
...
@@ -164,6 +165,11 @@ const Qt5Frame* Qt5Menu::GetFrame() const
return
pMenu
?
pMenu
->
mpFrame
:
nullptr
;
}
void
Qt5Menu
::
DispatchCommand
()
{
SAL_WARN
(
"vcl.qt5"
,
"menu triggered"
);
}
void
Qt5Menu
::
NativeItemText
(
OUString
&
rItemText
)
{
rItemText
=
rItemText
.
replace
(
'~'
,
'&'
);
...
...
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