本文整理汇总了C++中Configuration函数的典型用法代码示例。如果您正苦于以下问题:C++ Configuration函数的具体用法?C++ Configuration怎么用?C++ Configuration使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Configuration函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fileInfo
void DirectoryMangaVolume::readImages(const QString & path) {
QFileInfo fileInfo(path);
if (fileInfo.isDir()) {
QDir dir(path);
QStringList fileList = dir.entryList(
QDir::AllEntries | QDir::NoDotAndDotDot
| QDir::NoSymLinks | QDir::Hidden, QDir::Name
| QDir::IgnoreCase);
for (int i = 0; i < fileList.count(); ++i) {
readImages(path + tr("/")+fileList.at(i));
}
} else {
QString extension = path.split(".").last();
auto formats = Configuration().getSupportedImageFormats();
if (Configuration().isSupportedImageFormat(fileInfo.suffix())) {
m_page_names.push_back(fileInfo.canonicalFilePath());
/*
MangaPage img(path);
if (!img.isNull()) {
m_pages.push_back(img);
}*/
} else {
qDebug() << "Skipping file with unknown extension " << path;
}
}
}
示例2: Configuration
StraightPathSegment::StraightPathSegment(Segment& segment, bool dir) {
double angle = segment.getOrientation();
if (dir) {
start = Configuration(segment.getA(), angle);
end = Configuration(segment.getB(), angle);
} else {
start = Configuration(segment.getA(), wrapAngle(angle + M_PI));
end = Configuration(segment.getB(), wrapAngle(angle + M_PI));
}
this->dir = dir;
length = Point::distance(start.position, end.position);
}
示例3: if
//__________________________________________________
Qt::Alignment Configuration::titleAlignment( QString value, bool translated )
{
if (value == titleAlignmentName( Qt::AlignLeft, translated ) ) return Qt::AlignLeft;
else if (value == titleAlignmentName( Qt::AlignHCenter, translated, false ) || value == titleAlignmentName( Qt::AlignHCenter, translated, true ) ) return Qt::AlignHCenter;
else if (value == titleAlignmentName( Qt::AlignRight, translated ) ) return Qt::AlignRight;
else return Configuration().titleAlignment();
}
示例4: mRing
ReducerNoDedup<Q>::ReducerNoDedup(const PolyRing& ring):
mRing(ring),
mLeadTermKnown(false),
mQueue(Configuration(ring))
{
mLeadTerm.mono = mRing.monoid().alloc().release();
}
示例5: setCapacitance
status_ setCapacitance()
{
char query1[20];
snprintf(query1,sizeof(query1),"CONF:CAP\n");
return Configuration(query1);
}
示例6: QTimer
User::User(QObject *parent)
{
timer = new QTimer(this);
actions = new QQueue<QStringList *>();
Configuration();
}
示例7: file
Configuration ConfigurationFile::Read(const Provider& provider)
{
std::ifstream file(m_filename.c_str());
if (!file.good())
return Configuration();
std::map<int, std::string> channelMap;
std::string line;
while (std::getline(file, line))
{
std::vector<std::string> split;
boost::split(split, line, boost::is_any_of("="));
if (is_number(split[0]))
channelMap[boost::lexical_cast<int>(split[0])] = split[1];
}
::Channels channels;
::Channels allChannels = provider.GetChannels();
for (::Channels::iterator it = allChannels.begin(); it != allChannels.end(); ++it)
{
if (channelMap.find(it->Id()) != channelMap.end())
{
it->Name(channelMap[it->Id()]);
channels.push_back(*it);
}
}
m_configuration.Channels(channels);
m_configuration.Valid(true);
return m_configuration;
}
示例8: setFrequency
status_ setFrequency()
{
char query1[20];
snprintf(query1,sizeof(query1),"CONF:FREQ\n");
return Configuration(query1);
}
示例9: setPeriod
status_ setPeriod()
{
char query1[20];
snprintf(query1,sizeof(query1),"CONF:PER\n");
return Configuration(query1);
}
示例10: setFresistance_range
status_ setFresistance_range(float range_)
{
char query1[50];
snprintf(query1,sizeof(query1),"CONF:FRES %f\n",range_);
return Configuration(query1);
}
示例11: Configuration
/**
* \brief This will save input settings according to how the user did map the buttons,
* axes or keys to the commands.
*/
void CInput::saveControlconfig()
{
CConfiguration Configuration(CONFIGFILENAME);
Configuration.Parse();
std::string section;
for(size_t i=0 ; i<NUM_INPUTS ; i++)
{
section = "input" + itoa(i);
Configuration.WriteString(section, "Left", getEventName(IC_LEFT, i));
Configuration.WriteString(section, "Up", getEventName(IC_UP, i));
Configuration.WriteString(section, "Right", getEventName(IC_RIGHT, i));
Configuration.WriteString(section, "Down", getEventName(IC_DOWN, i));
Configuration.WriteString(section, "Upper-Left", getEventName(IC_UPPERLEFT, i));
Configuration.WriteString(section, "Upper-Right", getEventName(IC_UPPERRIGHT, i));
Configuration.WriteString(section, "Lower-Left", getEventName(IC_LOWERLEFT, i));
Configuration.WriteString(section, "Lower-Right", getEventName(IC_LOWERRIGHT, i));
Configuration.WriteString(section, "Jump", getEventName(IC_JUMP, i));
Configuration.WriteString(section, "Pogo", getEventName(IC_POGO, i));
Configuration.WriteString(section, "Fire", getEventName(IC_FIRE, i));
Configuration.WriteString(section, "Status", getEventName(IC_STATUS, i));
Configuration.WriteString(section, "Help", getEventName(IC_HELP, i));
Configuration.WriteString(section, "Quit", getEventName(IC_QUIT, i));
Configuration.SetKeyword(section, "TwoButtonFiring", TwoButtonFiring[i]);
}
Configuration.saveCfgFile();
}
示例12: qDebug
MathematicsManager::MathematicsManager(QObject *parent)
{
qDebug()<<"Create"<<metaObject()->className();
queAsk = new QQueue<EmptyModel *>();
queAnswer = new QQueue<EmptyModel *>();
timer = new QTimer(this);
Configuration();
}
示例13: Configuration
//---------------------------------------------------------------------------
void File_Cmml::Data_Parse()
{
//Parsing
if (Status[IsAccepted])
Configuration();
else
Identification();
}
示例14: ReducerPack
ReducerPack(const PolyRing& ring):
mRing(ring),
mLeadTermKnown(false),
mQueue(Configuration(ring)),
mPool(sizeof(MultipleWithPos))
{
mLeadTerm.mono = mRing.monoid().alloc().release();
}
示例15: mRing
MATHICGB_NAMESPACE_BEGIN
TournamentReducer::TournamentReducer(const PolyRing& ring):
mRing(ring),
mLeadTerm(0, mRing.allocMonomial()),
mLeadTermKnown(false),
mQueue(Configuration(ring)),
mPool(sizeof(MultipleWithPos))
{
}