Skip to content
GitLab
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
626ff4c1
Commit
626ff4c1
authored
Nov 10, 2014
by
Laurent Montel
Browse files
Astyle kdelibs
parent
906bb331
Changes
123
Expand all
Hide whitespace changes
Inline
Side-by-side
aboutdata.cpp
View file @
626ff4c1
...
...
@@ -28,67 +28,67 @@
using
namespace
KOrg
;
AboutData
::
AboutData
()
:
K4AboutData
(
"korganizer"
,
0
,
ki18n
(
"KOrganizer"
),
korgVersion
,
ki18n
(
"A Personal Organizer"
),
K4AboutData
::
License_GPL
,
ki18n
(
"Copyright © 1997–1999 Preston Brown
\n
"
"Copyright © 2000–2004, 2007 Cornelius Schumacher
\n
"
"Copyright © 2004–2005 Reinhold Kainhofer
\n
"
"Copyright © 2006–2012 Allen Winter"
),
KLocalizedString
(),
"http://korganizer.kde.org"
)
:
K4AboutData
(
"korganizer"
,
0
,
ki18n
(
"KOrganizer"
),
korgVersion
,
ki18n
(
"A Personal Organizer"
),
K4AboutData
::
License_GPL
,
ki18n
(
"Copyright © 1997–1999 Preston Brown
\n
"
"Copyright © 2000–2004, 2007 Cornelius Schumacher
\n
"
"Copyright © 2004–2005 Reinhold Kainhofer
\n
"
"Copyright © 2006–2012 Allen Winter"
),
KLocalizedString
(),
"http://korganizer.kde.org"
)
{
#if defined( KDEPIM_GIT_REVISION_STRING ) && defined( KDEPIM_GIT_LAST_CHANGE )
const
QByteArray
rev
(
KDEPIM_GIT_REVISION_STRING
);
const
QByteArray
last
(
KDEPIM_GIT_LAST_CHANGE
);
if
(
!
rev
.
isEmpty
()
&&
!
last
.
isEmpty
()
)
{
QByteArray
versionInfo
(
korgVersion
);
versionInfo
+=
'-'
+
rev
+
' '
+
'('
+
last
+
')'
;
setVersion
(
versionInfo
);
}
const
QByteArray
rev
(
KDEPIM_GIT_REVISION_STRING
);
const
QByteArray
last
(
KDEPIM_GIT_LAST_CHANGE
);
if
(
!
rev
.
isEmpty
()
&&
!
last
.
isEmpty
())
{
QByteArray
versionInfo
(
korgVersion
);
versionInfo
+=
'-'
+
rev
+
' '
+
'('
+
last
+
')'
;
setVersion
(
versionInfo
);
}
#endif
addAuthor
(
ki18n
(
"Allen Winter"
),
ki18n
(
"Maintainer"
),
"winter@kde.org"
);
addAuthor
(
ki18n
(
"Reinhold Kainhofer"
),
ki18n
(
"Former Maintainer"
),
"reinhold@kainhofer.com"
);
addAuthor
(
ki18n
(
"Cornelius Schumacher"
),
ki18n
(
"Former Maintainer"
),
"schumacher@kde.org"
);
addAuthor
(
ki18n
(
"Preston Brown"
),
ki18n
(
"Original Author"
),
"pbrown@kde.org"
);
addCredit
(
ki18n
(
"Richard Apodaca"
)
);
addCredit
(
ki18n
(
"Björn Balazs"
)
);
addCredit
(
ki18n
(
"Jan-Pascal van Best"
)
);
addCredit
(
ki18n
(
"Bertjan Broeksema"
)
);
addCredit
(
ki18n
(
"Laszlo Boloni"
)
);
addCredit
(
ki18n
(
"Barry Benowitz"
)
);
addCredit
(
ki18n
(
"Christopher Beard"
)
);
addCredit
(
ki18n
(
"Kalle Dalheimer"
)
);
addCredit
(
ki18n
(
"Ian Dawes"
)
);
addCredit
(
ki18n
(
"Thomas Eitzenberger"
)
);
addCredit
(
ki18n
(
"Neil Hart"
)
);
addCredit
(
ki18n
(
"Declan Houlihan"
)
);
addCredit
(
ki18n
(
"Hans-Jürgen Husel"
)
);
addCredit
(
ki18n
(
"Tim Jansen"
)
);
addCredit
(
ki18n
(
"Christian Kirsch"
)
);
addCredit
(
ki18n
(
"Tobias König"
)
);
addCredit
(
ki18n
(
"Martin Koller"
)
);
addCredit
(
ki18n
(
"Uwe Koloska"
)
);
addCredit
(
ki18n
(
"Sergio Luis Martins"
)
);
addCredit
(
ki18n
(
"Mike McQuaid"
)
);
addCredit
(
ki18n
(
"Glen Parker"
)
);
addCredit
(
ki18n
(
"Dan Pilone"
)
);
addCredit
(
ki18n
(
"Roman Rohr"
)
);
addCredit
(
ki18n
(
"Rafał Rzepecki"
),
ki18n
(
"Part of work sponsored by Google with Summer of Code 2005"
)
);
addCredit
(
ki18n
(
"Don Sanders"
)
);
addCredit
(
ki18n
(
"Bram Schoenmakers"
)
);
addCredit
(
ki18n
(
"Günter Schwann"
)
);
addCredit
(
ki18n
(
"Herwin Jan Steehouwer"
)
);
addCredit
(
ki18n
(
"Mario Teijeiro"
)
);
addCredit
(
ki18n
(
"Nick Thompson"
)
);
addCredit
(
ki18n
(
"Bo Thorsen"
)
);
addCredit
(
ki18n
(
"Larry Wright"
)
);
addCredit
(
ki18n
(
"Thomas Zander"
)
);
addCredit
(
ki18n
(
"Fester Zigterman"
)
);
addAuthor
(
ki18n
(
"Allen Winter"
),
ki18n
(
"Maintainer"
),
"winter@kde.org"
);
addAuthor
(
ki18n
(
"Reinhold Kainhofer"
),
ki18n
(
"Former Maintainer"
),
"reinhold@kainhofer.com"
);
addAuthor
(
ki18n
(
"Cornelius Schumacher"
),
ki18n
(
"Former Maintainer"
),
"schumacher@kde.org"
);
addAuthor
(
ki18n
(
"Preston Brown"
),
ki18n
(
"Original Author"
),
"pbrown@kde.org"
);
addCredit
(
ki18n
(
"Richard Apodaca"
)
);
addCredit
(
ki18n
(
"Björn Balazs"
)
);
addCredit
(
ki18n
(
"Jan-Pascal van Best"
)
);
addCredit
(
ki18n
(
"Bertjan Broeksema"
)
);
addCredit
(
ki18n
(
"Laszlo Boloni"
)
);
addCredit
(
ki18n
(
"Barry Benowitz"
)
);
addCredit
(
ki18n
(
"Christopher Beard"
)
);
addCredit
(
ki18n
(
"Kalle Dalheimer"
)
);
addCredit
(
ki18n
(
"Ian Dawes"
)
);
addCredit
(
ki18n
(
"Thomas Eitzenberger"
)
);
addCredit
(
ki18n
(
"Neil Hart"
)
);
addCredit
(
ki18n
(
"Declan Houlihan"
)
);
addCredit
(
ki18n
(
"Hans-Jürgen Husel"
)
);
addCredit
(
ki18n
(
"Tim Jansen"
)
);
addCredit
(
ki18n
(
"Christian Kirsch"
)
);
addCredit
(
ki18n
(
"Tobias König"
)
);
addCredit
(
ki18n
(
"Martin Koller"
)
);
addCredit
(
ki18n
(
"Uwe Koloska"
)
);
addCredit
(
ki18n
(
"Sergio Luis Martins"
)
);
addCredit
(
ki18n
(
"Mike McQuaid"
)
);
addCredit
(
ki18n
(
"Glen Parker"
)
);
addCredit
(
ki18n
(
"Dan Pilone"
)
);
addCredit
(
ki18n
(
"Roman Rohr"
)
);
addCredit
(
ki18n
(
"Rafał Rzepecki"
),
ki18n
(
"Part of work sponsored by Google with Summer of Code 2005"
)
);
addCredit
(
ki18n
(
"Don Sanders"
)
);
addCredit
(
ki18n
(
"Bram Schoenmakers"
)
);
addCredit
(
ki18n
(
"Günter Schwann"
)
);
addCredit
(
ki18n
(
"Herwin Jan Steehouwer"
)
);
addCredit
(
ki18n
(
"Mario Teijeiro"
)
);
addCredit
(
ki18n
(
"Nick Thompson"
)
);
addCredit
(
ki18n
(
"Bo Thorsen"
)
);
addCredit
(
ki18n
(
"Larry Wright"
)
);
addCredit
(
ki18n
(
"Thomas Zander"
)
);
addCredit
(
ki18n
(
"Fester Zigterman"
)
);
}
aboutdata.h
View file @
626ff4c1
...
...
@@ -27,11 +27,12 @@
#include
"korganizerprivate_export.h"
#include
<k4aboutdata.h>
namespace
KOrg
{
namespace
KOrg
{
class
KORGANIZERPRIVATE_EXPORT
AboutData
:
public
K4AboutData
{
public:
public:
AboutData
();
};
...
...
actionmanager.cpp
View file @
626ff4c1
This diff is collapsed.
Click to expand it.
actionmanager.h
View file @
626ff4c1
...
...
@@ -43,12 +43,14 @@
class
AkonadiCollectionView
;
class
CalendarView
;
class
KOWindowList
;
namespace
KOrg
{
class
HTMLExportSettings
;
namespace
KOrg
{
class
HTMLExportSettings
;
}
namespace
Akonadi
{
class
ETMViewStateSaver
;
namespace
Akonadi
{
class
ETMViewStateSaver
;
}
class
QAction
;
...
...
@@ -65,31 +67,34 @@ class KToggleAction;
*/
class
KORGANIZERPRIVATE_EXPORT
ActionManager
:
public
QObject
{
Q_OBJECT
public:
ActionManager
(
KXMLGUIClient
*
client
,
CalendarView
*
widget
,
QObject
*
parent
,
KOrg
::
MainWindow
*
mainWindow
,
bool
isPart
,
QMenuBar
*
menuBar
=
0
);
Q_OBJECT
public:
ActionManager
(
KXMLGUIClient
*
client
,
CalendarView
*
widget
,
QObject
*
parent
,
KOrg
::
MainWindow
*
mainWindow
,
bool
isPart
,
QMenuBar
*
menuBar
=
0
);
virtual
~
ActionManager
();
/** Peform initialization that requires this* to be full constructed */
void
init
();
CalendarView
*
view
()
const
{
return
mCalendarView
;
}
CalendarView
*
view
()
const
{
return
mCalendarView
;
}
/**
Create Calendar object based on the akonadi framework and set it on the view.
*/
void
createCalendarAkonadi
();
public
slots
:
bool
importURL
(
const
KUrl
&
url
,
bool
merge
);
public
slots
:
bool
importURL
(
const
KUrl
&
url
,
bool
merge
);
/** Save calendar file to URL of current calendar */
bool
saveURL
();
/** Save calendar file to URL */
bool
saveAsURL
(
const
KUrl
&
kurl
);
bool
saveAsURL
(
const
KUrl
&
kurl
);
/**
Export the calendar to an HTML file. Reads up the user settings as needed.
...
...
@@ -103,24 +108,27 @@ class KORGANIZERPRIVATE_EXPORT ActionManager : public QObject
@param autoMode if true, indicates that this export is for an autosave;
if false, then the export is explicitly user invoked.
*/
void
exportHTML
(
KOrg
::
HTMLExportSettings
*
settings
,
bool
autoMode
=
false
);
void
toggleMenubar
(
bool
dontShowWarning
=
false
);
void
exportHTML
(
KOrg
::
HTMLExportSettings
*
settings
,
bool
autoMode
=
false
);
void
toggleMenubar
(
bool
dontShowWarning
=
false
);
public:
public:
/** Get current URL */
KUrl
url
()
const
{
return
mURL
;
}
KUrl
url
()
const
{
return
mURL
;
}
/** Is there a instance with this URL? */
static
KOrg
::
MainWindow
*
findInstance
(
const
KUrl
&
url
);
static
KOrg
::
MainWindow
*
findInstance
(
const
KUrl
&
url
);
/** Open calendar file from URL */
bool
openURL
(
const
QString
&
url
);
bool
openURL
(
const
QString
&
url
);
/** Open calendar file from URL */
bool
mergeURL
(
const
QString
&
url
);
bool
mergeURL
(
const
QString
&
url
);
/** Save calendar file to URL */
bool
saveAsURL
(
const
QString
&
url
);
bool
saveAsURL
(
const
QString
&
url
);
/** Get current URL as QString */
QString
getCurrentURLasString
()
const
;
...
...
@@ -131,25 +139,25 @@ class KORGANIZERPRIVATE_EXPORT ActionManager : public QObject
@param force If true, all recurrences and sub-todos (if applicable) will
be deleted without prompting for confirmation.
*/
virtual
bool
deleteIncidence
(
Akonadi
::
Item
::
Id
id
,
bool
force
=
false
);
virtual
bool
deleteIncidence
(
Akonadi
::
Item
::
Id
id
,
bool
force
=
false
);
bool
editIncidence
(
Akonadi
::
Item
::
Id
id
);
bool
editIncidence
(
Akonadi
::
Item
::
Id
id
);
/**
Add an incidence to the active calendar.
@param ical A calendar in iCalendar format containing the incidence.
*/
bool
addIncidence
(
const
QString
&
ical
);
bool
addIncidence
(
const
QString
&
ical
);
//bool addIncidence( const Akonadi::Item::Id &ical );
bool
showIncidence
(
Akonadi
::
Item
::
Id
id
);
bool
showIncidence
(
Akonadi
::
Item
::
Id
id
);
/**
Show an incidence in context. This means showing the todo, agenda or
journal view (as appropriate) and scrolling it to show the incidence.
@param uid Unique ID of the incidence to show.
*/
bool
showIncidenceContext
(
Akonadi
::
Item
::
Id
id
);
bool
showIncidenceContext
(
Akonadi
::
Item
::
Id
id
);
/**
* Called by KOrganizerUniqueAppHandler in the kontact plugin
...
...
@@ -158,66 +166,66 @@ class KORGANIZERPRIVATE_EXPORT ActionManager : public QObject
*/
bool
handleCommandLine
();
public
slots
:
void
openEventEditor
(
const
QString
&
);
void
openEventEditor
(
const
QString
&
summary
,
const
QString
&
description
,
const
QStringList
&
attachments
);
void
openEventEditor
(
const
QString
&
summary
,
const
QString
&
description
,
const
QStringList
&
attachments
,
const
QStringList
&
attendees
);
void
openEventEditor
(
const
QString
&
summary
,
const
QString
&
description
,
const
QString
&
uri
,
const
QString
&
file
,
const
QStringList
&
attendees
,
const
QString
&
attachmentMimetype
);
void
openEventEditor
(
const
QString
&
summary
,
const
QString
&
description
,
const
QStringList
&
attachmentUris
,
const
QStringList
&
attendees
,
const
QStringList
&
attachmentMimetypes
,
bool
attachmentIsInline
);
void
openTodoEditor
(
const
QString
&
);
void
openTodoEditor
(
const
QString
&
summary
,
public
slots
:
void
openEventEditor
(
const
QString
&
);
void
openEventEditor
(
const
QString
&
summary
,
const
QString
&
description
,
const
QStringList
&
attachments
);
void
open
Todo
Editor
(
const
QString
&
summary
,
const
QStringList
&
attachments
);
void
open
Event
Editor
(
const
QString
&
summary
,
const
QString
&
description
,
const
QStringList
&
attachments
,
const
QStringList
&
attendees
);
void
open
Todo
Editor
(
const
QString
&
summary
,
const
QStringList
&
attendees
);
void
open
Event
Editor
(
const
QString
&
summary
,
const
QString
&
description
,
const
QString
&
uri
,
const
QString
&
file
,
const
QStringList
&
attendees
,
const
QString
&
attachmentMimetype
);
void
open
Todo
Editor
(
const
QString
&
summary
,
const
QString
&
attachmentMimetype
);
void
open
Event
Editor
(
const
QString
&
summary
,
const
QString
&
description
,
const
QStringList
&
attachmentUris
,
const
QStringList
&
attendees
,
const
QStringList
&
attachmentMimetypes
,
bool
attachmentIsInline
);
void
openJournalEditor
(
const
QDate
&
date
);
void
openJournalEditor
(
const
QString
&
text
,
const
QDate
&
date
);
void
openJournalEditor
(
const
QString
&
text
);
bool
attachmentIsInline
);
void
openTodoEditor
(
const
QString
&
);
void
openTodoEditor
(
const
QString
&
summary
,
const
QString
&
description
,
const
QStringList
&
attachments
);
void
openTodoEditor
(
const
QString
&
summary
,
const
QString
&
description
,
const
QStringList
&
attachments
,
const
QStringList
&
attendees
);
void
openTodoEditor
(
const
QString
&
summary
,
const
QString
&
description
,
const
QString
&
uri
,
const
QString
&
file
,
const
QStringList
&
attendees
,
const
QString
&
attachmentMimetype
);
void
openTodoEditor
(
const
QString
&
summary
,
const
QString
&
description
,
const
QStringList
&
attachmentUris
,
const
QStringList
&
attendees
,
const
QStringList
&
attachmentMimetypes
,
bool
attachmentIsInline
);
void
openJournalEditor
(
const
QDate
&
date
);
void
openJournalEditor
(
const
QString
&
text
,
const
QDate
&
date
);
void
openJournalEditor
(
const
QString
&
text
);
void
showJournalView
();
void
showTodoView
();
void
showEventView
();
void
goDate
(
const
QDate
&
);
void
goDate
(
const
QString
&
);
void
showDate
(
const
QDate
&
date
);
void
goDate
(
const
QDate
&
);
void
goDate
(
const
QString
&
);
void
showDate
(
const
QDate
&
date
);
public:
public:
QString
localFileName
();
bool
queryClose
();
signals:
signals:
/**
Emitted when the "New" action is activated.
*/
...
...
@@ -230,14 +238,14 @@ class KORGANIZERPRIVATE_EXPORT ActionManager : public QObject
*/
void
configChanged
();
public
slots
:
public
slots
:
/**
Options dialog made a changed to the configuration. we catch this
and notify all widgets which need to update their configuration.
*/
void
updateConfig
();
void
processIncidenceSelection
(
const
Akonadi
::
Item
&
item
,
const
QDate
&
date
);
void
processIncidenceSelection
(
const
Akonadi
::
Item
&
item
,
const
QDate
&
date
);
void
keyBindings
();
/**
...
...
@@ -252,15 +260,15 @@ class KORGANIZERPRIVATE_EXPORT ActionManager : public QObject
void
writeSettings
();
/* Session management */
void
saveProperties
(
KConfigGroup
&
);
void
readProperties
(
const
KConfigGroup
&
);
void
saveProperties
(
KConfigGroup
&
);
void
readProperties
(
const
KConfigGroup
&
);
void
loadParts
();
void
importCalendar
(
const
KUrl
&
url
);
void
importCalendar
(
const
KUrl
&
url
);
protected
slots
:
void
setItems
(
const
QStringList
&
,
int
);
protected
slots
:
void
setItems
(
const
QStringList
&
,
int
);
/** called by the autoExportTimer to automatically export the calendar */
void
checkAutoExport
();
...
...
@@ -275,7 +283,7 @@ class KORGANIZERPRIVATE_EXPORT ActionManager : public QObject
after the URL is obtained from the user.
@param url the URL to open
*/
void
file_open
(
const
KUrl
&
url
);
void
file_open
(
const
KUrl
&
url
);
/** import a non-ics calendar from another program like ical. */
void
file_icalimport
();
...
...
@@ -312,7 +320,7 @@ class KORGANIZERPRIVATE_EXPORT ActionManager : public QObject
void
updateUndoRedoActions
();
protected:
protected:
/** Get URL for saving. Opens FileDialog. */
KUrl
getSaveURL
();
...
...
@@ -321,11 +329,11 @@ class KORGANIZERPRIVATE_EXPORT ActionManager : public QObject
*/
QWidget
*
dialogParent
();
private
slots
:
void
handleExportJobResult
(
KJob
*
);
void
dumpText
(
const
QString
&
);
// only for debugging purposes
private
slots
:
void
handleExportJobResult
(
KJob
*
);
void
dumpText
(
const
QString
&
);
// only for debugging purposes
void
slotDefaultResourceChanged
(
const
Akonadi
::
Collection
&
);
void
slotDefaultResourceChanged
(
const
Akonadi
::
Collection
&
);
void
slotResourcesAddedRemoved
();
void
slotNewEvent
();
...
...
@@ -336,14 +344,13 @@ class KORGANIZERPRIVATE_EXPORT ActionManager : public QObject
void
slotMergeFinished
(
bool
success
,
int
total
);
void
slotNewResourceFinished
(
bool
);
private:
private:
class
ActionStringsVisitor
;
void
setHelpText
(
QAction
*
act
,
const
QString
&
text
);
void
restoreCollectionViewSetting
();
/** Create all the actions. */
void
initActions
();
void
enableIncidenceActions
(
bool
enable
);
void
enableIncidenceActions
(
bool
enable
);
Akonadi
::
ETMCalendar
::
Ptr
calendar
()
const
;
Akonadi
::
Collection
selectedCollection
()
const
;
...
...
@@ -409,7 +416,7 @@ class KORGANIZERPRIVATE_EXPORT ActionManager : public QObject
AkonadiCollectionView
*
mCollectionView
;
KViewStateMaintainer
<
Akonadi
::
ETMViewStateSaver
>
*
mCollectionViewStateSaver
;
KViewStateMaintainer
<
Akonadi
::
ETMViewStateSaver
>
*
mCollectionSelectionModelStateSaver
;
QSet
<
KOrg
::
HTMLExportSettings
*>
mSettingsToFree
;
QSet
<
KOrg
::
HTMLExportSettings
*>
mSettingsToFree
;
};
#endif
akonadicollectionview.cpp
View file @
626ff4c1
This diff is collapsed.
Click to expand it.
akonadicollectionview.h
View file @
626ff4c1
...
...
@@ -32,10 +32,11 @@
class
AkonadiCollectionView
;
namespace
Akonadi
{
class
EntityTreeView
;
class
EntityTreeModel
;
class
StandardCalendarActionManager
;
namespace
Akonadi
{
class
EntityTreeView
;
class
EntityTreeModel
;
class
StandardCalendarActionManager
;
}
class
QAction
;
...
...
@@ -48,15 +49,15 @@ class QModelIndex;
*/
class
AkonadiCollectionViewFactory
:
public
CalendarViewExtension
::
Factory
{
public:
explicit
AkonadiCollectionViewFactory
(
CalendarView
*
view
);
public:
explicit
AkonadiCollectionViewFactory
(
CalendarView
*
view
);
CalendarView
*
view
()
const
;
AkonadiCollectionView
*
collectionView
()
const
;
CalendarViewExtension
*
create
(
QWidget
*
);
CalendarViewExtension
*
create
(
QWidget
*
);
private:
private:
CalendarView
*
mView
;
AkonadiCollectionView
*
mAkonadiCollectionView
;
};
...
...
@@ -66,44 +67,44 @@ class AkonadiCollectionViewFactory : public CalendarViewExtension::Factory
*/
class
AkonadiCollectionView
:
public
CalendarViewExtension
{
Q_OBJECT
public:
explicit
AkonadiCollectionView
(
CalendarView
*
view
,
bool
hasContextMenu
=
true
,
QWidget
*
parent
=
0
);
Q_OBJECT
public:
explicit
AkonadiCollectionView
(
CalendarView
*
view
,
bool
hasContextMenu
=
true
,
QWidget
*
parent
=
0
);
~
AkonadiCollectionView
();
Akonadi
::
EntityTreeView
*
view
()
const
;
KCheckableProxyModel
*
collectionSelectionProxyModel
()
const
;
void
setCollectionSelectionProxyModel
(
KCheckableProxyModel
*
);
void
setCollectionSelectionProxyModel
(
KCheckableProxyModel
*
);
Akonadi
::
Collection
selectedCollection
()
const
;
Akonadi
::
Collection
::
List
checkedCollections
()
const
;
bool
isChecked
(
const
Akonadi
::
Collection
&
)
const
;
Q_SIGNALS:
void
resourcesChanged
(
bool
enabled
);
Q_SIGNALS:
void
resourcesChanged
(
bool
enabled
);
void
resourcesAddedRemoved
();
void
defaultResourceChanged
(
const
Akonadi
::
Collection
&
);
void
defaultResourceChanged
(
const
Akonadi
::
Collection
&
);
void
colorsChanged
();
private
Q_SLOTS
:
private
Q_SLOTS
:
void
updateView
();
void
updateMenu
();
void
restoreTreeState
();
void
checkNewCalendar
(
const
QModelIndex
&
parent
,
int
begin
,
int
end
);
void
checkNewCalendar
(
const
QModelIndex
&
parent
,
int
begin
,
int
end
);
void
newCalendar
();
void
newCalendarDone
(
KJob
*
);
void
newCalendarDone
(
KJob
*
);
void
deleteCalendar
();
void
deleteCalendarDone
(
KJob
*
);
void
rowsInserted
(
const
QModelIndex
&
,
int
,
int
);
void
deleteCalendarDone
(
KJob
*
);
void
rowsInserted
(
const
QModelIndex
&
,
int
,
int
);
void
assignColor
();
void
disableColor
();
void
setDefaultCalendar
();
private:
private:
Akonadi
::
EntityTreeModel
*
entityTreeModel
()
const
;
Akonadi
::
StandardCalendarActionManager
*
mActionManager
;
...
...
@@ -116,6 +117,6 @@ class AkonadiCollectionView : public CalendarViewExtension
bool
mNotSendAddRemoveSignal
;
bool
mWasDefaultCalendar
;
bool
mHasContextMenu
;
};
};
#endif
autotests/testkodaymatrix.cpp
View file @
626ff4c1
...
...
@@ -24,42 +24,42 @@
#include
<qtest.h>
#include
<KLocale>
QTEST_MAIN
(
KODayMatrixTest
)
QTEST_MAIN
(
KODayMatrixTest
)
typedef
QPair
<
QDate
,
QDate
>
DateRange
;
typedef
QPair
<
QDate
,
QDate
>
DateRange
;
void
KODayMatrixTest
::
testMatrixLimits
()
{
QMap
<
QDate
,
DateRange
>
dates
;
KLocale
::
global
()
->
setWeekStartDay
(
1
);
// Monday
dates
.
insert
(
QDate
(
2011
,
1
,
1
),
DateRange
(
QDate
(
2010
,
12
,
27
),
QDate
(
2011
,
2
,
6
)
)
);
dates
.
insert
(
QDate
(
2011
,
2
,
1
),
DateRange
(
QDate
(
2011
,
1
,
31
),
QDate
(
2011
,
3
,
13
)
)
);
dates
.
insert
(
QDate
(
2011
,
3
,
1
),
DateRange
(
QDate
(
2011
,
2
,
28
),
QDate
(
2011
,
4
,
10
)
)
);
dates
.
insert
(
QDate
(
2011
,
4
,
1
),
DateRange
(
QDate
(
2011
,
3
,
28
),
QDate
(
2011
,
5
,
8
)
)
);
dates
.
insert
(
QDate
(
2011
,
5
,
1
),
DateRange
(
QDate
(
2011
,
4
,
25
),
QDate
(
2011
,
6
,
5
)
)
);
QMap
<
QDate
,
DateRange
>
dates
;
KLocale
::
global
()
->
setWeekStartDay
(
1
);
// Monday
dates
.
insert
(
QDate
(
2011
,
1
,
1
),
DateRange
(
QDate
(
2010
,
12
,
27
),
QDate
(
2011
,
2
,
6
))
);
dates
.
insert
(
QDate
(
2011
,
2
,
1
),
DateRange
(
QDate
(
2011
,
1
,
31
),
QDate
(
2011
,
3
,
13
))
);
dates
.
insert
(
QDate
(
2011
,
3
,
1
),
DateRange
(
QDate
(
2011
,
2
,
28
),
QDate
(
2011
,
4
,
10
))
);
dates
.
insert
(
QDate
(
2011
,
4
,
1
),
DateRange
(
QDate
(
2011
,
3
,
28
),
QDate
(
2011
,
5
,
8
))
);
dates
.
insert
(
QDate
(
2011
,
5
,
1
),
DateRange
(
QDate
(
2011
,
4
,
25
),
QDate
(
2011
,
6
,
5
))
);
QMapIterator
<
QDate
,
DateRange
>
iterator
(
dates
);
while
(
iterator
.
hasNext
())
{
iterator
.
next
();