diff --git a/src/presentation/applicationmodel.h b/src/presentation/applicationmodel.h --- a/src/presentation/applicationmodel.h +++ b/src/presentation/applicationmodel.h @@ -31,6 +31,7 @@ #include "domain/datasourcequeries.h" #include "domain/noterepository.h" #include "domain/taskrepository.h" +#include "domain/projectrepository.h" #include "presentation/metatypes.h" @@ -46,6 +47,8 @@ Q_PROPERTY(QObject* availablePages READ availablePages) Q_PROPERTY(QObject* currentPage READ currentPage WRITE setCurrentPage NOTIFY currentPageChanged) Q_PROPERTY(QObject* editor READ editor) + Q_PROPERTY(QObject* availableTemplateProjects READ availableTemplateProjects) + public: typedef QSharedPointer Ptr; @@ -56,6 +59,7 @@ QObject *availablePages(); QObject *currentPage(); QObject *editor(); + QObject *availableTemplateProjects(); ErrorHandler *errorHandler() const; @@ -71,6 +75,7 @@ QObjectPtr m_availablePages; QObjectPtr m_currentPage; QObjectPtr m_editor; + QObjectPtr m_availableTemplateProjects; ErrorHandler *m_errorHandler; }; diff --git a/src/presentation/applicationmodel.cpp b/src/presentation/applicationmodel.cpp --- a/src/presentation/applicationmodel.cpp +++ b/src/presentation/applicationmodel.cpp @@ -29,6 +29,7 @@ #include "presentation/availablesourcesmodel.h" #include "presentation/errorhandler.h" #include "presentation/pagemodel.h" +#include "presentation/templatepagemodel.h" #include "utils/dependencymanager.h" #include "utils/jobhandler.h" @@ -83,6 +84,17 @@ return m_editor.data(); } +QObject *ApplicationModel::availableTemplateProjects() +{ + if (!m_availableTemplateProjects) { + auto model = Utils::DependencyManager::globalInstance().create(); + model->setErrorHandler(errorHandler()); + m_availableTemplateProjects = model; + } + return m_availableTemplateProjects.data(); +} + + ErrorHandler *ApplicationModel::errorHandler() const { return m_errorHandler; diff --git a/src/presentation/templatepagemodel.h b/src/presentation/templatepagemodel.h new file mode 100644 --- /dev/null +++ b/src/presentation/templatepagemodel.h @@ -0,0 +1,69 @@ +/* This file is part of Zanshin + + Copyright 2014 Kevin Ottens + Copyright 2014 Franck Arrecot + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License or (at your option) version 3 or any later version + accepted by the membership of KDE e.V. (or its successor approved + by the membership of KDE e.V.), which shall act as a proxy + defined in Section 14 of version 3 of the license. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + + +#ifndef PRESENTATION_TEMPLATEPAGEMODEL_H +#define PRESENTATION_TEMPLATEPAGEMODEL_H + +#include "presentation/pagemodel.h" + +#include "domain/project.h" +#include "domain/projectqueries.h" +#include "domain/projectrepository.h" +#include "domain/taskqueries.h" +#include "domain/taskrepository.h" + + +namespace Presentation { + +class TemplatePageModel : public PageModel +{ + Q_OBJECT +public: + explicit TemplatePageModel(const Domain::Project::Ptr &project, + const Domain::ProjectQueries::Ptr &projectQueries, + const Domain::ProjectRepository::Ptr &projectRepository, + const Domain::TaskQueries::Ptr &taskQueries, + const Domain::TaskRepository::Ptr &taskRepository, + QObject *parent = Q_NULLPTR); + + Domain::Project::Ptr project() const; + Domain::Artifact::Ptr addItem(const QString &title, const QModelIndex &parentIndex = QModelIndex()) Q_DECL_OVERRIDE; + void removeItem(const QModelIndex &index) Q_DECL_OVERRIDE; + void promoteItem(const QModelIndex &index) Q_DECL_OVERRIDE; + +private: + QAbstractItemModel *createCentralListModel() Q_DECL_OVERRIDE; + + Domain::Project::Ptr m_project; + Domain::ProjectQueries::Ptr m_projectQueries; + Domain::ProjectRepository::Ptr m_projectRepository; + + Domain::TaskQueries::Ptr m_taskQueries; + Domain::TaskRepository::Ptr m_taskRepository; +}; + +} + +#endif // PRESENTATION_TEMPLATEPAGEMODEL_H diff --git a/src/presentation/templatepagemodel.cpp b/src/presentation/templatepagemodel.cpp new file mode 100644 --- /dev/null +++ b/src/presentation/templatepagemodel.cpp @@ -0,0 +1,136 @@ +/* This file is part of Zanshin + + Copyright 2014 Kevin Ottens + Copyright 2014 RĂ©mi Benoit + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License or (at your option) version 3 or any later version + accepted by the membership of KDE e.V. (or its successor approved + by the membership of KDE e.V.), which shall act as a proxy + defined in Section 14 of version 3 of the license. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + +#include "templatepagemodel.h" + +#include + +#include "domain/project.h" +#include "domain/projectqueries.h" +#include "domain/projectrepository.h" + +#include "presentation/querytreemodel.h" + +using namespace Presentation; + +TemplatePageModel::TemplatePageModel(const Domain::Project::Ptr &project, + const Domain::ProjectQueries::Ptr &projectQueries, + const Domain::ProjectRepository::Ptr &projectRepository, + const Domain::TaskQueries::Ptr &taskQueries, + const Domain::TaskRepository::Ptr &taskRepository, + QObject *parent) + : PageModel(parent), + m_project(project), + m_projectQueries(projectQueries), + m_projectRepository(projectRepository), + m_taskQueries(taskQueries), + m_taskRepository(taskRepository) + { + } + +Domain::Project::Ptr TemplatePageModel::project() const +{ + return m_project; +} + + +Domain::Artifact::Ptr TemplatePageModel::addItem(const QString &title, const QModelIndex &parentIndex) +{ + const auto parentData = parentIndex.data(QueryTreeModel::ObjectRole); + const auto parentArtifact = parentData.value(); + const auto parentTask = parentArtifact.objectCast(); + + auto task = Domain::Task::Ptr::create(); + task->setTitle(title); + + const auto job = parentTask ? m_taskRepository->createChild(task, parentTask) + : m_taskRepository->createInProject(task, m_project); + installHandler(job, tr("Cannot add task %1 in project %2").arg(title).arg(m_project->name())); + + return task; +} + +void TemplatePageModel::removeItem(const QModelIndex &index) +{ + QVariant data = index.data(QueryTreeModel::ObjectRole); + auto artifact = data.value(); + auto project = artifact.objectCast(); + Q_ASSERT(project); + const auto job = m_projectRepository->remove(project); + installHandler(job, tr("Cannot remove project %1").arg(project->name())); +} + +void TemplatePageModel::promoteItem(const QModelIndex &) +{ + qFatal("Not supported"); +} + +QAbstractItemModel *TemplatePageModel::createCentralListModel() +{ + auto query = [this] (const Domain::Project::Ptr &project) -> Domain::QueryResultInterface::Ptr { + if (!project) + return m_projectQueries->findAll(); + else + return Domain::QueryResult::Ptr(); + }; + + auto flags = [](const Domain::Project::Ptr &) { + return Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsEditable + | Qt::ItemIsDragEnabled; + }; + + auto data = [](const Domain::Project::Ptr &project, int role) -> QVariant { + if (role != Qt::DisplayRole + && role != Qt::EditRole) { + return QVariant(); + } + + if (role == Qt::DisplayRole || role == Qt::EditRole) { + return project->name(); + } else { + return QVariant(); + } + }; + + auto setData = [this] (const Domain::Project::Ptr &project, const QVariant &value, int role) { + if (role != Qt::EditRole) { + return false; + } + project->setName(value.toString()); + const auto job = m_projectRepository->update(project); + installHandler(job, tr("Cannot modify project %1 ").arg(project->name())); + return true; + }; + + auto drop = [this] (const QMimeData *, Qt::DropAction, const Domain::Project::Ptr &) { + return false; + }; + + auto drag = [](const Domain::Project::List &) -> QMimeData* { + return Q_NULLPTR; + }; + return new QueryTreeModel(query, flags, data, setData, drop, drag, this); +} diff --git a/src/widgets/applicationcomponents.cpp b/src/widgets/applicationcomponents.cpp --- a/src/widgets/applicationcomponents.cpp +++ b/src/widgets/applicationcomponents.cpp @@ -104,6 +104,10 @@ auto availableSources = m_model->property("availableSources").value(); if (availableSources) availablePagesView->setProjectSourcesModel(availableSources->property("sourceListModel").value()); + + auto availableTemplateProjects = m_model->property("availableTemplateProjects").value(); + if (availableTemplateProjects) + availablePagesView->setProjectListsModel(availableTemplateProjects->property("projectListModel").value()); } ApplicationComponents *self = const_cast(this); diff --git a/src/widgets/availablepagesview.h b/src/widgets/availablepagesview.h --- a/src/widgets/availablepagesview.h +++ b/src/widgets/availablepagesview.h @@ -35,6 +35,10 @@ #include "domain/datasource.h" #include "messageboxinterface.h" +#include "domain/project.h" +#include "domain/projectqueries.h" +#include "domain/projectrepository.h" + class QAbstractItemModel; class QModelIndex; class QTreeView; @@ -42,6 +46,7 @@ namespace Widgets { class NewProjectDialogInterface; +class NewTemplateDialogInterface; class QuickSelectDialogInterface; class AvailablePagesView : public QWidget @@ -49,7 +54,9 @@ Q_OBJECT public: typedef QSharedPointer NewProjectDialogPtr; + typedef QSharedPointer NewTemplateDialogPtr; typedef std::function ProjectDialogFactory; + typedef std::function TemplateDialogFactory; typedef QSharedPointer QuickSelectDialogPtr; typedef std::function QuickSelectDialogFactory; @@ -62,6 +69,9 @@ Domain::DataSource::Ptr defaultProjectSource() const; ProjectDialogFactory projectDialogFactory() const; QuickSelectDialogFactory quickSelectDialogFactory() const; + QAbstractItemModel *projectListsModel() const; + Domain::Project::Ptr defaultProjectList() const; + public slots: void setModel(QObject *model); @@ -71,6 +81,10 @@ void setQuickSelectDialogFactory(const QuickSelectDialogFactory &factory); void setMessageBoxInterface(const MessageBoxInterface::Ptr &interface); + void setProjectListsModel(QAbstractItemModel *lists); + //void setDefaultProjectList(const Domain::ProjectQueries::Ptr &list); + void setDefaultProjectList(const Domain::Project::Ptr &list); + signals: void currentPageChanged(QObject *page); @@ -84,9 +98,10 @@ void onGoNextTriggered(); void onGoToTriggered(); void onInitTimeout(); - + void onAddTemplateTriggered(); private: QAction *m_addProjectAction; + QAction *m_addTemplateAction; QAction *m_addContextAction; QAction *m_addTagAction; QAction *m_removeAction; @@ -95,8 +110,15 @@ QObject *m_model; QAbstractItemModel *m_sources; Domain::DataSource::Ptr m_defaultSource; + + QAbstractItemModel *m_projects; + Domain::Project::Ptr m_defaultProject; + Domain::ProjectQueries::Ptr m_projectQueries; + Domain::ProjectRepository::Ptr m_projectRepository; + QTreeView *m_pagesView; ProjectDialogFactory m_projectDialogFactory; + TemplateDialogFactory m_templateDialogFactory; QuickSelectDialogFactory m_quickSelectDialogFactory; MessageBoxInterface::Ptr m_messageBoxInterface; }; diff --git a/src/widgets/availablepagesview.cpp b/src/widgets/availablepagesview.cpp --- a/src/widgets/availablepagesview.cpp +++ b/src/widgets/availablepagesview.cpp @@ -31,12 +31,16 @@ #include #include #include +#include #include "presentation/metatypes.h" +#include "presentation/querytreemodel.h" #include "presentation/querytreemodelbase.h" +#include "presentation/templatepagemodel.h" #include "widgets/messagebox.h" #include "widgets/newprojectdialog.h" +#include "widgets/newtemplatedialog.h" #include "widgets/quickselectdialog.h" #include "domain/project.h" @@ -49,11 +53,14 @@ AvailablePagesView::AvailablePagesView(QWidget *parent) : QWidget(parent), m_addProjectAction(new QAction(this)), + m_addTemplateAction(new QAction(this)), m_addContextAction(new QAction(this)), m_addTagAction(new QAction(this)), m_removeAction(new QAction(this)), m_model(Q_NULLPTR), m_sources(Q_NULLPTR), + m_projects(Q_NULLPTR), + m_pagesView(new QTreeView(this)) { m_pagesView->setObjectName("pagesView"); @@ -70,6 +77,12 @@ connect(m_addProjectAction, SIGNAL(triggered()), this, SLOT(onAddProjectTriggered())); actionBar->addAction(m_addProjectAction); + m_addTemplateAction->setObjectName("addTemplateAction"); + m_addTemplateAction->setText(tr("New template")); + m_addTemplateAction->setIcon(QIcon::fromTheme("action-albumfolder-importdir2")); + connect(m_addTemplateAction, SIGNAL(triggered()), this, SLOT(onAddTemplateTriggered())); + actionBar->addAction(m_addTemplateAction); + m_addContextAction->setObjectName("addContextAction"); m_addContextAction->setText(tr("New context")); m_addContextAction->setIcon(QIcon::fromTheme("view-pim-notes")); @@ -100,6 +113,10 @@ m_projectDialogFactory = [] (QWidget *parent) { return NewProjectDialogPtr(new NewProjectDialog(parent)); }; + + m_templateDialogFactory = [] (QWidget *parent) { + return NewTemplateDialogPtr(new NewTemplateDialog(parent)); + }; m_quickSelectDialogFactory = [] (QWidget *parent) { return QuickSelectDialogPtr(new QuickSelectDialog(parent)); }; @@ -126,6 +143,7 @@ connect(goToAction, SIGNAL(triggered(bool)), this, SLOT(onGoToTriggered())); m_actions.insert("pages_project_add", m_addProjectAction); + m_actions.insert("pages_template_add", m_addTemplateAction); m_actions.insert("pages_context_add", m_addContextAction); m_actions.insert("pages_tag_add", m_addTagAction); m_actions.insert("pages_remove", m_removeAction); @@ -154,6 +172,16 @@ return m_defaultSource; } +QAbstractItemModel *AvailablePagesView::projectListsModel() const +{ + return m_projects; +} + +Domain::Project::Ptr AvailablePagesView::defaultProjectList() const +{ + return m_defaultProject; +} + AvailablePagesView::ProjectDialogFactory AvailablePagesView::projectDialogFactory() const { return m_projectDialogFactory; @@ -221,6 +249,16 @@ m_messageBoxInterface = interface; } +void AvailablePagesView::setProjectListsModel(QAbstractItemModel *lists) +{ + m_projects = lists; +} + +void AvailablePagesView::setDefaultProjectList(const Domain::Project::Ptr &list) +{ + m_defaultProject = list; +} + void AvailablePagesView::onCurrentChanged(const QModelIndex ¤t) { QObject *page = Q_NULLPTR; @@ -248,6 +286,20 @@ } } +void AvailablePagesView::onAddTemplateTriggered(){ + NewTemplateDialogInterface::Ptr dialog = m_templateDialogFactory(this); + //m_projects = projectListsModel(); + //m_projects = TemplatePageModel::createCentralListModel(); + dialog->setProjectListsModel(m_projects); + dialog->exec(); + /* if (dialog->exec() == QDialog::Accepted) { + m_defaultSource = dialog->dataSource(); + QMetaObject::invokeMethod(m_model, "addTemplate", + Q_ARG(QString, dialog->name()), + Q_ARG(Domain::DataSource::Ptr, dialog->dataSource())); + } */ +} + void AvailablePagesView::onAddContextTriggered() { const QString name = m_messageBoxInterface->askTextInput(this, tr("Add Context"), tr("Context name")); @@ -344,3 +396,4 @@ m_pagesView->expandAll(); } } + diff --git a/src/widgets/newtemplatedialog.h b/src/widgets/newtemplatedialog.h new file mode 100644 --- /dev/null +++ b/src/widgets/newtemplatedialog.h @@ -0,0 +1,70 @@ +/* This file is part of Zanshin + + Copyright 2014 Kevin Ottens + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License or (at your option) version 3 or any later version + accepted by the membership of KDE e.V. (or its successor approved + by the membership of KDE e.V.), which shall act as a proxy + defined in Section 14 of version 3 of the license. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + + +#ifndef WIDGETS_NEWTEMPLATEDIALOG_H +#define WIDGETS_NEWTEMPLATEDIALOG_H + +#include + +#include "widgets/newtemplatedialoginterface.h" + +class QModelIndex; + +namespace Ui { + class NewTemplateDialog; +} + +namespace Widgets { + +class NewTemplateDialog : public QDialog, public NewTemplateDialogInterface +{ + Q_OBJECT +public: + explicit NewTemplateDialog(QWidget *parent = Q_NULLPTR); + ~NewTemplateDialog(); + + int exec() Q_DECL_OVERRIDE; + + void accept() Q_DECL_OVERRIDE; + + QString name() const Q_DECL_OVERRIDE; + + void setProjectListsModel(QAbstractItemModel *model1) Q_DECL_OVERRIDE; + Domain::Project::Ptr projectLists() const Q_DECL_OVERRIDE; + +private slots: + void onNameTextChanged(const QString &text); + +private: + void applyDefaultProject(const QModelIndex &root); + + Ui::NewTemplateDialog *ui; + QString m_name; + Domain::Project::Ptr m_project; + +}; + +} + +#endif // WIDGETS_NEWTEMPLATEDIALOG_H diff --git a/src/widgets/newtemplatedialog.cpp b/src/widgets/newtemplatedialog.cpp new file mode 100644 --- /dev/null +++ b/src/widgets/newtemplatedialog.cpp @@ -0,0 +1,93 @@ +/* This file is part of Zanshin + + Copyright 2014 Kevin Ottens + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License or (at your option) version 3 or any later version + accepted by the membership of KDE e.V. (or its successor approved + by the membership of KDE e.V.), which shall act as a proxy + defined in Section 14 of version 3 of the license. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + +#include "newtemplatedialog.h" +#include "ui_newtemplatedialog.h" +#include +#include +#include +#include +#include "presentation/querytreemodelbase.h" + +using namespace Widgets; + +NewTemplateDialog::NewTemplateDialog(QWidget *parent) + : QDialog(parent), + ui(new Ui::NewTemplateDialog) +{ + ui->setupUi(this); + + QObject::connect(ui->nameEdit, SIGNAL(textChanged(QString)), this, SLOT(onNameTextChanged(QString))); + onNameTextChanged(m_name); + +} + +NewTemplateDialog::~NewTemplateDialog() +{ + delete ui; +} + +int NewTemplateDialog::exec() +{ + return QDialog::exec(); +} + +void NewTemplateDialog::accept() +{ + m_name = ui->nameEdit->text(); + + QDialog::accept(); +} + +QString NewTemplateDialog::name() const +{ + return m_name; +} + +void NewTemplateDialog::onNameTextChanged(const QString &text) +{ + auto buttonOk = ui->buttonBox->button(QDialogButtonBox::Ok); + buttonOk->setEnabled(!text.isEmpty()); +} + +Domain::Project::Ptr NewTemplateDialog::projectLists() const +{ + return m_project; +} + +void NewTemplateDialog::setProjectListsModel(QAbstractItemModel *model) +{ + /*model->setHeaderData(0, Qt::Horizontal, QObject::tr("test header")); + QStandardItem *item = new QStandardItem(QString(m_project->name())); + model->setItem(0, 0, item); + model->setItem(1, 0, item); + model->setItem(2, 0, item);*/ + + ui->projectListView->setModel(model); + + /*auto query = m_projectQueries->findAll(); + ui->projectListView->setModelColumn(1);*/ + +} + + diff --git a/src/widgets/newtemplatedialog.ui b/src/widgets/newtemplatedialog.ui new file mode 100644 --- /dev/null +++ b/src/widgets/newtemplatedialog.ui @@ -0,0 +1,98 @@ + + + NewTemplateDialog + + + + 0 + 0 + 400 + 300 + + + + Add a project + + + + QLayout::SetFixedSize + + + + + + + Name + + + + + + + + 200 + 0 + + + + + + + + Project + + + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + NewTemplateDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + NewTemplateDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/src/widgets/newtemplatedialoginterface.h b/src/widgets/newtemplatedialoginterface.h new file mode 100644 --- /dev/null +++ b/src/widgets/newtemplatedialoginterface.h @@ -0,0 +1,53 @@ +/* This file is part of Zanshin + + Copyright 2014 Kevin Ottens + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License or (at your option) version 3 or any later version + accepted by the membership of KDE e.V. (or its successor approved + by the membership of KDE e.V.), which shall act as a proxy + defined in Section 14 of version 3 of the license. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + + +#ifndef WIDGETS_NEWTEMPLATEDIALOGINTERFACE_H +#define WIDGETS_NEWTEMPLATEDIALOGINTERFACE_H + +#include + +#include "domain/project.h" + +class QAbstractItemModel; + +namespace Widgets { + +class NewTemplateDialogInterface +{ +public: + typedef QSharedPointer Ptr; + + virtual ~NewTemplateDialogInterface(); + + virtual int exec() = 0; + + virtual QString name() const = 0; + + virtual void setProjectListsModel(QAbstractItemModel *model) = 0; + virtual Domain::Project::Ptr projectLists() const = 0; +}; + +} + +#endif // WIDGETS_NEWTEMPLATEDIALOGINTERFACE_H diff --git a/src/widgets/newtemplatedialoginterface.cpp b/src/widgets/newtemplatedialoginterface.cpp new file mode 100644 --- /dev/null +++ b/src/widgets/newtemplatedialoginterface.cpp @@ -0,0 +1,31 @@ +/* This file is part of Zanshin + + Copyright 2014 Kevin Ottens + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License or (at your option) version 3 or any later version + accepted by the membership of KDE e.V. (or its successor approved + by the membership of KDE e.V.), which shall act as a proxy + defined in Section 14 of version 3 of the license. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + + +#include "newtemplatedialoginterface.h" + +using namespace Widgets; + +NewTemplateDialogInterface::~NewTemplateDialogInterface() +{ +} diff --git a/src/zanshin/app/dependencies.cpp b/src/zanshin/app/dependencies.cpp --- a/src/zanshin/app/dependencies.cpp +++ b/src/zanshin/app/dependencies.cpp @@ -40,6 +40,7 @@ #include "presentation/artifacteditormodel.h" #include "presentation/availablesourcesmodel.h" #include "presentation/availabletaskpagesmodel.h" +#include "presentation/templatepagemodel.h" #include "utils/dependencymanager.h" @@ -117,4 +118,11 @@ deps.add(); + + deps.add(); }