Esempio n. 1
0
PDB_UserInfo::PDB_UserInfo(QWidget *parent) : QWidget(parent) {
  QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
  QLabel *l = new QLabel(i18n("To log on to your ISP, kppp needs the username\n"
			    "and the password you got from your ISP. Type\n"
			    "in this information in the fields below.\n\n"
			    "Word case is important here."),
		       this);
  tl->addWidget(l);

  QGridLayout *l1 = new QGridLayout(2, 2);
  tl->addLayout(l1);
  l = new QLabel(i18n("Username:"******"Password:"), this);
  l1->addWidget(l, 1, 0);
  _username = newLineEdit(24, this);
  connect(_username, SIGNAL(textChanged(const QString &)),
	  this, SLOT(textChanged(const QString &)));
  l1->addWidget(_username, 0, 1);
  _password = newLineEdit(24, this);
  _password->setEchoMode(QLineEdit::Password);
  connect(_password, SIGNAL(textChanged(const QString &)),
	  this, SLOT(textChanged(const QString &)));
  l1->addWidget(_password, 1, 1);
  tl->activate();
}
Esempio n. 2
0
PDB_DialPrefix::PDB_DialPrefix(QWidget *parent) : QWidget(parent) {
  QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
  QLabel *l = new QLabel(i18n("If you need a special dial prefix (e.g. if you\n"
			    "are using a telephone switch) you can specify\n"
			    "it here. This prefix is dialed just before the\n"
			    "phone number.\n\n"
			    "If you have a telephone switch, you probably need\n"
			    "to write \"0\" or \"0,\" here."),
		       this);
  tl->addWidget(l);

  QGridLayout *l1 = new QGridLayout(1, 2);
  tl->addLayout(l1);
  l = new QLabel(i18n("Dial prefix:"), this);
  l1->addWidget(l, 0, 0);
  _prefix = newLineEdit(24, this);
  l1->addWidget(_prefix, 0, 1);
  tl->activate();
}
Esempio n. 3
0
PPPdArguments::PPPdArguments(QWidget *parent, const char *name)
  : QDialog(parent, name, TRUE)
{
  setCaption(i18n("Customize pppd Arguments"));  
  KWM::setMiniIcon(winId(), kapp->getMiniIcon());
  QVBoxLayout *l = new QVBoxLayout(this, 10, 10);
  QHBoxLayout *tl = new QHBoxLayout(10);
  l->addLayout(tl);
  QVBoxLayout *l1 = new QVBoxLayout();
  QVBoxLayout *l2 = new QVBoxLayout();
  tl->addLayout(l1, 1);
  tl->addLayout(l2, 0);

  QHBoxLayout *l11 = new QHBoxLayout(10);
  l1->addLayout(l11);

  argument_label = newLabel(i18n("Argument:"), this);
  l11->addWidget(argument_label);

  argument = newLineEdit(0, this);
  connect(argument, SIGNAL(returnPressed()), 
	  SLOT(addbutton()));
  l11->addWidget(argument);
  connect(argument, SIGNAL(textChanged(const char *)),
	  this, SLOT(textChanged(const char *)));

  arguments = new QListBox(this);
  arguments->setMinimumSize(1, fontMetrics().lineSpacing()*10);
  connect(arguments, SIGNAL(highlighted(int)),
	  this, SLOT(itemSelected(int)));
  l1->addWidget(arguments, 1);

  add = new QPushButton(i18n("Add"), this);
  FIXED_HEIGHT(add);
  MIN_WIDTH(add);
  connect(add, SIGNAL(clicked()), SLOT(addbutton()));
  l2->addWidget(add);
  l2->addStretch(1);  

  remove = new QPushButton(i18n("Remove"), this);
  FIXED_HEIGHT(remove);
  MIN_WIDTH(remove);
  connect(remove, SIGNAL(clicked()), SLOT(removebutton()));
  l2->addWidget(remove);

  defaults = new QPushButton(i18n("Defaults"), this);
  FIXED_HEIGHT(defaults);
  MIN_WIDTH(defaults);
  connect(defaults, SIGNAL(clicked()), SLOT(defaultsbutton()));
  l2->addWidget(defaults);
  
  l->addSpacing(5);

  KButtonBox *bbox = new KButtonBox(this);
  bbox->addStretch(1);
  closebtn = bbox->addButton(i18n("OK"));
  connect(closebtn, SIGNAL(clicked()), SLOT(closebutton()));
  QPushButton *cancel = bbox->addButton(i18n("Cancel"));
  connect(cancel, SIGNAL(clicked()),
	  this, SLOT(reject()));
  bbox->layout();
  l->addWidget(bbox);

  l->freeze();

  //load info from gpppdata
  init();

  add->setEnabled(false);
  remove->setEnabled(false);
  argument->setFocus();
}