summaryrefslogtreecommitdiff
path: root/core/pim/datebook2/editor.h
blob: 3fcfaa4e809591836da1f8f6db2e97888c4f9a5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef OPIE_DATEBOOK_EDITOR_H
#define OPIE_DATEBOOK_EDITOR_H

#include <qdialog.h>

#include <opie/oevent.h>

#include "descriptionmanager.h"
#include "locationmanager.h"

namespace Datebook {
    class MainWindow;
    /**
     * This is the editor interface
     */
    class Editor {
    public:
        Editor( MainWindow*, QWidget* parent );
        virtual ~Editor();

        virtual bool newEvent( const QDate& ) = 0;
        virtual bool newEvent( const QDateTime& start, const QDateTime& end ) = 0;
        virtual bool edit( const OEvent&, bool showRec = TRUE ) = 0;

        virtual OEvent event()const = 0;

    protected:
        DescriptionManager descriptions()const;
        LocationManager locations()const;
        void setDescriptions( const DescriptionManager& );
        void setLocations( const LocationManager& );

    private:
        MainWindow* m_win;

    };
}

#endif