MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / generateStringFromFormat

Function generateStringFromFormat

Engine/ProjectPrivate.h:148–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)

Callers 3

initializeKnobsMethod · 0.85
tryAddProjectFormatMethod · 0.85

Calls 6

emptyMethod · 0.80
getNameMethod · 0.80
appendMethod · 0.80
widthMethod · 0.45
heightMethod · 0.45
getPixelAspectRatioMethod · 0.45

Tested by

no test coverage detected