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
c9e00279
Kaydet (Commit)
c9e00279
authored
Haz 14, 2018
tarafından
Katarina Behrens
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Implement get|setLabel, signal+slot
Change-Id: I0188f7609b7a934949ffdf0a6e64547b08ff03a8
üst
6b052ccf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
28 deletions
+45
-28
KDE5FilePicker.cxx
vcl/unx/kde5/KDE5FilePicker.cxx
+0
-27
KDE5FilePicker.hxx
vcl/unx/kde5/KDE5FilePicker.hxx
+9
-0
KDE5FilePicker2.cxx
vcl/unx/kde5/KDE5FilePicker2.cxx
+36
-1
No files found.
vcl/unx/kde5/KDE5FilePicker.cxx
Dosyayı görüntüle @
c9e00279
...
@@ -46,33 +46,6 @@ KDE5FilePicker::~KDE5FilePicker()
...
@@ -46,33 +46,6 @@ KDE5FilePicker::~KDE5FilePicker()
delete
_dialog
;
delete
_dialog
;
}
}
/*void KDE5FilePicker::setLabel(sal_Int16 controlId, const QString& label)
{
if (_customWidgets.contains(controlId))
{
QCheckBox* cb = dynamic_cast<QCheckBox*>(_customWidgets.value(controlId));
if (cb)
cb->setText(label);
}
else
qWarning() << "set label on unknown control" << controlId;
}
QString KDE5FilePicker::getLabel(sal_Int16 controlId) const
{
QString label;
if (_customWidgets.contains(controlId))
{
QCheckBox* cb = dynamic_cast<QCheckBox*>(_customWidgets.value(controlId));
if (cb)
label = cb->text();
}
else
qWarning() << "get label on unknown control" << controlId;
return label;
}*/
void
KDE5FilePicker
::
setWinId
(
sal_uIntPtr
winId
)
{
_winId
=
winId
;
}
void
KDE5FilePicker
::
setWinId
(
sal_uIntPtr
winId
)
{
_winId
=
winId
;
}
bool
KDE5FilePicker
::
eventFilter
(
QObject
*
o
,
QEvent
*
e
)
bool
KDE5FilePicker
::
eventFilter
(
QObject
*
o
,
QEvent
*
e
)
...
...
vcl/unx/kde5/KDE5FilePicker.hxx
Dosyayı görüntüle @
c9e00279
...
@@ -180,6 +180,8 @@ Q_SIGNALS:
...
@@ -180,6 +180,8 @@ Q_SIGNALS:
const
css
::
uno
::
Any
&
rValue
);
const
css
::
uno
::
Any
&
rValue
);
css
::
uno
::
Any
getValueSignal
(
sal_Int16
nControlId
,
sal_Int16
nControlAction
);
css
::
uno
::
Any
getValueSignal
(
sal_Int16
nControlId
,
sal_Int16
nControlAction
);
void
enableControlSignal
(
sal_Int16
nControlId
,
sal_Bool
bEnable
);
void
enableControlSignal
(
sal_Int16
nControlId
,
sal_Bool
bEnable
);
void
setLabelSignal
(
sal_Int16
nControlId
,
const
OUString
&
rLabel
);
OUString
getLabelSignal
(
sal_Int16
nControlId
);
void
appendFilterSignal
(
const
OUString
&
rTitle
,
const
OUString
&
rFilter
);
void
appendFilterSignal
(
const
OUString
&
rTitle
,
const
OUString
&
rFilter
);
void
appendFilterGroupSignal
(
const
OUString
&
rTitle
,
void
appendFilterGroupSignal
(
const
OUString
&
rTitle
,
const
css
::
uno
::
Sequence
<
css
::
beans
::
StringPair
>&
rFilters
);
const
css
::
uno
::
Sequence
<
css
::
beans
::
StringPair
>&
rFilters
);
...
@@ -208,6 +210,13 @@ private Q_SLOTS:
...
@@ -208,6 +210,13 @@ private Q_SLOTS:
return
enableControl
(
nControlId
,
bEnable
);
return
enableControl
(
nControlId
,
bEnable
);
}
}
void
setLabelSlot
(
sal_Int16
nControId
,
const
OUString
&
rLabel
)
{
return
setLabel
(
nControId
,
rLabel
);
}
OUString
getLabelSlot
(
sal_Int16
nControlId
)
{
return
getLabel
(
nControlId
);
}
void
appendFilterSlot
(
const
OUString
&
rTitle
,
const
OUString
&
rFilter
)
void
appendFilterSlot
(
const
OUString
&
rTitle
,
const
OUString
&
rFilter
)
{
{
return
appendFilter
(
rTitle
,
rFilter
);
return
appendFilter
(
rTitle
,
rFilter
);
...
...
vcl/unx/kde5/KDE5FilePicker2.cxx
Dosyayı görüntüle @
c9e00279
...
@@ -115,6 +115,10 @@ KDE5FilePicker::KDE5FilePicker(QFileDialog::FileMode eMode)
...
@@ -115,6 +115,10 @@ KDE5FilePicker::KDE5FilePicker(QFileDialog::FileMode eMode)
Qt
::
BlockingQueuedConnection
);
Qt
::
BlockingQueuedConnection
);
connect
(
this
,
&
KDE5FilePicker
::
getValueSignal
,
this
,
&
KDE5FilePicker
::
getValueSlot
,
connect
(
this
,
&
KDE5FilePicker
::
getValueSignal
,
this
,
&
KDE5FilePicker
::
getValueSlot
,
Qt
::
BlockingQueuedConnection
);
Qt
::
BlockingQueuedConnection
);
connect
(
this
,
&
KDE5FilePicker
::
setLabelSignal
,
this
,
&
KDE5FilePicker
::
setLabelSlot
,
Qt
::
BlockingQueuedConnection
);
connect
(
this
,
&
KDE5FilePicker
::
getLabelSignal
,
this
,
&
KDE5FilePicker
::
getLabelSlot
,
Qt
::
BlockingQueuedConnection
);
connect
(
this
,
&
KDE5FilePicker
::
enableControlSignal
,
this
,
&
KDE5FilePicker
::
enableControlSlot
,
connect
(
this
,
&
KDE5FilePicker
::
enableControlSignal
,
this
,
&
KDE5FilePicker
::
enableControlSlot
,
Qt
::
BlockingQueuedConnection
);
Qt
::
BlockingQueuedConnection
);
connect
(
this
,
&
KDE5FilePicker
::
appendFilterSignal
,
this
,
&
KDE5FilePicker
::
appendFilterSlot
,
connect
(
this
,
&
KDE5FilePicker
::
appendFilterSignal
,
this
,
&
KDE5FilePicker
::
appendFilterSlot
,
...
@@ -374,11 +378,42 @@ void SAL_CALL KDE5FilePicker::enableControl(sal_Int16 controlId, sal_Bool enable
...
@@ -374,11 +378,42 @@ void SAL_CALL KDE5FilePicker::enableControl(sal_Int16 controlId, sal_Bool enable
SAL_WARN
(
"vcl.kde5"
,
"enable on unknown control"
<<
controlId
);
SAL_WARN
(
"vcl.kde5"
,
"enable on unknown control"
<<
controlId
);
}
}
void
SAL_CALL
KDE5FilePicker
::
setLabel
(
sal_Int16
controlId
,
const
OUString
&
label
)
{}
void
SAL_CALL
KDE5FilePicker
::
setLabel
(
sal_Int16
controlId
,
const
OUString
&
label
)
{
if
(
qApp
->
thread
()
!=
QThread
::
currentThread
())
{
SolarMutexReleaser
aReleaser
;
return
Q_EMIT
setLabelSignal
(
controlId
,
label
);
}
if
(
_customWidgets
.
contains
(
controlId
))
{
QCheckBox
*
cb
=
dynamic_cast
<
QCheckBox
*>
(
_customWidgets
.
value
(
controlId
));
if
(
cb
)
cb
->
setText
(
toQString
(
label
));
}
else
SAL_WARN
(
"vcl.kde5"
,
"set label on unknown control"
<<
controlId
);
}
OUString
SAL_CALL
KDE5FilePicker
::
getLabel
(
sal_Int16
controlId
)
OUString
SAL_CALL
KDE5FilePicker
::
getLabel
(
sal_Int16
controlId
)
{
{
if
(
qApp
->
thread
()
!=
QThread
::
currentThread
())
{
SolarMutexReleaser
aReleaser
;
return
Q_EMIT
getLabelSignal
(
controlId
);
}
OUString
label
;
OUString
label
;
if
(
_customWidgets
.
contains
(
controlId
))
{
QCheckBox
*
cb
=
dynamic_cast
<
QCheckBox
*>
(
_customWidgets
.
value
(
controlId
));
if
(
cb
)
label
=
toOUString
(
cb
->
text
());
}
else
SAL_WARN
(
"vcl.kde5"
,
"get label on unknown control"
<<
controlId
);
return
label
;
return
label
;
}
}
...
...
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