File indexing completed on 2024-04-21 05:50:20
0001 /* This file is part of the KDE project 0002 Copyright (C) 2000, 2010 David Faure <faure@kde.org> 0003 Copyright (C) 2002-2003 Alexander Kellett <lypanov@kde.org> 0004 0005 This program is free software; you can redistribute it and/or 0006 modify it under the terms of the GNU General Public License as 0007 published by the Free Software Foundation; either version 2 of 0008 the License, or (at your option) version 3. 0009 0010 This program is distributed in the hope that it will be useful, 0011 but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0013 GNU General Public License for more details. 0014 0015 You should have received a copy of the GNU General Public License 0016 along with this program. If not, see <http://www.gnu.org/licenses/> 0017 */ 0018 0019 #ifndef KBOOKMARKMODEL_COMMANDS_P_H 0020 #define KBOOKMARKMODEL_COMMANDS_P_H 0021 0022 // Used internally by the "sort" command 0023 class MoveCommand : public QUndoCommand, public IKEBCommand 0024 { 0025 public: 0026 MoveCommand(KBookmarkModel *model, const QString &from, const QString &to, const QString &name = QString(), QUndoCommand *parent = nullptr); 0027 QString finalAddress() const; 0028 ~MoveCommand() override 0029 { 0030 } 0031 void redo() override; 0032 void undo() override; 0033 QString affectedBookmarks() const override; 0034 0035 private: 0036 KBookmarkModel *m_model; 0037 QString m_from; 0038 QString m_to; 0039 CreateCommand *m_cc; 0040 DeleteCommand *m_dc; 0041 }; 0042 0043 #endif /* KBOOKMARKMODEL_COMMANDS_P_H */