Files
pilotclient/src/blackgui/views/namevariantpairview.h
Klaus Basan 2c91b3ada0 refs #452 models and views created
* for new value objects (e.g. distributor, ...)
* new modes are required (e.g. CStatusMessageListModel::Simplified)
* model filter allowing to filter models
2015-11-19 20:59:40 +00:00

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