myEditor->setIsSync( on );
}
+/*!
+ \brief Get read only flag value.
+
+ \sa setIsReadOnly()
+ \return True if python console output is in Read-only state.
+*/
+bool PyConsole_Console::isReadOnly() const
+{
+ return myEditor->isReadOnly();
+}
+
+/*!
+ \brief Set read only flag value.
+
+ \param on read only mode flag
+*/
+void PyConsole_Console::setIsReadOnly( const bool on )
+{
+ myEditor->setReadOnly( on );
+}
+
/*!
\brief Get suppress output flag value.
bool isSync() const;
void setIsSync( const bool );
+ bool isReadOnly() const;
+ void setIsReadOnly( const bool );
+
bool isSuppressOutput() const;
void setIsSuppressOutput( const bool );
myCmdInHistory = -1;
// print command line by line
QString cmd = command;
- if ( !cmd.endsWith( "\n" ) ) cmd += "\n";
+ if ( shouldPrint && !cmd.endsWith( "\n" ) ) cmd += "\n";
QStringList lines = command.split( "\n" );
for ( int i = 0; i < lines.size(); i++ ) {
if ( !lines[i].trimmed().isEmpty() )