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 | |
parent | 34194d7d8957b77fbc032efa5b89ef56e322d35f (diff) | |
download | opie-f0a4320f43abb1a24f80d6de1a94d39453945355.zip opie-f0a4320f43abb1a24f80d6de1a94d39453945355.tar.gz opie-f0a4320f43abb1a24f80d6de1a94d39453945355.tar.bz2 |
- remove stdlib.h and stdio.h
-rw-r--r-- | noncore/settings/usermanager/groupdialog.cpp | 2 | ||||
-rw-r--r-- | noncore/settings/usermanager/userdialog.cpp | 3 | ||||
-rw-r--r-- | noncore/settings/usermanager/usermanager.cpp | 1 |
3 files changed, 0 insertions, 6 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; } diff --git a/noncore/settings/usermanager/userdialog.cpp b/noncore/settings/usermanager/userdialog.cpp index 19b0e84..d87a005 100644 --- a/noncore/settings/usermanager/userdialog.cpp +++ b/noncore/settings/usermanager/userdialog.cpp @@ -1,67 +1,64 @@ /*************************************************************************** * * * 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 "userdialog.h" #include <qlayout.h> #include <qlabel.h> #include <qmessagebox.h> #include <qfile.h> -#include <stdlib.h> - -#include <stdio.h> #include <sys/types.h> #include <sys/wait.h> #include <unistd.h> #include <signal.h> #include "passwd.h" #include <opie/odevice.h> using namespace Opie; /** * UserDialog constructor. Setup the dialog, fill the groupComboBox & groupsListView with all groups. * */ UserDialog::UserDialog(int viewmode, QWidget* parent, const char* name, bool modal, WFlags fl) : QDialog(parent, name, modal, fl) { vm=viewmode; QVBoxLayout *layout = new QVBoxLayout(this); myTabWidget=new QTabWidget(this,"User Tab Widget"); layout->addWidget(myTabWidget); setupTab1(); setupTab2(); accounts->groupStringList.sort(); // And also fill the listview & the combobox with all available groups. for( QStringList::Iterator it = accounts->groupStringList.begin(); it!=accounts->groupStringList.end(); ++it) { accounts->splitGroupEntry(*it); if(accounts->gr_name.find(QRegExp("^#"),0)) { // Skip commented lines. new QCheckListItem(groupsListView,accounts->gr_name,QCheckListItem::CheckBox); groupComboBox->insertItem(accounts->gr_name); } } showMaximized(); } /** * Empty destructor. * */ UserDialog::~UserDialog() { } /** * Creates the first tab, all userinfo is here. * */ void UserDialog::setupTab1() { QPixmap mypixmap; diff --git a/noncore/settings/usermanager/usermanager.cpp b/noncore/settings/usermanager/usermanager.cpp index 5c90525..5411995 100644 --- a/noncore/settings/usermanager/usermanager.cpp +++ b/noncore/settings/usermanager/usermanager.cpp @@ -1,61 +1,60 @@ /*************************************************************************** * * * 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 "usermanager.h" #include <qlayout.h> -#include <stdio.h> #include <qmessagebox.h> #include <qfile.h> #include <qpe/resource.h> #include <qregexp.h> /** * The mainwindow constructor. * * @param QWidget *parent * @param const char *name * @ param WFlags fl * */ UserConfig::UserConfig(QWidget* parent, const char* name, WFlags fl) : QMainWindow(parent, name, fl) { setCaption(tr("Opie User Manager")); // Create an instance of the global object 'accounts'. This holds all user/group info, and functions to modify them. accounts=new Passwd(); accounts->open(); // This actually loads the files /etc/passwd & /etc/group into memory. // Create the toolbar. QToolBar *toolbar = new QToolBar(this,"Toolbar"); toolbar->setHorizontalStretchable(1); // Is there any other way to get the toolbar to stretch of the full screen!? adduserToolButton = new QToolButton(Resource::loadPixmap("usermanager/adduser"),"Add User",0,this,SLOT(addUser()),toolbar,"Add User"); edituserToolButton = new QToolButton(Resource::loadPixmap("usermanager/edituser"),"Edit User",0,this,SLOT(editUser()),toolbar,"Edit User"); deleteuserToolButton = new QToolButton(Resource::loadPixmap("usermanager/deleteuser"),"Delete User",0,this,SLOT(delUser()),toolbar,"Delete User"); QToolButton *userstext = new QToolButton(0,"User",0,0,0,toolbar,"User"); userstext->setUsesTextLabel(true); toolbar->addSeparator(); addgroupToolButton = new QToolButton(Resource::loadPixmap("usermanager/addgroup"),"Add Group",0,this,SLOT(addGroup()),toolbar,"Add Group"); editgroupToolButton = new QToolButton(Resource::loadPixmap("usermanager/editgroup"),"Edit Group",0,this,SLOT(editGroup()),toolbar,"Edit Group"); deletegroupToolButton = new QToolButton(Resource::loadPixmap("usermanager/deletegroup"),"Delete Group",0,this,SLOT(delGroup()),toolbar,"Delete Group"); QToolButton *groupstext = new QToolButton(0,"Group",0,0,0,toolbar,"Group"); groupstext->setUsesTextLabel(true); addToolBar(toolbar,"myToolBar"); // Add a tabwidget and all the tabs. myTabWidget = new QTabWidget(this,"My Tab Widget"); setupTabAccounts(); setupTabAllUsers(); setupTabAllGroups(); userPopupMenu.insertItem("Copy",0); getUsers(); // Fill out the iconview & listview with all users. getGroups(); // Fill out the group listview with all groups. |