File: ColorParameters.h

package info (click to toggle)
clustalx 2.1%2Blgpl-8
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,320 kB
  • sloc: cpp: 40,050; sh: 163; xml: 102; makefile: 16
file content (44 lines) | stat: -rw-r--r-- 1,588 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef COLORPARAMETERS_H
#define COLORPARAMETERS_H

#include <string>
#include <vector>
#include <map>

#include <QString>
#include <QChar>
#include <QColor>
#include "HardCodedColorScheme.h"

class ColorParameters
{   
    public:
        ColorParameters();
        void addColor(QString colorName, int red, int green, int blue);
        void addConsensusCondition(QChar name, int cutOff, QString res);
        void addColorRule(QChar res, QString colorName, QString conditions);
        void clear();
        int getNumColors(){return colors.size();};
        void useHardCodedColors();
        void useDefaultColorRules();
        QColor getResidueColor(QChar res, QChar consensus);
        int getResidueColorNum(QChar res, QChar consensus);
        QColor getColorFromNum(int colorNum);
        QColor getDefaultColor(){return defaultColor;}
        int getNumConsensusParams();
        int getDefaultIndex(){return 0;}
        std::vector<consensusParams>* getConPar(){return &conPar;}
        std::vector<residueColors> getColorRules(){return colorPar;}
        void addAllRulesTogether(std::vector<residueColors> colPar);
        void addConsensusParams(std::vector<consensusParams> _conPar){conPar = _conPar;}
        void printColorInfo();
    private:
        int getIndexOfColor(QColor col);
        //std::map<QString, QColor> colors; // Stores the colors from @rgbindex OR hard coded!!
        std::vector<std::pair<QString, QColor> >colors;
        std::vector<residueColors> colorPar; 
        std::vector<consensusParams> conPar;
        QColor defaultColor;
};

#endif