Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
KAlarm
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PIM
KAlarm
Commits
2a7a0295
Commit
2a7a0295
authored
Oct 22, 2011
by
David Jarvie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move kdepim/kalarm/cal/ to kdepimlibs/kalarmcal/
Make it build using new kalarmcal library in kdepimlibs instead of local cal/ directory.
parent
ee92aa2b
Changes
125
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
125 changed files
with
851 additions
and
14050 deletions
+851
-14050
CMakeLists.txt
CMakeLists.txt
+5
-5
akonadi/CMakeLists.txt
akonadi/CMakeLists.txt
+7
-5
akonadi/akonadi_serializer_kalarm.cpp
akonadi/akonadi_serializer_kalarm.cpp
+9
-8
akonadi/common/alarmtyperadiowidget.cpp
akonadi/common/alarmtyperadiowidget.cpp
+9
-9
akonadi/common/alarmtyperadiowidget.h
akonadi/common/alarmtyperadiowidget.h
+6
-3
akonadi/common/alarmtypewidget.cpp
akonadi/common/alarmtypewidget.cpp
+9
-9
akonadi/common/alarmtypewidget.h
akonadi/common/alarmtypewidget.h
+5
-3
akonadi/common/kalarmresourcecommon.cpp
akonadi/common/kalarmresourcecommon.cpp
+10
-10
akonadi/common/kalarmresourcecommon.h
akonadi/common/kalarmresourcecommon.h
+4
-3
akonadi/kaeventformatter.cpp
akonadi/kaeventformatter.cpp
+7
-6
akonadi/kaeventformatter.h
akonadi/kaeventformatter.h
+3
-3
akonadi/kalarm/CMakeLists.txt
akonadi/kalarm/CMakeLists.txt
+8
-2
akonadi/kalarm/kalarmresource.cpp
akonadi/kalarm/kalarmresource.cpp
+12
-11
akonadi/kalarm/kalarmresource.h
akonadi/kalarm/kalarmresource.h
+5
-2
akonadi/kalarmdir/CMakeLists.txt
akonadi/kalarmdir/CMakeLists.txt
+8
-2
akonadi/kalarmdir/kalarmdirresource.cpp
akonadi/kalarmdir/kalarmdirresource.cpp
+8
-7
akonadi/kalarmdir/kalarmdirresource.h
akonadi/kalarmdir/kalarmdirresource.h
+4
-3
akonadi/kalarmdir/settingsdialog.cpp
akonadi/kalarmdir/settingsdialog.cpp
+3
-3
akonadi/kalarmdir/settingsdialog.h
akonadi/kalarmdir/settingsdialog.h
+6
-3
akonadimodel.cpp
akonadimodel.cpp
+33
-32
akonadimodel.h
akonadimodel.h
+12
-12
akonadiresourcecreator.cpp
akonadiresourcecreator.cpp
+9
-8
akonadiresourcecreator.h
akonadiresourcecreator.h
+6
-3
alarmcalendar.cpp
alarmcalendar.cpp
+71
-70
alarmcalendar.h
alarmcalendar.h
+18
-17
alarmlistdelegate.cpp
alarmlistdelegate.cpp
+3
-2
alarmlistfiltermodel.cpp
alarmlistfiltermodel.cpp
+4
-3
alarmlistfiltermodel.h
alarmlistfiltermodel.h
+7
-6
alarmtimewidget.cpp
alarmtimewidget.cpp
+2
-1
alarmtimewidget.h
alarmtimewidget.h
+3
-3
birthdaydlg.cpp
birthdaydlg.cpp
+0
-1
birthdaydlg.h
birthdaydlg.h
+2
-2
birthdaymodel.cpp
birthdaymodel.cpp
+4
-5
cal/CMakeLists.txt
cal/CMakeLists.txt
+0
-43
cal/Mainpage.dox
cal/Mainpage.dox
+0
-34
cal/README
cal/README
+0
-1
cal/alarmtext.cpp
cal/alarmtext.cpp
+0
-576
cal/alarmtext.h
cal/alarmtext.h
+0
-211
cal/collectionattribute.cpp
cal/collectionattribute.cpp
+0
-269
cal/collectionattribute.h
cal/collectionattribute.h
+0
-159
cal/compatibilityattribute.cpp
cal/compatibilityattribute.cpp
+0
-151
cal/compatibilityattribute.h
cal/compatibilityattribute.h
+0
-99
cal/datetime.cpp
cal/datetime.cpp
+0
-390
cal/datetime.h
cal/datetime.h
+0
-266
cal/eventattribute.cpp
cal/eventattribute.cpp
+0
-118
cal/eventattribute.h
cal/eventattribute.h
+0
-85
cal/identities.cpp
cal/identities.cpp
+0
-78
cal/identities.h
cal/identities.h
+0
-55
cal/kacalendar.cpp
cal/kacalendar.cpp
+0
-562
cal/kacalendar.h
cal/kacalendar.h
+0
-196
cal/kaevent.cpp
cal/kaevent.cpp
+0
-6388
cal/kaevent.h
cal/kaevent.h
+0
-1218
cal/kalarm_cal_export.h
cal/kalarm_cal_export.h
+0
-43
cal/karecurrence.cpp
cal/karecurrence.cpp
+0
-1298
cal/karecurrence.h
cal/karecurrence.h
+0
-516
cal/kcalcore_constptr.h
cal/kcalcore_constptr.h
+0
-82
cal/repetition.cpp
cal/repetition.cpp
+0
-170
cal/repetition.h
cal/repetition.h
+0
-173
cal/version.cpp
cal/version.cpp
+0
-73
cal/version.h
cal/version.h
+0
-43
calendarcompat.h
calendarcompat.h
+1
-1
calendarmigrator.cpp
calendarmigrator.cpp
+20
-20
calendarmigrator.h
calendarmigrator.h
+1
-1
collectionmodel.cpp
collectionmodel.cpp
+70
-69
collectionmodel.h
collectionmodel.h
+21
-18
commandoptions.cpp
commandoptions.cpp
+3
-2
commandoptions.h
commandoptions.h
+4
-3
dbushandler.cpp
dbushandler.cpp
+4
-3
dbushandler.h
dbushandler.h
+3
-3
deferdlg.cpp
deferdlg.cpp
+3
-2
deferdlg.h
deferdlg.h
+3
-3
editdlg.cpp
editdlg.cpp
+7
-6
editdlg.h
editdlg.h
+4
-4
editdlgtypes.cpp
editdlgtypes.cpp
+5
-2
editdlgtypes.h
editdlgtypes.h
+7
-2
eventlistmodel.cpp
eventlistmodel.cpp
+6
-8
eventlistmodel.h
eventlistmodel.h
+9
-10
find.cpp
find.cpp
+6
-3
functions.cpp
functions.cpp
+22
-21
functions.h
functions.h
+3
-4
itemlistmodel.cpp
itemlistmodel.cpp
+11
-10
itemlistmodel.h
itemlistmodel.h
+10
-8
kalarmapp.cpp
kalarmapp.cpp
+5
-4
kalarmapp.h
kalarmapp.h
+3
-4
kalarmconfig.kcfg
kalarmconfig.kcfg
+5
-5
kalarmconfig.kcfgc
kalarmconfig.kcfgc
+1
-1
kamail.cpp
kamail.cpp
+3
-2
kamail.h
kamail.h
+4
-6
main.cpp
main.cpp
+3
-2
mainwindow.cpp
mainwindow.cpp
+15
-13
mainwindow.h
mainwindow.h
+2
-1
messagewin.cpp
messagewin.cpp
+7
-6
messagewin.h
messagewin.h
+3
-2
newalarmaction.cpp
newalarmaction.cpp
+3
-2
prefdlg.cpp
prefdlg.cpp
+11
-8
preferences.cpp
preferences.cpp
+6
-4
recurrenceedit.cpp
recurrenceedit.cpp
+3
-2
recurrenceedit.h
recurrenceedit.h
+4
-5
recurrenceedit_p.h
recurrenceedit_p.h
+3
-2
repetitionbutton.h
repetitionbutton.h
+5
-3
resourcemodelview.cpp
resourcemodelview.cpp
+9
-9
resourcemodelview.h
resourcemodelview.h
+8
-7
resources/CMakeLists.txt
resources/CMakeLists.txt
+23
-15
resources/alarmresource.cpp
resources/alarmresource.cpp
+24
-24
resources/alarmresource.h
resources/alarmresource.h
+7
-6
resources/alarmresources.cpp
resources/alarmresources.cpp
+34
-32
resources/alarmresources.h
resources/alarmresources.h
+12
-11
resources/resourcelocal.cpp
resources/resourcelocal.cpp
+1
-1
resources/resourcelocal.h
resources/resourcelocal.h
+2
-2
resources/resourcelocaldir.cpp
resources/resourcelocaldir.cpp
+1
-1
resources/resourcelocaldir.h
resources/resourcelocaldir.h
+2
-2
resources/resourceremote.cpp
resources/resourceremote.cpp
+2
-2
resources/resourceremote.h
resources/resourceremote.h
+2
-2
resourceselector.cpp
resourceselector.cpp
+45
-45
resourceselector.h
resourceselector.h
+4
-2
templatelistfiltermodel.cpp
templatelistfiltermodel.cpp
+4
-3
templatemenuaction.cpp
templatemenuaction.cpp
+2
-1
templatemenuaction.h
templatemenuaction.h
+1
-1
templatepickdlg.h
templatepickdlg.h
+3
-2
traywindow.cpp
traywindow.cpp
+5
-4
traywindow.h
traywindow.h
+3
-2
undo.cpp
undo.cpp
+35
-35
undo.h
undo.h
+5
-3
wakedlg.cpp
wakedlg.cpp
+6
-3
wakedlg.h
wakedlg.h
+0
-1
No files found.
CMakeLists.txt
View file @
2a7a0295
...
...
@@ -13,6 +13,7 @@ endif()
if
(
KALARM_USE_AKONADI
)
add_definitions
(
-DUSE_AKONADI
)
else
(
KALARM_USE_AKONADI
)
add_definitions
(
-DUSE_KRESOURCES
)
add_definitions
(
-DWANT_DEPRECATED_KCAL_API
)
add_definitions
(
-DWANT_DEPRECATED_KABC_API
)
add_definitions
(
-DWANT_DEPRECATED_KRESOURCE_API
)
...
...
@@ -24,7 +25,6 @@ if(KALARM_USE_AKONADI)
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
CMAKE_CURRENT_SOURCE_DIR
}
/cal
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib
${
CMAKE_SOURCE_DIR
}
${
Boost_INCLUDE_DIR
}
...
...
@@ -33,7 +33,6 @@ else(KALARM_USE_AKONADI)
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
CMAKE_CURRENT_SOURCE_DIR
}
/cal
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib
${
CMAKE_CURRENT_SOURCE_DIR
}
/resources
${
CMAKE_SOURCE_DIR
}
...
...
@@ -41,7 +40,6 @@ include_directories(
)
endif
(
KALARM_USE_AKONADI
)
add_subdirectory
(
cal
)
if
(
KALARM_USE_AKONADI
)
add_subdirectory
(
akonadi
)
else
(
KALARM_USE_AKONADI
)
...
...
@@ -125,6 +123,8 @@ set(kalarm_bin_SRCS ${libkalarm_SRCS}
templatedlg.cpp
templatemenuaction.cpp
wakedlg.cpp
kcombobox.cpp
kdatecombobox.cpp
)
if
(
KALARM_USE_AKONADI
)
set
(
kalarm_bin_SRCS
${
kalarm_bin_SRCS
}
...
...
@@ -182,7 +182,7 @@ set_target_properties(kalarm_bin PROPERTIES OUTPUT_NAME kalarm)
if
(
KALARM_USE_AKONADI
)
target_link_libraries
(
kalarm_bin
kalarm_calendar
${
KDEPIMLIBS_KALARMCAL_LIBS
}
${
KDEPIMLIBS_KCALCORE_LIBS
}
${
KDEPIMLIBS_KCALUTILS_LIBS
}
${
KDEPIMLIBS_KABC_LIBS
}
...
...
@@ -202,7 +202,7 @@ if(KALARM_USE_AKONADI)
else
(
KALARM_USE_AKONADI
)
target_link_libraries
(
kalarm_bin
kalarm_resources
kalarm_calendar
${
KDEPIMLIBS_KALARMCAL_LIBS
}
${
KDEPIMLIBS_KCAL_LIBS
}
${
KDEPIMLIBS_KABC_LIBS
}
${
KDEPIMLIBS_KMIME_LIBS
}
...
...
akonadi/CMakeLists.txt
View file @
2a7a0295
# Note that resource configuration dialogs don't appear if built with this option.
set
(
KALARM_CALENDAR_INCLUDE_DIR
${
CMAKE_SOURCE_DIR
}
/kalarm/cal
)
########### definitions copied from kdepim-runtime module ###############
set
(
SHARED_MIME_INFO_MINIMUM_VERSION
"0.30"
)
find_package
(
SharedMimeInfo
)
...
...
@@ -20,7 +17,6 @@ add_subdirectory(kalarm)
add_subdirectory
(
kalarmdir
)
include_directories
(
${
KALARM_CALENDAR_INCLUDE_DIR
}
# ${AKONADI_ICAL_RESOURCE}
# ${AKONADI_SHARED_RESOURCES}
${
QT_QTDBUS_INCLUDE_DIR
}
...
...
@@ -40,7 +36,13 @@ set(akonadi_serializer_kalarm_SRCS
)
kde4_add_plugin
(
akonadi_serializer_kalarm
${
SERIALIZER_TYPE
}
${
akonadi_serializer_kalarm_SRCS
}
)
target_link_libraries
(
akonadi_serializer_kalarm kalarm_calendar
${
KDEPIMLIBS_KCALCORE_LIBS
}
${
KDEPIMLIBS_KCALUTILS_LIBS
}
${
KDEPIMLIBS_AKONADI_LIBS
}
${
KDE4_KDECORE_LIBS
}
)
target_link_libraries
(
akonadi_serializer_kalarm
${
KDEPIMLIBS_KALARMCAL_LIBS
}
${
KDEPIMLIBS_KCALCORE_LIBS
}
${
KDEPIMLIBS_KCALUTILS_LIBS
}
${
KDEPIMLIBS_AKONADI_LIBS
}
${
KDE4_KDECORE_LIBS
}
)
install
(
TARGETS akonadi_serializer_kalarm DESTINATION
${
PLUGIN_INSTALL_DIR
}
)
install
(
FILES akonadi_serializer_kalarm.desktop DESTINATION
${
DATA_INSTALL_DIR
}
/akonadi/plugins/serializer
)
...
...
akonadi/akonadi_serializer_kalarm.cpp
View file @
2a7a0295
...
...
@@ -20,11 +20,12 @@
*/
#include "akonadi_serializer_kalarm.h"
#include "eventattribute.h"
#include "kacalendar.h"
#include "kaevent.h"
#include "kaeventformatter.h"
#include <kalarmcal/eventattribute.h>
#include <kalarmcal/kacalendar.h>
#include <kalarmcal/kaevent.h>
#include <akonadi/item.h>
#include <akonadi/abstractdifferencesreporter.h>
#include <akonadi/attributefactory.h>
...
...
@@ -35,7 +36,7 @@
#include <QtCore/qplugin.h>
using
namespace
Akonadi
;
using
namespace
KAlarm
;
using
namespace
KAlarm
Cal
;
// Convert from backend data stream to a KAEvent, and set it into the item's payload.
...
...
@@ -61,7 +62,7 @@ bool SerializerPluginKAlarm::deserialize(Item& item, const QByteArray& label, QI
return
false
;
}
KAEvent
event
(
i
.
staticCast
<
KCalCore
::
Event
>
());
QString
mime
=
KAlarm
::
CalEvent
::
mimeType
(
event
.
category
());
QString
mime
=
CalEvent
::
mimeType
(
event
.
category
());
if
(
mime
.
isEmpty
()
||
!
event
.
isValid
())
{
kWarning
(
5263
)
<<
"Event with uid"
<<
event
.
id
()
<<
"contains no usable alarms!"
;
...
...
@@ -74,12 +75,12 @@ bool SerializerPluginKAlarm::deserialize(Item& item, const QByteArray& label, QI
static
bool
attrRegistered
=
false
;
if
(
!
attrRegistered
)
{
AttributeFactory
::
registerAttribute
<
KAlarm
::
EventAttribute
>
();
AttributeFactory
::
registerAttribute
<
KAlarm
Cal
::
EventAttribute
>
();
attrRegistered
=
true
;
}
if
(
item
.
hasAttribute
<
KAlarm
::
EventAttribute
>
())
if
(
item
.
hasAttribute
<
EventAttribute
>
())
{
KAEvent
::
CmdErrType
err
=
item
.
attribute
<
KAlarm
::
EventAttribute
>
()
->
commandError
();
KAEvent
::
CmdErrType
err
=
item
.
attribute
<
EventAttribute
>
()
->
commandError
();
event
.
setCommandError
(
err
);
}
...
...
akonadi/common/alarmtyperadiowidget.cpp
View file @
2a7a0295
...
...
@@ -36,17 +36,17 @@ AlarmTypeRadioWidget::AlarmTypeRadioWidget(QWidget* parent)
connect
(
ui
.
templateRadio
,
SIGNAL
(
toggled
(
bool
)),
SIGNAL
(
changed
()));
}
void
AlarmTypeRadioWidget
::
setAlarmType
(
KAlarm
::
CalEvent
::
Type
type
)
void
AlarmTypeRadioWidget
::
setAlarmType
(
CalEvent
::
Type
type
)
{
switch
(
type
)
{
case
KAlarm
::
CalEvent
::
ACTIVE
:
case
CalEvent
::
ACTIVE
:
ui
.
activeRadio
->
setChecked
(
true
);
break
;
case
KAlarm
::
CalEvent
::
ARCHIVED
:
case
CalEvent
::
ARCHIVED
:
ui
.
archivedRadio
->
setChecked
(
true
);
break
;
case
KAlarm
::
CalEvent
::
TEMPLATE
:
case
CalEvent
::
TEMPLATE
:
ui
.
templateRadio
->
setChecked
(
true
);
break
;
default:
...
...
@@ -54,15 +54,15 @@ void AlarmTypeRadioWidget::setAlarmType(KAlarm::CalEvent::Type type)
}
}
KAlarm
::
CalEvent
::
Type
AlarmTypeRadioWidget
::
alarmType
()
const
CalEvent
::
Type
AlarmTypeRadioWidget
::
alarmType
()
const
{
if
(
ui
.
activeRadio
->
isChecked
())
return
KAlarm
::
CalEvent
::
ACTIVE
;
return
CalEvent
::
ACTIVE
;
if
(
ui
.
archivedRadio
->
isChecked
())
return
KAlarm
::
CalEvent
::
ARCHIVED
;
return
CalEvent
::
ARCHIVED
;
if
(
ui
.
templateRadio
->
isChecked
())
return
KAlarm
::
CalEvent
::
TEMPLATE
;
return
KAlarm
::
CalEvent
::
EMPTY
;
return
CalEvent
::
TEMPLATE
;
return
CalEvent
::
EMPTY
;
}
bool
AlarmTypeRadioWidget
::
validate
()
const
...
...
akonadi/common/alarmtyperadiowidget.h
View file @
2a7a0295
...
...
@@ -24,7 +24,10 @@
#include "singlefileresourceconfigdialogbase.h"
#include "ui_alarmtyperadiowidget.h"
#include "kacalendar.h"
#include <kalarmcal/kacalendar.h>
using
namespace
KAlarmCal
;
class
QButtonGroup
;
...
...
@@ -33,8 +36,8 @@ class AlarmTypeRadioWidget : public Akonadi::SingleFileValidatingWidget
Q_OBJECT
public:
explicit
AlarmTypeRadioWidget
(
QWidget
*
parent
=
0
);
void
setAlarmType
(
KAlarm
::
CalEvent
::
Type
);
KAlarm
::
CalEvent
::
Type
alarmType
()
const
;
void
setAlarmType
(
CalEvent
::
Type
);
CalEvent
::
Type
alarmType
()
const
;
virtual
bool
validate
()
const
;
private:
...
...
akonadi/common/alarmtypewidget.cpp
View file @
2a7a0295
...
...
@@ -32,25 +32,25 @@ AlarmTypeWidget::AlarmTypeWidget(QWidget* parent, QLayout* layout)
connect
(
ui
.
templateCheckBox
,
SIGNAL
(
toggled
(
bool
)),
SIGNAL
(
changed
()));
}
void
AlarmTypeWidget
::
setAlarmTypes
(
KAlarm
::
CalEvent
::
Types
types
)
void
AlarmTypeWidget
::
setAlarmTypes
(
CalEvent
::
Types
types
)
{
if
(
types
&
KAlarm
::
CalEvent
::
ACTIVE
)
if
(
types
&
CalEvent
::
ACTIVE
)
ui
.
activeCheckBox
->
setChecked
(
true
);
if
(
types
&
KAlarm
::
CalEvent
::
ARCHIVED
)
if
(
types
&
CalEvent
::
ARCHIVED
)
ui
.
archivedCheckBox
->
setChecked
(
true
);
if
(
types
&
KAlarm
::
CalEvent
::
TEMPLATE
)
if
(
types
&
CalEvent
::
TEMPLATE
)
ui
.
templateCheckBox
->
setChecked
(
true
);
}
KAlarm
::
CalEvent
::
Types
AlarmTypeWidget
::
alarmTypes
()
const
CalEvent
::
Types
AlarmTypeWidget
::
alarmTypes
()
const
{
KAlarm
::
CalEvent
::
Types
types
=
KAlarm
::
CalEvent
::
EMPTY
;
CalEvent
::
Types
types
=
CalEvent
::
EMPTY
;
if
(
ui
.
activeCheckBox
->
isChecked
())
types
|=
KAlarm
::
CalEvent
::
ACTIVE
;
types
|=
CalEvent
::
ACTIVE
;
if
(
ui
.
archivedCheckBox
->
isChecked
())
types
|=
KAlarm
::
CalEvent
::
ARCHIVED
;
types
|=
CalEvent
::
ARCHIVED
;
if
(
ui
.
templateCheckBox
->
isChecked
())
types
|=
KAlarm
::
CalEvent
::
TEMPLATE
;
types
|=
CalEvent
::
TEMPLATE
;
return
types
;
}
...
...
akonadi/common/alarmtypewidget.h
View file @
2a7a0295
...
...
@@ -23,16 +23,18 @@
#define ALARMTYPEWIDGET_H
#include "ui_alarmtypewidget.h"
#include "kacalendar.h"
#include <kalarmcal/kacalendar.h>
using
namespace
KAlarmCal
;
class
AlarmTypeWidget
:
public
QWidget
{
Q_OBJECT
public:
AlarmTypeWidget
(
QWidget
*
parent
,
QLayout
*
layout
);
void
setAlarmTypes
(
KAlarm
::
CalEvent
::
Types
);
KAlarm
::
CalEvent
::
Types
alarmTypes
()
const
;
void
setAlarmTypes
(
CalEvent
::
Types
);
CalEvent
::
Types
alarmTypes
()
const
;
signals:
void
changed
();
...
...
akonadi/common/kalarmresourcecommon.cpp
View file @
2a7a0295
...
...
@@ -20,8 +20,9 @@
*/
#include "kalarmresourcecommon.h"
#include "compatibilityattribute.h"
#include "eventattribute.h"
#include <kalarmcal/compatibilityattribute.h>
#include <kalarmcal/eventattribute.h>
#include <akonadi/attributefactory.h>
#include <akonadi/collectionmodifyjob.h>
...
...
@@ -35,8 +36,7 @@
using
namespace
Akonadi
;
using
namespace
KCalCore
;
using
KAlarm
::
CompatibilityAttribute
;
using
KAlarm
::
EventAttribute
;
using
namespace
KAlarmCal
;
class
Private
:
public
QObject
...
...
@@ -80,14 +80,14 @@ QStringList mimeTypes(const QString& id)
{
QStringList
mimes
;
if
(
id
.
contains
(
"_active"
))
mimes
<<
KAlarm
::
MIME_ACTIVE
;
mimes
<<
KAlarm
Cal
::
MIME_ACTIVE
;
else
if
(
id
.
contains
(
"_archived"
))
mimes
<<
KAlarm
::
MIME_ARCHIVED
;
mimes
<<
KAlarm
Cal
::
MIME_ARCHIVED
;
else
if
(
id
.
contains
(
"_template"
))
mimes
<<
KAlarm
::
MIME_TEMPLATE
;
mimes
<<
KAlarm
Cal
::
MIME_TEMPLATE
;
else
mimes
<<
KAlarm
::
MIME_BASE
<<
KAlarm
::
MIME_ACTIVE
<<
KAlarm
::
MIME_ARCHIVED
<<
KAlarm
::
MIME_TEMPLATE
;
mimes
<<
KAlarm
Cal
::
MIME_BASE
<<
KAlarm
Cal
::
MIME_ACTIVE
<<
KAlarmCal
::
MIME_ARCHIVED
<<
KAlarmCal
::
MIME_TEMPLATE
;
return
mimes
;
}
...
...
@@ -117,7 +117,7 @@ KACalendar::Compat getCompatibility(const FileStorage::Ptr& fileStorage, int& ve
*/
Item
retrieveItem
(
const
Akonadi
::
Item
&
item
,
KAEvent
&
event
)
{
QString
mime
=
KAlarm
::
CalEvent
::
mimeType
(
event
.
category
());
QString
mime
=
CalEvent
::
mimeType
(
event
.
category
());
event
.
setItemId
(
item
.
id
());
if
(
item
.
hasAttribute
<
EventAttribute
>
())
event
.
setCommandError
(
item
.
attribute
<
EventAttribute
>
()
->
commandError
());
...
...
akonadi/common/kalarmresourcecommon.h
View file @
2a7a0295
...
...
@@ -22,8 +22,9 @@
#ifndef KALARMRESOURCECOMMON_H
#define KALARMRESOURCECOMMON_H
#include "kacalendar.h"
#include "kaevent.h"
#include <kalarmcal/kacalendar.h>
#include <kalarmcal/kaevent.h>
#include <QObject>
namespace
KCalCore
{
class
FileStorage
;
}
...
...
@@ -31,7 +32,7 @@ namespace Akonadi {
class
Collection
;
class
Item
;
}
using
namespace
KAlarm
;
using
namespace
KAlarm
Cal
;
namespace
KAlarmResourceCommon
{
...
...
akonadi/kaeventformatter.cpp
View file @
2a7a0295
...
...
@@ -19,9 +19,10 @@
*/
#include "kaeventformatter.h"
#include "kacalendar.h"
#include "kaevent.h"
#include "datetime.h"
#include <kalarmcal/kacalendar.h>
#include <kalarmcal/kaevent.h>
#include <kalarmcal/datetime.h>
#include <kcalutils/incidenceformatter.h>
...
...
@@ -214,9 +215,9 @@ QString KAEventFormatter::value(Parameter param) const
case
AlarmCategory
:
switch
(
mEvent
.
category
())
{
case
KAlarm
::
CalEvent
::
ACTIVE
:
return
i18nc
(
"@info/plain Alarm type"
,
"Active"
);
case
KAlarm
::
CalEvent
::
ARCHIVED
:
return
i18nc
(
"@info/plain Alarm type"
,
"Archived"
);
case
KAlarm
::
CalEvent
::
TEMPLATE
:
return
i18nc
(
"@info/plain Alarm type"
,
"Template"
);
case
CalEvent
::
ACTIVE
:
return
i18nc
(
"@info/plain Alarm type"
,
"Active"
);
case
CalEvent
::
ARCHIVED
:
return
i18nc
(
"@info/plain Alarm type"
,
"Archived"
);
case
CalEvent
::
TEMPLATE
:
return
i18nc
(
"@info/plain Alarm type"
,
"Template"
);
default:
break
;
}
...
...
akonadi/kaeventformatter.h
View file @
2a7a0295
/*
* kaeventformatter.h - converts KAEvent properties to text
* Program: kalarm
* Copyright © 2010 by David Jarvie <djarvie@kde.org>
* Copyright © 2010
-2011
by David Jarvie <djarvie@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -21,11 +21,11 @@
#ifndef KAEVENTFORMATTER_H
#define KAEVENTFORMATTER_H
#include
"kaevent.h"
#include
<kalarmcal/kaevent.h>
#include <QString>
using
KAlarm
::
KAEvent
;
using
namespace
KAlarmCal
;
class
KAEventFormatter
{
...
...
akonadi/kalarm/CMakeLists.txt
View file @
2a7a0295
...
...
@@ -17,7 +17,6 @@ endif (KDEPIM_MOBILE_UI)
include_directories
(
${
KALARM_COMMON_RESOURCES
}
${
KALARM_CALENDAR_INCLUDE_DIR
}
${
AKONADI_ICAL_RESOURCE
}
${
AKONADI_SHARED_RESOURCES
}
${
QT_QTDBUS_INCLUDE_DIR
}
...
...
@@ -60,6 +59,13 @@ if (Q_WS_MAC)
set_target_properties
(
akonadi_kalarm_resource PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME
"KDE Akonadi KAlarm Resource"
)
endif
(
Q_WS_MAC
)
target_link_libraries
(
akonadi_kalarm_resource kalarm_calendar akonadi-kcal
${
KDEPIMLIBS_AKONADI_LIBS
}
${
QT_QTDBUS_LIBRARY
}
${
KDEPIMLIBS_KCALCORE_LIBS
}
${
KDE4_KIO_LIBS
}
)
target_link_libraries
(
akonadi_kalarm_resource
${
KDEPIMLIBS_KALARMCAL_LIBS
}
${
KDEPIMLIBS_AKONADI_KCAL_LIBS
}
${
KDEPIMLIBS_AKONADI_LIBS
}
${
KDEPIMLIBS_KCALCORE_LIBS
}
${
KDE4_KIO_LIBS
}
${
QT_QTDBUS_LIBRARY
}
)
install
(
TARGETS akonadi_kalarm_resource DESTINATION
${
PLUGIN_INSTALL_DIR
}
)
akonadi/kalarm/kalarmresource.cpp
View file @
2a7a0295
...
...
@@ -22,8 +22,9 @@
#include "kalarmresource.h"
#include "kalarmresourcecommon.h"
#include "alarmtyperadiowidget.h"
#include "kacalendar.h"
#include "kaevent.h"
#include <kalarmcal/kacalendar.h>
#include <kalarmcal/kaevent.h>
#include <akonadi/agentfactory.h>
#include <akonadi/attributefactory.h>
...
...
@@ -37,8 +38,8 @@
using
namespace
Akonadi
;
using
namespace
Akonadi_KAlarm_Resource
;
using
namespace
KAlarmCal
;
using
KAlarmResourceCommon
::
errorMessage
;
using
KAlarm
::
KAEvent
;
KAlarmResource
::
KAlarmResource
(
const
QString
&
id
)
...
...
@@ -64,22 +65,22 @@ void KAlarmResource::customizeConfigDialog(SingleFileResourceConfigDialog<Settin
ICalResourceBase
::
customizeConfigDialog
(
dlg
);
mTypeSelector
=
new
AlarmTypeRadioWidget
(
dlg
);
QStringList
types
=
mSettings
->
alarmTypes
();
KAlarm
::
CalEvent
::
Type
alarmType
=
KAlarm
::
CalEvent
::
ACTIVE
;
CalEvent
::
Type
alarmType
=
CalEvent
::
ACTIVE
;
if
(
!
types
.
isEmpty
())
alarmType
=
KAlarm
::
CalEvent
::
type
(
types
[
0
]);
alarmType
=
CalEvent
::
type
(
types
[
0
]);
mTypeSelector
->
setAlarmType
(
alarmType
);
dlg
->
appendWidget
(
mTypeSelector
);
dlg
->
setMonitorEnabled
(
false
);
QString
title
;
switch
(
alarmType
)
{
case
KAlarm
::
CalEvent
::
ACTIVE
:
case
CalEvent
::
ACTIVE
:
title
=
i18nc
(
"@title:window"
,
"Select Active Alarm Calendar"
);
break
;
case
KAlarm
::
CalEvent
::
ARCHIVED
:
case
CalEvent
::
ARCHIVED
:
title
=
i18nc
(
"@title:window"
,
"Select Archived Alarm Calendar"
);
break
;
case
KAlarm
::
CalEvent
::
TEMPLATE
:
case
CalEvent
::
TEMPLATE
:
title
=
i18nc
(
"@title:window"
,
"Select Alarm Template Calendar"
);
break
;
default:
...
...
@@ -93,7 +94,7 @@ void KAlarmResource::customizeConfigDialog(SingleFileResourceConfigDialog<Settin
*/
void
KAlarmResource
::
configDialogAcceptedActions
(
SingleFileResourceConfigDialog
<
Settings
>*
)
{
mSettings
->
setAlarmTypes
(
KAlarm
::
CalEvent
::
mimeTypes
(
mTypeSelector
->
alarmType
()));
mSettings
->
setAlarmTypes
(
CalEvent
::
mimeTypes
(
mTypeSelector
->
alarmType
()));
mSettings
->
writeConfig
();
}
...
...
@@ -172,7 +173,7 @@ bool KAlarmResource::doRetrieveItem(const Akonadi::Item& item, const QSet<QByteA
}
KAEvent
event
(
kcalEvent
);
QString
mime
=
KAlarm
::
CalEvent
::
mimeType
(
event
.
category
());
QString
mime
=
CalEvent
::
mimeType
(
event
.
category
());
if
(
mime
.
isEmpty
())
{
kWarning
()
<<
"KAEvent has no alarms:"
<<
rid
;
...
...
@@ -344,7 +345,7 @@ void KAlarmResource::doRetrieveItems(const Akonadi::Collection& collection)
}
KAEvent
event
(
kcalEvent
);
QString
mime
=
KAlarm
::
CalEvent
::
mimeType
(
event
.
category
());
QString
mime
=
CalEvent
::
mimeType
(
event
.
category
());
if
(
mime
.
isEmpty
())
{
kWarning
()
<<
"KAEvent has no alarms:"
<<
event
.
id
();
...
...
akonadi/kalarm/kalarmresource.h
View file @
2a7a0295
...
...
@@ -22,9 +22,12 @@
#ifndef KALARMRESOURCE_H
#define KALARMRESOURCE_H
#include "kacalendar.h"
#include <icalresourcebase.h>
#include <kalarmcal/kacalendar.h>
using
namespace
KAlarmCal
;
class
KJob
;
class
AlarmTypeRadioWidget
;
...
...
@@ -54,7 +57,7 @@ class KAlarmResource : public ICalResourceBase
private:
AlarmTypeRadioWidget
*
mTypeSelector
;
KA
larm
::
KA
Calendar
::
Compat
mCompatibility
;
KACalendar
::
Compat
mCompatibility
;
int
mVersion
;
// calendar format version
};
...
...
akonadi/kalarmdir/CMakeLists.txt
View file @
2a7a0295
include_directories
(
${
KALARM_COMMON_RESOURCES
}
${
KALARM_CALENDAR_INCLUDE_DIR
}
${
QT_QTDBUS_INCLUDE_DIR
}
${
Boost_INCLUDE_DIR
}
${
CMAKE_CURRENT_BINARY_DIR
}
...
...
@@ -39,6 +38,13 @@ if (Q_WS_MAC)
set_target_properties
(
akonadi_kalarm_dir_resource PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME
"KDE Akonadi KAlarm Directory Resource"
)
endif
(
Q_WS_MAC
)
target_link_libraries
(
akonadi_kalarm_dir_resource kalarm_calendar akonadi-kcal
${
KDEPIMLIBS_AKONADI_LIBS
}
${
QT_QTDBUS_LIBRARY
}
${
KDEPIMLIBS_KCALCORE_LIBS
}
${
KDE4_KIO_LIBS
}
)
target_link_libraries
(
akonadi_kalarm_dir_resource
${
KDEPIMLIBS_KALARMCAL_LIBS
}
${
KDEPIMLIBS_AKONADI_KCAL_LIBS
}
${
KDEPIMLIBS_AKONADI_LIBS
}
${
KDEPIMLIBS_KCALCORE_LIBS
}
${
KDE4_KIO_LIBS
}
${
QT_QTDBUS_LIBRARY
}
)
install
(
TARGETS akonadi_kalarm_dir_resource DESTINATION
${
PLUGIN_INSTALL_DIR
}
)
akonadi/kalarmdir/kalarmdirresource.cpp
View file @
2a7a0295
...
...
@@ -24,11 +24,12 @@
#include "kalarmdirresource.h"
#include "kalarmresourcecommon.h"
#include "autoqpointer.h"
#include "kacalendar.h"
#include "kalarmdirsettingsadaptor.h"
#include "settingsdialog.h"
#include <kalarmcal/kacalendar.h>
#include <kcalcore/filestorage.h>
#include <kcalcore/icalformat.h>
#include <kcalcore/memorycalendar.h>
...
...
@@ -183,8 +184,8 @@ void KAlarmDirResource::configure(WId windowId)
{
// Settings have changed which might affect the alarm configuration
initializeDirectory
();
// should only be needed for new resource, but just in case ...
KAlarm
::
CalEvent
::
Types
newTypes
=
KAlarm
::
CalEvent
::
types
(
mSettings
->
alarmTypes
());
KAlarm
::
CalEvent
::
Types
oldTypes
=
KAlarm
::
CalEvent
::
types
(
types
);
CalEvent
::
Types
newTypes
=
CalEvent
::
types
(
mSettings
->
alarmTypes
());
CalEvent
::
Types
oldTypes
=
CalEvent
::
types
(
types
);
changeAlarmTypes
(
~
newTypes
&
oldTypes
);
c
.
setContentMimeTypes
(
mSettings
->
alarmTypes
());
modify
=
true
;
...
...
@@ -216,7 +217,7 @@ void KAlarmDirResource::configure(WId windowId)
* Add/remove events to ensure that they match the changed alarm types for the
* resource.
*/
void
KAlarmDirResource
::
changeAlarmTypes
(
KAlarm
::
CalEvent
::
Types
removed
)
void
KAlarmDirResource
::
changeAlarmTypes
(
CalEvent
::
Types
removed
)
{
DEBUG_DATA
;
const
QString
dirPath
=
directoryName
();
...
...
@@ -459,7 +460,7 @@ KAEvent KAlarmDirResource::loadFile(const QString& path, const QString& file)
int
version
;
KACalendar
::
Compat
compat
=
KAlarmResourceCommon
::
getCompatibility
(
fileStorage
,
version
);
KAEvent
event
(
kcalEvent
);
const
QString
mime
=
KAlarm
::
CalEvent
::
mimeType
(
event
.
category
());
const
QString
mime
=
CalEvent
::
mimeType
(
event
.
category
());
if
(
mime
.
isEmpty
())
{
kWarning
()
<<
"KAEvent has no usable alarms:"
<<
event
.
id
();
...
...
@@ -762,7 +763,7 @@ void KAlarmDirResource::retrieveItems(const Akonadi::Collection& collection)
foreach
(
const
EventFile
&
data
,
mEvents
)
{
const
KAEvent
&
event
=
data
.
event
;
const
QString
mime
=
KAlarm
::
CalEvent
::
mimeType
(
event
.
category
());
const
QString
mime
=
CalEvent
::
mimeType
(
event
.
category
());
if
(
mime
.
isEmpty
())
{
kWarning
()
<<
"KAEvent has no alarms:"
<<
event
.
id
();
...
...
@@ -1013,7 +1014,7 @@ bool KAlarmDirResource::modifyItem(const KAEvent& event)
*/
void
KAlarmDirResource
::
deleteItem
(
const
KAEvent
&
event
)