Source Code (Use browser search to find items of interest.)
Class Index
kfinger'Talk (./kdenetwork/kfinger/kfinger.h:92)
class Talk : public QDialog
{
Q_OBJECT
public:
Talk (QWidget* parent = 0,const char* name = 0,QString command="ktalk");
virtual ~Talk();
public slots:
void adduser(const char *username);
protected slots:
virtual void newselect(int a);
virtual void runtalk();
virtual void quit();
private:
QListBox* usrQListBox;
QLineEdit* TalkLineEdit;
QString theCommand;
protected:
};
kfinger'Talk::Talk() (./kdenetwork/kfinger/kfinger.C:719)
Talk::Talk( QWidget *parent, const char *name,QString command)
: QDialog( parent, name,true )
{
theCommand=command;
setMinimumSize(400,310);
setMaximumSize(400,310);
usrQListBox = new QListBox( this, "ListBox_1" );
usrQListBox->setGeometry( 10, 80, 380, 180 );
connect( usrQListBox, SIGNAL(selected(int)), SLOT(newselect(int)) );
usrQListBox->setFrameStyle( 51 );
usrQListBox->setLineWidth( 2 );
//QLineEdit* tmpQLineEdit;
TalkLineEdit = new QLineEdit( this, "LineEdit_1" );
TalkLineEdit->setGeometry( 140, 30, 250, 30 );
connect( TalkLineEdit, SIGNAL(returnPressed()), SLOT(runtalk()) );
TalkLineEdit->setText( "" );
QPushButton* tmpQPushButton;
tmpQPushButton = new QPushButton( this, "PushButton_1" );
tmpQPushButton->setGeometry( 20, 30, 100, 30 );
connect( tmpQPushButton, SIGNAL(clicked()), SLOT(runtalk()) );
tmpQPushButton->setText( i18n("Talk with..." ));
tmpQPushButton->setAutoRepeat( false );
tmpQPushButton->setAutoResize( false );
tmpQPushButton->setAutoDefault( true );
tmpQPushButton = new QPushButton( this, "PushButton_2" );
tmpQPushButton->setGeometry( 150, 270, 100, 30 );
connect( tmpQPushButton, SIGNAL(clicked()), SLOT(quit()) );
tmpQPushButton->setText( i18n("Cancel" ));
tmpQPushButton->setAutoRepeat( false );
tmpQPushButton->setAutoResize( false );
resize( 400, 310 );
}
kfinger'Talk::~Talk() (./kdenetwork/kfinger/kfinger.C:758)
Talk::~Talk()
{
}
kfinger'Talk::adduser() (./kdenetwork/kfinger/kfinger.C:762)
void Talk::adduser(const char *username)
{
usrQListBox->insertItem(username);
}
kfinger'Talk::newselect() (./kdenetwork/kfinger/kfinger.C:767)
void Talk::newselect(int a)
{
TalkLineEdit->setText(usrQListBox->text(a) );
}
kfinger'Talk::runtalk() (./kdenetwork/kfinger/kfinger.C:773)
void Talk::runtalk()
{
strcpy(sstr1, theCommand);
strcat(sstr1, " ");
strcat(sstr1, TalkLineEdit->text().ascii());
if ((fork())==0) {
execl("/bin/sh", "sh", "-c",sstr1, NULL);
_exit(127);
}
}
kfinger'Talk::quit() (./kdenetwork/kfinger/kfinger.C:785)
void Talk::quit()
{
close();
}
// Format Dialog