64 mScheduler = scheduler;
66 TQBoxLayout *topLayout =
new TQVBoxLayout(
this );
68 TQSplitter *mainSplitter =
new TQSplitter( TQt::Horizontal,
this );
69 topLayout->addWidget( mainSplitter );
71 TQWidget *commandBox =
new TQWidget( mainSplitter );
73 TQBoxLayout *commandLayout =
new TQVBoxLayout( commandBox );
74 commandLayout->setMargin( KDialog::marginHint() );
75 commandLayout->setSpacing( KDialog::spacingHint() );
77 mCommandList =
new TQListView( commandBox );
78 mCommandList->addColumn( i18n(
"Name" ) );
79 mCommandList->addColumn( i18n(
"Command" ) );
80 mCommandList->addColumn( i18n(
"Hex" ) );
81 commandLayout->addWidget( mCommandList );
83 connect( mCommandList, TQ_SIGNAL( doubleClicked(TQListViewItem*) ),
84 TQ_SLOT( executeCommand() ) );
86 TQPushButton *buttonAdd =
new TQPushButton( i18n(
"Add..."), commandBox );
87 commandLayout->addWidget( buttonAdd );
88 connect( buttonAdd, TQ_SIGNAL( clicked() ), TQ_SLOT( addCommand() ) );
90 TQPushButton *buttonEdit =
new TQPushButton( i18n(
"Edit..."), commandBox );
91 commandLayout->addWidget( buttonEdit );
92 connect( buttonEdit, TQ_SIGNAL( clicked() ), TQ_SLOT( editCommand() ) );
94 TQPushButton *buttonDelete =
new TQPushButton( i18n(
"Delete"), commandBox );
95 commandLayout->addWidget( buttonDelete );
96 connect( buttonDelete, TQ_SIGNAL( clicked() ), TQ_SLOT( deleteCommand() ) );
98 TQPushButton *buttonExecute =
new TQPushButton( i18n(
"Execute"), commandBox );
99 commandLayout->addWidget( buttonExecute );
100 connect( buttonExecute, TQ_SIGNAL( clicked() ), TQ_SLOT( executeCommand() ) );
102 TQSplitter *ioSplitter =
new TQSplitter( TQt::Vertical, mainSplitter );
104 TQWidget *inBox =
new TQWidget( ioSplitter );
106 TQBoxLayout *inLayout =
new TQVBoxLayout( inBox );
108 TQLabel *inLabel =
new TQLabel( i18n(
"Input:"), inBox );
109 inLabel->setMargin( 2 );
110 inLayout->addWidget( inLabel );
112 mInput =
new TQTextEdit( inBox );
113 inLayout->addWidget( mInput );
115 TQWidget *outBox =
new TQWidget( ioSplitter );
117 TQBoxLayout *outLayout =
new TQVBoxLayout( outBox );
119 TQLabel *outLabel =
new TQLabel( i18n(
"Output:"), outBox );
120 outLabel->setMargin( 2 );
121 outLayout->addWidget( outLabel );
123 mOutput =
new TQTextEdit( outBox );
124 mOutput->setReadOnly(
true );
125 outLayout->addWidget( mOutput );
127 TQVBox *resultBox =
new TQVBox( mainSplitter );
129 TQLabel *resultLabel =
new TQLabel( i18n(
"Result:"), resultBox );
130 resultLabel->setMargin( 2 );
132 mResultView =
new TQTextEdit( resultBox );
133 mResultView->setReadOnly(
true );
135 connect (mInput,TQ_SIGNAL(returnPressed()),TQ_SLOT(processLastLine()));
137 connect(mScheduler->modem(),TQ_SIGNAL(gotLine(
const char *)),
138 TQ_SLOT(appendOutput(
const char *)));
140 connect(mScheduler,TQ_SIGNAL(result(
const TQString &)),
141 mResultView,TQ_SLOT(setText(
const TQString &)));
142 connect(mScheduler,TQ_SIGNAL(commandProcessed(
ATCommand *)),