void ApplicationWindow::Editor_2()
{
char name[32]="AppWin::Editor_2";
if( rtfAct->isChecked() ) {
QString tt
= xlist
->get_desc
(xlist
->get_varno
("about_rtf_file"));
about_rtf_file.setName(tt);
if ( !about_rtf_file.exists() ) {
midget("%s does not exist %d %s\n",qPrintable(tt),__LINE__,__FILE__);
return;
}
if ( !about_rtf_file.
open( QIODevice::ReadOnly ) ) { midget("Could not open about_rtf_file: %s %d %s\n",qPrintable(tt),__LINE__,__FILE__);
return;
}
setCursor(Qt::waitCursor);
e_2->setGeometry(get_int("xxe"), get_int("yye"), get_int("wwe"), get_int("hhe"));
midget("debugger x=%d y=%d w=%d h=%d %d %s\n",get_int("xxe"), get_int("yye"), get_int("wwe"), get_int("hhe"),__LINE__,__FILE__);
// e->setDocumentTitle(debug_file);
e_2->setReadOnly(TRUE);
e_2->setAcceptRichText(TRUE);
e_2->setFocus();
e_2->clear();
int kk =0;
while ( !t_t.atEnd() ) {
qApp->processEvents();
e_2->append( s );
kk++;
}
midget("Read %d lines of about_rtf_file: %d %s\n",kk,__LINE__,__FILE__);
about_rtf_file.close();
setCursor(Qt::arrowCursor);
e_2->show();
}
else {
about_rtf_file.close();
delete e_2;
xdeb->hide();
ss->repaint();
}
emit(setStat());
void ApplicationWindow::Editor_2()
{
char name[32]="AppWin::Editor_2";
QString s,tt,tt1;
if( rtfAct->isChecked() ) {
QString tt = xlist->get_desc(xlist->get_varno("about_rtf_file"));
about_rtf_file.setName(tt);
if ( !about_rtf_file.exists() ) {
midget("%s does not exist %d %s\n",qPrintable(tt),__LINE__,__FILE__);
return;
}
if ( !about_rtf_file.open( QIODevice::ReadOnly ) ) {
midget("Could not open about_rtf_file: %s %d %s\n",qPrintable(tt),__LINE__,__FILE__);
return;
}
setCursor(Qt::waitCursor);
e_2 = new QTextBrowser( this, "editor" );
e_2->setGeometry(get_int("xxe"), get_int("yye"), get_int("wwe"), get_int("hhe"));
midget("debugger x=%d y=%d w=%d h=%d %d %s\n",get_int("xxe"), get_int("yye"), get_int("wwe"), get_int("hhe"),__LINE__,__FILE__);
// e->setDocumentTitle(debug_file);
e_2->setReadOnly(TRUE);
e_2->setAcceptRichText(TRUE);
e_2->setFocus();
e_2->clear();
int kk =0;
QTextStream t_t(&about_rtf_file);
while ( !t_t.atEnd() ) {
QString s = t_t.readLine();
qApp->processEvents();
e_2->append( s );
kk++;
}
midget("Read %d lines of about_rtf_file: %d %s\n",kk,__LINE__,__FILE__);
about_rtf_file.close();
setCursor(Qt::arrowCursor);
e_2->show();
}
else {
about_rtf_file.close();
delete e_2;
xdeb->hide();
ss->repaint();
}
emit(setStat());
To copy to clipboard, switch view to plain text mode
Bookmarks