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
c38e49e8
Kaydet (Commit)
c38e49e8
authored
Haz 08, 2018
tarafından
Katarina Behrens
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Implement setValue of fpicker checkboxes, signal+slot
Change-Id: I0d75ef9f5584935d05a0526a626145e00761efd9
üst
d61f5db2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
13 deletions
+25
-13
KDE5FilePicker.cxx
vcl/unx/kde5/KDE5FilePicker.cxx
+0
-12
KDE5FilePicker.hxx
vcl/unx/kde5/KDE5FilePicker.hxx
+6
-0
KDE5FilePicker2.cxx
vcl/unx/kde5/KDE5FilePicker2.cxx
+19
-1
No files found.
vcl/unx/kde5/KDE5FilePicker.cxx
Dosyayı görüntüle @
c38e49e8
...
@@ -91,18 +91,6 @@ QString KDE5FilePicker::getCurrentFilter() const
...
@@ -91,18 +91,6 @@ QString KDE5FilePicker::getCurrentFilter() const
return filter;
return filter;
}
}
void KDE5FilePicker::setValue(sal_Int16 controlId, sal_Int16 nControlAction, bool value)
{
if (_customWidgets.contains(controlId))
{
QCheckBox* cb = dynamic_cast<QCheckBox*>(_customWidgets.value(controlId));
if (cb)
cb->setChecked(value);
}
else
qWarning() << "set value on unknown control" << controlId;
}
bool KDE5FilePicker::getValue(sal_Int16 controlId, sal_Int16 nControlAction) const
bool KDE5FilePicker::getValue(sal_Int16 controlId, sal_Int16 nControlAction) const
{
{
bool ret = false;
bool ret = false;
...
...
vcl/unx/kde5/KDE5FilePicker.hxx
Dosyayı görüntüle @
c38e49e8
...
@@ -174,10 +174,16 @@ protected:
...
@@ -174,10 +174,16 @@ protected:
Q_SIGNALS
:
Q_SIGNALS
:
void
setTitleSignal
(
const
OUString
&
rTitle
);
void
setTitleSignal
(
const
OUString
&
rTitle
);
void
setDisplayDirectorySignal
(
const
OUString
&
rDir
);
void
setDisplayDirectorySignal
(
const
OUString
&
rDir
);
void
setValueSignal
(
sal_Int16
nControlId
,
sal_Int16
nControlAction
,
const
css
::
uno
::
Any
&
rValue
);
private
Q_SLOTS
:
private
Q_SLOTS
:
void
setTitleSlot
(
const
OUString
&
rTitle
)
{
return
setTitle
(
rTitle
);
}
void
setTitleSlot
(
const
OUString
&
rTitle
)
{
return
setTitle
(
rTitle
);
}
void
setDisplayDirectorySlot
(
const
OUString
&
rDir
)
{
return
setDisplayDirectory
(
rDir
);
}
void
setDisplayDirectorySlot
(
const
OUString
&
rDir
)
{
return
setDisplayDirectory
(
rDir
);
}
void
setValueSlot
(
sal_Int16
nControlId
,
sal_Int16
nControlAction
,
const
css
::
uno
::
Any
&
rValue
)
{
return
setValue
(
nControlAction
,
nControlAction
,
rValue
);
}
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/unx/kde5/KDE5FilePicker2.cxx
Dosyayı görüntüle @
c38e49e8
...
@@ -105,6 +105,8 @@ KDE5FilePicker::KDE5FilePicker(QFileDialog::FileMode eMode)
...
@@ -105,6 +105,8 @@ KDE5FilePicker::KDE5FilePicker(QFileDialog::FileMode eMode)
connect
(
this
,
&
KDE5FilePicker
::
setDisplayDirectorySignal
/*(const OUString&)*/
,
this
,
connect
(
this
,
&
KDE5FilePicker
::
setDisplayDirectorySignal
/*(const OUString&)*/
,
this
,
&
KDE5FilePicker
::
setDisplayDirectorySlot
/*(const OUString&)*/
,
&
KDE5FilePicker
::
setDisplayDirectorySlot
/*(const OUString&)*/
,
Qt
::
BlockingQueuedConnection
);
Qt
::
BlockingQueuedConnection
);
connect
(
this
,
&
KDE5FilePicker
::
setValueSignal
,
this
,
&
KDE5FilePicker
::
setValueSlot
,
Qt
::
BlockingQueuedConnection
);
qApp
->
installEventFilter
(
this
);
qApp
->
installEventFilter
(
this
);
setMultiSelectionMode
(
false
);
setMultiSelectionMode
(
false
);
...
@@ -205,6 +207,23 @@ void SAL_CALL KDE5FilePicker::appendFilterGroup(const OUString& /*rGroupTitle*/,
...
@@ -205,6 +207,23 @@ void SAL_CALL KDE5FilePicker::appendFilterGroup(const OUString& /*rGroupTitle*/,
void
SAL_CALL
KDE5FilePicker
::
setValue
(
sal_Int16
controlId
,
sal_Int16
nControlAction
,
void
SAL_CALL
KDE5FilePicker
::
setValue
(
sal_Int16
controlId
,
sal_Int16
nControlAction
,
const
uno
::
Any
&
value
)
const
uno
::
Any
&
value
)
{
{
if
(
qApp
->
thread
()
!=
QThread
::
currentThread
())
{
SolarMutexReleaser
aReleaser
;
return
Q_EMIT
setValueSignal
(
controlId
,
nControlAction
,
value
);
}
if
(
_customWidgets
.
contains
(
controlId
))
{
bool
bChecked
=
false
;
value
>>=
bChecked
;
QCheckBox
*
cb
=
dynamic_cast
<
QCheckBox
*>
(
_customWidgets
.
value
(
controlId
));
if
(
cb
)
cb
->
setChecked
(
bChecked
);
}
else
SAL_WARN
(
"vcl.kde5"
,
"set value on unknown control "
<<
controlId
);
}
}
uno
::
Any
SAL_CALL
KDE5FilePicker
::
getValue
(
sal_Int16
controlId
,
sal_Int16
nControlAction
)
uno
::
Any
SAL_CALL
KDE5FilePicker
::
getValue
(
sal_Int16
controlId
,
sal_Int16
nControlAction
)
...
@@ -433,7 +452,6 @@ void SAL_CALL KDE5FilePicker::initialize(const uno::Sequence<uno::Any>& args)
...
@@ -433,7 +452,6 @@ void SAL_CALL KDE5FilePicker::initialize(const uno::Sequence<uno::Any>& args)
OSL_TRACE
(
"Unknown templates %d"
,
templateId
);
OSL_TRACE
(
"Unknown templates %d"
,
templateId
);
return
;
return
;
}
}
setTitle
(
VclResId
(
saveDialog
?
STR_FPICKER_SAVE
:
STR_FPICKER_OPEN
));
setTitle
(
VclResId
(
saveDialog
?
STR_FPICKER_SAVE
:
STR_FPICKER_OPEN
));
}
}
...
...
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