ionModel () -> clearSelection ();} void FunctionAdmin :: editPostersUser () {int row = uiFunctionAdmin.usersTableWidget-> currentRow (); QLinkedList :: Iterator passage = users-> begin (); for (row = 0; row currentRow (); row + +) + + passage; QDialog * window = new QDialog (this); FunctionAdmin * user = new FunctionAdmin (users, * passage, window); user-> uiFunction.tabWidget-> removeTab (0); user-> uiFunction.tabWidget-> removeTab ( 0); user-> uiFunction.tabWidget-> removeTab (2); user-> uiFunction.delAccountButton-> hide (); window-> exec (); if (* passage == current) {row = uiTabPostersHiring.tableWidget-> rowCount (); while (row> 0) uiTabPostersHiring.tableWidget-> removeRow (- row), row = uiTabPostersRent.tableWidget-> rowCount (); while (row> 0) uiTabPostersRent.tableWidget-> removeRow (- row), fillPosterTableHiring (); fillPosterTableRent ();} delete user; delete window; uiFunctionAdmin.usersTableWidget-> selectionModel () -> clearSelection ();}
Лістинг main.cpp
main.cpp # include # include "mainWindow.h" # include "functionAdmin.h" # include "login.h" int main (int argc, char ** argv) {QApplication app (argc, argv); MainWindow mainWindow; FunctionGuest * guestWindow; FunctionUser * userWindow; FunctionAdmin * adminWindow; Login loginWindow; if (! loginWindow.exec ()) return 0; if (! loginWindow.getCurrentUser ()) guestWindow = new FunctionGuest (loginWindow.getUsers (), mainWindow.centralWidget ()); else if (loginWindow.getCurrentUser () -> getAccess () == USER) userWindow = new FunctionUser (loginWindow.getUsers (), loginWindow.getCurrentUser (), mainWindow.centralWidget ()); else adminWindow = new FunctionAdmin (loginWindow.getUsers (), loginWindow.getCurrentUser (), mainWindow.centralWidget ()); mainWindow.show (); return app.exec ();}