| 1 | /*************************************************************************** |
| 2 | style.h |
| 3 | ------------------- |
| 4 | AHA-like style class |
| 5 | ------------------- |
| 6 | Copyright 1999-2008, David Johnson |
| 7 | All rights reserved. |
| 8 | |
| 9 | Redistribution and use in source and binary forms, with or without |
| 10 | modification, are permitted provided that the following conditions |
| 11 | are met: |
| 12 | |
| 13 | 1. Redistributions of source code must retain the above copyright |
| 14 | notice, this list of conditions and the following disclaimer. |
| 15 | |
| 16 | 2. Redistributions in binary form must reproduce the above copyright |
| 17 | notice, this list of conditions and the following disclaimer in the |
| 18 | documentation and/or other materials provided with the distribution. |
| 19 | |
| 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 21 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 24 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 25 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 26 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 27 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 28 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 30 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 31 | ***************************************************************************/ |
| 32 | |
| 33 | #ifndef STYLE_H |
| 34 | #define STYLE_Hcxx . . $ `src/style.h:34:9`! |
| 35 | |
| 36 | #include <QList> |
| 37 | #include <QMap> |
| 38 | #include <QString> |
| 39 | |
| 40 | class Stylecxx . . $ Style# { |
| 41 | public: |
| 42 | // default constructor |
| 43 | Stylecxx . . $ Style#Style(49f6e7a06ebc5aa8).(); |
| 44 | // constructor |
| 45 | Stylecxx . . $ Style#Style(1f541e414bac11ab).(const QStringcxx . . $ QString# name, const double &oglow, const double &oghi, |
| 46 | const double &fglow, const double &fghi, const int &ibulow, |
| 47 | const int &ibuhi, const int &srmlow, const int &srmhi); |
| 48 | // copy constructor |
| 49 | Stylecxx . . $ Style#Style(29d9cc28be3d2322).(const Stylecxx . . $ Style# &s); |
| 50 | // operators |
| 51 | Stylecxx . . $ Style# operatorcxx . . $ Style#`operator=`(73c14b8dd1039aa8).=(const Stylecxx . . $ Style# &s); |
| 52 | bool operatorcxx . . $ Style#`operator==`(1bb77a824eb57384).==(const Stylecxx . . $ Style# &s) const; |
| 53 | bool operatorcxx . . $ Style#`operator<`(1bb77a824eb57384).<(const Stylecxx . . $ Style# &s) const; |
| 54 | // destructor |
| 55 | ~cxx . . $ Style#`~Style`(ced63f7c635d850d).Stylecxx . . $ Style#(); |
| 56 | |
| 57 | // return name of style |
| 58 | const QStringcxx . . $ QString# &namecxx . . $ Style#name(a2fb7a6ce195d51).() const; |
| 59 | void setNamecxx . . $ Style#setName(3520e46b33348bf6).(const QStringcxx . . $ QString# &name); |
| 60 | // return high end of OG |
| 61 | double OGHicxx . . $ Style#OGHi(21b6c25e127938e2).() const; |
| 62 | void setOGHicxx . . $ Style#setOGHi(ba8836b59fb42830).(double hi); |
| 63 | // return low end of OG |
| 64 | double OGLowcxx . . $ Style#OGLow(21b6c25e127938e2).() const; |
| 65 | void setOGLowcxx . . $ Style#setOGLow(ba8836b59fb42830).(double lo); |
| 66 | // return high end of FG |
| 67 | double FGHicxx . . $ Style#FGHi(21b6c25e127938e2).() const; |
| 68 | void setFGHicxx . . $ Style#setFGHi(ba8836b59fb42830).(double hi); |
| 69 | // return low end of FG |
| 70 | double FGLowcxx . . $ Style#FGLow(21b6c25e127938e2).() const; |
| 71 | void setFGLowcxx . . $ Style#setFGLow(ba8836b59fb42830).(double lo); |
| 72 | // return high end of IBU |
| 73 | int IBUHicxx . . $ Style#IBUHi(455f465bc33b4cdf).() const; |
| 74 | void setIBUHicxx . . $ Style#setIBUHi(d4f767463ce0a6b3).(int hi); |
| 75 | // return low end of IBU |
| 76 | int IBULowcxx . . $ Style#IBULow(455f465bc33b4cdf).() const; |
| 77 | void setIBULowcxx . . $ Style#setIBULow(d4f767463ce0a6b3).(int lo); |
| 78 | // return high end of SRM |
| 79 | int SRMHicxx . . $ Style#SRMHi(455f465bc33b4cdf).() const; |
| 80 | void setSRMHicxx . . $ Style#setSRMHi(d4f767463ce0a6b3).(int hi); |
| 81 | // return low end of SRM |
| 82 | int SRMLowcxx . . $ Style#SRMLow(455f465bc33b4cdf).() const; |
| 83 | void setSRMLowcxx . . $ Style#setSRMLow(d4f767463ce0a6b3).(int lo); |
| 84 | |
| 85 | private: |
| 86 | friend class StyleModelcxx . . $ StyleModel#; |
| 87 | |
| 88 | QStringcxx . . $ QString# name_cxx . . $ Style#name_.; |
| 89 | double oglow_cxx . . $ Style#oglow_.; |
| 90 | double oghi_cxx . . $ Style#oghi_.; |
| 91 | double fglow_cxx . . $ Style#fglow_.; |
| 92 | double fghi_cxx . . $ Style#fghi_.; |
| 93 | int ibulow_cxx . . $ Style#ibulow_.; |
| 94 | int ibuhi_cxx . . $ Style#ibuhi_.; |
| 95 | int srmlow_cxx . . $ Style#srmlow_.; |
| 96 | int srmhi_cxx . . $ Style#srmhi_.; |
| 97 | }; |
| 98 | |
| 99 | typedef QListcxx . . $ QList#<Stylecxx . . $ Style#> StyleListcxx . . $ StyleList#; |
| 100 | typedef QMapcxx . . $ QMap#<QStringcxx . . $ QString#,Stylecxx . . $ Style#> StyleMapcxx . . $ StyleMap#; |
| 101 | |
| 102 | ////////////////////////////////////////////////////////////////////////////// |
| 103 | // Inlined Methods |
| 104 | |
| 105 | inline bool Stylecxx . . $ Style#::operatorcxx . . $ Style#`operator<`(1bb77a824eb57384).<(const Stylecxx . . $ Style# &s) const { return (name_cxx . . $ Style#name_.<cxx . . $ `operator<`(5bc2975d2d751687).s.name_cxx . . $ Style#name_.); } |
| 106 | |
| 107 | inline const QStringcxx . . $ QString# &Stylecxx . . $ Style#::namecxx . . $ Style#name(a2fb7a6ce195d51).() const { return name_cxx . . $ Style#name_.; } |
| 108 | |
| 109 | inline void Stylecxx . . $ Style#::setNamecxx . . $ Style#setName(3520e46b33348bf6).(const QStringcxx . . $ QString# &name) { name_cxx . . $ Style#name_. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). name; } |
| 110 | |
| 111 | inline double Stylecxx . . $ Style#::OGHicxx . . $ Style#OGHi(21b6c25e127938e2).() const { return oghi_cxx . . $ Style#oghi_.; } |
| 112 | inline void Stylecxx . . $ Style#::setOGHicxx . . $ Style#setOGHi(ba8836b59fb42830).(double hi) { oghi_cxx . . $ Style#oghi_. = hi; } |
| 113 | |
| 114 | inline double Stylecxx . . $ Style#::OGLowcxx . . $ Style#OGLow(21b6c25e127938e2).() const { return oglow_cxx . . $ Style#oglow_.; } |
| 115 | inline void Stylecxx . . $ Style#::setOGLowcxx . . $ Style#setOGLow(ba8836b59fb42830).(double lo) { oglow_cxx . . $ Style#oglow_. = lo; } |
| 116 | |
| 117 | inline double Stylecxx . . $ Style#::FGHicxx . . $ Style#FGHi(21b6c25e127938e2).() const { return fghi_cxx . . $ Style#fghi_.; } |
| 118 | inline void Stylecxx . . $ Style#::setFGHicxx . . $ Style#setFGHi(ba8836b59fb42830).(double hi) { fghi_cxx . . $ Style#fghi_. = hi; } |
| 119 | |
| 120 | inline double Stylecxx . . $ Style#::FGLowcxx . . $ Style#FGLow(21b6c25e127938e2).() const { return fglow_cxx . . $ Style#fglow_.; } |
| 121 | inline void Stylecxx . . $ Style#::setFGLowcxx . . $ Style#setFGLow(ba8836b59fb42830).(double lo) { fglow_cxx . . $ Style#fglow_. = lo; } |
| 122 | |
| 123 | inline int Stylecxx . . $ Style#::IBUHicxx . . $ Style#IBUHi(455f465bc33b4cdf).() const { return ibuhi_cxx . . $ Style#ibuhi_.; } |
| 124 | inline void Stylecxx . . $ Style#::setIBUHicxx . . $ Style#setIBUHi(d4f767463ce0a6b3).(int hi) { ibuhi_cxx . . $ Style#ibuhi_. = hi; } |
| 125 | |
| 126 | inline int Stylecxx . . $ Style#::IBULowcxx . . $ Style#IBULow(455f465bc33b4cdf).() const { return ibulow_cxx . . $ Style#ibulow_.; } |
| 127 | inline void Stylecxx . . $ Style#::setIBULowcxx . . $ Style#setIBULow(d4f767463ce0a6b3).(int lo) { ibulow_cxx . . $ Style#ibulow_. = lo; } |
| 128 | |
| 129 | inline int Stylecxx . . $ Style#::SRMHicxx . . $ Style#SRMHi(455f465bc33b4cdf).() const { return srmhi_cxx . . $ Style#srmhi_.; } |
| 130 | inline void Stylecxx . . $ Style#::setSRMHicxx . . $ Style#setSRMHi(d4f767463ce0a6b3).(int hi) { srmhi_cxx . . $ Style#srmhi_. = hi; } |
| 131 | |
| 132 | inline int Stylecxx . . $ Style#::SRMLowcxx . . $ Style#SRMLow(455f465bc33b4cdf).() const { return srmlow_cxx . . $ Style#srmlow_.; } |
| 133 | inline void Stylecxx . . $ Style#::setSRMLowcxx . . $ Style#setSRMLow(d4f767463ce0a6b3).(int lo) { srmlow_cxx . . $ Style#srmlow_. = lo; } |
| 134 | |
| 135 | #endif // STYLE_H |