Diffstat (limited to 'core/pim/todo/templatedialogimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/todo/templatedialogimpl.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/core/pim/todo/templatedialogimpl.cpp b/core/pim/todo/templatedialogimpl.cpp index 63d8107..c9ad3d0 100644 --- a/core/pim/todo/templatedialogimpl.cpp +++ b/core/pim/todo/templatedialogimpl.cpp | |||
@@ -10,48 +10,48 @@ using namespace Todo; | |||
10 | 10 | ||
11 | /* TRANSLATOR Todo::TemplateDialogImpl */ | 11 | /* TRANSLATOR Todo::TemplateDialogImpl */ |
12 | 12 | ||
13 | namespace { | 13 | namespace { |
14 | class TemplateListItem : public QListViewItem { | 14 | class TemplateListItem : public QListViewItem { |
15 | public: | 15 | public: |
16 | TemplateListItem( QListView*, | 16 | TemplateListItem( QListView*, |
17 | const QString& name, | 17 | const QString& name, |
18 | const OTodo& ); | 18 | const OPimTodo& ); |
19 | ~TemplateListItem(); | 19 | ~TemplateListItem(); |
20 | 20 | ||
21 | OTodo event()const; | 21 | OPimTodo event()const; |
22 | QString text()const; | 22 | QString text()const; |
23 | void setText(const QString& str ); | 23 | void setText(const QString& str ); |
24 | void setEvent( const OTodo& ); | 24 | void setEvent( const OPimTodo& ); |
25 | private: | 25 | private: |
26 | QString m_name; | 26 | QString m_name; |
27 | OTodo m_ev; | 27 | OPimTodo m_ev; |
28 | }; | 28 | }; |
29 | 29 | ||
30 | /* implementation */ | 30 | /* implementation */ |
31 | TemplateListItem::TemplateListItem( QListView* view, | 31 | TemplateListItem::TemplateListItem( QListView* view, |
32 | const QString& text, | 32 | const QString& text, |
33 | const OTodo& ev ) | 33 | const OPimTodo& ev ) |
34 | : QListViewItem( view ), m_name( text ), m_ev( ev ) | 34 | : QListViewItem( view ), m_name( text ), m_ev( ev ) |
35 | { | 35 | { |
36 | QListViewItem::setText(0, m_name ); | 36 | QListViewItem::setText(0, m_name ); |
37 | } | 37 | } |
38 | TemplateListItem::~TemplateListItem() {} | 38 | TemplateListItem::~TemplateListItem() {} |
39 | OTodo TemplateListItem::event() const { | 39 | OPimTodo TemplateListItem::event() const { |
40 | return m_ev; | 40 | return m_ev; |
41 | } | 41 | } |
42 | QString TemplateListItem::text()const { | 42 | QString TemplateListItem::text()const { |
43 | return m_name; | 43 | return m_name; |
44 | } | 44 | } |
45 | void TemplateListItem::setText( const QString& str ) { | 45 | void TemplateListItem::setText( const QString& str ) { |
46 | QListViewItem::setText(0, str ); | 46 | QListViewItem::setText(0, str ); |
47 | m_name = str; | 47 | m_name = str; |
48 | } | 48 | } |
49 | void TemplateListItem::setEvent( const OTodo& ev) { | 49 | void TemplateListItem::setEvent( const OPimTodo& ev) { |
50 | m_ev = ev; | 50 | m_ev = ev; |
51 | } | 51 | } |
52 | } | 52 | } |
53 | 53 | ||
54 | TemplateDialogImpl::TemplateDialogImpl( MainWindow* win, | 54 | TemplateDialogImpl::TemplateDialogImpl( MainWindow* win, |
55 | TemplateManager* man ) | 55 | TemplateManager* man ) |
56 | : TemplateDialog( win ), m_win( win), m_man( man ) | 56 | : TemplateDialog( win ), m_win( win), m_man( man ) |
57 | { | 57 | { |
@@ -67,17 +67,17 @@ TemplateDialogImpl::TemplateDialogImpl( MainWindow* win, | |||
67 | connect( listView(), SIGNAL(clicked(QListViewItem*) ), | 67 | connect( listView(), SIGNAL(clicked(QListViewItem*) ), |
68 | this, SLOT(slotClicked(QListViewItem*) ) ); | 68 | this, SLOT(slotClicked(QListViewItem*) ) ); |
69 | } | 69 | } |
70 | TemplateDialogImpl::~TemplateDialogImpl() { | 70 | TemplateDialogImpl::~TemplateDialogImpl() { |
71 | 71 | ||
72 | } | 72 | } |
73 | void TemplateDialogImpl::slotAdd() { | 73 | void TemplateDialogImpl::slotAdd() { |
74 | QString str = QWidget::tr("New Template %1").arg( listView()->childCount() ); | 74 | QString str = QWidget::tr("New Template %1").arg( listView()->childCount() ); |
75 | OTodo ev; | 75 | OPimTodo ev; |
76 | m_man->addEvent(str, ev); | 76 | m_man->addEvent(str, ev); |
77 | new TemplateListItem( listView(), str, ev ); | 77 | new TemplateListItem( listView(), str, ev ); |
78 | } | 78 | } |
79 | void TemplateDialogImpl::slotRemove() { | 79 | void TemplateDialogImpl::slotRemove() { |
80 | if (!listView()->currentItem() ) | 80 | if (!listView()->currentItem() ) |
81 | return; | 81 | return; |
82 | 82 | ||
83 | TemplateListItem* item = static_cast<TemplateListItem*>( listView()->currentItem() ); | 83 | TemplateListItem* item = static_cast<TemplateListItem*>( listView()->currentItem() ); |
@@ -87,17 +87,17 @@ void TemplateDialogImpl::slotRemove() { | |||
87 | 87 | ||
88 | delete item; | 88 | delete item; |
89 | } | 89 | } |
90 | void TemplateDialogImpl::slotEdit() { | 90 | void TemplateDialogImpl::slotEdit() { |
91 | if ( !listView()->currentItem() ) | 91 | if ( !listView()->currentItem() ) |
92 | return; | 92 | return; |
93 | 93 | ||
94 | TemplateListItem* item = static_cast<TemplateListItem*>( listView()->currentItem() ); | 94 | TemplateListItem* item = static_cast<TemplateListItem*>( listView()->currentItem() ); |
95 | OTodo ev = m_win->currentEditor()->edit( m_win, item->event() ); | 95 | OPimTodo ev = m_win->currentEditor()->edit( m_win, item->event() ); |
96 | if ( m_win->currentEditor()->accepted() ) { | 96 | if ( m_win->currentEditor()->accepted() ) { |
97 | item->setEvent( ev ); | 97 | item->setEvent( ev ); |
98 | m_man->removeEvent( item->text() ); | 98 | m_man->removeEvent( item->text() ); |
99 | m_man->addEvent( item->text(), ev ); | 99 | m_man->addEvent( item->text(), ev ); |
100 | } | 100 | } |
101 | } | 101 | } |
102 | /* | 102 | /* |
103 | * we need to update | 103 | * we need to update |