Formatting, new icons, minor tweaks

This commit is contained in:
Klaus Basan
2014-09-23 00:36:13 +02:00
parent be0d1e8153
commit ef5f5bde0f
23 changed files with 120 additions and 53 deletions

View File

@@ -7,8 +7,8 @@
* contained in the LICENSE file.
*/
#ifndef BLACKMISC_VOICEALLCLASSES_H
#define BLACKMISC_VOICEALLCLASSES_H
#ifndef BLACKMISC_AUDIOALLCLASSES_H
#define BLACKMISC_AUDIOALLCLASSES_H
#include "blackmisc/audiodevice.h"
#include "blackmisc/audiodevicelist.h"

View File

@@ -102,6 +102,8 @@ namespace BlackMisc
CIcon(CIcons::StandardIconRadar16, "radar"),
CIcon(CIcons::StandardIconRefresh16, "refresh"),
CIcon(CIcons::StandardIconResize16, "resize"),
CIcon(CIcons::StandardIconResizeHorizontal16, "resize (horizontal)"),
CIcon(CIcons::StandardIconResizeVertical16, "resize (vertical)"),
CIcon(CIcons::StandardIconStatusBar16, "status bar"),
CIcon(CIcons::StandardIconSwift24, "swift"),
CIcon(CIcons::StandardIconSwift48, "swift"),
@@ -117,6 +119,8 @@ namespace BlackMisc
CIcon(CIcons::StandardIconUnknown16, "unknwon"),
CIcon(CIcons::StandardIconUser16, "user"),
CIcon(CIcons::StandardIconUsers16, "users"),
CIcon(CIcons::StandardIconViewMulticolumn, "view multicolumn"),
CIcon(CIcons::StandardIconViewTile, "view tile"),
CIcon(CIcons::StandardIconVolumeHigh16, "volume hight"),
CIcon(CIcons::StandardIconVolumeLow16, "volume low"),
CIcon(CIcons::StandardIconVolumeMuted16, "muted"),

View File

@@ -95,6 +95,8 @@ namespace BlackMisc
case StandardIconRadar16: return radar16();
case StandardIconRefresh16: return refresh16();
case StandardIconResize16: return resize16();
case StandardIconResizeHorizontal16: return resizeHorizontal16();
case StandardIconResizeVertical16: return resizeVertical16();
case StandardIconStatusBar16: return statusBar16();
case StandardIconSwift24: return swift24();
case StandardIconSwift48: return swift48();
@@ -110,6 +112,8 @@ namespace BlackMisc
case StandardIconUnknown16: return unknown16();
case StandardIconUser16: return user16();
case StandardIconUsers16: return users16();
case StandardIconViewMulticolumn: return viewMultiColumn();
case StandardIconViewTile: return viewTile();
case StandardIconVolumeHigh16: return volumeHigh16();
case StandardIconVolumeLow16: return volumeLow16();
case StandardIconVolumeMuted16: return volumeMuted16();

View File

@@ -95,6 +95,8 @@ namespace BlackMisc
StandardIconRadar16,
StandardIconRefresh16,
StandardIconResize16,
StandardIconResizeHorizontal16,
StandardIconResizeVertical16,
StandardIconStatusBar16,
StandardIconSwift24,
StandardIconSwift48,
@@ -110,6 +112,8 @@ namespace BlackMisc
StandardIconUnknown16,
StandardIconUser16,
StandardIconUsers16,
StandardIconViewMulticolumn,
StandardIconViewTile,
StandardIconVolumeHigh16,
StandardIconVolumeLow16,
StandardIconVolumeMuted16,
@@ -157,7 +161,21 @@ namespace BlackMisc
return pm;
}
//! Resize
//! Resize horizontally
static const QPixmap &resizeHorizontal16()
{
static const QPixmap pm(":/diagona/icons/diagona/icons/arrow-resize.png");
return pm;
}
//! Resize vertically
static const QPixmap &resizeVertical16()
{
static const QPixmap pm(":/diagona/icons/diagona/icons/arrow-resize-090.png");
return pm;
}
//! Refresh
static const QPixmap &refresh16()
{
static const QPixmap pm(":/pastel/icons/pastel/16/arrow-refresh.png");
@@ -199,6 +217,20 @@ namespace BlackMisc
return pm;
}
//! View multicolumn
static const QPixmap &viewMultiColumn()
{
static const QPixmap pm(":/pastel/icons/pastel/16/application-view-multicolumns.png");
return pm;
}
//! View tile
static const QPixmap &viewTile()
{
static const QPixmap pm(":/pastel/icons/pastel/16/application-view-tile.png");
return pm;
}
//! Tick
static const QPixmap &tick16()
{

View File

@@ -24,6 +24,16 @@ namespace BlackMisc
class CNameVariantPair : public BlackMisc::CValueObject
{
public:
//! Properties by index
enum ColumnIndex
{
IndexName = BlackMisc::CPropertyIndex::GlobalIndexCNameVariantPair,
IndexVariant,
IndexIcon,
IndexPixmap
};
//! Default constructor.
CNameVariantPair() {}
@@ -69,15 +79,6 @@ namespace BlackMisc
//! Members
static const QStringList &jsonMembers();
//! Properties by index
enum ColumnIndex
{
IndexName = BlackMisc::CPropertyIndex::GlobalIndexCNameVariantPair,
IndexVariant,
IndexIcon,
IndexPixmap
};
//! \copydoc CValueObject::propertyByIndex()
virtual QVariant propertyByIndex(const BlackMisc::CPropertyIndex &index) const override;

View File

@@ -1,7 +1,11 @@
/* Copyright (C) 2013 VATSIM Community / authors
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* 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.
*/
#include "nwserverlist.h"

View File

@@ -1,11 +1,13 @@
/* Copyright (C) 2013 VATSIM Community / authors
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* 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
*/
//! \file
#ifndef BLACKMISC_SERVERLIST_H
#define BLACKMISC_SERVERLIST_H
@@ -13,9 +15,6 @@
#include "nwserver.h"
#include "collection.h"
#include "sequence.h"
#include <QObject>
#include <QString>
#include <QList>
namespace BlackMisc
{

View File

@@ -355,6 +355,7 @@ namespace BlackMisc
* \param key1 A pointer to a member function of T.
* \param value1 Will be compared to the return value of key1.
* \param newValues Values from this map will be put into each matching element.
* \param skipEqualValues Equal values will not be updated
* \return The number of elements modified.
*/
template <class K1, class V1>

View File

@@ -105,7 +105,7 @@ namespace BlackMisc
/*
* Variant equal property index?
*/
bool CValueObject::equalPropertyByIndex(const QVariant &compareValue, const CPropertyIndex &index) const
bool CValueObject::equalsPropertyByIndex(const QVariant &compareValue, const CPropertyIndex &index) const
{
const QVariant myValue = this->propertyByIndex(index);
return BlackMisc::equalQVariants(myValue, compareValue);
@@ -149,7 +149,7 @@ namespace BlackMisc
}
/*
* Variant map
* apply, return changed indexes
*/
CPropertyIndexList CValueObject::apply(const BlackMisc::CPropertyIndexVariantMap &indexMap, bool skipEqualValues)
{
@@ -163,7 +163,7 @@ namespace BlackMisc
const CPropertyIndex index = it.key();
if (skipEqualValues)
{
bool equal = this->equalPropertyByIndex(value, index);
bool equal = this->equalsPropertyByIndex(value, index);
if (equal) { continue; }
}
this->setPropertyByIndex(value, index);

View File

@@ -211,11 +211,9 @@ namespace BlackMisc
virtual QPixmap toPixmap() const;
//! Set property by index
//! \remarks Intentionally not abstract, avoiding all classes need to implement this method
virtual void setPropertyByIndex(const QVariant &variant, const CPropertyIndex &index);
//! Property by index
//! \remarks Intentionally not abstract, avoiding all classes need to implement this method
virtual QVariant propertyByIndex(const BlackMisc::CPropertyIndex &index) const;
//! Property by index as String
@@ -223,7 +221,7 @@ namespace BlackMisc
virtual QString propertyByIndexAsString(const CPropertyIndex &index, bool i18n = false) const;
//! Is given variant equal to value of property index?
virtual bool equalPropertyByIndex(const QVariant &compareValue, const CPropertyIndex &index) const;
virtual bool equalsPropertyByIndex(const QVariant &compareValue, const CPropertyIndex &index) const;
//! The stored object as CValueObject
static const CValueObject *fromQVariant(const QVariant &variant);