-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for Napisy24 engine configuration (#88)
* support for configuring napisy24 engine
- Loading branch information
Showing
13 changed files
with
328 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
|
||
/***************************************************************************** | ||
** QNapi | ||
** Copyright (C) 2008-2015 Piotr Krzemiński <[email protected]> | ||
** | ||
** This program is free software; you can redistribute it and/or modify | ||
** it under the terms of the GNU General Public License as published by | ||
** the Free Software Foundation; either version 2 of the License, or | ||
** (at your option) any later version. | ||
** | ||
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
** | ||
*****************************************************************************/ | ||
|
||
#include "frmnapisy24config.h" | ||
#include "../qnapi.h" | ||
|
||
frmNapisy24Config::frmNapisy24Config(QWidget *parent, Qt::WindowFlags f) | ||
: QDialog(parent, f) | ||
{ | ||
ui.setupUi(this); | ||
QNapi q; | ||
q.addEngines(q.enumerateEngines()); | ||
setWindowIcon(q.engineByName("Napisy24")->engineIcon()); | ||
|
||
load(); | ||
|
||
connect(ui.pbRegister, SIGNAL(clicked()), this, SLOT(pbRegisterClicked())); | ||
|
||
QRect position = frameGeometry(); | ||
position.moveCenter(QDesktopWidget().availableGeometry().center()); | ||
move(position.topLeft()); | ||
} | ||
|
||
void frmNapisy24Config::accept() | ||
{ | ||
GlobalConfig().setNick("Napisy24", ui.leNick->text()); | ||
GlobalConfig().setPass("Napisy24", ui.lePass->text()); | ||
QDialog::accept(); | ||
} | ||
|
||
void frmNapisy24Config::pbRegisterClicked() | ||
{ | ||
((QNapiApp*)qApp)->showCreateAccount("Napisy24"); | ||
} | ||
|
||
void frmNapisy24Config::load() | ||
{ | ||
ui.leNick->setText(GlobalConfig().nick("Napisy24")); | ||
ui.lePass->setText(GlobalConfig().pass("Napisy24")); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/***************************************************************************** | ||
** QNapi | ||
** Copyright (C) 2008-2015 Piotr Krzemiński <[email protected]> | ||
** | ||
** This program is free software; you can redistribute it and/or modify | ||
** it under the terms of the GNU General Public License as published by | ||
** the Free Software Foundation; either version 2 of the License, or | ||
** (at your option) any later version. | ||
** | ||
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
** | ||
*****************************************************************************/ | ||
|
||
#ifndef __FRMNAPISY24CONFIG__H__ | ||
#define __FRMNAPISY24CONFIG__H__ | ||
|
||
#include <QDialog> | ||
#include "ui_frmnapisy24config.h" | ||
|
||
#include "qnapiconfig.h" | ||
#include "qnapiapp.h" | ||
|
||
class frmNapisy24Config : public QDialog | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
|
||
frmNapisy24Config(QWidget *parent = 0, Qt::WindowFlags f = 0); | ||
~frmNapisy24Config() {} | ||
|
||
public slots: | ||
|
||
void accept(); | ||
void pbRegisterClicked(); | ||
|
||
private: | ||
Ui::frmNapisy24Config ui; | ||
|
||
void load(); | ||
|
||
}; | ||
|
||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.