mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +08:00
* for new value objects (e.g. distributor, ...) * new modes are required (e.g. CStatusMessageListModel::Simplified) * model filter allowing to filter models
47 lines
1.5 KiB
C++
47 lines
1.5 KiB
C++
/* Copyright (C) 2013
|
|
* swift project Community / Contributors
|
|
*
|
|
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
|
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
|
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
|
* contained in the LICENSE file.
|
|
*/
|
|
|
|
//! \file
|
|
|
|
#ifndef BLACKGUI_NAMEVARIANTPAIRVIEW_H
|
|
#define BLACKGUI_NAMEVARIANTPAIRVIEW_H
|
|
|
|
#include "blackgui/blackguiexport.h"
|
|
#include "viewbase.h"
|
|
#include "../models/namevariantpairlistmodel.h"
|
|
|
|
namespace BlackGui
|
|
{
|
|
namespace Views
|
|
{
|
|
//! User view
|
|
class BLACKGUI_EXPORT CNameVariantPairView : public CViewBase<Models::CNameVariantPairModel, BlackMisc::CNameVariantPairList, BlackMisc::CNameVariantPair>
|
|
{
|
|
|
|
public:
|
|
//! Constructor
|
|
explicit CNameVariantPairView(QWidget *parent = nullptr);
|
|
|
|
//! Icon mode
|
|
void setIconMode(bool withIcon);
|
|
|
|
//! Update or add value, QVariant version
|
|
bool addOrUpdateByName(const QString &name, const BlackMisc::CVariant &value, const BlackMisc::CIcon &icon = BlackMisc::CIcon(), bool isResizeConditionMet = true, bool skipEqualValues = true);
|
|
|
|
//! Remove by name
|
|
void removeByName(const QString &name, bool isResizeConditionMet = true);
|
|
|
|
//! Contains name
|
|
bool containsName(const QString &name);
|
|
|
|
};
|
|
}
|
|
}
|
|
#endif // guard
|