author | zecke <zecke> | 2003-05-12 13:21:59 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-05-12 13:21:59 (UTC) |
commit | 9a4c9544a59f8395f2ec5e7c99028570f8bd8bd1 (patch) (unidiff) | |
tree | 8af13b984750f743b7f9f06bbf04b531b1a10ff2 /core/pim/todo/templatedialogimpl.cpp | |
parent | a4c8b8912c9e87a2fd76103193e6b4f91c2a2c5d (diff) | |
download | opie-9a4c9544a59f8395f2ec5e7c99028570f8bd8bd1.zip opie-9a4c9544a59f8395f2ec5e7c99028570f8bd8bd1.tar.gz opie-9a4c9544a59f8395f2ec5e7c99028570f8bd8bd1.tar.bz2 |
Hospital Hacking Session
make more translatable
fix up GUI for Opie1.0 in regards what is implemnted
implement setting and removing of Alarms!!!!
Show Alarms once they got fired...
Diffstat (limited to 'core/pim/todo/templatedialogimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/todo/templatedialogimpl.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/pim/todo/templatedialogimpl.cpp b/core/pim/todo/templatedialogimpl.cpp index 77c5363..fed92f0 100644 --- a/core/pim/todo/templatedialogimpl.cpp +++ b/core/pim/todo/templatedialogimpl.cpp | |||
@@ -6,12 +6,14 @@ | |||
6 | #include "todotemplatemanager.h" | 6 | #include "todotemplatemanager.h" |
7 | #include "templatedialogimpl.h" | 7 | #include "templatedialogimpl.h" |
8 | 8 | ||
9 | 9 | ||
10 | using namespace Todo; | 10 | using namespace Todo; |
11 | 11 | ||
12 | /* TRANSLATOR Todo::TemplateDialogImpl */ | ||
13 | |||
12 | namespace { | 14 | namespace { |
13 | class TemplateListItem : public QListViewItem { | 15 | class TemplateListItem : public QListViewItem { |
14 | public: | 16 | public: |
15 | TemplateListItem( QListView*, | 17 | TemplateListItem( QListView*, |
16 | const QString& name, | 18 | const QString& name, |
17 | const OTodo& ); | 19 | const OTodo& ); |
@@ -58,22 +60,22 @@ TemplateDialogImpl::TemplateDialogImpl( MainWindow* win, | |||
58 | /* not the fastest way.... */ | 60 | /* not the fastest way.... */ |
59 | QStringList list = man->templates(); | 61 | QStringList list = man->templates(); |
60 | for (QStringList::Iterator it = list.begin(); | 62 | for (QStringList::Iterator it = list.begin(); |
61 | it != list.end(); ++it ) { | 63 | it != list.end(); ++it ) { |
62 | new TemplateListItem( listView(), (*it), man->templateEvent( (*it) ) ); | 64 | new TemplateListItem( listView(), (*it), man->templateEvent( (*it) ) ); |
63 | } | 65 | } |
64 | listView()->addColumn( tr("Name") ); | 66 | listView()->addColumn( QWidget::tr("Name") ); |
65 | 67 | ||
66 | connect( listView(), SIGNAL(clicked(QListViewItem*) ), | 68 | connect( listView(), SIGNAL(clicked(QListViewItem*) ), |
67 | this, SLOT(slotClicked(QListViewItem*) ) ); | 69 | this, SLOT(slotClicked(QListViewItem*) ) ); |
68 | } | 70 | } |
69 | TemplateDialogImpl::~TemplateDialogImpl() { | 71 | TemplateDialogImpl::~TemplateDialogImpl() { |
70 | 72 | ||
71 | } | 73 | } |
72 | void TemplateDialogImpl::slotAdd() { | 74 | void TemplateDialogImpl::slotAdd() { |
73 | QString str = tr("New Template %1").arg( listView()->childCount() ); | 75 | QString str = QWidget::tr("New Template %1").arg( listView()->childCount() ); |
74 | OTodo ev; | 76 | OTodo ev; |
75 | m_man->addEvent(str, ev); | 77 | m_man->addEvent(str, ev); |
76 | new TemplateListItem( listView(), str, ev ); | 78 | new TemplateListItem( listView(), str, ev ); |
77 | } | 79 | } |
78 | void TemplateDialogImpl::slotRemove() { | 80 | void TemplateDialogImpl::slotRemove() { |
79 | TemplateListItem* item = (TemplateListItem*) listView()->currentItem(); | 81 | TemplateListItem* item = (TemplateListItem*) listView()->currentItem(); |
@@ -84,15 +86,13 @@ void TemplateDialogImpl::slotRemove() { | |||
84 | delete item; | 86 | delete item; |
85 | } | 87 | } |
86 | void TemplateDialogImpl::slotEdit() { | 88 | void TemplateDialogImpl::slotEdit() { |
87 | TemplateListItem* item = (TemplateListItem*)listView()->currentItem(); | 89 | TemplateListItem* item = (TemplateListItem*)listView()->currentItem(); |
88 | OTodo ev = m_win->currentEditor()->edit( m_win, item->event() ); | 90 | OTodo ev = m_win->currentEditor()->edit( m_win, item->event() ); |
89 | if ( m_win->currentEditor()->accepted() ) { | 91 | if ( m_win->currentEditor()->accepted() ) { |
90 | qWarning("accepted"); | ||
91 | item->setEvent( ev ); | 92 | item->setEvent( ev ); |
92 | qWarning("Priority %d", ev.priority() ); | ||
93 | m_man->removeEvent( item->text() ); | 93 | m_man->removeEvent( item->text() ); |
94 | m_man->addEvent( item->text(), ev ); | 94 | m_man->addEvent( item->text(), ev ); |
95 | } | 95 | } |
96 | } | 96 | } |
97 | /* | 97 | /* |
98 | * we need to update | 98 | * we need to update |
@@ -110,10 +110,10 @@ void TemplateDialogImpl::slotReturn() { | |||
110 | } | 110 | } |
111 | /* update the lineedit when changing */ | 111 | /* update the lineedit when changing */ |
112 | void TemplateDialogImpl::slotClicked( QListViewItem* item) { | 112 | void TemplateDialogImpl::slotClicked( QListViewItem* item) { |
113 | if (!item) | 113 | if (!item) |
114 | return; | 114 | return; |
115 | 115 | ||
116 | TemplateListItem* tbl = (TemplateListItem*)item; | 116 | TemplateListItem* tbl = static_cast<TemplateListItem*>(item); |
117 | edit()->setText( tbl->text() ); | 117 | edit()->setText( tbl->text() ); |
118 | } | 118 | } |
119 | 119 | ||