本文整理汇总了C++中LOG4CPP_INFO_S函数的典型用法代码示例。如果您正苦于以下问题:C++ LOG4CPP_INFO_S函数的具体用法?C++ LOG4CPP_INFO_S怎么用?C++ LOG4CPP_INFO_S使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LOG4CPP_INFO_S函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LOG4CPP_INFO_S
void DlgSettingsExportFormat::slotInclude ()
{
LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsExportFormat::slotInclude";
// Perform forward pass to get included curves in the proper order
int i;
QStringList included;
for (i = 0; i < m_listExcluded->count(); i++) {
if (m_listExcluded->item(i)->isSelected()) {
included += m_listExcluded->item(i)->text();
}
}
// Add the included curves to the included list
for (i = 0; i < included.count(); i++) {
QString curveName = included.at (i);
m_listIncluded->addItem (curveName);
}
// Perform backwards pass to remove the included curves from the excluded list
QStringList excluded;
for (i = m_listExcluded->count() - 1; i>= 0; i--) {
QString curveName = m_listExcluded->item(i)->text();
QListWidgetItem *item = m_listExcluded->item (i);
if (included.contains (curveName)) {
m_listExcluded->removeItemWidget (item);
delete item;
} else {
excluded += item->text();
}
}
m_modelExportAfter->setCurveNamesNotExported(excluded);
updateControls();
updatePreview();
}
示例2: LOG4CPP_INFO_S
void TransformationStateContext::triggerStateTransition (TransformationState transformationState,
CmdMediator &cmdMediator,
const Transformation &transformation,
const QString &selectedGraphCurve)
{
LOG4CPP_INFO_S ((*mainCat)) << "TransformationStateContext::triggerStateTransition";
// Transition if we are not already at the requested state
if (transformationState != m_currentState) {
// End the current state if there is one
if (m_currentState != NUM_TRANSFORMATION_STATES) {
m_states[m_currentState]->end(cmdMediator,
transformation);
}
m_currentState = transformationState;
// Start the requested state
m_states[m_currentState]->begin(cmdMediator,
transformation,
selectedGraphCurve);
}
}
示例3: LOG4CPP_INFO_S
void GraphicsScene::updatePointMembership (CmdMediator &cmdMediator)
{
LOG4CPP_INFO_S ((*mainCat)) << "GraphicsScene::updatePointMembership";
CallbackSceneUpdateAfterCommand ftor (m_graphicsLinesForCurves,
*this,
cmdMediator.document ());
Functor2wRet<const QString &, const Point &, CallbackSearchReturn> ftorWithCallback = functor_ret (ftor,
&CallbackSceneUpdateAfterCommand::callback);
// First pass:
// 1) Mark all points as Not Wanted (this is done while creating the map)
m_graphicsLinesForCurves.lineMembershipReset ();
// Next pass:
// 1) Existing points that are found in the map are marked as Wanted
// 2) Add new points that were just created in the Document. The new points are marked as Wanted
cmdMediator.iterateThroughCurvePointsAxes (ftorWithCallback);
cmdMediator.iterateThroughCurvesPointsGraphs (ftorWithCallback);
// Next pass:
// 1) Remove points that were just removed from the Document
m_graphicsLinesForCurves.lineMembershipPurge (cmdMediator.document().modelCurveStyles());
}
示例4: LOG4CPP_INFO_S
DlgValidatorAbstract *DlgValidatorFactory::createWithNonPolar (CoordScale coordScale,
CoordUnitsNonPolarTheta coordUnits,
CoordUnitsDate coordUnitsDate,
CoordUnitsTime coordUnitsTime) const
{
LOG4CPP_INFO_S ((*mainCat)) << "DlgValidatorFactory::createWithNonPolar";
switch (coordUnits) {
case COORD_UNITS_NON_POLAR_THETA_DATE_TIME:
return new DlgValidatorDateTime (coordScale,
coordUnitsDate,
coordUnitsTime);
case COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS:
return new DlgValidatorDegreesMinutesSeconds (coordScale);
case COORD_UNITS_NON_POLAR_THETA_NUMBER:
return new DlgValidatorNumber(coordScale);
default:
LOG4CPP_ERROR_S ((*mainCat)) << "DlgValidatorFactory::createWithNonPolar";
exit (-1);
}
}
示例5: LOG4CPP_INFO_S
void Point::saveXml(QXmlStreamWriter &writer) const
{
LOG4CPP_INFO_S ((*mainCat)) << "Point::saveXml";
writer.writeStartElement(DOCUMENT_SERIALIZE_POINT);
writer.writeAttribute(DOCUMENT_SERIALIZE_POINT_IDENTIFIER, m_identifier);
writer.writeAttribute(DOCUMENT_SERIALIZE_POINT_ORDINAL, QString::number (m_ordinal));
// Variable m_identifierIndex is static, but for simplicity this is handled like other values. Those values are all
// the same, but simplicity wins over a few extra bytes of storage
writer.writeAttribute(DOCUMENT_SERIALIZE_POINT_IDENTIFIER_INDEX, QString::number (m_identifierIndex));
writer.writeStartElement(DOCUMENT_SERIALIZE_POINT_POSITION_SCREEN);
writer.writeAttribute(DOCUMENT_SERIALIZE_POINT_X, QString::number (m_posScreen.x()));
writer.writeAttribute(DOCUMENT_SERIALIZE_POINT_Y, QString::number (m_posScreen.y()));
writer.writeEndElement();
writer.writeStartElement(DOCUMENT_SERIALIZE_POINT_POSITION_GRAPH);
writer.writeAttribute(DOCUMENT_SERIALIZE_POINT_X, QString::number (m_posGraph.x()));
writer.writeAttribute(DOCUMENT_SERIALIZE_POINT_Y, QString::number (m_posGraph.y()));
writer.writeEndElement();
writer.writeEndElement();
}
示例6: LOG4CPP_INFO_S
void DlgSettingsDigitizeCurve::createPreview (QGridLayout *layout,
int &row)
{
LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsDigitizeCurve::createPreview";
QLabel *labelPreview = new QLabel ("Preview");
layout->addWidget (labelPreview, row++, 0, 1, 4);
m_scenePreview = new QGraphicsScene (this);
m_scenePreview->setSceneRect(0,
0,
IMAGE_WIDTH,
IMAGE_HEIGHT);
m_viewPreview = new ViewPreview (m_scenePreview,
ViewPreview::VIEW_ASPECT_RATIO_VARIABLE,
this);
m_viewPreview->setWhatsThis (tr ("Preview window showing the currently selected cursor"));
m_viewPreview->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
m_viewPreview->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
m_viewPreview->setMinimumHeight (MINIMUM_PREVIEW_HEIGHT);
layout->addWidget (m_viewPreview, row++, 0, 1, 4);
}
示例7: LOG4CPP_INFO_S
void CurvesGraphs::loadPreVersion6(QDataStream &str)
{
LOG4CPP_INFO_S ((*mainCat)) << "CurvesGraphs::loadPreVersion6";
int i;
// Remove previous Curves. There is a DEFAULT_GRAPH_CURVE_NAME by default
m_curvesGraphs.clear();
qint32 numberCurvesGraphs;
str >> numberCurvesGraphs;
for (i = 0; i < numberCurvesGraphs; i++) {
Curve curve (str);
m_curvesGraphs.append (curve);
}
qint32 numberCurvesMeasures;
str >> numberCurvesMeasures;
for (i = 0; i < numberCurvesMeasures; i++) {
Curve curve (str);
// Measures get dropped on the floor
}
}
示例8: LOG4CPP_INFO_S
void CurvesGraphs::loadXml(QXmlStreamReader &reader)
{
LOG4CPP_INFO_S ((*mainCat)) << "CurvesGraphs::loadXml";
bool success = true;
// Read until end of this subtree
while ((reader.tokenType() != QXmlStreamReader::EndElement) ||
(reader.name() != DOCUMENT_SERIALIZE_CURVES_GRAPHS)){
if ((reader.tokenType() == QXmlStreamReader::StartElement) &&
(reader.name () == DOCUMENT_SERIALIZE_CURVE)) {
Curve curve (reader);
m_curvesGraphs.push_back (curve);
} else {
loadNextFromReader(reader);
if (reader.hasError()) {
// No need to set success flag, which raises the error, since error was already raised. Just
// need to exit loop immediately
break;
}
if (reader.atEnd()) {
success = false;
break;
}
}
}
if (!success) {
reader.raiseError ("Cannot read graph curves data");
}
}
示例9: LOG4CPP_INFO_S
const CurvesGraphs &Document::curvesGraphs () const
{
LOG4CPP_INFO_S ((*mainCat)) << "Document::curvesGraphs";
return m_coordSystemContext.curvesGraphs();
}
示例10: LOG4CPP_INFO_S
DlgValidatorAbstract::~DlgValidatorAbstract()
{
LOG4CPP_INFO_S ((*mainCat)) << "DlgValidatorAbstract::~DlgValidatorAbstract";
}
示例11: LOG4CPP_INFO_S
void BackgroundStateNone::fitInView (GraphicsView &view)
{
LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateNone::fitInView";
view.fitInView (imageItem ().boundingRect());
}
示例12: LOG4CPP_INFO_S
void TutorialStateChecklistWizardPoints::slotPrevious ()
{
LOG4CPP_INFO_S ((*mainCat)) << "TutorialStateChecklistWizardPoints::slotPrevious";
context().requestDelayedStateTransition (TUTORIAL_STATE_POINT_MATCH);
}
示例13: m_name
Document::Document (const QString &fileName) :
m_name (fileName),
m_documentAxesPointsRequired (DOCUMENT_AXES_POINTS_REQUIRED_3)
{
LOG4CPP_INFO_S ((*mainCat)) << "Document::Document"
<< " fileName=" << fileName.toLatin1().data();
m_successfulRead = true;
// Grab first few bytes to determine the version number
QFile *file = new QFile (fileName);
if (file->open(QIODevice::ReadOnly)) {
QByteArray bytesStart = file->read (FOUR_BYTES);
file->close ();
if (bytesIndicatePreVersion6 (bytesStart)) {
QFile *file = new QFile (fileName);
if (file->open (QIODevice::ReadOnly)) {
QDataStream str (file);
m_coordSystemContext.addCoordSystems(NOMINAL_COORD_SYSTEM_COUNT);
loadPreVersion6 (str);
} else {
m_successfulRead = false;
m_reasonForUnsuccessfulRead = QObject::tr ("Operating system says file is not readable");
}
} else {
QFile *file = new QFile (fileName);
if (file->open (QIODevice::ReadOnly | QIODevice::Text)) {
int version = versionFromFile (file);
switch (version)
{
case VERSION_6:
loadVersion6 (file);
break;
case VERSION_7:
case VERSION_8:
case VERSION_9:
case VERSION_10:
case VERSION_11:
loadVersions7AndUp (file);
break;
default:
m_successfulRead = false;
m_reasonForUnsuccessfulRead = QString ("Engauge %1 %2 %3 %4 Engauge")
.arg (VERSION_NUMBER)
.arg (QObject::tr ("cannot read newer files from version"))
.arg (version)
.arg (QObject::tr ("of"));
break;
}
// Close and deactivate
file->close ();
delete file;
file = nullptr;
} else {
m_successfulRead = false;
m_reasonForUnsuccessfulRead = QObject::tr ("Operating system says file is not readable");
}
}
} else {
file->close ();
m_successfulRead = false;
m_reasonForUnsuccessfulRead = QString ("%1 '%2' %3")
.arg (QObject::tr ("File"))
.arg (fileName)
.arg (QObject::tr ("was not found"));
}
}
示例14: LOG4CPP_INFO_S
void TutorialStateIntroduction::slotNext ()
{
LOG4CPP_INFO_S ((*mainCat)) << "TutorialStateIntroduction::slotNext";
context().requestDelayedStateTransition (TUTORIAL_STATE_AXIS_POINTS);
}
示例15: QDoubleValidator
DlgValidatorAbstract::DlgValidatorAbstract(QObject *parent) :
QDoubleValidator(parent)
{
LOG4CPP_INFO_S ((*mainCat)) << "DlgValidatorAbstract::DlgValidatorAbstract";
}