File indexing completed on 2024-05-12 05:44:24
0001 /*************************************************************************** 0002 * Copyright (C) 2005-2009 by Rajko Albrecht ral@alwins-world.de * 0003 * https://kde.org/applications/development/org.kde.kdesvn * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify * 0006 * it under the terms of the GNU General Public License as published by * 0007 * the Free Software Foundation; either version 2 of the License, or * 0008 * (at your option) any later version. * 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, write to the * 0017 * Free Software Foundation, Inc., * 0018 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 0019 ***************************************************************************/ 0020 #ifndef PROPERTYITEM_H 0021 #define PROPERTYITEM_H 0022 0023 #include <QTreeWidgetItem> 0024 0025 class PropertyListViewItem final : public QTreeWidgetItem 0026 { 0027 public: 0028 static const int _RTTI_ = QTreeWidgetItem::UserType + 2; 0029 explicit PropertyListViewItem(QTreeWidget *parent, const QString &aStartName = QString(), const QString &aStartValue = QString()); 0030 0031 const QString &startName() const 0032 { 0033 return m_startName; 0034 } 0035 const QString &startValue() const 0036 { 0037 return m_startValue; 0038 } 0039 const QString ¤tName() const 0040 { 0041 return m_currentName; 0042 } 0043 const QString ¤tValue() const 0044 { 0045 return m_currentValue; 0046 } 0047 0048 void setName(const QString &name); 0049 void setValue(const QString &value); 0050 0051 void checkName() 0052 { 0053 setName(text(0)); 0054 } 0055 void checkValue() 0056 { 0057 setValue(text(1)); 0058 } 0059 0060 void deleteIt(); 0061 void unDeleteIt(); 0062 bool deleted() const 0063 { 0064 return m_deleted; 0065 } 0066 0067 bool different() const; 0068 0069 //! Check if a specific property may just internale 0070 /*! 0071 * That means, a property of that may not edit,added or deleted. 0072 * 0073 * This moment it just checks for "svn:special" 0074 * \return true if protected property otherwise false 0075 */ 0076 static bool protected_Property(const QString &what); 0077 0078 private: 0079 QString m_currentName, m_startName, m_currentValue, m_startValue; 0080 bool m_deleted; 0081 }; 0082 0083 #endif