/* Button press event. */ void QEGenericButton::userPressed() { // Do nothing if not acting on button press, or user confirmation required but not given, or password required but not given if( !writeOnPress || !confirmAction() || !checkPassword() ) return; // Determine the string to write QString writeText = substituteThis( pressText ); // Emit a 'pressed' signal emitPressed( writeText.toInt() ); // Get the variable to write to QEString *qca = (QEString*)getQcaItem(0); // If a QCa object is present (if there is a variable to write to) then write the value if( qca ) { QString error; if( !qca->writeString( writeText, error ) ) { QMessageBox::warning( (QWidget*)getButtonQObject(), QString( "Write failed" ), error, QMessageBox::Cancel ); } } }
QIdPushButton::QIdPushButton(const QString text, unsigned int indentifier, QWidget *parent) : QPushButton(text, parent) { _indentifier = indentifier; connect (this, SIGNAL( pressed() ), this, SLOT( emitPressed() )); connect (this, SIGNAL( released() ), this, SLOT( emitReleased() )); }