parent
5217b38f58
commit
03c041310e
@ -0,0 +1,72 @@
|
||||
// Ryzom Core Studio - GUI Editor Plugin
|
||||
//
|
||||
// Copyright (C) 2014 Laszlo Kis-Adam
|
||||
// Copyright (C) 2010 Ryzom Core <http://ryzomcore.org/>
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "new_gui_dlg.h"
|
||||
#include <QMessageBox>
|
||||
|
||||
NewGUIDlg::NewGUIDlg( QWidget *parent ) :
|
||||
QDialog( parent )
|
||||
{
|
||||
m_ui.setupUi( this );
|
||||
|
||||
connect( m_ui.okButton, SIGNAL( clicked( bool ) ), this, SLOT( onOKClicked() ) );
|
||||
connect( m_ui.cancelButton, SIGNAL( clicked( bool ) ), this, SLOT( onCancelClicked() ) );
|
||||
|
||||
}
|
||||
|
||||
NewGUIDlg::~NewGUIDlg()
|
||||
{
|
||||
}
|
||||
|
||||
QString NewGUIDlg::getProjectName() const
|
||||
{
|
||||
return m_ui.projectEdit->text();
|
||||
}
|
||||
|
||||
QString NewGUIDlg::getWindowName() const
|
||||
{
|
||||
return m_ui.windowEdit->text();
|
||||
}
|
||||
|
||||
void NewGUIDlg::onOKClicked()
|
||||
{
|
||||
if( m_ui.projectEdit->text().isEmpty() )
|
||||
{
|
||||
QMessageBox::information( this,
|
||||
tr( "New project" ),
|
||||
tr( "You must specify a project name!" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
if( m_ui.windowEdit->text().isEmpty() )
|
||||
{
|
||||
QMessageBox::information( this,
|
||||
tr( "New project" ),
|
||||
tr( "You must specify a window name!" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
accept();
|
||||
}
|
||||
|
||||
void NewGUIDlg::onCancelClicked()
|
||||
{
|
||||
reject();
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,44 @@
|
||||
// Ryzom Core Studio - GUI Editor Plugin
|
||||
//
|
||||
// Copyright (C) 2014 Laszlo Kis-Adam
|
||||
// Copyright (C) 2010 Ryzom Core <http://ryzomcore.org/>
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef NEW_GUI_DLG_H
|
||||
#define NEW_GUI_DLG_H
|
||||
|
||||
#include "ui_new_gui_dlg.h"
|
||||
|
||||
class NewGUIDlg : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
NewGUIDlg( QWidget *parent = NULL );
|
||||
~NewGUIDlg();
|
||||
|
||||
QString getProjectName() const;
|
||||
QString getWindowName() const;
|
||||
|
||||
private Q_SLOTS:
|
||||
void onOKClicked();
|
||||
void onCancelClicked();
|
||||
|
||||
private:
|
||||
Ui::NewGUIDialog m_ui;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>NewGUIDialog</class>
|
||||
<widget class="QDialog" name="NewGUIDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>292</width>
|
||||
<height>95</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>New GUI</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Project name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="projectEdit"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Window name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="windowEdit"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>107</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="okButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>OK</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cancelButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
Loading…
Reference in New Issue