{_OBJECT: TTMSMainWindow (QWidget * parent = 0);
~ TTMSMainWindow (); manager; ticket; ::: TTMSMainWindow * ui; slots: on_commandLinkButton_clicked ();
};
# endif// TTMSMAINWINDOW_H
Файл TTMSMainWindow.cpp
# include "ttmsmainwindow.h"
# include "ui_ttmsmainwindow.h" :: TTMSMainWindow (QWidget * parent): (parent), (new Ui :: TTMSMainWindow)
{> setupUi (this);
} :: ~ TTMSMainWindow ()
{ui;
} TTMSMainWindow :: on_commandLinkButton_clicked ()
{userLoginInput = ui-> loginLineEdit-> text (); userPassInput = ui-> passLineEdit-> text (); crewManager ("C: Users Oleksiy Documents managers.txt "); (crewManager.open (QIODevice :: ReadOnly))
{stream (& crewManager); str; (! stream.atEnd ())
{= stream.readLine (); (userLoginInput == str)
{((str = stream.readLine ()) == userPassInput)
{> hide ();> manager.show ();;
}
}
}
}. close (); crewSeller ("C: Users Oleksiy Documents sellers.txt"); (crewSeller.open (QIODevice :: ReadOnly))
{stream (& crewSeller); str; (! stream.atEnd ())
{= stream.readLine (); (userLoginInput == str)
{((str = stream.readLine ()) == userPassInput)
{> hide ();> ticket.show ();;
}
}
}
}. close ();
}
Файл Main.cpp
# include
# include "ttmsm ainwindow.h "main (int argc, char * argv [])
{a (argc, argv); w;. show (); a.exec ();
}
Файл ManagerWindow.h
# ifndef MANAGERWINDOW_H
# define MANAGERWINDOW_H
# include
# include
# include
# include Ui {ManagerWindow;
} ManagerWindow: public QMainWindow
{_OBJECT: ManagerWindow (QWidget * parent = 0);
~ ManagerWindow (); ::: ManagerWindow
// void on_pushButton_2_clicked (); on_addMatchPushButton_clicked ();
};
# endif// MANAGERWINDOW_H
Файл ManagerWindow.cpp
# include "managerwindow.h"