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
4add71a1
Kaydet (Commit)
4add71a1
authored
Haz 14, 2018
tarafından
Katarina Behrens
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Implement getValue, signal+slot
Change-Id: Ic009ea5dc3ca3bf791d3348fce8d007022598c49
üst
29e5096f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
16 deletions
+23
-16
KDE5FilePicker.cxx
vcl/unx/kde5/KDE5FilePicker.cxx
+1
-16
KDE5FilePicker.hxx
vcl/unx/kde5/KDE5FilePicker.hxx
+6
-0
KDE5FilePicker2.cxx
vcl/unx/kde5/KDE5FilePicker2.cxx
+16
-0
No files found.
vcl/unx/kde5/KDE5FilePicker.cxx
Dosyayı görüntüle @
4add71a1
...
...
@@ -46,22 +46,7 @@ KDE5FilePicker::~KDE5FilePicker()
delete
_dialog
;
}
/*bool KDE5FilePicker::getValue(sal_Int16 controlId, sal_Int16 nControlAction) const
{
bool ret = false;
if (_customWidgets.contains(controlId))
{
QCheckBox* cb = dynamic_cast<QCheckBox*>(_customWidgets.value(controlId));
if (cb)
ret = cb->isChecked();
}
else
qWarning() << "get value on unknown control" << controlId;
return ret;
}
void KDE5FilePicker::enableControl(sal_Int16 controlId, bool enable)
/*void KDE5FilePicker::enableControl(sal_Int16 controlId, bool enable)
{
if (_customWidgets.contains(controlId))
_customWidgets.value(controlId)->setEnabled(enable);
...
...
vcl/unx/kde5/KDE5FilePicker.hxx
Dosyayı görüntüle @
4add71a1
...
...
@@ -178,6 +178,7 @@ Q_SIGNALS:
OUString
getDisplayDirectorySignal
();
void
setValueSignal
(
sal_Int16
nControlId
,
sal_Int16
nControlAction
,
const
css
::
uno
::
Any
&
rValue
);
css
::
uno
::
Any
getValueSignal
(
sal_Int16
nControlId
,
sal_Int16
nControlAction
);
void
appendFilterSignal
(
const
OUString
&
rTitle
,
const
OUString
&
rFilter
);
void
appendFilterGroupSignal
(
const
OUString
&
rTitle
,
const
css
::
uno
::
Sequence
<
css
::
beans
::
StringPair
>&
rFilters
);
...
...
@@ -196,6 +197,11 @@ private Q_SLOTS:
return
setValue
(
nControlAction
,
nControlAction
,
rValue
);
}
css
::
uno
::
Any
getValueSlot
(
sal_Int16
nControlId
,
sal_Int16
nControlAction
)
{
return
getValue
(
nControlId
,
nControlAction
);
}
void
appendFilterSlot
(
const
OUString
&
rTitle
,
const
OUString
&
rFilter
)
{
return
appendFilter
(
rTitle
,
rFilter
);
...
...
vcl/unx/kde5/KDE5FilePicker2.cxx
Dosyayı görüntüle @
4add71a1
...
...
@@ -113,6 +113,8 @@ KDE5FilePicker::KDE5FilePicker(QFileDialog::FileMode eMode)
&
KDE5FilePicker
::
setMultiSelectionSlot
,
Qt
::
BlockingQueuedConnection
);
connect
(
this
,
&
KDE5FilePicker
::
setValueSignal
,
this
,
&
KDE5FilePicker
::
setValueSlot
,
Qt
::
BlockingQueuedConnection
);
connect
(
this
,
&
KDE5FilePicker
::
getValueSignal
,
this
,
&
KDE5FilePicker
::
getValueSlot
,
Qt
::
BlockingQueuedConnection
);
connect
(
this
,
&
KDE5FilePicker
::
appendFilterSignal
,
this
,
&
KDE5FilePicker
::
appendFilterSlot
,
Qt
::
BlockingQueuedConnection
);
connect
(
this
,
&
KDE5FilePicker
::
appendFilterGroupSignal
,
this
,
...
...
@@ -329,6 +331,12 @@ void SAL_CALL KDE5FilePicker::setValue(sal_Int16 controlId, sal_Int16 nControlAc
uno
::
Any
SAL_CALL
KDE5FilePicker
::
getValue
(
sal_Int16
controlId
,
sal_Int16
nControlAction
)
{
if
(
qApp
->
thread
()
!=
QThread
::
currentThread
())
{
SolarMutexReleaser
aReleaser
;
return
Q_EMIT
getValueSignal
(
controlId
,
nControlAction
);
}
if
(
CHECKBOX_AUTOEXTENSION
==
controlId
)
// We ignore this one and rely on QFileDialog to provide the function.
// Always return false, to pretend we do not support this, otherwise
...
...
@@ -338,6 +346,14 @@ uno::Any SAL_CALL KDE5FilePicker::getValue(sal_Int16 controlId, sal_Int16 nContr
return
uno
::
Any
(
false
);
bool
value
=
false
;
if
(
_customWidgets
.
contains
(
controlId
))
{
QCheckBox
*
cb
=
dynamic_cast
<
QCheckBox
*>
(
_customWidgets
.
value
(
controlId
));
if
(
cb
)
value
=
cb
->
isChecked
();
}
else
SAL_WARN
(
"vcl.kde5"
,
"get value on unknown control"
<<
controlId
);
return
uno
::
Any
(
value
);
}
...
...
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