| 146 | void setProjectPath(const std::string& path); |
| 147 | std::string getProjectPath() const; |
| 148 | static QString generateStringFromFormat(const Format & f) |
| 149 | { |
| 150 | QString formatStr; |
| 151 | |
| 152 | if (!f.getName().empty()) { |
| 153 | formatStr.append( QString::fromUtf8( f.getName().c_str() ) ); |
| 154 | formatStr.append( QLatin1Char(' ') ); |
| 155 | } |
| 156 | formatStr.append( QString::number( f.width() ) ); |
| 157 | formatStr.append( QLatin1Char('x') ); |
| 158 | formatStr.append( QString::number( f.height() ) ); |
| 159 | double par = f.getPixelAspectRatio(); |
| 160 | if (par != 1.) { |
| 161 | formatStr.append( QLatin1Char(' ') ); |
| 162 | formatStr.append( QString::number( f.getPixelAspectRatio(), 'f', 2 ) ); |
| 163 | } |
| 164 | |
| 165 | return formatStr; |
| 166 | } |
| 167 | |
| 168 | static bool generateFormatFromString(const QString& spec, |
| 169 | Format* f) |
no test coverage detected