Source Code (Use browser search to find items of interest.)
Class Index
kdm'ChooserDlg (./kdebase/kdm/DXdmcp.h:66)
class ChooserDlg : public FDialog {
Q_OBJECT
public:
ChooserDlg( CXdmcp *cxdmcp, QWidget *parent = 0, const char *name=0, bool modal=false,
WFlags f=0);
void ping();
public slots:
void addHostname();
void slotHelp();
private:
HostView *host_view;
QLineEdit *iline;
};
kdm'ChooserDlg::ChooserDlg() (./kdebase/kdm/DXdmcp.cpp:157)
ChooserDlg::ChooserDlg( CXdmcp *cxdmcp, QWidget *parent, const char *name,
bool modal, WFlags f)
: FDialog( parent, name, modal, f)
{
QBoxLayout* topLayout = new QVBoxLayout( this, 0, 0);
QFrame* winFrame = new QFrame( this);
winFrame->setFrameStyle(QFrame::WinPanel| QFrame::Raised);
topLayout->addWidget(winFrame);
QBoxLayout* vbox = new QVBoxLayout( winFrame, 10, 10);
host_view = new HostView( cxdmcp, winFrame, "hosts");
// Buttons
QPushButton *accept = new QPushButton( i18n("&Accept"), winFrame);
QPushButton *cancel = new QPushButton( i18n("&Cancel"), winFrame);
// QPushButton *willing = new QPushButton( i18n("&Willing"), winFrame);
QPushButton *help = new QPushButton( i18n("&Help"), winFrame);
QPushButton *ping = new QPushButton( i18n("&Ping"), winFrame);
QLabel* title = new QLabel( i18n("XDMCP Host Menu"), winFrame);
title->setAlignment( AlignCenter);
set_min(accept);
set_min(cancel);
set_min(ping);
set_min(help);
set_min(title);
vbox->addWidget( title);
vbox->addWidget( host_view);
QBoxLayout* hibox = new QHBoxLayout( vbox, 10 );
iline = new QLineEdit(winFrame);
iline->setEnabled(TRUE);
QLabel* itxt = new QLabel( iline, i18n("A&dd Host:"), winFrame);
hibox->addWidget( itxt);
hibox->addWidget( iline);
QBoxLayout* hbox = new QHBoxLayout( vbox, 20 );
hbox->addWidget( accept);
hbox->addWidget( ping);
// hbox->addWidget( willing);
hbox->addWidget( help);
hbox->addWidget( cancel);
topLayout->activate();
// setMinimumSize( winFrame->minimumSize());
connect( ping, SIGNAL( clicked()), host_view, SLOT( pingHosts()));
connect( accept, SIGNAL( clicked()), host_view, SLOT( accept()));
// connect( willing, SIGNAL( clicked()), host_view, SLOT( willing()));
connect( cancel, SIGNAL( clicked()), host_view, SLOT( cancel()));
connect( help, SIGNAL( clicked()), this, SLOT( slotHelp()));
connect( iline, SIGNAL( returnPressed()), this, SLOT( addHostname()));
}
kdm'ChooserDlg::slotHelp() (./kdebase/kdm/DXdmcp.cpp:217)
void ChooserDlg::slotHelp()
{
QMessageBox mb( i18n("Info"),
i18n("Choose a host, you want to work on,\n"
"in the list or add one.\n\n"
"After this box, you must press cancel\n"
"in the Host Menu to enter a host. :("),
QMessageBox::Information,
QMessageBox::Ok, 0, 0);
mb.exec();
iline->setFocus();
}
kdm'ChooserDlg::ping() (./kdebase/kdm/DXdmcp.cpp:230)
void ChooserDlg::ping()
{
host_view->pingHosts();
}
kdm'ChooserDlg::addHostname() (./kdebase/kdm/DXdmcp.cpp:235)
void ChooserDlg::addHostname()
{
if(iline->text().length()) {
host_view->slotRegisterHostname (iline->text().latin1());
iline->clear();
}
}