diff options
author | Timothy Pearson <[email protected]> | 2012-01-26 23:32:43 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-01-26 23:32:43 -0600 |
commit | ea318d1431c89e647598c510c4245c6571aa5f46 (patch) | |
tree | 996d29b80c30d453dda86d1a23162d441628f169 /doc/html/chart-chartform_files-cpp.html | |
parent | aaf89d4b48f69c9293feb187db26362e550b5561 (diff) | |
download | tqt3-ea318d1431c89e647598c510c4245c6571aa5f46.tar.gz tqt3-ea318d1431c89e647598c510c4245c6571aa5f46.zip |
Update to latest tqt3 automated conversion
Diffstat (limited to 'doc/html/chart-chartform_files-cpp.html')
-rw-r--r-- | doc/html/chart-chartform_files-cpp.html | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/doc/html/chart-chartform_files-cpp.html b/doc/html/chart-chartform_files-cpp.html index b03d86af2..146e490cd 100644 --- a/doc/html/chart-chartform_files-cpp.html +++ b/doc/html/chart-chartform_files-cpp.html @@ -35,54 +35,54 @@ body { background: #ffffff; color: black; } <pre>#include "canvasview.h" #include "chartform.h" -#include <<a href="qfile-h.html">qfile.h</a>> -#include <<a href="qfiledialog-h.html">qfiledialog.h</a>> -#include <<a href="qpainter-h.html">qpainter.h</a>> -#include <<a href="qprinter-h.html">qprinter.h</a>> -#include <<a href="qstatusbar-h.html">qstatusbar.h</a>> +#include <<a href="qfile-h.html">ntqfile.h</a>> +#include <<a href="qfiledialog-h.html">ntqfiledialog.h</a>> +#include <<a href="qpainter-h.html">ntqpainter.h</a>> +#include <<a href="qprinter-h.html">ntqprinter.h</a>> +#include <<a href="qstatusbar-h.html">ntqstatusbar.h</a>> -void <a name="f172"></a>ChartForm::load( const <a href="qstring.html">TQString</a>& filename ) +void <a name="f172"></a>ChartForm::load( const <a href="ntqstring.html">TQString</a>& filename ) { - <a href="qfile.html">TQFile</a> file( filename ); - if ( !file.<a href="qfile.html#open">open</a>( IO_ReadOnly ) ) { - <a href="qmainwindow.html#statusBar">statusBar</a>()->message( TQString( "Failed to load \'%1\'" ). + <a href="ntqfile.html">TQFile</a> file( filename ); + if ( !file.<a href="ntqfile.html#open">open</a>( IO_ReadOnly ) ) { + <a href="ntqmainwindow.html#statusBar">statusBar</a>()->message( TQString( "Failed to load \'%1\'" ). arg( filename ), 2000 ); return; } init(); // Make sure we have colours m_filename = filename; - <a href="qtextstream.html">TQTextStream</a> ts( &file ); + <a href="ntqtextstream.html">TQTextStream</a> ts( &file ); Element element; int errors = 0; int i = 0; - while ( !ts.<a href="qtextstream.html#eof">eof</a>() ) { + while ( !ts.<a href="ntqtextstream.html#eof">eof</a>() ) { ts >> element; if ( element.isValid() ) m_elements[i++] = element; else errors++; if ( i == MAX_ELEMENTS ) { - <a href="qmainwindow.html#statusBar">statusBar</a>()->message( + <a href="ntqmainwindow.html#statusBar">statusBar</a>()->message( TQString( "Read maximum number of elements (%1)" " discarding others" ).arg( i ), 2000 ); break; } } - file.<a href="qfile.html#close">close</a>(); + file.<a href="ntqfile.html#close">close</a>(); - <a href="qstring.html">TQString</a> bad = ""; + <a href="ntqstring.html">TQString</a> bad = ""; if ( errors ) { bad = TQString( "; skipped " ) + TQString::number( errors ) + " bad record"; if ( errors > 1 ) bad += "s"; } - <a href="qmainwindow.html#statusBar">statusBar</a>()->message( TQString( "Read %1 values from \'%2\'%3" ). + <a href="ntqmainwindow.html#statusBar">statusBar</a>()->message( TQString( "Read %1 values from \'%2\'%3" ). arg( i ).arg( filename ).arg( bad ), 3000 ); - <a href="qwidget.html#setCaption">setCaption</a>( TQString( "Chart -- %1" ).arg( filename ) ); + <a href="ntqwidget.html#setCaption">setCaption</a>( TQString( "Chart -- %1" ).arg( filename ) ); updateRecentFiles( filename ); drawElements(); @@ -97,51 +97,51 @@ void <a name="f173"></a>ChartForm::fileSave() return; } - <a href="qfile.html">TQFile</a> file( m_filename ); - if ( !file.<a href="qfile.html#open">open</a>( IO_WriteOnly ) ) { - <a href="qmainwindow.html#statusBar">statusBar</a>()->message( TQString( "Failed to save \'%1\'" ). + <a href="ntqfile.html">TQFile</a> file( m_filename ); + if ( !file.<a href="ntqfile.html#open">open</a>( IO_WriteOnly ) ) { + <a href="ntqmainwindow.html#statusBar">statusBar</a>()->message( TQString( "Failed to save \'%1\'" ). arg( m_filename ), 2000 ); return; } - <a href="qtextstream.html">TQTextStream</a> ts( &file ); + <a href="ntqtextstream.html">TQTextStream</a> ts( &file ); for ( int i = 0; i < MAX_ELEMENTS; ++i ) if ( m_elements[i].isValid() ) ts << m_elements[i]; - file.<a href="qfile.html#close">close</a>(); + file.<a href="ntqfile.html#close">close</a>(); - <a href="qwidget.html#setCaption">setCaption</a>( TQString( "Chart -- %1" ).arg( m_filename ) ); - <a href="qmainwindow.html#statusBar">statusBar</a>()->message( TQString( "Saved \'%1\'" ).arg( m_filename ), 2000 ); + <a href="ntqwidget.html#setCaption">setCaption</a>( TQString( "Chart -- %1" ).arg( m_filename ) ); + <a href="ntqmainwindow.html#statusBar">statusBar</a>()->message( TQString( "Saved \'%1\'" ).arg( m_filename ), 2000 ); m_changed = FALSE; } void <a name="f174"></a>ChartForm::fileSaveAsPixmap() { - <a href="qstring.html">TQString</a> filename = TQFileDialog::<a href="qfiledialog.html#getSaveFileName">getSaveFileName</a>( + <a href="ntqstring.html">TQString</a> filename = TQFileDialog::<a href="ntqfiledialog.html#getSaveFileName">getSaveFileName</a>( TQString::null, "Images (*.png *.xpm *.jpg)", this, "file save as bitmap", "Chart -- File Save As Bitmap" ); - if ( TQPixmap::<a href="qpixmap.html#grabWidget">grabWidget</a>( m_canvasView ). + if ( TQPixmap::<a href="ntqpixmap.html#grabWidget">grabWidget</a>( m_canvasView ). save( filename, - filename.<a href="qstring.html#mid">mid</a>( filename.<a href="qstring.html#findRev">findRev</a>( '.' ) + 1 ).upper() ) ) - <a href="qmainwindow.html#statusBar">statusBar</a>()->message( TQString( "Wrote \'%1\'" ).arg( filename ), 2000 ); + filename.<a href="ntqstring.html#mid">mid</a>( filename.<a href="ntqstring.html#findRev">findRev</a>( '.' ) + 1 ).upper() ) ) + <a href="ntqmainwindow.html#statusBar">statusBar</a>()->message( TQString( "Wrote \'%1\'" ).arg( filename ), 2000 ); else - <a href="qmainwindow.html#statusBar">statusBar</a>()->message( TQString( "Failed to write \'%1\'" ). + <a href="ntqmainwindow.html#statusBar">statusBar</a>()->message( TQString( "Failed to write \'%1\'" ). arg( filename ), 2000 ); } void <a name="f175"></a>ChartForm::filePrint() { if ( !m_printer ) - m_printer = new <a href="qprinter.html">TQPrinter</a>; - if ( m_printer-><a href="qprinter.html#setup">setup</a>() ) { - <a href="qpainter.html">TQPainter</a> painter( m_printer ); + m_printer = new <a href="ntqprinter.html">TQPrinter</a>; + if ( m_printer-><a href="ntqprinter.html#setup">setup</a>() ) { + <a href="ntqpainter.html">TQPainter</a> painter( m_printer ); m_canvas->drawArea( TQRect( 0, 0, m_canvas->width(), m_canvas->height() ), &painter, FALSE ); - if ( !m_printer-><a href="qprinter.html#outputFileName">outputFileName</a>().isEmpty() ) - <a href="qmainwindow.html#statusBar">statusBar</a>()->message( TQString( "Printed \'%1\'" ). - arg( m_printer-><a href="qprinter.html#outputFileName">outputFileName</a>() ), 2000 ); + if ( !m_printer-><a href="ntqprinter.html#outputFileName">outputFileName</a>().isEmpty() ) + <a href="ntqmainwindow.html#statusBar">statusBar</a>()->message( TQString( "Printed \'%1\'" ). + arg( m_printer-><a href="ntqprinter.html#outputFileName">outputFileName</a>() ), 2000 ); } } |