Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KOrganizer
Commits
04234537
Commit
04234537
authored
Jul 17, 2020
by
Laurent Montel
😁
Browse files
Remove unused export symbol. React when we change settings
parent
1f9d2e7c
Pipeline
#27495
passed with stage
in 13 minutes and 12 seconds
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/prefs/koprefsdialogcolorsandfonts.cpp
View file @
04234537
...
...
@@ -99,7 +99,7 @@ KOPrefsDialogColorsAndFonts::KOPrefsDialogColorsAndFonts(QWidget *parent)
// Use System color
mUseSystemColorCheckBox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
useSystemColorItem
()
->
label
(),
colorFrame
);
QObject
::
connect
(
mUseSystemColorCheckBox
,
&
QCheckBox
::
toggled
,
connect
(
mUseSystemColorCheckBox
,
&
QCheckBox
::
toggled
,
this
,
&
KOPrefsDialogColorsAndFonts
::
useSystemColorToggle
);
colorLayout
->
addWidget
(
mUseSystemColorCheckBox
,
1
,
0
,
1
,
2
);
...
...
src/prefs/koprefsdialoggroupscheduling.h
View file @
04234537
...
...
@@ -25,11 +25,10 @@
#ifndef KOPREFSDIALOGGROUPSCHEDULING_H
#define KOPREFSDIALOGGROUPSCHEDULING_H
#include "kcm_korganizer_export.h"
#include <KCModule>
class
QCheckBox
;
class
KCM_KORGANIZER_EXPORT
KOPrefsDialogGroupScheduling
:
public
KCModule
class
KOPrefsDialogGroupScheduling
:
public
KCModule
{
Q_OBJECT
public:
...
...
src/prefs/koprefsdialoggroupwarescheduling.h
View file @
04234537
...
...
@@ -26,13 +26,11 @@
#ifndef KOPREFSDIALOGGROUPWARESCHEDULING_H
#define KOPREFSDIALOGGROUPWARESCHEDULING_H
#include <KCModule>
#include "kcm_korganizer_export.h"
namespace
Ui
{
class
KOGroupwarePrefsPage
;
}
class
KOGroupwarePrefsPage
;
class
KCM_KORGANIZER_EXPORT
KOPrefsDialogGroupwareScheduling
:
public
KCModule
class
KOPrefsDialogGroupwareScheduling
:
public
KCModule
{
Q_OBJECT
public:
...
...
src/prefs/koprefsdialogmain.cpp
View file @
04234537
...
...
@@ -59,6 +59,7 @@ KOPrefsDialogMain::KOPrefsDialogMain(QWidget *parent)
mEmailControlCenterCheckBox
=
new
QCheckBox
(
CalendarSupport
::
KCalPrefs
::
instance
()
->
emailControlCenterItem
()
->
label
(),
this
);
connect
(
mEmailControlCenterCheckBox
,
&
QAbstractButton
::
toggled
,
this
,
&
KOPrefsDialogMain
::
toggleEmailSettings
);
connect
(
mEmailControlCenterCheckBox
,
&
QCheckBox
::
clicked
,
this
,
&
KOPrefsDialogMain
::
slotConfigChanged
);
personalLayout
->
addWidget
(
mEmailControlCenterCheckBox
);
mUserEmailSettings
=
new
QGroupBox
(
i18nc
(
"@title:group email settings"
,
"Email Settings"
),
...
...
@@ -95,9 +96,11 @@ KOPrefsDialogMain::KOPrefsDialogMain(QWidget *parent)
QVBoxLayout
*
saveLayout
=
new
QVBoxLayout
(
saveFrame
);
mConfirmCheckBox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
confirmItem
()
->
label
(),
saveFrame
);
connect
(
mConfirmCheckBox
,
&
QCheckBox
::
clicked
,
this
,
&
KOPrefsDialogMain
::
slotConfigChanged
);
saveLayout
->
addWidget
(
mConfirmCheckBox
);
mDestinationCheckBox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
destinationItem
()
->
label
(),
saveFrame
);
connect
(
mDestinationCheckBox
,
&
QCheckBox
::
clicked
,
this
,
&
KOPrefsDialogMain
::
slotConfigChanged
);
saveLayout
->
addWidget
(
mDestinationCheckBox
);
saveLayout
->
addStretch
(
1
);
...
...
@@ -114,6 +117,7 @@ KOPrefsDialogMain::KOPrefsDialogMain(QWidget *parent)
systrayGroupBox
->
setLayout
(
systrayGroupLayout
);
mShowReminderDaemonCheckBox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
showReminderDaemonItem
()
->
label
(),
systrayGroupBox
);
connect
(
mShowReminderDaemonCheckBox
,
&
QCheckBox
::
clicked
,
this
,
&
KOPrefsDialogMain
::
slotConfigChanged
);
systrayGroupLayout
->
addWidget
(
mShowReminderDaemonCheckBox
);
mShowReminderDaemonCheckBox
->
setToolTip
(
i18nc
(
"@info:tooltip"
,
"Enable this setting to show the KOrganizer "
...
...
@@ -178,6 +182,11 @@ void KOPrefsDialogMain::toggleEmailSettings(bool on)
}*/
}
void
KOPrefsDialogMain
::
slotConfigChanged
()
{
Q_EMIT
markAsChanged
();
}
extern
"C"
{
Q_DECL_EXPORT
KCModule
*
create_korganizerconfigmain
(
QWidget
*
parent
,
const
char
*
)
...
...
src/prefs/koprefsdialogmain.h
View file @
04234537
...
...
@@ -25,13 +25,12 @@
#ifndef KOPREFSDIALOGMAIN_H
#define KOPREFSDIALOGMAIN_H
#include "kcm_korganizer_export.h"
#include <KCModule>
class
QCheckBox
;
class
QLineEdit
;
class
KCM_KORGANIZER_EXPORT
KOPrefsDialogMain
:
public
KCModule
class
KOPrefsDialogMain
:
public
KCModule
{
Q_OBJECT
public:
...
...
@@ -42,8 +41,8 @@ public:
protected
Q_SLOTS
:
void
toggleEmailSettings
(
bool
on
);
private:
void
slotConfigChanged
();
QWidget
*
mUserEmailSettings
=
nullptr
;
QCheckBox
*
mEmailControlCenterCheckBox
=
nullptr
;
QLineEdit
*
mUserName
=
nullptr
;
...
...
src/prefs/koprefsdialogplugins.h
View file @
04234537
...
...
@@ -29,7 +29,6 @@
#include <KCModule>
#include <QSet>
#include "kcm_korganizer_export.h"
class
QTreeWidget
;
class
QLabel
;
class
QPushButton
;
...
...
@@ -37,7 +36,7 @@ class QRadioButton;
class
QGroupBox
;
class
QTreeWidgetItem
;
class
KCM_KORGANIZER_EXPORT
KOPrefsDialogPlugins
:
public
KCModule
class
KOPrefsDialogPlugins
:
public
KCModule
{
Q_OBJECT
public:
...
...
src/prefs/koprefsdialogtime.cpp
View file @
04234537
...
...
@@ -197,6 +197,7 @@ KOPrefsDialogTime::KOPrefsDialogTime(QWidget *parent)
workEndLayout
->
addWidget
(
mWorkEnd
);
mExcludeHolidaysCheckbox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
excludeHolidaysItem
()
->
label
(),
this
);
connect
(
mExcludeHolidaysCheckbox
,
&
QCheckBox
::
clicked
,
this
,
&
KOPrefsDialogTime
::
slotConfigChanged
);
workingHoursLayout
->
addWidget
(
mExcludeHolidaysCheckbox
);
regionalLayout
->
setRowStretch
(
4
,
1
);
...
...
@@ -262,7 +263,7 @@ KOPrefsDialogTime::KOPrefsDialogTime(QWidget *parent)
remindersLayout
->
addWidget
(
mReminderUnitsCombo
,
0
,
2
);
mDefaultAudioFileRemindersCheckBox
=
new
QCheckBox
(
CalendarSupport
::
KCalPrefs
::
instance
()
->
defaultAudioFileRemindersItem
()
->
label
(),
this
);
connect
(
mDefaultAudioFileRemindersCheckBox
,
&
QCheckBox
::
clicked
,
this
,
&
KOPrefsDialogTime
::
slotConfigChanged
);
if
(
CalendarSupport
::
KCalPrefs
::
instance
()
->
audioFilePathItem
()
->
value
().
isEmpty
())
{
const
QString
defAudioFile
=
QStandardPaths
::
locate
(
QStandardPaths
::
GenericDataLocation
,
...
...
@@ -283,8 +284,10 @@ KOPrefsDialogTime::KOPrefsDialogTime(QWidget *parent)
remindersLayout
->
addLayout
(
audioFileRemindersBox
,
1
,
0
);
mDefaultEventRemindersCheckBox
=
new
QCheckBox
(
CalendarSupport
::
KCalPrefs
::
instance
()
->
defaultEventRemindersItem
()
->
label
(),
this
);
connect
(
mDefaultEventRemindersCheckBox
,
&
QCheckBox
::
clicked
,
this
,
&
KOPrefsDialogTime
::
slotConfigChanged
);
remindersLayout
->
addWidget
(
mDefaultEventRemindersCheckBox
,
2
,
0
);
mDefaultTodoRemindersCheckBox
=
new
QCheckBox
(
CalendarSupport
::
KCalPrefs
::
instance
()
->
defaultTodoRemindersItem
()
->
label
(),
this
);
connect
(
mDefaultTodoRemindersCheckBox
,
&
QCheckBox
::
clicked
,
this
,
&
KOPrefsDialogTime
::
slotConfigChanged
);
remindersLayout
->
addWidget
(
mDefaultTodoRemindersCheckBox
,
3
,
0
);
defaultLayout
->
setRowStretch
(
3
,
1
);
...
...
@@ -293,8 +296,7 @@ KOPrefsDialogTime::KOPrefsDialogTime(QWidget *parent)
void
KOPrefsDialogTime
::
load
()
{
//TODO mFirstDayCombo
mFirstDayCombo
->
setCurrentIndex
(
KOPrefs
::
instance
()
->
weekStartDay
());
mDefaultAudioFileRemindersCheckBox
->
setChecked
(
CalendarSupport
::
KCalPrefs
::
instance
()
->
defaultAudioFileReminders
());
mDefaultDuration
->
setMaximumTime
(
QTime
(
24
,
0
));
// [24 hr]
mDefaultDuration
->
setTime
(
CalendarSupport
::
KCalPrefs
::
instance
()
->
defaultDuration
().
time
());
...
...
@@ -316,7 +318,8 @@ void KOPrefsDialogTime::load()
void
KOPrefsDialogTime
::
save
()
{
//TODO mFirstDayCombo
KOPrefs
::
instance
()
->
setWeekStartDay
(
mFirstDayCombo
->
currentIndex
());
CalendarSupport
::
KCalPrefs
::
instance
()
->
setDefaultAudioFileReminders
(
mDefaultAudioFileRemindersCheckBox
->
isChecked
());
{
QDateTime
dt
(
CalendarSupport
::
KCalPrefs
::
instance
()
->
defaultDuration
());
...
...
src/prefs/koprefsdialogviews.cpp
View file @
04234537
...
...
@@ -78,6 +78,9 @@ KOPrefsDialogViews::KOPrefsDialogViews(QWidget *parent)
mNextDay
=
new
QSpinBox
(
this
);
mNextDay
->
setSuffix
(
i18nc
(
"@label suffix in the N days spin box"
,
" days"
));
connect
(
mNextDay
,
&
QSpinBox
::
valueChanged
,
this
,
&
KOPrefsDialogViews
::
slotConfigChanged
);
nextDaysLayout
->
addWidget
(
new
QLabel
(
KOPrefs
::
instance
()
->
nextXDaysItem
()
->
label
(),
this
));
nextDaysLayout
->
addWidget
(
mNextDay
);
...
...
@@ -85,7 +88,13 @@ KOPrefsDialogViews::KOPrefsDialogViews(QWidget *parent)
mEnableToolTipsCheckBox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
enableToolTipsItem
()
->
label
(),
this
);
connect
(
mEnableToolTipsCheckBox
,
&
QCheckBox
::
clicked
,
this
,
&
KOPrefsDialogViews
::
slotConfigChanged
);
mTodosUseCategoryColorsCheckBox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
todosUseCategoryColorsItem
()
->
label
(),
this
);
connect
(
mTodosUseCategoryColorsCheckBox
,
&
QCheckBox
::
clicked
,
this
,
&
KOPrefsDialogViews
::
slotConfigChanged
);
gdisplayLayout
->
addWidget
(
mEnableToolTipsCheckBox
);
gdisplayLayout
->
addWidget
(
mTodosUseCategoryColorsCheckBox
);
gdisplayBox
->
setLayout
(
gdisplayLayout
);
...
...
@@ -95,9 +104,17 @@ KOPrefsDialogViews::KOPrefsDialogViews(QWidget *parent)
QVBoxLayout
*
datenavLayout
=
new
QVBoxLayout
;
QGroupBox
*
datenavBox
=
new
QGroupBox
(
i18nc
(
"@title:group"
,
"Date Navigator"
));
mDailyRecurCheckbox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
dailyRecurItem
()
->
label
(),
this
);
connect
(
mDailyRecurCheckbox
,
&
QCheckBox
::
clicked
,
this
,
&
KOPrefsDialogViews
::
slotConfigChanged
);
mWeeklyRecurCheckbox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
weeklyRecurItem
()
->
label
(),
this
);
connect
(
mWeeklyRecurCheckbox
,
&
QCheckBox
::
clicked
,
this
,
&
KOPrefsDialogViews
::
slotConfigChanged
);
mHighlightTodosCheckbox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
highlightTodosItem
()
->
label
(),
this
);
connect
(
mHighlightTodosCheckbox
,
&
QCheckBox
::
clicked
,
this
,
&
KOPrefsDialogViews
::
slotConfigChanged
);
mHighlightJournalsCheckbox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
highlightJournalsItem
()
->
label
(),
this
);
connect
(
mHighlightJournalsCheckbox
,
&
QCheckBox
::
clicked
,
this
,
&
KOPrefsDialogViews
::
slotConfigChanged
);
mWeekNumbersShowWorkCheckbox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
weekNumbersShowWorkItem
()
->
label
(),
this
);
datenavLayout
->
addWidget
(
mDailyRecurCheckbox
);
datenavLayout
->
addWidget
(
mWeeklyRecurCheckbox
);
...
...
@@ -131,16 +148,26 @@ KOPrefsDialogViews::KOPrefsDialogViews(QWidget *parent)
hourSizeLayout
->
addStretch
(
1
);
mEnableAgendaItemIconsCheckbox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
enableAgendaItemIconsItem
()
->
label
(),
this
);
connect
(
mEnableAgendaItemIconsCheckbox
,
&
QCheckBox
::
clicked
,
this
,
&
KOPrefsDialogViews
::
slotConfigChanged
);
adisplayLayout
->
addWidget
(
mEnableAgendaItemIconsCheckbox
);
mShowTodosAgendaViewCheckbox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
showTodosAgendaViewItem
()
->
label
(),
this
);
connect
(
mShowTodosAgendaViewCheckbox
,
&
QCheckBox
::
clicked
,
this
,
&
KOPrefsDialogViews
::
slotConfigChanged
);
adisplayLayout
->
addWidget
(
mShowTodosAgendaViewCheckbox
);
mMarcusBainsEnabledCheckbox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
marcusBainsEnabledItem
()
->
label
(),
this
);
connect
(
mMarcusBainsEnabledCheckbox
,
&
QCheckBox
::
clicked
,
this
,
&
KOPrefsDialogViews
::
slotConfigChanged
);
adisplayLayout
->
addWidget
(
mMarcusBainsEnabledCheckbox
);
mMarcusBainsShowSecondsCheckbox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
marcusBainsShowSecondsItem
()
->
label
(),
this
);
connect
(
mMarcusBainsShowSecondsCheckbox
,
&
QCheckBox
::
clicked
,
this
,
&
KOPrefsDialogViews
::
slotConfigChanged
);
adisplayLayout
->
addWidget
(
mMarcusBainsShowSecondsCheckbox
);
connect
(
mMarcusBains
Enabled
Checkbox
,
&
QAbstractButton
::
toggled
,
mMarcusBainsShowSecondsCheckbox
,
&
QWidget
::
setEnabled
);
connect
(
mMarcusBains
ShowSeconds
Checkbox
,
&
QAbstractButton
::
toggled
,
this
,
&
QWidget
::
setEnabled
);
mSelectionStartsEditorCheckbox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
selectionStartsEditorItem
()
->
label
(),
this
);
connect
(
mSelectionStartsEditorCheckbox
,
&
QAbstractButton
::
toggled
,
this
,
&
QWidget
::
setEnabled
);
adisplayLayout
->
addWidget
(
mSelectionStartsEditorCheckbox
);
mAgendaIconComboBox
->
setCheckedIcons
(
...
...
@@ -155,6 +182,8 @@ KOPrefsDialogViews::KOPrefsDialogViews(QWidget *parent)
// addWidRadios(KOPrefs::instance()->agendaViewColorsItem())->groupBox());
mColorBusyDaysEnabledCheckBox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
colorBusyDaysEnabledItem
()
->
label
(),
this
);
connect
(
mColorBusyDaysEnabledCheckBox
,
&
QAbstractButton
::
toggled
,
this
,
&
QWidget
::
setEnabled
);
agendaLayout
->
addWidget
(
mColorBusyDaysEnabledCheckBox
);
// GroupBox: Views->Agenda View->Multiple Calendars
...
...
@@ -175,12 +204,20 @@ KOPrefsDialogViews::KOPrefsDialogViews(QWidget *parent)
QVBoxLayout
*
mdisplayLayout
=
new
QVBoxLayout
;
QGroupBox
*
mdisplayBox
=
new
QGroupBox
(
i18nc
(
"@title:group"
,
"Display Options"
));
mShowTimeInMonthViewCheckBox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
showTimeInMonthViewItem
()
->
label
(),
this
);
connect
(
mShowTimeInMonthViewCheckBox
,
&
QAbstractButton
::
toggled
,
this
,
&
QWidget
::
setEnabled
);
mdisplayLayout
->
addWidget
(
mShowTimeInMonthViewCheckBox
);
mEnableMonthItemIconsCheckBox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
enableMonthItemIconsItem
()
->
label
(),
this
);
connect
(
mEnableMonthItemIconsCheckBox
,
&
QAbstractButton
::
toggled
,
this
,
&
QWidget
::
setEnabled
);
mdisplayLayout
->
addWidget
(
mEnableMonthItemIconsCheckBox
);
mShowTodosMonthViewCheckBox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
showTodosMonthViewItem
()
->
label
(),
this
);
connect
(
mShowTodosMonthViewCheckBox
,
&
QAbstractButton
::
toggled
,
this
,
&
QWidget
::
setEnabled
);
mdisplayLayout
->
addWidget
(
mShowTodosMonthViewCheckBox
);
mShowJournalsMonthViewCheckBox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
showJournalsMonthViewItem
()
->
label
(),
this
);
connect
(
mShowJournalsMonthViewCheckBox
,
&
QAbstractButton
::
toggled
,
this
,
&
QWidget
::
setEnabled
);
mdisplayLayout
->
addWidget
(
mShowJournalsMonthViewCheckBox
);
mdisplayBox
->
setLayout
(
mdisplayLayout
);
...
...
@@ -191,6 +228,8 @@ KOPrefsDialogViews::KOPrefsDialogViews(QWidget *parent)
monthLayout
->
addWidget
(
mdisplayBox
);
mColorMonthBusyDaysEnabledCheckBox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
colorMonthBusyDaysEnabledItem
()
->
label
(),
this
);
connect
(
mColorMonthBusyDaysEnabledCheckBox
,
&
QAbstractButton
::
toggled
,
this
,
&
QWidget
::
setEnabled
);
monthLayout
->
addWidget
(
mColorMonthBusyDaysEnabledCheckBox
);
// GroupBox: Views->Month View->Color Usage
...
...
@@ -210,6 +249,9 @@ KOPrefsDialogViews::KOPrefsDialogViews(QWidget *parent)
QVBoxLayout
*
tdisplayLayout
=
new
QVBoxLayout
;
QGroupBox
*
tdisplayBox
=
new
QGroupBox
(
i18nc
(
"@title:group"
,
"Display Options"
));
mSortCompletedTodosSeparatelyCheckBox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
sortCompletedTodosSeparatelyItem
()
->
label
(),
this
);
connect
(
mSortCompletedTodosSeparatelyCheckBox
,
&
QAbstractButton
::
toggled
,
this
,
&
QWidget
::
setEnabled
);
tdisplayLayout
->
addWidget
(
mSortCompletedTodosSeparatelyCheckBox
);
tdisplayBox
->
setLayout
(
tdisplayLayout
);
todoLayout
->
addWidget
(
tdisplayBox
);
...
...
@@ -218,6 +260,8 @@ KOPrefsDialogViews::KOPrefsDialogViews(QWidget *parent)
QVBoxLayout
*
otherLayout
=
new
QVBoxLayout
;
QGroupBox
*
otherBox
=
new
QGroupBox
(
i18nc
(
"@title:group"
,
"Other Options"
));
mRecordTodosInJournalsCheckBox
=
new
QCheckBox
(
KOPrefs
::
instance
()
->
recordTodosInJournalsItem
()
->
label
(),
this
);
connect
(
mRecordTodosInJournalsCheckBox
,
&
QAbstractButton
::
toggled
,
this
,
&
QWidget
::
setEnabled
);
otherLayout
->
addWidget
(
mRecordTodosInJournalsCheckBox
);
otherBox
->
setLayout
(
otherLayout
);
todoLayout
->
addWidget
(
otherBox
);
...
...
@@ -284,6 +328,7 @@ void KOPrefsDialogViews::save()
}
void
KOPrefsDialogViews
::
slotConfigChanged
()
{
void
KOPrefsDialogViews
::
slotConfigChanged
()
{
Q_EMIT
markAsChanged
();
}
src/prefs/koprefsuserfeedback.h
View file @
04234537
...
...
@@ -27,14 +27,12 @@
#define KOPREFSUSERFEEDBACK_H
#include <KCModule>
#include "kcm_korganizer_export.h"
#ifdef WITH_KUSERFEEDBACK
namespace
KUserFeedback
{
class
FeedbackConfigWidget
;
}
class
KCM_KORGANIZER_EXPORT
KOPrefsUserFeedBack
:
public
KCModule
class
KOPrefsUserFeedBack
:
public
KCModule
{
public:
explicit
KOPrefsUserFeedBack
(
QWidget
*
parent
=
nullptr
,
const
QVariantList
&
args
=
QVariantList
());
...
...
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