New lua versions
[ryzomcore.git] / studio / src / plugins / mission_compiler / server_entry_dialog.cpp
blobf420dd1ca3e287ae25aaa6d0385977fe574b73d1
1 // Object Viewer Qt - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) <dnk-88@tut.by>
3 //
4 // This source file has been modified by the following contributors:
5 // Copyright (C) 2010 Winch Gate Property Limited
6 // Copyright (C) 2011 Matt RAYKOWSKI (sfb) <matt.raykowski@gmail.com>
7 // Copyright (C) 2013 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
8 //
9 // This program is free software: you can redistribute it and/or modify
10 // it under the terms of the GNU Affero General Public License as
11 // published by the Free Software Foundation, either version 3 of the
12 // License, or (at your option) any later version.
14 // This program is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU Affero General Public License for more details.
19 // You should have received a copy of the GNU Affero General Public License
20 // along with this program. If not, see <http://www.gnu.org/licenses/>.
22 // Project includes
23 #include "server_entry_dialog.h"
25 #include "ui_server_entry_dialog.h"
27 // NeL includes
29 // Qt includes
30 #include <QFileDialog>
32 namespace MissionCompiler
35 ServerEntryDialog::ServerEntryDialog(QWidget *parent)
36 : QDialog(parent),
37 m_ui(new Ui::ServerEntryDialog)
39 m_ui->setupUi(this);
41 connect(m_ui->serverTextPathButton, SIGNAL(clicked()), this, SLOT(lookupTextPath()));
42 connect(m_ui->serverPrimPathButton, SIGNAL(clicked()), this, SLOT(lookupPrimPath()));
45 ServerEntryDialog::~ServerEntryDialog()
47 delete m_ui;
50 QString ServerEntryDialog::getServerName()
52 return m_ui->serverNameEdit->text();
55 QString ServerEntryDialog::getTextPath()
57 return m_ui->serverTextPathEdit->text();
60 QString ServerEntryDialog::getPrimPath()
62 return m_ui->serverPrimPathEdit->text();
65 void ServerEntryDialog::setServerName(QString name)
67 m_ui->serverNameEdit->setText(name);
70 void ServerEntryDialog::setTextPath(QString path)
72 m_ui->serverTextPathEdit->setText(path);
75 void ServerEntryDialog::setPrimPath(QString path)
77 m_ui->serverPrimPathEdit->setText(path);
80 void ServerEntryDialog::lookupTextPath()
82 QString curPath = m_ui->serverTextPathEdit->text();
83 QString path = QFileDialog::getExistingDirectory(this, "", curPath);
84 m_ui->serverTextPathEdit->setText(path);
87 void ServerEntryDialog::lookupPrimPath()
89 QString curPath = m_ui->serverPrimPathEdit->text();
90 QString path = QFileDialog::getExistingDirectory(this, "", curPath);
91 m_ui->serverPrimPathEdit->setText(path);
93 } /* namespace MissionCompiler */