File indexing completed on 2024-12-01 11:10:29
0001 /* 0002 SPDX-FileCopyrightText: 2021 Michail Vourlakos <mvourlakos@gmail.com> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #include "actionlistwidgetitem.h" 0007 0008 0009 namespace Latte { 0010 namespace Settings { 0011 namespace ActionsDialog { 0012 0013 ActionListWidgetItem::ActionListWidgetItem(const QIcon &icon, const QString &text, const int &order, const QString &id, QListWidget *parent, int type) 0014 : QListWidgetItem(icon, text, parent, type) 0015 { 0016 setData(IDROLE, id); 0017 setData(ORDERROLE, order); 0018 } 0019 0020 bool ActionListWidgetItem::operator<(const QListWidgetItem &other) const 0021 { 0022 int curorder = data(ORDERROLE).toInt(); 0023 int othorder = other.data(ORDERROLE).toInt(); 0024 0025 return (curorder < othorder); 0026 } 0027 0028 } 0029 } 0030 }