Warning, file /office/skrooge/skgbasegui/skgprogressbar.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /***************************************************************************
0002  * SPDX-FileCopyrightText: 2022 S. MANKOWSKI stephane@mankowski.fr
0003  * SPDX-FileCopyrightText: 2022 G. DE BURE support@mankowski.fr
0004  * SPDX-License-Identifier: GPL-3.0-or-later
0005  ***************************************************************************/
0006 #ifndef SKGPROGRESSBAR_H
0007 #define SKGPROGRESSBAR_H
0008 /** @file
0009  * A progress bar with colors
0010  *
0011  * @author Stephane MANKOWSKI / Guillaume DE BURE
0012  */
0013 #include "skgbasegui_export.h"
0014 #include <qprogressbar.h>
0015 
0016 /**
0017  * A progress bar with colors
0018  */
0019 class SKGBASEGUI_EXPORT SKGProgressBar : public QProgressBar
0020 {
0021     Q_OBJECT
0022 
0023     /**
0024      * Property value
0025      */
0026     Q_PROPERTY(int value READ value WRITE setValue)  // clazy:exclude=qproperty-without-notify
0027 
0028 public:
0029     /**
0030      * Constructor
0031      * @param iParent the parent
0032      */
0033     explicit SKGProgressBar(QWidget* iParent);
0034 
0035     /**
0036      * Destructor
0037      */
0038     ~SKGProgressBar() override;
0039 
0040     /**
0041      * Set the limits
0042      * @param negative if the value @see setValue is less than @param negative the color will be negative
0043      * @param neutral if the value @see setValue is less than @param neutral the color will be neutral
0044      * @param positive if the value @see setValue is less than @param positive the color will be positive
0045      */
0046     virtual void setLimits(int negative, int neutral, int positive);
0047 
0048     /**
0049      * Set the value
0050      * @param iValue the value
0051      */
0052     virtual void setValue(int iValue);
0053 
0054 
0055 private:
0056     int m_negative;
0057     int m_neutral;
0058     int m_positive;
0059     QString m_negativeStyleSheet;
0060     QString m_neutralStyleSheet;
0061     QString m_positiveStyleSheet;
0062 };
0063 
0064 #endif