g.h" # include "ui_posterRent.h" # include " ; ui_tabFunction.h "# include" ui_searchPosterHiring.h "# include" ui_searchPosterRent.h "class FunctionGuest: public QWidget {Q_OBJECT protected: QWidget * searchWindowPosterHiring; QWidget * searchWindowPosterRent; QLinkedList * users; Ui :: searchPosterHiring uiSearchHiring; Ui :: searchPosterRent uiSearchRent; Ui :: posterHiring uiHiring; Ui :: posterRent uiRent; Ui :: tabFunction uiFunction; protected: void addQStringInTable (QTableWidget * table, QString text, const int row, const int column); public: FunctionGuest (QLinkedList * _users, QWidget * parent = 0); ~ FunctionGuest (); bool selectionPosterHiring (PosterHiring * poster, const QLineEdit * city, const QLineEdit * area, const QComboBox * nRoom, const QCheckBox * furtiture, const QCheckBox * animal, const QComboBox * tenant, const QLineEdit * price); bool selectionPosterRent (PosterRent * poster, const QLineEdit * city, const QLineEdit * area, const QLineEdit * street, const QLineEdit * home, const QSpinBox * floor, const QComboBox * nRoom, const QCheckBox * furtiture, const QCheckBox * animal, const QComboBox * tenant, const QLineEdit * price); void addInTablePosterHiring (QTableWidget * table, PosterHiring * poster, const int row); void addInTablePosterRent (QTableWidget * table, PosterRent * poster , const int row); void clearPosterHiring (QLineEdit * city, QLineEdit * area, QLineEdit * nPhone, QComboBox * nRoom, QCheckBox * furtiture, QCheckBox * animal, QComboBox * tenant, QLineEdit * price); void clearPosterRent (QLineEdit * city, QLineEdit * area, QLineEdit * street, QLineEdit * home, QSpinBox * floor, QLineEdit * nPhone, QComboBox * nRoom, QCheckBox * furtiture, QCheckBox * animal, QComboBox * tenant, QLineEdit * price); protected slots: void searchPosterHiring (); void searchPosterRent (); void clearPosterHiring (); void clearPosterRent ();}; # endif// FUNCTIONGUEST_H
Лістинг functionGuest.cpp
functionGuest.cpp # include "functionGuest.h" # include "ui_tabPostersHiring.h" # include "ui_tabPostersRent.h" FunctionGuest :: FunctionGuest (QLinkedList * _users, QWidget * parent) {if (! parent) parent = this; users = _users; searchWindowPosterHiring = new QWidget (parent); searchWindowPosterRent = new QWidget (parent); uiSearchHiring.setupUi (searchWindowPosterHiring); uiSearchRent.setupUi (searchWindowPosterRent); uiHiring.setupUi (uiSearchHiring.windowPosterHiring); uiRent.setupUi (uiSearchRent.searchWindowPosterRent); uiHiring.nPhoneLabel-> hide (); uiHiring.nPhoneLineEdit-> hide (); uiRent.nPhoneLabel-> hide (); uiRent.nPhoneLineEdit-> ; hide (); uiFunction.setupUi (parent); uiFunction.delAccountButton-> hide (); uiFunction.tabWidget-> addTab (searchWindowPosterHiring, searchWindowPosterHiring -> windowTitle ()); uiFunction.tabWidget-> addTab (searchWindowPosterRent , searchWindowPosterRent -> windowTitle ()); QObject :: connect (uiSearchHiring.o...