author | ar <ar> | 2003-12-22 17:29:18 (UTC) |
---|---|---|
committer | ar <ar> | 2003-12-22 17:29:18 (UTC) |
commit | f0a4320f43abb1a24f80d6de1a94d39453945355 (patch) (side-by-side diff) | |
tree | 5ad5cd96bb659152a67c0f8b43726091615109e8 /noncore/settings/usermanager/groupdialog.cpp | |
parent | 34194d7d8957b77fbc032efa5b89ef56e322d35f (diff) | |
download | opie-f0a4320f43abb1a24f80d6de1a94d39453945355.zip opie-f0a4320f43abb1a24f80d6de1a94d39453945355.tar.gz opie-f0a4320f43abb1a24f80d6de1a94d39453945355.tar.bz2 |
- remove stdlib.h and stdio.h
Diffstat (limited to 'noncore/settings/usermanager/groupdialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/usermanager/groupdialog.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/noncore/settings/usermanager/groupdialog.cpp b/noncore/settings/usermanager/groupdialog.cpp index b595d31..76810be 100644 --- a/noncore/settings/usermanager/groupdialog.cpp +++ b/noncore/settings/usermanager/groupdialog.cpp @@ -1,65 +1,63 @@ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "groupdialog.h" #include <qlabel.h> #include <qlayout.h> #include <qmessagebox.h> -#include <stdlib.h> - #include "passwd.h" GroupDialog::GroupDialog(QWidget* parent, const char* name, bool modal, WFlags fl) : QDialog(parent, name, modal, fl) { // GID QLabel *gidLabel=new QLabel(this,"gid: "); gidLabel->setText("GroupID: "); gidLineEdit=new QLineEdit(this,"gid: "); gidLineEdit->setEnabled(false); // Groupname QLabel *groupnameLabel=new QLabel(this,"groupname"); groupnameLabel->setText("Groupname: "); groupnameLineEdit=new QLineEdit(this,"groupname"); // Widget layout QVBoxLayout *layout=new QVBoxLayout(this); layout->setMargin(5); QHBoxLayout *hlayout=new QHBoxLayout(-1,"hlayout"); layout->addLayout(hlayout); QVBoxLayout *vlayout1=new QVBoxLayout(-1,"vlayout1"); QVBoxLayout *vlayout2=new QVBoxLayout(-1,"vlayout2"); // First column, labels vlayout1->addWidget(gidLabel); vlayout1->addWidget(groupnameLabel); // Second column, data vlayout2->addWidget(gidLineEdit); vlayout2->addWidget(groupnameLineEdit); hlayout->addLayout(vlayout1); hlayout->addLayout(vlayout2); layout->addSpacing(5); // showMaximized(); } GroupDialog::~GroupDialog() { } bool GroupDialog::addGroup(int gid) { GroupDialog *addgroupDialog=new GroupDialog(); // Make a groupinfo dialog. addgroupDialog->setCaption(tr("Add Group")); // Set the caption. addgroupDialog->gidLineEdit->setText(QString::number(gid)); // Set the next available gid. if(!(addgroupDialog->exec())) return false; // View the dialog, and only continue if 'ok' was pressed. if(!(accounts->addGroup(addgroupDialog->groupnameLineEdit->text(),addgroupDialog->gidLineEdit->text().toInt()))) { // Try to add the group. QMessageBox::information(0,"Ooops!","Something went wrong.\nUnable to add group."); return false; } return true; } |