passworddlg.h
1 //------------------------------------------------------------------------------
2 // passworddlg.h
3 //------------------------------------------------------------------------------
4 //
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
9 //
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 // 02110-1301 USA
19 //
20 //------------------------------------------------------------------------------
21 // Copyright (C) 2009 Braden "Blzut3" Obrzut <admin@maniacsvault.net>
22 //------------------------------------------------------------------------------
23 #ifndef __PASSWORDDIALOG_H__
24 #define __PASSWORDDIALOG_H__
25 
26 #include "serverapi/serverptr.h"
27 #include "dptr.h"
28 #include <QDialog>
29 
30 class EnginePlugin;
31 class Server;
32 class QStringList;
33 
34 class PasswordDlg : public QDialog
35 {
36  Q_OBJECT
37 
38  public:
39  PasswordDlg(ServerCPtr server, QWidget *parent=NULL);
40  ~PasswordDlg();
41 
42  QString connectPassword() const;
43  QString inGamePassword() const;
44 
45  public slots:
46  void accept();
47 
48  private:
50 
51  void applyInputsVisibility();
52  void loadConfiguration();
53  void saveConfiguration();
54  void setCurrentConnectPassword(const QString& password);
55  void setCurrentIngamePassword(const QString& password);
56  void setPasswords(const QStringList& passwords);
57 
58  private slots:
59  void removeCurrentConnectPassword();
60  void removeCurrentIngamePassword();
61 };
62 
63 #endif /* __PASSWORDDIALOG_H__ */
A representation of a server for a given game.
Definition: server.h:93