Changed: #1150 Added splash screen & new dialog + minor changes
parent
cf39fcd06c
commit
553f11d111
@ -0,0 +1,150 @@
|
|||||||
|
|
||||||
|
|
||||||
|
#include "completer_line_edit.h"
|
||||||
|
|
||||||
|
#include <QKeyEvent>
|
||||||
|
#include <QtGui/QListView>
|
||||||
|
#include <QtGui/QStringListModel>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QScrollBar>
|
||||||
|
|
||||||
|
CompleteLineEdit::CompleteLineEdit(QWidget *parent, QStringList words)
|
||||||
|
: QLineEdit(parent), _words(words)
|
||||||
|
{
|
||||||
|
listView = new QListView(this);
|
||||||
|
model = new QStringListModel(this);
|
||||||
|
listView->setModel(model);
|
||||||
|
listView->setWindowFlags(Qt::ToolTip);
|
||||||
|
listView->setUniformItemSizes(true);
|
||||||
|
|
||||||
|
connect(this, SIGNAL(textChanged(const QString &)), this, SLOT(setCompleter(const QString &)));
|
||||||
|
connect(listView, SIGNAL(clicked(const QModelIndex &)), this, SLOT(completeText(const QModelIndex &)));
|
||||||
|
}
|
||||||
|
|
||||||
|
void CompleteLineEdit::setStringList(QStringList list)
|
||||||
|
{
|
||||||
|
_words = list;
|
||||||
|
}
|
||||||
|
|
||||||
|
//void CompleteLineEdit::focusOutEvent(QFocusEvent *e)
|
||||||
|
//{
|
||||||
|
// listView->hide();
|
||||||
|
//}
|
||||||
|
|
||||||
|
void CompleteLineEdit::keyPressEvent(QKeyEvent *e)
|
||||||
|
{
|
||||||
|
if (!listView->isHidden())
|
||||||
|
{
|
||||||
|
int key = e->key();
|
||||||
|
int count = listView->model()->rowCount();
|
||||||
|
QModelIndex currentIndex = listView->currentIndex();
|
||||||
|
|
||||||
|
if (Qt::Key_Down == key)
|
||||||
|
{
|
||||||
|
int row = currentIndex.row() + 1;
|
||||||
|
if (row >= count)
|
||||||
|
{
|
||||||
|
row = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
QModelIndex index = listView->model()->index(row, 0);
|
||||||
|
listView->setCurrentIndex(index);
|
||||||
|
}
|
||||||
|
else if (Qt::Key_Up == key)
|
||||||
|
{
|
||||||
|
int row = currentIndex.row() - 1;
|
||||||
|
if (row < 0)
|
||||||
|
{
|
||||||
|
row = count - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
QModelIndex index = listView->model()->index(row, 0);
|
||||||
|
listView->setCurrentIndex(index);
|
||||||
|
}
|
||||||
|
else if (Qt::Key_Escape == key)
|
||||||
|
{
|
||||||
|
listView->hide();
|
||||||
|
}
|
||||||
|
else if (Qt::Key_Enter == key || Qt::Key_Return == key)
|
||||||
|
{
|
||||||
|
if (currentIndex.isValid())
|
||||||
|
{
|
||||||
|
QString text = listView->currentIndex().data().toString();
|
||||||
|
setText(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
listView->hide();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//listView->hide();
|
||||||
|
QLineEdit::keyPressEvent(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
QLineEdit::keyPressEvent(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CompleteLineEdit::setCompleter(const QString &text)
|
||||||
|
{
|
||||||
|
if (text.isEmpty())
|
||||||
|
{
|
||||||
|
listView->hide();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((text.length() > 1) && (!listView->isHidden()))
|
||||||
|
{
|
||||||
|
//return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList sl;
|
||||||
|
Q_FOREACH(QString word, _words)
|
||||||
|
{
|
||||||
|
if (word.contains(text))
|
||||||
|
{
|
||||||
|
sl << word;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sl.isEmpty())
|
||||||
|
{
|
||||||
|
if (_words.isEmpty())
|
||||||
|
{
|
||||||
|
setText(tr("No files found"));
|
||||||
|
setEnabled(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
model->setStringList(_words);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
model->setStringList(sl);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Position the text edit
|
||||||
|
listView->setMinimumWidth(width());
|
||||||
|
listView->setMaximumWidth(width());
|
||||||
|
//listView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
|
|
||||||
|
QPoint p(0, height());
|
||||||
|
int x = mapToGlobal(p).x();
|
||||||
|
int y = mapToGlobal(p).y() + 1;
|
||||||
|
|
||||||
|
listView->move(x, y);
|
||||||
|
if(!listView->isVisible())
|
||||||
|
listView->show();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CompleteLineEdit::completeText(const QModelIndex &index)
|
||||||
|
{
|
||||||
|
QString text = index.data().toString();
|
||||||
|
setText(text);
|
||||||
|
listView->hide();
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
#ifndef COMPLETELINEEDIT_H
|
||||||
|
#define COMPLETELINEEDIT_H
|
||||||
|
|
||||||
|
|
||||||
|
// code from
|
||||||
|
// http://www.cppblog.com/biao/archive/2009/10/31/99873.html
|
||||||
|
// there was no license attached
|
||||||
|
|
||||||
|
#include <QtGui/QLineEdit>
|
||||||
|
#include <QStringList>
|
||||||
|
|
||||||
|
class QListView;
|
||||||
|
class QStringListModel;
|
||||||
|
class QModelIndex;
|
||||||
|
|
||||||
|
class CompleteLineEdit : public QLineEdit
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
CompleteLineEdit(QWidget *parent = 0, QStringList words = QStringList());
|
||||||
|
|
||||||
|
void setStringList(QStringList list);
|
||||||
|
|
||||||
|
public Q_SLOTS:
|
||||||
|
void setCompleter(const QString &text);
|
||||||
|
void completeText(const QModelIndex &index);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void keyPressEvent(QKeyEvent *e);
|
||||||
|
//virtual void focusOutEvent(QFocusEvent *e);
|
||||||
|
|
||||||
|
private:
|
||||||
|
QStringList _words;
|
||||||
|
QListView *listView;
|
||||||
|
QStringListModel *model;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // COMPLETELINEEDIT_H
|
@ -0,0 +1,73 @@
|
|||||||
|
/*
|
||||||
|
Georges Editor Qt
|
||||||
|
Copyright (C) 2010 Adrian Jaekel <aj at elane2k dot com>
|
||||||
|
|
||||||
|
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 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 General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "georges_splash.h"
|
||||||
|
|
||||||
|
// Qt includes
|
||||||
|
#include <QtGui/QWidget>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QFileInfo>
|
||||||
|
|
||||||
|
// NeL includes
|
||||||
|
|
||||||
|
// Project includes
|
||||||
|
|
||||||
|
namespace NLMISC {
|
||||||
|
class IProgressCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace NLQT
|
||||||
|
{
|
||||||
|
|
||||||
|
CGeorgesSplash::CGeorgesSplash(QWidget *parent)
|
||||||
|
: QWidget(parent)
|
||||||
|
{
|
||||||
|
_ui.setupUi(this);
|
||||||
|
|
||||||
|
setWindowFlags(Qt::SplashScreen);
|
||||||
|
_ui.imageLabel->setPixmap(
|
||||||
|
QPixmap(":/images/georges_logo.png").
|
||||||
|
scaledToHeight(_ui.imageLabel->height(),Qt::SmoothTransformation));
|
||||||
|
//setWindowIcon(QIcon(":/images/georges_logo.png"));
|
||||||
|
}
|
||||||
|
|
||||||
|
CGeorgesSplash::~CGeorgesSplash()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGeorgesSplash::progress (float progressValue)
|
||||||
|
{
|
||||||
|
QString display = DisplayString.c_str();
|
||||||
|
|
||||||
|
// UNCOMMENT if shorter strings are needed
|
||||||
|
//QFileInfo info(display);
|
||||||
|
//display = info.filePath();
|
||||||
|
//QString sec = display.section("/",-2,-1,
|
||||||
|
// QString::SectionSkipEmpty |
|
||||||
|
// QString::SectionIncludeTrailingSep |
|
||||||
|
// QString::SectionIncludeLeadingSep);
|
||||||
|
//if(display != sec)
|
||||||
|
// display = sec.prepend("...");
|
||||||
|
|
||||||
|
_ui.splashLabel->setText(QString(tr("Adding Folder:\n%1")).arg(display));
|
||||||
|
_ui.progressBar->setValue(getCropedValue(progressValue) * 100);
|
||||||
|
QApplication::processEvents();
|
||||||
|
}
|
||||||
|
} /* namespace NLQT */
|
@ -0,0 +1,56 @@
|
|||||||
|
/*
|
||||||
|
Georges Editor Qt
|
||||||
|
Copyright (C) 2010 Adrian Jaekel <aj at elane2k dot com>
|
||||||
|
|
||||||
|
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 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 General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef GEORGES_SPLASH_H
|
||||||
|
#define GEORGES_SPLASH_H
|
||||||
|
|
||||||
|
// Qt includes
|
||||||
|
#include <QtGui/QWidget>
|
||||||
|
|
||||||
|
// STL includes
|
||||||
|
|
||||||
|
// NeL includes
|
||||||
|
|
||||||
|
// NeL includes
|
||||||
|
#include <nel/misc/progress_callback.h>
|
||||||
|
|
||||||
|
// Project includes
|
||||||
|
#include "ui_splash.h"
|
||||||
|
|
||||||
|
namespace NLMISC {
|
||||||
|
class IProgressCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace NLQT
|
||||||
|
{
|
||||||
|
class CGeorgesSplash: public QWidget, public NLMISC::IProgressCallback
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
Ui::CGeorgesSplash _ui;
|
||||||
|
|
||||||
|
void progress (float progressValue);
|
||||||
|
|
||||||
|
public:
|
||||||
|
CGeorgesSplash(QWidget *parent = 0);
|
||||||
|
~CGeorgesSplash();
|
||||||
|
}; /* CGeorgesSplash */
|
||||||
|
|
||||||
|
} /* namespace NLQT */
|
||||||
|
|
||||||
|
#endif // GEORGES_SPLASH_H
|
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
@ -0,0 +1,341 @@
|
|||||||
|
/*
|
||||||
|
Georges Editor Qt
|
||||||
|
Copyright (C) 2010 Adrian Jaekel <aj at elane2k dot com>
|
||||||
|
|
||||||
|
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 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 General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "new_dialog.h"
|
||||||
|
|
||||||
|
// Qt includes
|
||||||
|
#include <QtGui/QWidget>
|
||||||
|
#include <QFile>
|
||||||
|
#include <QDateTime>
|
||||||
|
#include <QTextStream>
|
||||||
|
#include <QMessageBox>
|
||||||
|
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
// NeL includes
|
||||||
|
#include <nel/misc/path.h>
|
||||||
|
|
||||||
|
// Project includes
|
||||||
|
#include "modules.h"
|
||||||
|
#include "completer_line_edit.h"
|
||||||
|
|
||||||
|
namespace NLQT
|
||||||
|
{
|
||||||
|
|
||||||
|
CGeorgesNewDialog::CGeorgesNewDialog(QStringList& result, QWidget *parent)
|
||||||
|
: QDialog(parent),
|
||||||
|
_result(result),
|
||||||
|
_descriptionTemplate(QString())
|
||||||
|
{
|
||||||
|
_ui.setupUi(this);
|
||||||
|
|
||||||
|
setWindowIcon(QIcon(":/images/georges_logo.png"));
|
||||||
|
|
||||||
|
_ui.parentLineEdit->setEnabled(false);
|
||||||
|
_ui.addParentButton->setEnabled(true);
|
||||||
|
|
||||||
|
// wizard page
|
||||||
|
connect(_ui.wizardBtn, SIGNAL(clicked(bool)),
|
||||||
|
this, SLOT(wizardBtnClicked(bool)));
|
||||||
|
connect(_ui.wizardList, SIGNAL(itemClicked(QListWidgetItem*)),
|
||||||
|
this, SLOT(wizardItemActivated(QListWidgetItem *)));
|
||||||
|
|
||||||
|
// form page
|
||||||
|
connect(_ui.formBtn, SIGNAL(clicked(bool)),
|
||||||
|
this, SLOT(formBtnClicked(bool)));
|
||||||
|
connect(_ui.addParentButton, SIGNAL(clicked()),
|
||||||
|
this, SLOT(addParentClicked()));
|
||||||
|
connect(_ui.deleteParentButton, SIGNAL(clicked()),
|
||||||
|
this, SLOT(deleteParentClicked()));
|
||||||
|
connect(_ui.formList, SIGNAL(itemActivated(QListWidgetItem*)),
|
||||||
|
this, SLOT(formItemActivated(QListWidgetItem *)));
|
||||||
|
connect(_ui.formList, SIGNAL(itemClicked(QListWidgetItem*)),
|
||||||
|
this, SLOT(formItemActivated(QListWidgetItem *)));
|
||||||
|
connect(_ui.parentLineEdit, SIGNAL(editingFinished()),
|
||||||
|
this, SLOT(validateParentCombo()));
|
||||||
|
|
||||||
|
// dfn page
|
||||||
|
connect(_ui.dfnTypeBtn, SIGNAL(clicked(bool)),
|
||||||
|
this, SLOT(dfnTypeClicked(bool)));
|
||||||
|
|
||||||
|
connect(_ui.buttonBox, SIGNAL(accepted()),
|
||||||
|
this, SLOT(buttonBoxAccepted()));
|
||||||
|
connect(_ui.buttonBox, SIGNAL(rejected()),
|
||||||
|
this, SLOT(buttonBoxRejected()));
|
||||||
|
|
||||||
|
// wizard list
|
||||||
|
QListWidgetItem *mpWiz = new QListWidgetItem(QIcon(":/images/mp_generic.png"),tr("Raw Material Generator"));
|
||||||
|
_ui.wizardList->addItem(mpWiz);
|
||||||
|
|
||||||
|
// form list
|
||||||
|
QString path = Modules::mainWin().leveldesignPath();
|
||||||
|
QStringList typelist;
|
||||||
|
//nlinfo ("Searching files in directory '%s'...", dir.c_str());
|
||||||
|
NLMISC::CPath::getPathContent(path.toStdString(),true,false,true,_files);
|
||||||
|
|
||||||
|
getTypes(path.toStdString());
|
||||||
|
//nlinfo ("%d supported file types :",FileTypeToId.size());
|
||||||
|
for ( std::map<std::string,uint8>::iterator it = FileTypeToId.begin(); it != FileTypeToId.end(); ++it )
|
||||||
|
{
|
||||||
|
typelist.append(QString((*it).first.c_str()));
|
||||||
|
//nlinfo("%s",(*it).first.c_str());
|
||||||
|
}
|
||||||
|
_ui.formList->addItems(typelist);
|
||||||
|
|
||||||
|
for(uint i = 0; i < _files.size(); i++)
|
||||||
|
{
|
||||||
|
std::string extStr = NLMISC::CFile::getExtension( _files[i] );
|
||||||
|
|
||||||
|
// filter files without existing dfn
|
||||||
|
if (!NLMISC::CPath::exists(QString("%1.dfn").arg(extStr.c_str()).toStdString()) &&
|
||||||
|
!NLMISC::CPath::exists(QString("%1.typ").arg(extStr.c_str()).toStdString()))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
_filelist.append(QString(NLMISC::CFile::getFilename(_files[i]).c_str()));
|
||||||
|
}
|
||||||
|
|
||||||
|
_ui.parentFrame->hide();
|
||||||
|
|
||||||
|
// replace "Heading" and "Descriptive Text" with your string
|
||||||
|
_descriptionTemplate =
|
||||||
|
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\""
|
||||||
|
"\"http://www.w3.org/TR/REC-html40/strict.dtd\">"
|
||||||
|
"\n<html><head><meta name=\"qrichtext\" content=\"1\" />"
|
||||||
|
"<style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style>"
|
||||||
|
"</head><body style=\" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;\">"
|
||||||
|
"\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">"
|
||||||
|
"<span style=\" font-size:8pt; font-weight:600;\">Heading</span></p>"
|
||||||
|
"\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">"
|
||||||
|
"<span style=\" font-size:8pt;\">Descriptive Text</span></p></body></html>";
|
||||||
|
}
|
||||||
|
|
||||||
|
CGeorgesNewDialog::~CGeorgesNewDialog()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGeorgesNewDialog::wizardBtnClicked(bool p_checked)
|
||||||
|
{
|
||||||
|
if(p_checked)
|
||||||
|
_ui.stackedWidget->setCurrentWidget(_ui.wizardPage);
|
||||||
|
else
|
||||||
|
_ui.wizardBtn->setChecked(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGeorgesNewDialog::formBtnClicked(bool p_checked)
|
||||||
|
{
|
||||||
|
if(p_checked)
|
||||||
|
_ui.stackedWidget->setCurrentWidget(_ui.formPage);
|
||||||
|
else
|
||||||
|
_ui.formBtn->setChecked(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGeorgesNewDialog::dfnTypeClicked(bool p_checked)
|
||||||
|
{
|
||||||
|
if(p_checked)
|
||||||
|
_ui.stackedWidget->setCurrentWidget(_ui.dfnTypePage);
|
||||||
|
else
|
||||||
|
_ui.dfnTypeBtn->setChecked(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGeorgesNewDialog::addParentClicked()
|
||||||
|
{
|
||||||
|
if (!_filelist.contains(_ui.parentLineEdit->text()))
|
||||||
|
{
|
||||||
|
_ui.parentLineEdit->clear();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_ui.parentFrame->show();
|
||||||
|
|
||||||
|
QList<QListWidgetItem *> itemList = _ui.parentList->
|
||||||
|
findItems(_ui.parentLineEdit->text(), Qt::MatchFixedString);
|
||||||
|
if ((itemList.count() == 0) && (!_ui.parentLineEdit->text().isEmpty()))
|
||||||
|
{
|
||||||
|
_ui.parentList->insertItem(_ui.parentList->count(), _ui.parentLineEdit->text());
|
||||||
|
}
|
||||||
|
_ui.parentLineEdit->clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGeorgesNewDialog::deleteParentClicked()
|
||||||
|
{
|
||||||
|
_ui.parentList->takeItem(_ui.parentList->currentRow());
|
||||||
|
|
||||||
|
if (_ui.parentList->count() == 0)
|
||||||
|
{
|
||||||
|
_ui.parentFrame->hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGeorgesNewDialog::buttonBoxAccepted()
|
||||||
|
{
|
||||||
|
if (_ui.stackedWidget->currentWidget() == _ui.formPage)
|
||||||
|
{
|
||||||
|
_result << _ui.formFileNameEdit->text();
|
||||||
|
for (int i = 0; i < _ui.parentList->count(); i++)
|
||||||
|
{
|
||||||
|
_result << _ui.parentList->item(i)->text();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
QMessageBox::information(this,"Information","Not yet included.\nSoon to come! :)");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGeorgesNewDialog::buttonBoxRejected()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGeorgesNewDialog::formItemActivated(QListWidgetItem *item)
|
||||||
|
{
|
||||||
|
_ui.formFileNameEdit->setText(QString(tr("newfile.%1").arg(item->text())));
|
||||||
|
_ui.parentLineEdit->setEnabled(true);
|
||||||
|
_ui.parentLineEdit->setText("");
|
||||||
|
//_ui.addParentButton->setEnabled(false);
|
||||||
|
|
||||||
|
QStringList list = _filelist.filter(item->text());
|
||||||
|
_ui.parentLineEdit->setStringList(list);
|
||||||
|
_ui.formFileNameEdit->setFocus();
|
||||||
|
_ui.formFileNameEdit->setSelection(0, tr("newfile").size());
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGeorgesNewDialog::wizardItemActivated(QListWidgetItem *item)
|
||||||
|
{
|
||||||
|
QString myDescription = _descriptionTemplate;
|
||||||
|
myDescription = myDescription.replace("Heading", item->text());
|
||||||
|
|
||||||
|
if (item->text() == tr("Raw Material Generator"))
|
||||||
|
{
|
||||||
|
myDescription = myDescription.replace("Descriptive Text",
|
||||||
|
tr("Automatically creates MP (resources) for every creature in the assets."));
|
||||||
|
}
|
||||||
|
|
||||||
|
_ui.wizDescLabel->setText(myDescription);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGeorgesNewDialog::getTypes( std::string& dir )
|
||||||
|
{
|
||||||
|
//nlinfo ("Found %d files in directory '%s'", files.size(), dir.c_str());
|
||||||
|
for(uint i = 0; i < _files.size(); i++)
|
||||||
|
{
|
||||||
|
addType(NLMISC::CFile::getFilename(_files[i]));
|
||||||
|
QApplication::processEvents();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGeorgesNewDialog::addType( std::string fileName )
|
||||||
|
{
|
||||||
|
if(fileName.empty() || fileName=="." || fileName==".." || fileName[0]=='_' || fileName.find(".#")==0)
|
||||||
|
{
|
||||||
|
//nlinfo("Discarding file '%s'", fileName.c_str());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::string extStr = NLMISC::CFile::getExtension( fileName );
|
||||||
|
|
||||||
|
if (!NLMISC::CPath::exists(QString("%1.dfn").arg(extStr.c_str()).toStdString()))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// if the file is new
|
||||||
|
std::map<std::string,TFormId>::iterator itFI = FormToId.find( fileName );
|
||||||
|
if( itFI == FormToId.end() )
|
||||||
|
{
|
||||||
|
// double check : if file not found we check with lower case version of filename
|
||||||
|
std::map<std::string,TFormId>::iterator itFILwr = FormToId.find( NLMISC::toLower(fileName) );
|
||||||
|
if( itFILwr != FormToId.end() )
|
||||||
|
{
|
||||||
|
nlwarning("Trying to add %s but the file %s is already known ! be careful with lower case and upper case.", fileName.c_str(), NLMISC::toLower(fileName).c_str());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string fileType;
|
||||||
|
if( getFileType( fileName, fileType ) )
|
||||||
|
{
|
||||||
|
std::map<std::string,uint8>::iterator itFTI = FileTypeToId.find( fileType );
|
||||||
|
TFormId fid;
|
||||||
|
memset( &fid, 0, sizeof(TFormId) );
|
||||||
|
|
||||||
|
// if the type of this file is a new type
|
||||||
|
if( itFTI == FileTypeToId.end() )
|
||||||
|
{
|
||||||
|
sint16 firstFreeFileTypeId = getFirstFreeFileTypeId();
|
||||||
|
if( firstFreeFileTypeId == -1 )
|
||||||
|
{
|
||||||
|
nlwarning("MORE THAN 256 FILE TYPES!!!!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FileTypeToId.insert( std::make_pair(fileType,(uint8)firstFreeFileTypeId) );
|
||||||
|
IdToFileType.insert( std::make_pair((uint8)firstFreeFileTypeId,fileType) );
|
||||||
|
|
||||||
|
fid.FormIDInfos.Type = (uint8)firstFreeFileTypeId;
|
||||||
|
fid.FormIDInfos.Id = 0;
|
||||||
|
|
||||||
|
//nlinfo("Adding file type '%s' with id %d", fileType.c_str(), firstFreeFileTypeId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
FormToId.insert( make_pair(fileName,fid) );
|
||||||
|
//nlinfo("Adding file '%s' id %d with type '%s' id %d", fileName.c_str(), fid.FormIDInfos.Id, fileType.c_str(), fid.FormIDInfos.Type);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nlinfo("Unknown file type for the file : '%s' --> not added",fileName.c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nlinfo("Skipping file '%s', already in the file", fileName.c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CGeorgesNewDialog::getFileType( std::string& fileName, std::string& fileType )
|
||||||
|
{
|
||||||
|
fileType = NLMISC::CFile::getExtension(NLMISC::CFile::getFilename(fileName));
|
||||||
|
return !fileType.empty();
|
||||||
|
}
|
||||||
|
|
||||||
|
sint16 CGeorgesNewDialog::getFirstFreeFileTypeId()
|
||||||
|
{
|
||||||
|
for( sint16 id=0; id<256; ++id )
|
||||||
|
{
|
||||||
|
if( IdToFileType.find((uint8)id) == IdToFileType.end() )
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGeorgesNewDialog::validateParentCombo() {
|
||||||
|
// TODO: clear if no valid text
|
||||||
|
//if (!_filelist.contains(_ui.parentLineEdit->text()))
|
||||||
|
// _ui.parentLineEdit->clear();
|
||||||
|
}
|
||||||
|
} /* namespace NLQT */
|
@ -0,0 +1,88 @@
|
|||||||
|
/*
|
||||||
|
Georges Editor Qt
|
||||||
|
Copyright (C) 2010 Adrian Jaekel <aj at elane2k dot com>
|
||||||
|
|
||||||
|
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 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 General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef NEW_DIALOG_H
|
||||||
|
#define NEW_DIALOG_H
|
||||||
|
|
||||||
|
// Qt includes
|
||||||
|
#include <QtGui/QWidget>
|
||||||
|
|
||||||
|
// STL includes
|
||||||
|
|
||||||
|
// NeL includes
|
||||||
|
#include <nel/misc/types_nl.h>
|
||||||
|
#include <nel/misc/file.h>
|
||||||
|
|
||||||
|
// Project includes
|
||||||
|
#include "ui_new_form.h"
|
||||||
|
|
||||||
|
namespace NLQT
|
||||||
|
{
|
||||||
|
class CGeorgesNewDialog: public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
union TFormId
|
||||||
|
{
|
||||||
|
uint32 Id;
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
uint32 Type : 8;
|
||||||
|
uint32 Id : 24;
|
||||||
|
} FormIDInfos;
|
||||||
|
void serial(NLMISC::IStream &f) { f.serial(Id); };
|
||||||
|
};
|
||||||
|
|
||||||
|
Ui::CGeorgesNewDialog _ui;
|
||||||
|
QStringList _filelist;
|
||||||
|
QStringList &_result;
|
||||||
|
QString _descriptionTemplate;
|
||||||
|
|
||||||
|
std::map<std::string,TFormId> FormToId;
|
||||||
|
std::map<std::string,uint8> FileTypeToId;
|
||||||
|
std::map<uint8,std::string> IdToFileType;
|
||||||
|
|
||||||
|
std::vector<std::string> _files;
|
||||||
|
|
||||||
|
void getTypes( std::string& dir );
|
||||||
|
void addType( std::string fileName );
|
||||||
|
bool getFileType( std::string& fileName, std::string& fileType );
|
||||||
|
sint16 getFirstFreeFileTypeId();
|
||||||
|
|
||||||
|
public:
|
||||||
|
CGeorgesNewDialog(QStringList& result, QWidget *parent = 0);
|
||||||
|
~CGeorgesNewDialog();
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
void wizardBtnClicked(bool checked);
|
||||||
|
void formBtnClicked (bool checked);
|
||||||
|
void dfnTypeClicked (bool p_checked);
|
||||||
|
void addParentClicked();
|
||||||
|
void deleteParentClicked();
|
||||||
|
void formItemActivated(QListWidgetItem *);
|
||||||
|
void wizardItemActivated(QListWidgetItem *);
|
||||||
|
void validateParentCombo();
|
||||||
|
void buttonBoxAccepted();
|
||||||
|
void buttonBoxRejected();
|
||||||
|
|
||||||
|
friend class CMainWindow;
|
||||||
|
}; /* CGeorgesNewDialog */
|
||||||
|
|
||||||
|
} /* namespace NLQT */
|
||||||
|
|
||||||
|
#endif // NEW_DIALOG_H
|
@ -0,0 +1,428 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>CGeorgesNewDialog</class>
|
||||||
|
<widget class="QDialog" name="CGeorgesNewDialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>885</width>
|
||||||
|
<height>520</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Create new form ...</string>
|
||||||
|
</property>
|
||||||
|
<property name="modal">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="2" rowspan="2">
|
||||||
|
<widget class="Line" name="line">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3" rowspan="2">
|
||||||
|
<widget class="QStackedWidget" name="stackedWidget">
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="wizardPage">
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<property name="margin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QGroupBox" name="wizardGroupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Choose a wizard ...</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QListWidget" name="wizardList">
|
||||||
|
<property name="viewMode">
|
||||||
|
<enum>QListView::IconMode</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QGroupBox" name="wizDescGroupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Description</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_10">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="wizDescLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
|
p, li { white-space: pre-wrap; }
|
||||||
|
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||||
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p></body></html></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="formPage">
|
||||||
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<property name="margin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QGroupBox" name="formGroupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Choose type of form ...</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_9">
|
||||||
|
<item row="0" column="0" colspan="3">
|
||||||
|
<widget class="QSplitter" name="splitter">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<widget class="QListWidget" name="formList">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QFrame" name="parentFrame">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>55</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>55</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_5">
|
||||||
|
<property name="margin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0" rowspan="2">
|
||||||
|
<widget class="QListWidget" name="parentList">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>55</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QPushButton" name="deleteParentButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Delete</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<spacer name="verticalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="formAddParentLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Add Parent</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="CompleteLineEdit" name="parentLineEdit"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QPushButton" name="addParentButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Add</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="formFilenameLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Filename</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLineEdit" name="formFileNameEdit"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="dfnTypePage">
|
||||||
|
<layout class="QGridLayout" name="gridLayout_6">
|
||||||
|
<property name="margin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QGroupBox" name="dfnTypeGroupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Create a new dfn or typ file ...</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_7">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QRadioButton" name="dfnRadioButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>DFN</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QRadioButton" name="typeRadioButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Type</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" colspan="3">
|
||||||
|
<widget class="QLineEdit" name="filenameLineEdit"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" colspan="3">
|
||||||
|
<spacer name="verticalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1" colspan="3">
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" rowspan="3" colspan="2">
|
||||||
|
<widget class="QFrame" name="frame">
|
||||||
|
<layout class="QGridLayout" name="gridLayout_8">
|
||||||
|
<property name="horizontalSpacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="verticalSpacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QCommandLinkButton" name="wizardBtn">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Wizards ...</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="autoExclusive">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="autoDefault">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QCommandLinkButton" name="formBtn">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Create New Form ...</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="autoExclusive">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="autoDefault">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QCommandLinkButton" name="dfnTypeBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string>Create DFN or Type ...</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="autoExclusive">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="autoDefault">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>169</width>
|
||||||
|
<height>308</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>CompleteLineEdit</class>
|
||||||
|
<extends>QLineEdit</extends>
|
||||||
|
<header>completer_line_edit.h</header>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
|
<tabstops>
|
||||||
|
<tabstop>wizardBtn</tabstop>
|
||||||
|
<tabstop>formBtn</tabstop>
|
||||||
|
<tabstop>dfnTypeBtn</tabstop>
|
||||||
|
<tabstop>wizardList</tabstop>
|
||||||
|
<tabstop>formList</tabstop>
|
||||||
|
<tabstop>parentList</tabstop>
|
||||||
|
<tabstop>formFileNameEdit</tabstop>
|
||||||
|
<tabstop>dfnRadioButton</tabstop>
|
||||||
|
<tabstop>typeRadioButton</tabstop>
|
||||||
|
<tabstop>filenameLineEdit</tabstop>
|
||||||
|
<tabstop>buttonBox</tabstop>
|
||||||
|
</tabstops>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>accepted()</signal>
|
||||||
|
<receiver>CGeorgesNewDialog</receiver>
|
||||||
|
<slot>accept()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>350</x>
|
||||||
|
<y>598</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>157</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>rejected()</signal>
|
||||||
|
<receiver>CGeorgesNewDialog</receiver>
|
||||||
|
<slot>reject()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>418</x>
|
||||||
|
<y>598</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>286</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
@ -0,0 +1,76 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>CGeorgesSplash</class>
|
||||||
|
<widget class="QWidget" name="CGeorgesSplash">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>337</width>
|
||||||
|
<height>214</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="2" column="0" colspan="2">
|
||||||
|
<widget class="QProgressBar" name="progressBar">
|
||||||
|
<property name="value">
|
||||||
|
<number>24</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" colspan="2">
|
||||||
|
<widget class="QLabel" name="splashLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Initializing ...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
|
p, li { white-space: pre-wrap; }
|
||||||
|
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||||
|
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600;">Georges Editor Qt</span></p>
|
||||||
|
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">for</span></p>
|
||||||
|
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Ryzom Core</span></p>
|
||||||
|
<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p>
|
||||||
|
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">by</span></p>
|
||||||
|
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">aquiles</span></p></body></html></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="imageLabel">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>150</width>
|
||||||
|
<height>150</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>150</width>
|
||||||
|
<height>150</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
Loading…
Reference in New Issue