summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook2/datebook2.pro3
-rw-r--r--core/pim/datebook2/editor.cpp24
-rw-r--r--core/pim/datebook2/editor.h13
-rw-r--r--core/pim/datebook2/mainwindow.cpp97
-rw-r--r--core/pim/datebook2/mainwindow.h24
-rw-r--r--core/pim/datebook2/managertemplate.h23
-rw-r--r--core/pim/datebook2/stringmanager.cpp108
-rw-r--r--core/pim/datebook2/stringmanager.h14
-rw-r--r--core/pim/datebook2/templatemanager.cpp167
-rw-r--r--core/pim/datebook2/templatemanager.h22
-rw-r--r--core/pim/datebook2/view.h10
11 files changed, 447 insertions, 58 deletions
diff --git a/core/pim/datebook2/datebook2.pro b/core/pim/datebook2/datebook2.pro
index 2ad906e..0b59309 100644
--- a/core/pim/datebook2/datebook2.pro
+++ b/core/pim/datebook2/datebook2.pro
@@ -19,5 +19,6 @@ SOURCES = main.cpp \
templatemanager.cpp \
show.cpp \
- view.cpp
+ view.cpp \
+ editor.cpp
INCLUDEPATH += $(OPIEDIR)/include
diff --git a/core/pim/datebook2/editor.cpp b/core/pim/datebook2/editor.cpp
new file mode 100644
index 0000000..a51aab6
--- a/dev/null
+++ b/core/pim/datebook2/editor.cpp
@@ -0,0 +1,24 @@
+#include "mainwindow.h"
+
+#include "editor.h"
+
+using namespace Datebook;
+
+Editor::Editor( MainWindow* win, QWidget*)
+ : m_win( win )
+{}
+Editor::~Editor() {
+
+}
+DescriptionManager Editor::descriptions()const {
+ return m_win->descriptionManager();
+}
+LocationManager Editor::locations()const {
+ return m_win->locationManager();
+}
+void Editor::setDescriptions( const DescriptionManager& dsc) {
+ m_win->setDescriptionManager( dsc );
+}
+void Editor::setLocations( const LocationManager& loc) {
+ m_win->setLocationManager( loc );
+}
diff --git a/core/pim/datebook2/editor.h b/core/pim/datebook2/editor.h
index 53e8718..3fcfaa4 100644
--- a/core/pim/datebook2/editor.h
+++ b/core/pim/datebook2/editor.h
@@ -17,11 +17,11 @@ namespace Datebook {
public:
Editor( MainWindow*, QWidget* parent );
- virtual Editor();
+ virtual ~Editor();
- bool newEvent( const QDate& );
- bool newEvent( const QDateTime& start, const QDateTime& end );
- bool edit( const OEvent& );
+ 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;
- OEvent event()const;
+ virtual OEvent event()const = 0;
protected:
@@ -31,4 +31,7 @@ namespace Datebook {
void setLocations( const LocationManager& );
+ private:
+ MainWindow* m_win;
+
};
}
diff --git a/core/pim/datebook2/mainwindow.cpp b/core/pim/datebook2/mainwindow.cpp
index 44de6b0..68525b3 100644
--- a/core/pim/datebook2/mainwindow.cpp
+++ b/core/pim/datebook2/mainwindow.cpp
@@ -14,4 +14,5 @@
#include <qpe/resource.h>
+#include "editor.h"
#include "show.h"
#include "templatemanager.h"
@@ -23,5 +24,6 @@ using namespace Datebook;
MainWindow::MainWindow()
- : OPimMainWindow( "Datebook", 0, 0 ) {
+ : OPimMainWindow( "Datebook", 0, 0 ), m_descMan( "Descriptions" ), m_locMan( "Locations" )
+{
setIcon( Resource::loadPixmap( "datebook_icon" ) );
initUI();
@@ -30,5 +32,4 @@ MainWindow::MainWindow()
initConfig();
- raiseCurrentView();
QTimer::singleShot(0, this, SLOT(populate() ) );
@@ -42,4 +43,10 @@ MainWindow::MainWindow()
}
MainWindow::~MainWindow() {
+ m_tempMan.save();
+ m_locMan.save();
+ m_descMan.save();
+
+ manager()->save();
+ delete m_manager;
}
void MainWindow::doSetDocument( const QString& str ) {
@@ -96,6 +103,10 @@ void MainWindow::initUI() {
m_popTemplate = new QPopupMenu( this );
+ m_popTemplate->setCheckable( TRUE );
+ connect( m_popTemplate, SIGNAL(activated(int) ),
+ this, SLOT(slotNewFromTemplate(int) ) );
m_popView->insertItem(tr("New from template"), m_popTemplate, -1, 0);
+
QAction* a = new QAction( tr("New Event"), Resource::loadPixmap("new"),
QString::null, 0, this, 0 );
@@ -131,4 +142,8 @@ void MainWindow::initUI() {
connect(a, SIGNAL( activated() ), this, SLOT(slotConfigureDesc() ) );
+ a = new QAction( tr("Configure Templates"), QString::null, 0, 0 );
+ a->addTo( m_popSetting );
+ connect(a, SIGNAL( activated() ), this, SLOT(slotConfigureTemp() ) );
+
connect( qApp, SIGNAL(clockChanged(bool) ),
this, SLOT(slotClockChanged(bool) ) );
@@ -147,6 +162,10 @@ void MainWindow::initView() {
void MainWindow::initManagers() {
m_manager = new BookManager;
- m_locMan = new LocationManager( tr("Locations") );
- m_descMan = new DescriptionManager( tr("Descriptions") );
+
+ m_tempMan.load();
+ m_locMan.load();
+ m_descMan.load();
+
+ setTemplateMenu();
}
void MainWindow::raiseCurrentView() {
@@ -187,13 +206,19 @@ BookManager* MainWindow::manager() {
return m_manager;
}
-TemplateManager* MainWindow::templateManager() {
+TemplateManager MainWindow::templateManager() {
return m_tempMan;
}
-LocationManager* MainWindow::locationManager() {
+LocationManager MainWindow::locationManager() {
return m_locMan;
}
-DescriptionManager* MainWindow::descriptionManager() {
+DescriptionManager MainWindow::descriptionManager() {
return m_descMan;
}
+void MainWindow::setLocationManager( const LocationManager& loc) {
+ m_locMan = loc;
+}
+void MainWindow::setDescriptionManager( const DescriptionManager& dsc ) {
+ m_descMan = dsc;
+}
Show* MainWindow::eventShow() {
return m_show;
@@ -203,8 +228,27 @@ void MainWindow::slotAction( QAction* act ) {
}
void MainWindow::slotConfigureLocs() {
-
+ LocationManagerDialog dlg( locationManager() );
+ dlg.setCaption( tr("Configure Locations") );
+ dlg.showMaximized();
+ if (dlg.exec() == QDialog::Accepted ) {
+ setLocationManager( dlg.manager() );
+ }
}
void MainWindow::slotConfigureDesc() {
-
+ DescriptionManagerDialog dlg( descriptionManager() );
+ dlg.setCaption( tr("Configure Descriptions") );
+ dlg.showMaximized();
+ if (dlg.exec() == QDialog::Accepted ) {
+ setDescriptionManager( dlg.manager() );
+ }
+}
+void MainWindow::slotConfigureTemp() {
+ TemplateDialog dlg( templateManager(), editor() );
+ dlg.setCaption( tr("Configure Templates") );
+ dlg.showMaximized();
+ if ( dlg.exec() == QDialog::Accepted ) {
+ m_tempMan = dlg.manager();
+ setTemplateMenu();
+ }
}
void MainWindow::hideShow() {
@@ -225,2 +269,37 @@ bool MainWindow::viewStartMonday()const {
}
+void MainWindow::setTemplateMenu() {
+ m_popTemplate->clear();
+
+ QStringList list = templateManager().names();
+ for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
+ m_popTemplate->insertItem( (*it) );
+ }
+}
+/*
+ * get the name of the item with the id id
+ * then ask for an OEvent from the manager
+ */
+void MainWindow::slotNewFromTemplate(int id ) {
+ QString name = m_popTemplate->text( id );
+
+ OEvent ev = templateManager().value( name );
+
+ if ( editor()->edit( ev ) ) {
+ ev = editor()->event();
+ ev.setUid( -1 );
+ manager()->add( ev );
+
+ /*
+ * no we'll find out if the current view
+ * should show the new event
+ * and then we will ask it to refresh
+ * FIXME for now we'll call a refresh
+ */
+ currentView()->reschedule();
+ raiseCurrentView();
+ }
+}
+Editor* MainWindow::editor() {
+ return m_edit;
+}
diff --git a/core/pim/datebook2/mainwindow.h b/core/pim/datebook2/mainwindow.h
index 60ea4c4..3c22637 100644
--- a/core/pim/datebook2/mainwindow.h
+++ b/core/pim/datebook2/mainwindow.h
@@ -8,4 +8,5 @@
#include "descriptionmanager.h"
#include "locationmanager.h"
+#include "templatemanager.h"
#include "view.h"
@@ -15,12 +16,12 @@ class QPopupMenu;
class QPEToolBar;
namespace Datebook {
-
- class TemplateManager;
class BookManager;
class Show;
+ class Editor;
class MainWindow : public OPimMainWindow {
Q_OBJECT
friend class Show; // to avoid QObject
friend class View; // to avoid QObject
+ friend class Editor;
public:
MainWindow();
@@ -43,5 +44,8 @@ namespace Datebook {
void slotConfigureLocs(); // Configure the Locations
void slotConfigureDesc(); // Configure the Desc
+ void slotConfigureTemp();
+ void slotNewFromTemplate(int ); // called when someone chooses the template menu
+ void setTemplateMenu(); // updates the templateMenu
protected slots:
@@ -65,8 +69,11 @@ namespace Datebook {
View* currentView();
BookManager* manager();
- TemplateManager* templateManager();
- LocationManager* locationManager();
- DescriptionManager* descriptionManager();
+ TemplateManager templateManager();
+ LocationManager locationManager();
+ DescriptionManager descriptionManager();
+ void setLocationManager( const LocationManager& );
+ void setDescriptionManager( const DescriptionManager& );
Show* eventShow();
+ Editor* editor();
private: // friend functions for Show
@@ -90,8 +97,9 @@ namespace Datebook {
QPopupMenu* m_popTemplate;
BookManager* m_manager;
- TemplateManager* m_tempMan;
- DescriptionManager* m_descMan;
- LocationManager* m_locMan;
+ TemplateManager m_tempMan;
+ DescriptionManager m_descMan;
+ LocationManager m_locMan;
Show* m_show;
+ Editor* m_edit;
};
}
diff --git a/core/pim/datebook2/managertemplate.h b/core/pim/datebook2/managertemplate.h
index cdf121d..72fab3a 100644
--- a/core/pim/datebook2/managertemplate.h
+++ b/core/pim/datebook2/managertemplate.h
@@ -13,5 +13,5 @@ namespace Datebook {
template<class T>
class ManagerTemplate {
- typedef typename QMap<QString, T>::Iterator Iterator;
+ typedef typename QMap<QString, T>::ConstIterator Iterator;
public:
ManagerTemplate();
@@ -20,17 +20,12 @@ namespace Datebook {
virtual void add( const QString&, const T& t );
void remove( const QString& );
- bool load();
- bool save();
+ virtual bool load() = 0;
+ virtual bool save() = 0;
- QStringList names();
+ QStringList names()const;
T value(const QString&)const;
protected:
QMap<QString, T> m_map;
-
- private:
- virtual bool doSave() = 0;
- virtual bool doLoad() = 0;
-
};
template<class T>
@@ -49,13 +44,5 @@ namespace Datebook {
}
template<class T>
- bool ManagerTemplate<T>::load() {
- return doLoad();
- }
- template<class T>
- bool ManagerTemplate<T>::save() {
- return doSave();
- }
- template<class T>
- QStringList ManagerTemplate<T>::names() {
+ QStringList ManagerTemplate<T>::names()const {
QStringList lst;
Iterator it;
diff --git a/core/pim/datebook2/stringmanager.cpp b/core/pim/datebook2/stringmanager.cpp
index 77bc88a..715a4b1 100644
--- a/core/pim/datebook2/stringmanager.cpp
+++ b/core/pim/datebook2/stringmanager.cpp
@@ -1,2 +1,8 @@
+#include <qhbox.h>
+#include <qpushbutton.h>
+#include <qlayout.h>
+#include <qlistview.h>
+#include <qlineedit.h>
+
#include <qpe/config.h>
@@ -14,5 +20,5 @@ void StringManager::add( const QString& str ) {
ManagerTemplate<QString>::add(str, str);
}
-bool StringManager::doLoad() {
+bool StringManager::load() {
Config qpe( "datebook-"+m_base );
qpe.setGroup(m_base );
@@ -23,6 +29,6 @@ bool StringManager::doLoad() {
return true;
}
-bool StringManager::doSave() {
- Config qpe( "datebook"+m_base );
+bool StringManager::save() {
+ Config qpe( "datebook-"+m_base );
qpe.setGroup(m_base);
qpe.writeEntry( "Names", names(), 0x1f );
@@ -30,13 +36,103 @@ bool StringManager::doSave() {
return false;
}
+QString StringManager::baseName()const {
+ return m_base;
+}
+
-StringManagerDialog::StringManagerDialog(const StringManager& )
+StringManagerDialog::StringManagerDialog(const StringManager& man)
: QDialog(0, 0, true ) {
+ m_base = man.baseName();
+
+ QVBoxLayout* lay = new QVBoxLayout( this );
+
+ m_view = new QListView( this );
+ m_view->addColumn( QString::null );
+ lay->addWidget( m_view );
+
+ QHBox* box = new QHBox( this );
+
+ QPushButton* b = new QPushButton( box );
+ b->setText( tr("&Add") );
+ connect(b, SIGNAL(clicked() ), this, SLOT(slotAdd() ) );
+
+ b = new QPushButton( box );
+ b->setText( tr("&Remove") );
+ connect(b, SIGNAL(clicked() ), this, SLOT(slotRemove() ) );
+
+ b = new QPushButton( box );
+ b->setText( tr("Rename") );
+ connect(b, SIGNAL(clicked() ), this, SLOT(slotRename() ) );
+
+ lay->addWidget( box );
+
+ init( man );
}
StringManagerDialog::~StringManagerDialog() {
-
}
StringManager StringManagerDialog::manager()const {
- return StringManager();
+ StringManager man(m_base );
+ QListViewItemIterator it(m_view);
+ while ( it.current() ) {
+ man.add( it.current()->text(0) );
+ ++it;
+ }
+
+ return man;
+}
+void StringManagerDialog::init( const StringManager& _man ) {
+ QStringList::Iterator it;
+ QStringList man = _man.names();
+ for ( it = man.begin(); it != man.end(); ++it )
+ (void)new QListViewItem( m_view, (*it) );
+
+}
+
+namespace {
+ class InputDialog : public QDialog{
+ public:
+ InputDialog( const QString& text );
+ ~InputDialog();
+
+ QString text()const;
+ private:
+ QLineEdit* m_lneEdit;
+ };
+ InputDialog::InputDialog(const QString& text )
+ : QDialog(0, 0, true ) {
+ m_lneEdit = new QLineEdit( this );
+ m_lneEdit->setText( text );
+ }
+ InputDialog::~InputDialog() {
+ }
+ QString InputDialog::text() const{
+ return m_lneEdit->text();
+ }
+
+}
+
+void StringManagerDialog::slotAdd() {
+ InputDialog dlg(QString::null);
+ dlg.setCaption( tr("Add") );
+ if ( dlg.exec() == QDialog::Accepted )
+ (void)new QListViewItem( m_view, dlg.text() );
+
+}
+void StringManagerDialog::slotRename() {
+ QListViewItem* item = m_view->currentItem();
+ if (!item) return;
+
+ InputDialog dlg(item->text(0) );
+ dlg.setCaption( tr("Rename") );
+
+ if ( dlg.exec() == QDialog::Accepted )
+ item->setText( 0, dlg.text() );
+}
+void StringManagerDialog::slotRemove() {
+ QListViewItem* item = m_view->currentItem();
+ if (!item) return;
+
+ m_view->takeItem( item );
+ delete item;
}
diff --git a/core/pim/datebook2/stringmanager.h b/core/pim/datebook2/stringmanager.h
index ac0d4bd..2eee43f 100644
--- a/core/pim/datebook2/stringmanager.h
+++ b/core/pim/datebook2/stringmanager.h
@@ -6,4 +6,5 @@
#include "managertemplate.h"
+class QListView;
namespace Datebook {
/**
@@ -26,8 +27,9 @@ namespace Datebook {
*/
void add( const QString& );
+ bool load();
+ bool save();
+ QString baseName()const;
private:
QString m_base;
- bool doLoad();
- bool doSave();
};
@@ -42,4 +44,12 @@ namespace Datebook {
StringManager manager()const;
+ private slots:
+ void init( const StringManager& );
+ void slotAdd();
+ void slotRemove();
+ void slotRename();
+ private:
+ QListView* m_view;
+ QString m_base;
};
}
diff --git a/core/pim/datebook2/templatemanager.cpp b/core/pim/datebook2/templatemanager.cpp
index b620cf7..541fec0 100644
--- a/core/pim/datebook2/templatemanager.cpp
+++ b/core/pim/datebook2/templatemanager.cpp
@@ -1,2 +1,15 @@
+#include <qdatetime.h>
+#include <qlistview.h>
+#include <qlayout.h>
+#include <qhbox.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+
+#include <qpe/config.h>
+
+#include <opie/odatebookaccess.h>
+#include <opie/odatebookaccessbackend_xml.h>
+
+#include "editor.h"
#include "templatemanager.h"
@@ -9,17 +22,163 @@ TemplateManager::TemplateManager() {
TemplateManager::~TemplateManager() {
}
-bool TemplateManager::doSave() {
+bool TemplateManager::save() {
+ QStringList lst = names();
+ Config conf( "datebook-templates");
+ conf.setGroup( "___Names___");
+ conf.writeEntry( "Names", names(), 0x1f );
+
+ for ( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
+ conf.setGroup( (*it) );
+ conf.writeEntry( "Uid", value( (*it) ).uid() );
+ }
+
return true;
}
-bool TemplateManager::doLoad() {
+bool TemplateManager::load() {
+ Config conf( "datebook-templates");
+ conf.setGroup( "___Names___");
+ QStringList lst = conf.readListEntry( "Names", 0x1f );
+ for ( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
+ conf.setGroup( (*it) );
+ add( (*it), OEvent() );
+ }
return true;
}
-TemplateDialog::TemplateDialog( const TemplateManager& )
+namespace {
+ class TemplateItem : public QListViewItem {
+ public:
+ TemplateItem( QListView*, const QString& text,
+ const OEvent& );
+ ~TemplateItem();
+
+ QString text()const;
+ OEvent event()const;
+
+ void setText( const QString& text );
+ void setEvent( const OEvent& );
+ private:
+ QString m_text;
+ OEvent m_event;
+ };
+ TemplateItem::TemplateItem( QListView* view,
+ const QString& text,
+ const OEvent& ev )
+ : QListViewItem( view ), m_event(ev) {
+ QListViewItem::setText( 0, text );
+ }
+ TemplateItem::~TemplateItem() {
+ }
+ void TemplateItem::setText( const QString& text ) {
+ QListViewItem::setText( 0, text );
+ m_text = text;
+ }
+ void TemplateItem::setEvent( const OEvent& ev ) {
+ m_event = ev;
+ }
+ QString TemplateItem::text()const {
+ return m_text;
+ }
+ OEvent TemplateItem::event()const {
+
+ }
+
+ class InputDialog : public QDialog{
+ public:
+ InputDialog( const QString& text );
+ ~InputDialog();
+
+ QString text()const;
+ private:
+ QLineEdit* m_lneEdit;
+ };
+ InputDialog::InputDialog(const QString& text )
+ : QDialog(0, 0, true ) {
+ m_lneEdit = new QLineEdit( this );
+ m_lneEdit->setText( text );
+ }
+ InputDialog::~InputDialog() {
+ }
+ QString InputDialog::text() const{
+ return m_lneEdit->text();
+ }
+}
+
+TemplateDialog::TemplateDialog( const TemplateManager& man, Editor* edit )
: QDialog(0, 0, true ) {
+ QVBoxLayout* lay = new QVBoxLayout(this);
+ m_view = new QListView( this );
+ m_view->addColumn( tr("Template Names") );
+ lay->addWidget( m_view );
+
+ QHBox* box = new QHBox( this );
+ lay->addWidget( box );
+
+ QPushButton* b = new QPushButton( box );
+ b->setText(tr("&Add") );
+ connect( b, SIGNAL(clicked() ), this, SLOT(slotAdd() ) );
+
+ b = new QPushButton( box );
+ b->setText(tr("&Edit") );
+ connect( b, SIGNAL(clicked() ), this, SLOT(slotEdit() ) );
+
+ b = new QPushButton( box );
+ b->setText(tr("&Rename") );
+ connect(b, SIGNAL(clicked() ), this, SLOT(slotRename() ) );
+
+ b = new QPushButton( box );
+ b->setText(tr("Re&move") );
+ connect(b, SIGNAL(clicked() ), this, SLOT(slotRemove() ) );
+
+ init( man );
+ m_edit = edit;
}
TemplateDialog::~TemplateDialog() {
}
+void TemplateDialog::slotAdd() {
+ if ( m_edit->newEvent( QDate::currentDate() ) ) {
+ (void)new TemplateItem( m_view, tr("New Template"), m_edit->event() );
+ }
+}
+void TemplateDialog::slotEdit() {
+ TemplateItem* item = static_cast<TemplateItem*>( m_view->currentItem() );
+ if (!item) return;
+
+ if (m_edit->edit( item->event() ) )
+ item->setEvent( m_edit->event() );
+
+}
+void TemplateDialog::slotRemove() {
+ QListViewItem* item = m_view->currentItem();
+ if (!item) return;
+
+ m_view->takeItem( item );
+ delete item;
+}
+void TemplateDialog::slotRename() {
+ TemplateItem* item = static_cast<TemplateItem*>( m_view->currentItem() );
+ if (!item) return;
+
+ InputDialog dlg( item->text() );
+ dlg.setCaption( tr("Rename") );
+ if ( dlg.exec() == QDialog::Accepted )
+ item->setText( dlg.text() );
+
+}
TemplateManager TemplateDialog::manager()const {
- return TemplateManager();
+ TemplateManager manager;
+
+ QListViewItemIterator it(m_view);
+ while ( it.current() ) {
+ TemplateItem* item = static_cast<TemplateItem*>( it.current() );
+ manager.add( item->text(), item->event() );
+ ++it;
+ }
+ return manager;
+}
+void TemplateDialog::init( const TemplateManager& man ) {
+ QStringList list = man.names();
+ for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
+ (void)new TemplateItem( m_view, (*it), man.value( (*it) ) );
+ }
}
diff --git a/core/pim/datebook2/templatemanager.h b/core/pim/datebook2/templatemanager.h
index f885677..91d8b2e 100644
--- a/core/pim/datebook2/templatemanager.h
+++ b/core/pim/datebook2/templatemanager.h
@@ -8,8 +8,10 @@
#include "managertemplate.h"
+class QListView;
namespace Datebook {
/**
* The OEvent Template Manager
*/
+ class Editor;
class TemplateManager : public ManagerTemplate<OEvent> {
public:
@@ -17,7 +19,6 @@ namespace Datebook {
~TemplateManager();
- private:
- virtual bool doSave();
- virtual bool doLoad();
+ bool save();
+ bool load();
};
/**
@@ -27,8 +28,19 @@ namespace Datebook {
Q_OBJECT
public:
- TemplateDialog(const TemplateManager& man);
+ TemplateDialog(const TemplateManager& man, Editor*);
~TemplateDialog();
- virtual TemplateManager manager()const;
+ TemplateManager manager()const;
+
+ private slots:
+ void init( const TemplateManager& );
+ void slotAdd();
+ void slotEdit();
+ void slotRename();
+ void slotRemove();
+
+ private:
+ QListView* m_view;
+ Editor* m_edit;
};
}
diff --git a/core/pim/datebook2/view.h b/core/pim/datebook2/view.h
index e2312a3..2236aad 100644
--- a/core/pim/datebook2/view.h
+++ b/core/pim/datebook2/view.h
@@ -20,4 +20,14 @@ namespace Datebook {
virtual QPixmap pixmap()const = 0;
+
+ /**
+ * non translatable name or type
+ */
+ virtual QCString type()const = 0;
+
+ /**
+ * shown to the user
+ */
+ virtual QString name()const = 0;
virtual QString description()const = 0;