refs #288, some GUI elements

* tick label, shows OK/failure
* serverlist selector, select 1 of servers
* used tick label in selcal selector
* fixed include in transponder mode selector
This commit is contained in:
Klaus Basan
2014-11-10 20:31:03 +01:00
committed by Roland Winklmeier
parent 0098fd3d58
commit 89806e69ce
7 changed files with 231 additions and 13 deletions

61
src/blackgui/ticklabel.h Normal file
View File

@@ -0,0 +1,61 @@
/* 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 TICKLABEL_H
#define TICKLABEL_H
#include "blackmisc/icons.h"
#include <QLabel>
#include <QPixmap>
namespace BlackGui
{
//! Representing a ticked or crossed icon
class CTickLabel : public QLabel
{
Q_OBJECT
public:
//! Constructor
explicit CTickLabel(QWidget *parent = nullptr);
//! Set ticked
void setTicked(bool ticked);
//! Set the tool tips
void setToolTips(const QString &ticked, const QString &unticked);
//! Ticked pixmap
void setPixmapTicked(const QPixmap &pixmap);
//! Unticked pixmap
void setPixmapUnticked(const QPixmap &pixmap);
signals:
//! Changed ticked state
void tickChanged(bool ticked);
private:
bool m_isPixmapTicked = false; //!< ticked state
QString m_toolTipTicked = "on";
QString m_toolTipUnticked = "off";
QPixmap m_pixmapTicked = BlackMisc::CIcons::tick16();
QPixmap m_pixmapUnticked = BlackMisc::CIcons::cross16();
//! Set the label according to \sa
void setLabel();
};
} // namespace
#endif // guard