blob: ca021737271b2a69fbd7506b9aae1dd0565b4195 (
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
|
#include <qaction.h>
#include <qpopupmenu.h>
#include "mainwindow.h"
#include "todotemplatemanager.h"
#include "templatedialogimpl.h"
#include "templateeditor.h"
using namespace Todo;
TemplateEditor::TemplateEditor( MainWindow* main,
TemplateManager* manager )
: QObject( main ), m_main( main ), m_man( manager )
{
init();
}
TemplateEditor::~TemplateEditor() {
}
/* ok we add us to the Menubar */
void TemplateEditor::init() {
QAction* a = new QAction( QString::null, QWidget::tr("Configure Templates"),
0, this, 0, FALSE );
connect(a, SIGNAL(activated() ),
this, SLOT(setUp() ) );
a->addTo( m_main->options() );
}
void TemplateEditor::setUp() {
TemplateDialogImpl dlg(m_main, m_man );
int ret= dlg.exec();
if (QDialog::Accepted != ret )
m_man->load();
else
m_main->populateTemplates();
}
|