~ubuntu-branches/ubuntu/oneiric/kdepim/oneiric-updates

« back to all changes in this revision

Viewing changes to korganizer/datenavigator.h

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2011-06-28 19:33:24 UTC
  • mfrom: (0.2.13) (0.1.13 sid)
  • Revision ID: package-import@ubuntu.com-20110628193324-8yvjs8sdv9rdoo6c
Tags: 4:4.7.0-0ubuntu1
* New upstream release
  - update install files
  - add missing kdepim-doc package to control file
  - Fix Vcs lines
  - kontact breaks/replaces korganizer << 4:4.6.80
  - tighten the dependency of kdepim-dev on libkdepim4 to fix lintian error

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
  Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
5
5
  Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6
6
 
 
7
  Copyright (C) 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.net>
 
8
  Author: Sergio Martins <sergio@kdab.com>
 
9
 
7
10
  This program is free software; you can redistribute it and/or modify
8
11
  it under the terms of the GNU General Public License as published by
9
12
  the Free Software Foundation; either version 2 of the License, or
25
28
#ifndef DATENAVIGATOR_H
26
29
#define DATENAVIGATOR_H
27
30
 
28
 
#include <kcal/incidencebase.h>
 
31
#include <KCalCore/IncidenceBase>
29
32
 
30
33
#include <QObject>
31
34
 
41
44
    DateNavigator( QObject *parent = 0 );
42
45
    ~DateNavigator();
43
46
 
44
 
    KCal::DateList selectedDates();
 
47
    KCalCore::DateList selectedDates();
45
48
 
46
49
    int datesCount() const;
47
50
 
48
51
  public slots:
49
 
    void selectDates( const KCal::DateList & );
 
52
    void selectDates( const KCalCore::DateList &, const QDate &preferredMonth = QDate() );
50
53
    void selectDate( const QDate & );
51
54
 
52
55
    void selectDates( int count );
53
 
    void selectDates( const QDate &, int count );
 
56
    void selectDates( const QDate &, int count, const QDate &preferredMonth = QDate() );
54
57
 
55
58
    void selectWeek();
56
 
    void selectWeek( const QDate & );
 
59
    void selectWeek( const QDate &, const QDate &preferredMonth = QDate() );
57
60
 
58
61
    void selectWorkWeek();
59
62
    void selectWorkWeek( const QDate & );
60
63
 
61
 
    void selectWeekByDay( int weekDay, const QDate & );
 
64
    void selectWeekByDay( int weekDay, const QDate &, const QDate &preferredMonth = QDate() );
62
65
 
63
66
    void selectToday();
64
67
 
65
68
    void selectPreviousYear();
66
 
    void selectPreviousMonth();
 
69
    void selectPreviousMonth( const QDate &currentMonth = QDate(),
 
70
                              const QDate &selectionLowerLimit = QDate(),
 
71
                              const QDate &selectionUpperLimit = QDate() );
67
72
    void selectPreviousWeek();
68
73
    void selectNextWeek();
69
 
    void selectNextMonth();
 
74
    void selectNextMonth( const QDate &currentMonth = QDate(),
 
75
                          const QDate &selectionLowerLimit = QDate(),
 
76
                          const QDate &selectionUpperLimit = QDate() );
70
77
    void selectNextYear();
71
78
 
72
79
    void selectPrevious();
76
83
    void selectYear( int year );
77
84
 
78
85
  signals:
79
 
    void datesSelected( const KCal::DateList & );
 
86
    /* preferredMonth is useful when the datelist crosses months,
 
87
       if valid, any month-like component should honour it
 
88
    */
 
89
    void datesSelected( const KCalCore::DateList &, const QDate &preferredMonth );
80
90
 
81
91
  protected:
82
 
    void emitSelected();
 
92
    void emitSelected( const QDate &preferredMonth = QDate() );
83
93
 
84
94
  private:
85
 
    KCal::DateList mSelectedDates;
 
95
 
 
96
    /*
 
97
      Selects next month if offset equals 1, or previous month
 
98
      if offset equals -1.
 
99
      Bigger offsets are accepted.
 
100
    */
 
101
    void shiftMonth( const QDate &date,
 
102
                     const QDate &selectionLowerLimit,
 
103
                     const QDate &selectionUpperLimit,
 
104
                     int offset );
 
105
 
 
106
    KCalCore::DateList mSelectedDates;
 
107
 
 
108
    enum {
 
109
      MAX_SELECTABLE_DAYS = 50
 
110
    };
86
111
};
87
112
 
88
113
#endif