1 #include <QApplication>
13 int main(
int argc,
char* argv[] )
15 QApplication application( argc, argv );
21 return application.exec();
26 setWindowTitle( tr(
"Interface with RasMol Instances" ) );
32 QGridLayout* mainLayout =
new QGridLayout(
this );
33 mainLayout->setSpacing ( 2 );
34 mainLayout->setContentsMargins ( 2, 2, 2, 2 );
37 QLabel* lb_intname =
us_label( tr(
"Interp Name:" ) );
45 QLabel* lb_commcmd =
us_label( tr(
"Send Common Command:" ) );
64 QLabel* lb_results =
us_label( tr(
"Command Results:" ) );
71 connect(
cb_commcmd, SIGNAL( activated (
const QString& ) ),
77 connect(
pb_close, SIGNAL( clicked() ),
78 this, SLOT ( close() ) );
82 mainLayout->addWidget( lb_intname, row, 0, 1, 2 );
83 mainLayout->addWidget(
cb_intname, row++, 2, 1, 2 );
84 mainLayout->addWidget( lb_commcmd, row, 0, 1, 2 );
85 mainLayout->addWidget(
cb_commcmd, row++, 2, 1, 2 );
86 mainLayout->addWidget(
pb_sendcmd, row, 0, 1, 1 );
87 mainLayout->addWidget(
le_sendcmd, row++, 1, 1, 3 );
88 mainLayout->addWidget( lb_results, row++, 0, 1, 4 );
89 mainLayout->addWidget(
te_status, row++, 0, 1, 4 );
91 mainLayout->addWidget(
pb_close, row++, 2, 1, 2 );
103 DbgLv(1) <<
"SCMD: command" << scmnd <<
"iname" << iname;
109 tr(
"Successful Send to \"%1\"\n of command \"%2\"." )
110 .arg( iname ).arg( scmnd ) :
122 DbgLv(1) <<
"CHCMD: command" << scmnd;
133 QList< ulong > w_ids;
134 QStringList w_inames;
139 if ( nids != nnames )
141 qDebug() <<
"*ERROR* Number of IDs does not match number of Names"
146 else if ( nids == 0 )
148 te_status->setPlainText( QString(
"(none)" ) );
154 for (
int ii = 0; ii < nids; ii++ )
159 QString iname = w_inames[ ii ];
160 QString ientry = QString().sprintf(
"%lx : ", w_ids[ ii ] ) + iname;
171 namtext += tr(
"\n\nZombie Interpreters:" );
173 for (
int ii = 0; ii < nzomb; ii++ )
175 namtext +=
"\n" + zombies[ ii ];