File indexing completed on 2024-04-28 08:33:10
0001 /*************************************************************************** 0002 * Copyright (C) 2018 by Emmanuel Lepage Vallee * 0003 * Author : Emmanuel Lepage Vallee <emmanuel.lepage@kde.org> * 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 3 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, see <http://www.gnu.org/licenses/>. * 0017 **************************************************************************/ 0018 #include "delegatechooser.h" 0019 0020 using Modes = DelegateChooser::Modes; 0021 0022 class DelegateChooserPrivate 0023 { 0024 public: 0025 Modes m_Mode {Modes::Undefined}; 0026 QQmlListProperty<DelegateChoice> m_Choices; 0027 QString m_Role; 0028 }; 0029 0030 Modes DelegateChooser::mode() const 0031 { 0032 return d_ptr->m_Mode; 0033 } 0034 0035 void DelegateChooser::setMode(Modes m) 0036 { 0037 d_ptr->m_Mode = m; 0038 } 0039 0040 QQmlListProperty<DelegateChoice> DelegateChooser::choices() 0041 { 0042 return d_ptr->m_Choices; 0043 } 0044 0045 bool DelegateChooser::evaluateIndex(const QModelIndex& idx) 0046 { 0047 return false; 0048 } 0049 0050 bool DelegateChooser::evaluateRow(int row, const QModelIndex& parent) 0051 { 0052 return false; 0053 } 0054 0055 bool DelegateChooser::evaluateColumn(int row, const QModelIndex& parent) 0056 { 0057 return false; 0058 } 0059 0060 QString DelegateChooser::role() const 0061 { 0062 return d_ptr->m_Role; 0063 } 0064 0065 void DelegateChooser::setRole(const QString &role) 0066 { 0067 d_ptr->m_Role = role; 0068 }