Diffstat (limited to 'noncore/settings/usermanager/usermanager.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/usermanager/usermanager.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/noncore/settings/usermanager/usermanager.cpp b/noncore/settings/usermanager/usermanager.cpp index 2735e6a..57efa71 100644 --- a/noncore/settings/usermanager/usermanager.cpp +++ b/noncore/settings/usermanager/usermanager.cpp @@ -51,12 +51,13 @@ UserConfig::UserConfig(QWidget* parent, const char* name, WFlags fl) : QMainWind // 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. setCentralWidget(myTabWidget); } @@ -74,12 +75,14 @@ void UserConfig::setupTabAccounts() { usersIconView=new QListView(tabpage,"users"); usersIconView->addColumn("Icon"); usersIconView->addColumn("Username"); usersIconView->setAllColumnsShowFocus(true); layout->addWidget(usersIconView); + connect(usersIconView,SIGNAL(returnPressed(QListViewItem *)),this,SLOT(showUserMenu(QListViewItem *))); + myTabWidget->addTab(tabpage,"Users"); } void UserConfig::setupTabAllUsers() { QWidget *tabpage = new QWidget(this); QVBoxLayout *layout = new QVBoxLayout(tabpage); @@ -241,6 +244,11 @@ void UserConfig::delGroup() { if(GroupDialog::delGroup(groupname)) getGroups(); // And also update the view afterwards if the user was deleted. } } else { QMessageBox::information(this,"No selection","No group has been selected."); } } + +void UserConfig::showUserMenu(QListViewItem *item) { +// userPopupMenu.exec(item->mapToGlobal(QPoint(0,0))); + qWarning("Pressed!"); +} |