Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion qeframeworkSup/project/archive/maiaObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ void MaiaObject::parseResponse(QString response, QNetworkReply* reply) {
int errorLine;
int errorColumn;
if(!doc.setContent(response, &errorMsg, &errorLine, &errorColumn)) {
emit fault(-32700, QString("parse error: response not well formed at line %1: %2").arg(errorLine).arg(errorMsg), reply);
emit fault(-32700, tr("parse error: response not well formed at line %1: %2").arg(errorLine).arg(errorMsg), reply);
delete this;
return;
}
Expand Down
2 changes: 1 addition & 1 deletion qeframeworkSup/project/common/QEPVNameSelectDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ void QEPVNameSelectDialog::helpClicked (bool /* checked */ )

// And update button text.
//
const QString helpButtonText = helpIsVis ? "Hide" : "Help";
const QString helpButtonText = helpIsVis ? tr("Hide") : tr("Help");
this->ui->helpButton->setText (helpButtonText);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,12 @@ QMenu* QEAbstractDynamicWidget::buildContextMenu ()

menu->addSeparator ();

action = new QAction ("Load Configuration", menu);
action = new QAction (tr("Load Configuration"), menu);
action->setCheckable (false);
action->setData (ADWCM_LOAD_WIDGET_CONFIG);
menu->addAction (action);

action = new QAction ("Save Configuration", menu);
action = new QAction (tr("Save Configuration"), menu);
action->setCheckable (false);
action->setData (ADWCM_SAVE_WIDGET_CONFIG);
menu->addAction (action);
Expand All @@ -214,19 +214,19 @@ void QEAbstractDynamicWidget::addPVLabelModeContextMenu (QMenu* menu)

menu->addSeparator ();

action = new QAction ("Use PV Names", menu);
action = new QAction (tr("Use PV Names"), menu);
action->setCheckable (true);
action->setChecked (this->pvLabelMode == QE::usePvName);
action->setData (ADWCM_SELECT_USE_PV_NAME);
menu->addAction (action);

action = new QAction ("Use Alias Names (if available)", menu);
action = new QAction (tr("Use Alias Names (if available)"), menu);
action->setCheckable (true);
action->setChecked (this->pvLabelMode == QE::useAliasName);
action->setData (ADWCM_SELECT_USE_ALIAS_NAME);
menu->addAction (action);

action = new QAction ("Use Descriptions (if available)", menu);
action = new QAction (tr("Use Descriptions (if available)"), menu);
action->setCheckable (true);
action->setChecked (this->pvLabelMode == QE::useDescription);
action->setData (ADWCM_SELECT_USE_DESCRIPTION);
Expand Down Expand Up @@ -341,8 +341,8 @@ void QEAbstractDynamicWidget::saveNamedWidetConfiguration (const QString& filena
void QEAbstractDynamicWidget::loadWidgetConfiguration ()
{
QString filename = QFileDialog::getOpenFileName
(this,"Select configuration input file", this->getDefaultDir (),
"Config Files(*.xml);;All files (*)");
(this,tr("Select configuration input file"), this->getDefaultDir (),
tr("Config Files(*.xml);;All files (*)"));

// Idf user clicks on Cancel, an empty file name is returned.
// This is handled by the loadNamedWidetConfiguration function.
Expand All @@ -358,8 +358,8 @@ void QEAbstractDynamicWidget::saveWidgetConfiguration ()
// overwrite confirmation here.
//
QString filename = QFileDialog::getSaveFileName
(this, "Select configuration output file", this->getDefaultDir (),
"Config Files(*.xml)", 0, QFileDialog::DontConfirmOverwrite);
(this, tr("Select configuration output file"), this->getDefaultDir (),
tr("Config Files(*.xml)"), 0, QFileDialog::DontConfirmOverwrite);

// Ensure name ends with .xml iff a name has been specified.
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,19 +139,19 @@ void QAnalogSlider::commonSetup ()
this->saveButton->setFixedSize (buttonSize, buttonSize);
this->saveButton->setStyleSheet (QEUtilities::colourToStyle (QColor (0x00C000)));
this->saveButton->setFocusPolicy (Qt::NoFocus);
this->saveButton->setToolTip (" save current value ");
this->saveButton->setToolTip (tr(" save current value "));

this->revertButton = new QPushButton ("R", this->labelFrame);
this->revertButton->setFixedSize (buttonSize, buttonSize);
this->revertButton->setStyleSheet (QEUtilities::colourToStyle (QColor (0x40A0FF)));
this->revertButton->setFocusPolicy (Qt::NoFocus);
this->revertButton->setToolTip (" revert to saved value ");
this->revertButton->setToolTip (tr(" revert to saved value "));

this->applyButton = new QPushButton ("A", this->labelFrame);
this->applyButton->setFixedSize (buttonSize, buttonSize);
this->applyButton->setStyleSheet (QEUtilities::colourToStyle (QColor (0x80E880)));
this->applyButton->setFocusPolicy (Qt::NoFocus);
this->applyButton->setToolTip (" apply value ");
this->applyButton->setToolTip (tr(" apply value "));

this->labelLayout->addWidget (this->saveButton);
this->labelLayout->addWidget (this->revertButton);
Expand Down
14 changes: 7 additions & 7 deletions qeframeworkSup/project/widgets/QEButton/QEGenericButton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void QEGenericButton::dataSetup()
writeOnClick = true;
setAllowDrop( false );
confirmRequired = false;
confirmText = "Do you want to perform this action?";
confirmText = QObject::tr("Do you want to perform this action?");

// Set text alignment to the default for a push button
// This will make no visual difference unless the style has been changed from the default
Expand Down Expand Up @@ -403,7 +403,7 @@ void QEGenericButton::setGenericButtonText( const QString& text, QCaAlarmInfo& a

} else {
QString message;
message = QString( "%1: '%2' (%3) is not one of: '%4' or '%5'" )
message = QString( QObject::tr("%1: '%2' (%3) is not one of: '%4' or '%5'") )
.arg( getQWidget()->metaObject()->className() )
.arg( text )
.arg( state )
Expand Down Expand Up @@ -453,7 +453,7 @@ bool QEGenericButton::confirmAction()

// Get confirmation from the user as to what to do
int confirm = QMessageBox::Yes;
confirm = QMessageBox::warning( (QWidget*)getButtonQObject(), "Confirm write", confirmText,
confirm = QMessageBox::warning( (QWidget*)getButtonQObject(), QObject::tr("Confirm write"), confirmText,
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes );

// Return yes/no
Expand Down Expand Up @@ -520,7 +520,7 @@ void QEGenericButton::userReleased()
QString error;
if( !qca->writeStringElement( writeText, error ) )
{
QMessageBox::warning( (QWidget*)getButtonQObject(), QString( "Write failed" ), error, QMessageBox::Cancel );
QMessageBox::warning( (QWidget*)getButtonQObject(), QString( QObject::tr("Write failed") ), error, QMessageBox::Cancel );
}
}
}
Expand Down Expand Up @@ -580,7 +580,7 @@ void QEGenericButton::userClicked( bool checked )
QString error;
if( !qca->writeStringElement( writeText, error ) )
{
QMessageBox::warning( (QWidget*)getButtonQObject(), QString( "Write failed" ), error, QMessageBox::Cancel );
QMessageBox::warning( (QWidget*)getButtonQObject(), QString( QObject::tr("Write failed") ), error, QMessageBox::Cancel );
}
}
}
Expand Down Expand Up @@ -691,7 +691,7 @@ bool QEGenericButton::checkPassword()

// Ask the user what the password is
bool ok;
QString text = QInputDialog::getText( (QWidget*)getButtonQObject(), "Password", "Password:", QLineEdit::Password, "", &ok );
QString text = QInputDialog::getText( (QWidget*)getButtonQObject(), QObject::tr("Password"), QObject::tr("Password:"), QLineEdit::Password, "", &ok );

// If the user canceled, silently return password failure
if( !ok )
Expand All @@ -700,7 +700,7 @@ bool QEGenericButton::checkPassword()
// If the user entered the wrong password, show a warning, then return password failure
if ( text.compare( password ) )
{
QMessageBox::warning( (QWidget*)getButtonQObject(), "Incorrect Password", "You entered the wrong password. No action will be taken" );
QMessageBox::warning( (QWidget*)getButtonQObject(), QObject::tr("Incorrect Password"), QObject::tr("You entered the wrong password. No action will be taken") );
return false;
}

Expand Down
8 changes: 4 additions & 4 deletions qeframeworkSup/project/widgets/QECalcout/QECalcout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void QECalcout::setCalc (const QString& calcIn)

if (this->calc.length() > MAX_POSTFIX_SIZE) {
this->calcExpressionIsValid = false;
this->calcExpressionStatus = "Expression too long";
this->calcExpressionStatus = tr("Expression too long");
return;
}

Expand All @@ -224,7 +224,7 @@ void QECalcout::setCalc (const QString& calcIn)
this->calcExpressionIsValid = (status == 0);

if (this->calcExpressionIsValid) {
this->calcExpressionStatus = "okay";
this->calcExpressionStatus = tr("okay");
} else {
this->calcExpressionStatus = QString (calcErrorStr (error));
}
Expand Down Expand Up @@ -258,7 +258,7 @@ void QECalcout::setOcal (const QString& ocalIn)

if (this->ocal.length() > MAX_POSTFIX_SIZE) {
this->ocalExpressionIsValid = false;
this->ocalExpressionStatus = "Expression too long";
this->ocalExpressionStatus = tr("Expression too long");
return;
}

Expand All @@ -274,7 +274,7 @@ void QECalcout::setOcal (const QString& ocalIn)
this->ocalExpressionIsValid = (status == 0);

if (this->ocalExpressionIsValid) {
this->ocalExpressionStatus = "okay";
this->ocalExpressionStatus = tr("okay");
} else {
this->ocalExpressionStatus = QString (calcErrorStr (error));
}
Expand Down
2 changes: 1 addition & 1 deletion qeframeworkSup/project/widgets/QEComboBox/QEComboBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ QMenu* QEComboBox::buildContextMenu ()
QMenu* menu = QEWidget::buildContextMenu ();

QAction* action;
action = new QAction ("Apply current selection", menu);
action = new QAction (tr("Apply current selection"), menu);
action->setCheckable (false);
action->setData (QECB_APPLY_CURRENT_SELECTION);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ QEConfiguredLayout::QEConfiguredLayout(QWidget *pParent, bool pSubscription) :

qComboBoxItemList = new QComboBox(this);
qComboBoxItemList->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
qComboBoxItemList->setToolTip("Select item to be viewed/controlled");
qComboBoxItemList->setToolTip(tr("Select item to be viewed/controlled"));
QObject::connect(qComboBoxItemList, SIGNAL(currentIndexChanged(int)),
this, SLOT( comboBoxItemSelected(int)));

Expand Down Expand Up @@ -587,7 +587,7 @@ void QEConfiguredLayout::refreshFields()
qHBoxLayout = new QHBoxLayout();
qPushButtonGroup = new _QPushButtonGroup(this, item->getName(), fieldInfo->getGroup(), &currentFieldList);
qPushButtonGroup->setText(fieldInfo->getGroup());
qPushButtonGroup->setToolTip("Show fields of group '" + fieldInfo->getGroup() + "'");
qPushButtonGroup->setToolTip(tr("Show fields of group '%1'").arg(fieldInfo->getGroup()));

if (fieldInfo->getJoin())
{
Expand Down Expand Up @@ -643,7 +643,7 @@ void QEConfiguredLayout::valueWritten(const QString &pNewValue, const QString &p
{
// if (pFieldName.isEmpty())
// {
sendMessage("The field was changed from '" + pOldValue + "' to '" + pNewValue + "'.");
sendMessage(tr("The field was changed from '%1' to '%2'").arg(pOldValue).arg(pNewValue));
// }
// else
// {
Expand Down Expand Up @@ -962,8 +962,8 @@ _QDialogItem::_QDialogItem(QWidget *pParent, QString pItemName, QString pGroupNa
}
}

qPushButtonClose->setText("Close");
qPushButtonClose->setToolTip("Close window");
qPushButtonClose->setText(tr("Close"));
qPushButtonClose->setToolTip(tr("Close window"));
QObject::connect(qPushButtonClose, SIGNAL(clicked()),
this, SLOT(buttonCloseClicked()));
qVBoxLayout->addWidget(qPushButtonClose);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,16 +169,16 @@ void QECorrelation::setup ()
this->contextMenu = new QMenu (this);

QAction* action;
action = new QAction ("Add/Edit PV Name ", this->contextMenu);
action = new QAction (tr("Add/Edit PV Name "), this->contextMenu);
action->setData (QVariant (int (maAddEdit)));
this->contextMenu->addAction (action);

action = new QAction ("Paste PV Name ", this->contextMenu );
action = new QAction (tr("Paste PV Name "), this->contextMenu );
action->setData (QVariant (int (maPaste)));
this->contextMenu->addAction (action);
this->pasteAction = action; // save a reference.

action = new QAction ("Clear ", this->contextMenu );
action = new QAction (tr("Clear "), this->contextMenu );
action->setData (QVariant (int (maClear)));
this->contextMenu->addAction (action);
this->clearAction = action; // save a reference.
Expand Down
2 changes: 1 addition & 1 deletion qeframeworkSup/project/widgets/QEDateTime/QEDateTime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ QEDateTime::QEDateTime (QWidget* parent) : QLabel (parent)
// Build the context menu - note unlike QEWidget paradigm, we do this only once.
//
this->contextMenu = new QMenu (this);
QAction* action = new QAction ("Copy time text ", this->contextMenu);
QAction* action = new QAction (tr("Copy time text "), this->contextMenu);
this->contextMenu->addAction (action);

QObject::connect (this->contextMenu, SIGNAL (triggered (QAction*)),
Expand Down
26 changes: 13 additions & 13 deletions qeframeworkSup/project/widgets/QEDistribution/QEDistribution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,16 @@ void QEDistribution::setup()
this->contextMenu = new QMenu (this);

QAction* action;
action = new QAction ("Add/Edit PV Name ", this->contextMenu);
action = new QAction (tr("Add/Edit PV Name "), this->contextMenu);
action->setData (QVariant (int (maAddEdit)));
this->contextMenu->addAction (action);

action = new QAction ("Paste PV Name ", this->contextMenu );
action = new QAction (tr("Paste PV Name "), this->contextMenu );
action->setData (QVariant (int (maPaste)));
this->contextMenu->addAction (action);
this->pasteAction = action; // save a reference.

action = new QAction ("Clear ", this->contextMenu );
action = new QAction (tr("Clear "), this->contextMenu );
action->setData (QVariant (int (maClear)));
this->contextMenu->addAction (action);
this->clearAction = action; // save a reference.
Expand Down Expand Up @@ -1158,7 +1158,7 @@ void QEDistribution::createWidgets()

this->pvNameLabel = new QLabel (this->resize_frame);
this->pvNameLabel->setGeometry (QRect (left, 8, 420, 16)); left += 420 + sg;
this->pvNameLabel->setText ("NAME...");
this->pvNameLabel->setText (tr("NAME..."));
this->pvNameLabel->setFont (font1);
this->pvNameLabel->setStyleSheet (QEUtilities::colourToStyle (QColor (155, 205, 255)));
this->pvNameLabel->setIndent (6);
Expand All @@ -1170,16 +1170,16 @@ void QEDistribution::createWidgets()
this->valueLabel->setStyleSheet (QEUtilities::offBackgroundStyle ());

this->resetButton = new QPushButton (this->resize_frame);
this->resetButton->setToolTip (" Reset/clear all data ");
this->resetButton->setText ("Reset");
this->resetButton->setToolTip (tr(" Reset/clear all data "));
this->resetButton->setText (tr("Reset"));
this->resetButton->setGeometry (QRect (left, 7, 52, 20)); left += 52 + sg;
this->resetButton->setFont (font0);
this->resetButton->setFocusPolicy (Qt::NoFocus);
this->resetButton->setStyleSheet (QEUtilities::colourToStyle (QColor (255, 255, 128)));

this->gaussianBox = new QCheckBox (this->resize_frame);
this->gaussianBox->setToolTip (" Show/hide gaussian curve ");
this->gaussianBox->setText ("gaussian");
this->gaussianBox->setToolTip (tr(" Show/hide gaussian curve "));
this->gaussianBox->setText (tr("gaussian"));
this->gaussianBox->setGeometry (QRect (left, 7, 72, 20)); left += 72 + sg;
this->gaussianBox->setFont (font0);
this->gaussianBox->setFocusPolicy (Qt::NoFocus);
Expand All @@ -1189,7 +1189,7 @@ void QEDistribution::createWidgets()
left = 8;

this->label_1 = new QLabel (this->resize_frame);
this->label_1->setText ("Number:");
this->label_1->setText (tr("Number:"));
this->label_1->setGeometry (QRect (left, 32, 52, 16));
left += 52 + sg;
this->label_1->setFont (font2);
Expand All @@ -1202,7 +1202,7 @@ void QEDistribution::createWidgets()
this->countValueLabel->setIndent (6);

this->label_2 = new QLabel (this->resize_frame);
this->label_2->setText ("Mean:");
this->label_2->setText (tr("Mean:"));
this->label_2->setGeometry (QRect (left, 32, 36, 16));
left += 36 + sg;
this->label_2->setFont (font2);
Expand All @@ -1215,7 +1215,7 @@ void QEDistribution::createWidgets()
this->meanValueLabel->setIndent (6);

this->label_4 = new QLabel (this->resize_frame);
this->label_4->setText ("Min:");
this->label_4->setText (tr("Min:"));
this->label_4->setGeometry (QRect (left, 32, 28, 16)); left += 28 + sg;
this->label_4->setFont (font2);

Expand All @@ -1227,7 +1227,7 @@ void QEDistribution::createWidgets()
this->minValueLabel->setIndent (6);

this->label_5 = new QLabel (this->resize_frame);
this->label_5->setText ("Max:");
this->label_5->setText (tr("Max:"));
this->label_5->setGeometry (QRect (left, 32, 28, 16)); left += 28 + sg;
this->label_5->setFont (font2);

Expand All @@ -1239,7 +1239,7 @@ void QEDistribution::createWidgets()
this->maxValueLabel->setIndent (6);

this->label_6 = new QLabel (this->resize_frame);
this->label_6->setText ("Std Dev:");
this->label_6->setText (tr("Std Dev:"));
this->label_6->setGeometry (QRect (left, 32, 48, 16)); left += 48 + sg;
this->label_6->setFont (font2);

Expand Down
Loading