summaryrefslogtreecommitdiffstats
path: root/kplato/kptsummarytaskgeneralpanel.cc
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2021-05-23 20:48:35 +0900
committerMichele Calgaro <[email protected]>2021-05-29 15:16:28 +0900
commit8b78a8791bc539bcffe7159f9d9714d577cb3d7d (patch)
tree1328291f966f19a22d7b13657d3f01a588eb1083 /kplato/kptsummarytaskgeneralpanel.cc
parent95834e2bdc5e01ae1bd21ac0dfa4fa1d2417fae9 (diff)
downloadkoffice-8b78a8791bc539bcffe7159f9d9714d577cb3d7d.tar.gz
koffice-8b78a8791bc539bcffe7159f9d9714d577cb3d7d.zip
Renaming of files in preparation for code style tools.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'kplato/kptsummarytaskgeneralpanel.cc')
-rw-r--r--kplato/kptsummarytaskgeneralpanel.cc126
1 files changed, 0 insertions, 126 deletions
diff --git a/kplato/kptsummarytaskgeneralpanel.cc b/kplato/kptsummarytaskgeneralpanel.cc
deleted file mode 100644
index 8fff1821..00000000
--- a/kplato/kptsummarytaskgeneralpanel.cc
+++ /dev/null
@@ -1,126 +0,0 @@
-/* This file is part of the KDE project
- Copyright (C) 2004 - 2006 Dag Andersen <[email protected]>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation;
- version 2 of the License.
-
- This library 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
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
-*/
-
-#include "kptsummarytaskgeneralpanel.h"
-#include "kptsummarytaskdialog.h"
-#include "kpttask.h"
-#include "kptcommand.h"
-#include "kptconfig.h"
-#include "kptpart.h"
-
-#include <tdemessagebox.h>
-#include <klineedit.h>
-#include <ktextedit.h>
-#include <kcombobox.h>
-#include <kdatetimewidget.h>
-#include <tdelocale.h>
-#include <kcommand.h>
-#include <tdeabc/addressee.h>
-#include <tdeabc/addresseedialog.h>
-
-#include <tqpushbutton.h>
-#include <tqlayout.h>
-#include <tqlabel.h>
-#include <tqdatetime.h>
-#include <tqdatetimeedit.h>
-#include <tqgroupbox.h>
-#include <kdebug.h>
-
-namespace KPlato
-{
-
-SummaryTaskGeneralPanel::SummaryTaskGeneralPanel(Task &task, TQWidget *p, const char *n)
- : SummaryTaskGeneralPanelBase(p, n),
- m_task(task)
-{
- setStartValues(task);
-
- connect(namefield, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotObligatedFieldsFilled()));
- connect(leaderfield, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotObligatedFieldsFilled()));
- connect(idfield, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotObligatedFieldsFilled()));
- connect(descriptionfield, TQT_SIGNAL(textChanged()), TQT_SLOT(slotObligatedFieldsFilled()));
-
- connect(chooseLeader, TQT_SIGNAL(clicked()), TQT_SLOT(slotChooseResponsible()));
-
-}
-
-void SummaryTaskGeneralPanel::setStartValues(Task &task) {
- namefield->setText(task.name());
- leaderfield->setText(task.leader());
- descriptionfield->setText(task.description());
- idfield->setText(task.id());
- wbsfield->setText(task.wbs());
-
- namefield->setFocus();
-
-}
-
-void SummaryTaskGeneralPanel::slotObligatedFieldsFilled() {
- emit obligatedFieldsFilled(!namefield->text().isEmpty() && !idfield->text().isEmpty());
-}
-
-KMacroCommand *SummaryTaskGeneralPanel::buildCommand(Part *part) {
- KMacroCommand *cmd = new KMacroCommand(i18n("Modify Task"));
- bool modified = false;
-
- if (!namefield->isHidden() && m_task.name() != namefield->text()) {
- cmd->addCommand(new NodeModifyNameCmd(part, m_task, namefield->text()));
- modified = true;
- }
- if (!leaderfield->isHidden() && m_task.leader() != leaderfield->text()) {
- cmd->addCommand(new NodeModifyLeaderCmd(part, m_task, leaderfield->text()));
- modified = true;
- }
- if (!descriptionfield->isHidden() &&
- m_task.description() != descriptionfield->text()) {
- cmd->addCommand(new NodeModifyDescriptionCmd(part, m_task, descriptionfield->text()));
- modified = true;
- }
- if (!idfield->isHidden() && idfield->text() != m_task.id()) {
- cmd->addCommand(new NodeModifyIdCmd(part, m_task, idfield->text()));
- modified = true;
- }
- if (!modified) {
- delete cmd;
- return 0;
- }
- return cmd;
-}
-
-bool SummaryTaskGeneralPanel::ok() {
- if (idfield->text() != m_task.id() && m_task.findNode(idfield->text())) {
- KMessageBox::sorry(this, i18n("Task id must be unique"));
- idfield->setFocus();
- return false;
- }
- return true;
-}
-
-void SummaryTaskGeneralPanel::slotChooseResponsible() {
- TDEABC::Addressee a = TDEABC::AddresseeDialog::getAddressee(this);
- if (!a.isEmpty()) {
- leaderfield->setText(a.fullEmail());
- leaderfield->setFocus();
- }
-}
-
-
-} //KPlato namespace
-
-#include "kptsummarytaskgeneralpanel.moc"