mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-30 04:40:53 +00:00
Added: #1307 Ui deffs for merge source selection and ftp selection
This commit is contained in:
parent
40b50b0c7d
commit
f8b52c2553
16 changed files with 812 additions and 0 deletions
32
code/TranslationManagerPlugin/TranslationManagerPlugin.cbp
Normal file
32
code/TranslationManagerPlugin/TranslationManagerPlugin.cbp
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_project_file>
|
||||
<FileVersion major="1" minor="6" />
|
||||
<Project>
|
||||
<Option title="OVQT Translation Manager Plugin" />
|
||||
<Option pch_mode="2" />
|
||||
<Option compiler="gcc" />
|
||||
<Build>
|
||||
<Target title="Release">
|
||||
<Option output="bin/Release/OVQT Translation Manager Plugin" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj/Release/" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-O2" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-s" />
|
||||
</Linker>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall" />
|
||||
</Compiler>
|
||||
<Extensions>
|
||||
<code_completion />
|
||||
<envvars />
|
||||
<lib_finder disable_auto="1" />
|
||||
<debugger />
|
||||
</Extensions>
|
||||
</Project>
|
||||
</CodeBlocks_project_file>
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_layout_file>
|
||||
<ActiveTarget name="Release" />
|
||||
</CodeBlocks_layout_file>
|
|
@ -0,0 +1,121 @@
|
|||
|
||||
#include "ftp_selection.h"
|
||||
|
||||
#include <QtGui/QMessageBox>
|
||||
#include <QtNetwork/QFtp>
|
||||
namespace Plugin
|
||||
{
|
||||
CFtpSelection::CFtpSelection(QWidget *parent): QDialog(parent)
|
||||
{
|
||||
_ui.setupUi(this);
|
||||
connect(_ui.connectButton, SIGNAL(clicked()), this, SLOT(ConnectButtonClicked()));
|
||||
connect(_ui.doneButton, SIGNAL(clicked()), this, SLOT(DoneButtonClicked()));
|
||||
connect(_ui.cancelButton, SIGNAL(clicked()), this, SLOT(CancelButtonClicked()));
|
||||
|
||||
// file list
|
||||
connect(_ui.fileList, SIGNAL(itemActivated(QTreeWidgetItem*,int)),this, SLOT(processItem(QTreeWidgetItem*,int)));
|
||||
_ui.fileList->setEnabled(false);
|
||||
_ui.fileList->setRootIsDecorated(false);
|
||||
_ui.fileList->setHeaderLabels(QStringList() << tr("Name") << tr("Size") << tr("Owner") << tr("Group") << tr("Time"));
|
||||
_ui.fileList->header()->setStretchLastSection(false);
|
||||
}
|
||||
|
||||
void CFtpSelection::ConnectButtonClicked()
|
||||
{
|
||||
conn = new QFtp(this);
|
||||
connect(conn, SIGNAL(commandFinished(int,bool)), this, SLOT(FtpCommandFinished(int,bool)));
|
||||
connect(conn, SIGNAL(listInfo(QUrlInfo)), this, SLOT(AddToList(QUrlInfo)));
|
||||
|
||||
QUrl url(_ui.url->text());
|
||||
if (!url.isValid() || url.scheme().toLower() != QLatin1String("ftp")) {
|
||||
conn->connectToHost(_ui.url->text(), 21);
|
||||
conn->login();
|
||||
} else {
|
||||
conn->connectToHost(url.host(), url.port(21));
|
||||
|
||||
if (!url.userName().isEmpty())
|
||||
conn->login(QUrl::fromPercentEncoding(url.userName().toLatin1()), url.password());
|
||||
else
|
||||
conn->login();
|
||||
if (!url.path().isEmpty())
|
||||
conn->cd(url.path());
|
||||
}
|
||||
}
|
||||
|
||||
void CFtpSelection::FtpCommandFinished(int, bool error)
|
||||
{
|
||||
if (conn->currentCommand() == QFtp::ConnectToHost)
|
||||
{
|
||||
if (error)
|
||||
{
|
||||
QMessageBox::information(this, tr("FTP"),
|
||||
tr("Unable to connect to the FTP server "
|
||||
"at %1. Please check that the host "
|
||||
"name is correct.")
|
||||
.arg(_ui.url->text()));
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (conn->currentCommand() == QFtp::Login)
|
||||
{
|
||||
conn->list();
|
||||
}
|
||||
|
||||
if (conn->currentCommand() == QFtp::List)
|
||||
{
|
||||
if (isDirectory.isEmpty()) {
|
||||
_ui.fileList->addTopLevelItem(new QTreeWidgetItem(QStringList() << tr("<empty>")));
|
||||
_ui.fileList->setEnabled(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CFtpSelection::AddToList(const QUrlInfo &urlInfo)
|
||||
{
|
||||
QTreeWidgetItem *item = new QTreeWidgetItem;
|
||||
item->setText(0, urlInfo.name());
|
||||
item->setText(1, QString::number(urlInfo.size()));
|
||||
item->setText(2, urlInfo.owner());
|
||||
item->setText(3, urlInfo.group());
|
||||
item->setText(4, urlInfo.lastModified().toString("MMM dd yyyy"));
|
||||
|
||||
QPixmap pixmap(urlInfo.isDir() ? ":/images/dir.png" : ":/images/file.png");
|
||||
item->setIcon(0, pixmap);
|
||||
|
||||
isDirectory[urlInfo.name()] = urlInfo.isDir();
|
||||
_ui.fileList->addTopLevelItem(item);
|
||||
if (!_ui.fileList->currentItem()) {
|
||||
_ui.fileList->setCurrentItem(_ui.fileList->topLevelItem(0));
|
||||
_ui.fileList->setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
void CFtpSelection::processItem(QTreeWidgetItem* item, int)
|
||||
{
|
||||
QString name = item->text(0);
|
||||
if (isDirectory.value(name))
|
||||
{
|
||||
_ui.fileList->clear();
|
||||
isDirectory.clear();
|
||||
currentPath += '/';
|
||||
currentPath += name;
|
||||
conn->cd(name);
|
||||
conn->list();
|
||||
//TODO: cursor
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void CFtpSelection::DoneButtonClicked()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CFtpSelection::CancelButtonClicked()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* File: ftp_selection.h
|
||||
* Author: cemycc
|
||||
*
|
||||
* Created on July 8, 2011, 4:03 PM
|
||||
*/
|
||||
|
||||
#ifndef FTP_SELECTION_H
|
||||
#define FTP_SELECTION_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtGui/QDialog>
|
||||
#include <QtCore/QString>
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtNetwork>
|
||||
#include <QtCore/QUrl>
|
||||
|
||||
#include "ui_ftp_selection.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace Plugin {
|
||||
|
||||
class CFtpSelection : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
Ui::FtpSelectionDialog _ui;
|
||||
QFtp *conn;
|
||||
QHash<QString, bool> isDirectory;
|
||||
QString currentPath;
|
||||
private Q_SLOTS:
|
||||
void processItem(QTreeWidgetItem*,int);
|
||||
void CancelButtonClicked();
|
||||
void ConnectButtonClicked();
|
||||
void DoneButtonClicked();
|
||||
void FtpCommandFinished(int, bool error);
|
||||
void AddToList(const QUrlInfo &urlInfo);
|
||||
public:
|
||||
CFtpSelection(QWidget* parent = 0);
|
||||
~CFtpSelection() {}
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* FTP_SELECTION_H */
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FtpSelectionDialog</class>
|
||||
<widget class="QDialog" name="FtpSelectionDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>383</width>
|
||||
<height>547</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>371</width>
|
||||
<height>501</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>FTP Server informations</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>130</y>
|
||||
<width>371</width>
|
||||
<height>411</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Content</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>20</y>
|
||||
<width>141</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Please select the file</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QTreeWidget" name="fileList">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>40</y>
|
||||
<width>361</width>
|
||||
<height>311</height>
|
||||
</rect>
|
||||
</property>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">1</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>1</x>
|
||||
<y>29</y>
|
||||
<width>361</width>
|
||||
<height>107</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Ftp server</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="url"/>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="3">
|
||||
<widget class="QPushButton" name="connectButton">
|
||||
<property name="text">
|
||||
<string>Connect</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="cdToParrent">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>500</y>
|
||||
<width>361</width>
|
||||
<height>33</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="doneButton">
|
||||
<property name="text">
|
||||
<string>Done</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="cancelButton">
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1,75 @@
|
|||
#!/bin/bash -x
|
||||
|
||||
#
|
||||
# Generated - do not edit!
|
||||
#
|
||||
|
||||
# Macros
|
||||
TOP=`pwd`
|
||||
CND_PLATFORM=GNU-Linux-x86
|
||||
CND_CONF=Default
|
||||
CND_DISTDIR=dist
|
||||
CND_BUILDDIR=build
|
||||
NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
|
||||
TMPDIRNAME=tmp-packaging
|
||||
OUTPUT_PATH=../../../../../../../build/bin/object_viewer_qt
|
||||
OUTPUT_BASENAME=object_viewer_qt
|
||||
PACKAGE_TOP_DIR=translationmanager/
|
||||
|
||||
# Functions
|
||||
function checkReturnCode
|
||||
{
|
||||
rc=$?
|
||||
if [ $rc != 0 ]
|
||||
then
|
||||
exit $rc
|
||||
fi
|
||||
}
|
||||
function makeDirectory
|
||||
# $1 directory path
|
||||
# $2 permission (optional)
|
||||
{
|
||||
mkdir -p "$1"
|
||||
checkReturnCode
|
||||
if [ "$2" != "" ]
|
||||
then
|
||||
chmod $2 "$1"
|
||||
checkReturnCode
|
||||
fi
|
||||
}
|
||||
function copyFileToTmpDir
|
||||
# $1 from-file path
|
||||
# $2 to-file path
|
||||
# $3 permission
|
||||
{
|
||||
cp "$1" "$2"
|
||||
checkReturnCode
|
||||
if [ "$3" != "" ]
|
||||
then
|
||||
chmod $3 "$2"
|
||||
checkReturnCode
|
||||
fi
|
||||
}
|
||||
|
||||
# Setup
|
||||
cd "${TOP}"
|
||||
mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package
|
||||
rm -rf ${NBTMPDIR}
|
||||
mkdir -p ${NBTMPDIR}
|
||||
|
||||
# Copy files and create directories and links
|
||||
cd "${TOP}"
|
||||
makeDirectory "${NBTMPDIR}/translationmanager/bin"
|
||||
copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
|
||||
|
||||
|
||||
# Generate tar file
|
||||
cd "${TOP}"
|
||||
rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/translationmanager.tar
|
||||
cd ${NBTMPDIR}
|
||||
tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/translationmanager.tar *
|
||||
checkReturnCode
|
||||
|
||||
# Cleanup
|
||||
cd "${TOP}"
|
||||
rm -rf ${NBTMPDIR}
|
|
@ -0,0 +1,147 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configurationDescriptor version="79">
|
||||
<logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">
|
||||
<logicalFolder name="code"
|
||||
displayName="code"
|
||||
projectFiles="true"
|
||||
root="../../../../..">
|
||||
<logicalFolder name="build" displayName="build" projectFiles="true">
|
||||
<logicalFolder name="nel" displayName="nel" projectFiles="true">
|
||||
<logicalFolder name="tools" displayName="tools" projectFiles="true">
|
||||
<logicalFolder name="3d" displayName="3d" projectFiles="true">
|
||||
<logicalFolder name="object_viewer_qt"
|
||||
displayName="object_viewer_qt"
|
||||
projectFiles="true">
|
||||
<logicalFolder name="src" displayName="src" projectFiles="true">
|
||||
<logicalFolder name="plugins" displayName="plugins" projectFiles="true">
|
||||
<logicalFolder name="translation_manager"
|
||||
displayName="translation_manager"
|
||||
projectFiles="true">
|
||||
<itemPath>../../../../../../../build/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/ui_translation_manager_settings_page.h</itemPath>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="nel" displayName="nel" projectFiles="true">
|
||||
<logicalFolder name="include" displayName="include" projectFiles="true">
|
||||
<logicalFolder name="nel" displayName="nel" projectFiles="true">
|
||||
<logicalFolder name="misc" displayName="misc" projectFiles="true">
|
||||
<itemPath>../../../../../../include/nel/misc/app_context.h</itemPath>
|
||||
<itemPath>../../../../../../include/nel/misc/common.h</itemPath>
|
||||
<itemPath>../../../../../../include/nel/misc/debug.h</itemPath>
|
||||
<itemPath>../../../../../../include/nel/misc/displayer.h</itemPath>
|
||||
<itemPath>../../../../../../include/nel/misc/log.h</itemPath>
|
||||
<itemPath>../../../../../../include/nel/misc/mem_displayer.h</itemPath>
|
||||
<itemPath>../../../../../../include/nel/misc/mutex.h</itemPath>
|
||||
<itemPath>../../../../../../include/nel/misc/string_common.h</itemPath>
|
||||
<itemPath>../../../../../../include/nel/misc/time_nl.h</itemPath>
|
||||
<itemPath>../../../../../../include/nel/misc/types_nl.h</itemPath>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="src" displayName="src" projectFiles="true" root="../..">
|
||||
<logicalFolder name="extension_system"
|
||||
displayName="extension_system"
|
||||
projectFiles="true">
|
||||
<itemPath>../../extension_system/iplugin.h</itemPath>
|
||||
<itemPath>../../extension_system/iplugin_manager.h</itemPath>
|
||||
<itemPath>../../extension_system/iplugin_spec.h</itemPath>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="plugins" displayName="plugins" projectFiles="true">
|
||||
<logicalFolder name="core" displayName="core" projectFiles="true">
|
||||
<itemPath>../core/core_constants.h</itemPath>
|
||||
<itemPath>../core/core_global.h</itemPath>
|
||||
<itemPath>../core/icontext.h</itemPath>
|
||||
<itemPath>../core/icore.h</itemPath>
|
||||
<itemPath>../core/icore_listener.h</itemPath>
|
||||
<itemPath>../core/imenu_manager.h</itemPath>
|
||||
<itemPath>../core/ioptions_page.h</itemPath>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
<df name="translation_manager" root=".">
|
||||
<in>editor_worksheet.cpp</in>
|
||||
<in>editor_worksheet.h</in>
|
||||
<in>extract_bot_names.cpp</in>
|
||||
<in>extract_bot_names.h</in>
|
||||
<in>extract_new_sheet_names.cpp</in>
|
||||
<in>extract_new_sheet_names.h</in>
|
||||
<in>source_selection.cpp</in>
|
||||
<in>source_selection.h</in>
|
||||
<in>translation_manager_constants.h</in>
|
||||
<in>translation_manager_editor.h</in>
|
||||
<in>translation_manager_main_window.cpp</in>
|
||||
<in>translation_manager_main_window.h</in>
|
||||
<in>translation_manager_plugin.cpp</in>
|
||||
<in>translation_manager_plugin.h</in>
|
||||
<in>translation_manager_settings_page.cpp</in>
|
||||
<in>translation_manager_settings_page.h</in>
|
||||
</df>
|
||||
<logicalFolder name="ExternalFiles"
|
||||
displayName="Important Files"
|
||||
projectFiles="false"
|
||||
kind="IMPORTANT_FILES_FOLDER">
|
||||
<itemPath>../../../../../../../build/Makefile</itemPath>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
<sourceFolderFilter>^(nbproject)$</sourceFolderFilter>
|
||||
<sourceRootList>
|
||||
<Elem>.</Elem>
|
||||
</sourceRootList>
|
||||
<projectmakefile>../../../../../../../build/Makefile</projectmakefile>
|
||||
<confs>
|
||||
<conf name="Default" type="0">
|
||||
<toolsSet>
|
||||
<remote-sources-mode>LOCAL_SOURCES</remote-sources-mode>
|
||||
<compilerSet>default</compilerSet>
|
||||
</toolsSet>
|
||||
<makefileType>
|
||||
<makeTool>
|
||||
<buildCommandWorkingDir>../../../../../../../build</buildCommandWorkingDir>
|
||||
<buildCommand>${MAKE} -f Makefile ovqt_plugin_translation_manager</buildCommand>
|
||||
<cleanCommand>${MAKE} -f Makefile clean</cleanCommand>
|
||||
<executablePath>../../../../../../../build/bin/object_viewer_qt</executablePath>
|
||||
</makeTool>
|
||||
</makefileType>
|
||||
<item path="extract_bot_names.cpp" ex="false" tool="1" flavor="0">
|
||||
<ccTool>
|
||||
<incDir>
|
||||
<pElem>../../../../../../include</pElem>
|
||||
</incDir>
|
||||
</ccTool>
|
||||
</item>
|
||||
<item path="translation_manager_main_window.cpp" ex="false" tool="1" flavor="0">
|
||||
<ccTool>
|
||||
<incDir>
|
||||
<pElem>../../../../../../../build/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager</pElem>
|
||||
<pElem>../../../../../../include</pElem>
|
||||
</incDir>
|
||||
</ccTool>
|
||||
</item>
|
||||
<item path="translation_manager_plugin.cpp" ex="false" tool="1" flavor="0">
|
||||
<ccTool>
|
||||
<incDir>
|
||||
<pElem>../../../../../../../build/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager</pElem>
|
||||
<pElem>../../../../../../include</pElem>
|
||||
</incDir>
|
||||
</ccTool>
|
||||
</item>
|
||||
<item path="translation_manager_settings_page.cpp"
|
||||
ex="false"
|
||||
tool="1"
|
||||
flavor="0">
|
||||
<ccTool>
|
||||
<incDir>
|
||||
<pElem>../../../../../../../build/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager</pElem>
|
||||
</incDir>
|
||||
</ccTool>
|
||||
</item>
|
||||
</conf>
|
||||
</confs>
|
||||
</configurationDescriptor>
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configurationDescriptor version="79">
|
||||
<projectmakefile>../../../../../../../build/Makefile</projectmakefile>
|
||||
<confs>
|
||||
<conf name="Default" type="0">
|
||||
<toolsSet>
|
||||
<developmentServer>localhost</developmentServer>
|
||||
<platform>2</platform>
|
||||
</toolsSet>
|
||||
<dbx_gdbdebugger version="1">
|
||||
<gdb_pathmaps>
|
||||
</gdb_pathmaps>
|
||||
<gdb_interceptlist>
|
||||
<gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/>
|
||||
</gdb_interceptlist>
|
||||
<gdb_options>
|
||||
<DebugOptions>
|
||||
</DebugOptions>
|
||||
</gdb_options>
|
||||
<gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/>
|
||||
</dbx_gdbdebugger>
|
||||
<gizmo_options version="3">
|
||||
</gizmo_options>
|
||||
<nativedebugger version="1">
|
||||
<engine>gdb</engine>
|
||||
</nativedebugger>
|
||||
<runprofile version="9">
|
||||
<runcommandpicklist>
|
||||
<runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem>
|
||||
</runcommandpicklist>
|
||||
<runcommand>"${OUTPUT_PATH}"</runcommand>
|
||||
<rundir></rundir>
|
||||
<buildfirst>true</buildfirst>
|
||||
<terminal-type>0</terminal-type>
|
||||
<remove-instrumentation>0</remove-instrumentation>
|
||||
<environment>
|
||||
</environment>
|
||||
</runprofile>
|
||||
</conf>
|
||||
</confs>
|
||||
</configurationDescriptor>
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
|
||||
<code-assistance-data xmlns="http://www.netbeans.org/ns/make-project-private/1">
|
||||
<code-model-enabled>true</code-model-enabled>
|
||||
</code-assistance-data>
|
||||
<data xmlns="http://www.netbeans.org/ns/make-project-private/1">
|
||||
<activeConfTypeElem>0</activeConfTypeElem>
|
||||
<activeConfIndexElem>0</activeConfIndexElem>
|
||||
</data>
|
||||
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
|
||||
<preferences xmlns="http://www.netbeans.org/ns/auxiliary-configuration-preferences/1">
|
||||
<module name="org-netbeans-modules-cnd-discovery">
|
||||
<property name="rootFolder" value="/home/cemycc/Ryzom/work/ryzom/code*/home/cemycc/Ryzom/work/ryzom/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/."/>
|
||||
<property name="folder" value="/home/cemycc/Ryzom/work/ryzom/code*/home/cemycc/Ryzom/work/ryzom/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/."/>
|
||||
</module>
|
||||
</preferences>
|
||||
</project-private>
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.cnd.makeproject</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/make-project/1">
|
||||
<name>translation_manager</name>
|
||||
<c-extensions/>
|
||||
<cpp-extensions>cpp</cpp-extensions>
|
||||
<header-extensions>h</header-extensions>
|
||||
<sourceEncoding>UTF-8</sourceEncoding>
|
||||
<make-dep-projects/>
|
||||
<sourceRootList>
|
||||
<sourceRootElem>.</sourceRootElem>
|
||||
</sourceRootList>
|
||||
<confList>
|
||||
<confElem>
|
||||
<name>Default</name>
|
||||
<type>0</type>
|
||||
</confElem>
|
||||
</confList>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
|
@ -0,0 +1,37 @@
|
|||
|
||||
#include <QtGui/qlistwidget.h>
|
||||
|
||||
#include "source_selection.h"
|
||||
|
||||
namespace Plugin
|
||||
{
|
||||
|
||||
|
||||
CSourceDialog::CSourceDialog(QWidget *parent): QDialog(parent)
|
||||
{
|
||||
_ui.setupUi(this);
|
||||
// Set signal and slot for "OK Button"
|
||||
|
||||
connect(_ui.ok_button, SIGNAL(clicked()), this, SLOT(OkButtonClicked()));
|
||||
// Set signal and slot for "Cancel Button"
|
||||
connect(_ui.cancel_button, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
_ui.listWidget->setSortingEnabled(false);
|
||||
}
|
||||
|
||||
void CSourceDialog::setSourceOptions(map<QListWidgetItem*,int> options)
|
||||
{
|
||||
map<QListWidgetItem*,int>::iterator it;
|
||||
|
||||
for(it = options.begin(); it != options.end(); ++it)
|
||||
{
|
||||
_ui.listWidget->addItem((*it).first);
|
||||
}
|
||||
}
|
||||
|
||||
void CSourceDialog::OkButtonClicked()
|
||||
{
|
||||
selected_item = _ui.listWidget->currentItem();
|
||||
reject();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
|
||||
|
||||
#ifndef SOURCE_SELECTION_H
|
||||
#define SOURCE_SELECTION_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtGui/QDialog>
|
||||
#include <QtCore/QString>
|
||||
#include <QtGui/QListWidgetItem>
|
||||
#include "ui_source_selection.h"
|
||||
#include <map>
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace Plugin
|
||||
{
|
||||
class CSourceDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
Ui::SourceSelectionDialog _ui;
|
||||
|
||||
private Q_SLOTS:
|
||||
|
||||
void OkButtonClicked();
|
||||
public:
|
||||
CSourceDialog(QWidget *parent = 0);
|
||||
~CSourceDialog(){}
|
||||
void setSourceOptions(map<QListWidgetItem*, int> options);
|
||||
QListWidgetItem *selected_item;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif /* SOURCE_SELECTION_H */
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SourceSelectionDialog</class>
|
||||
<widget class="QDialog" name="SourceSelectionDialog">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::WindowModal</enum>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>396</width>
|
||||
<height>197</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<property name="modal">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>381</width>
|
||||
<height>181</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Select source for merge operation</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>30</y>
|
||||
<width>361</width>
|
||||
<height>141</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QListWidget" name="listWidget"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="ok_button">
|
||||
<property name="text">
|
||||
<string>OK</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="cancel_button">
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* File: translation_manager_constants.h
|
||||
* Author: cemycc
|
||||
*
|
||||
* Created on July 5, 2011, 9:15 PM
|
||||
*/
|
||||
|
||||
#ifndef TRANSLATION_MANAGER_CONSTANTS_H
|
||||
#define TRANSLATION_MANAGER_CONSTANTS_H
|
||||
|
||||
namespace Plugin
|
||||
{
|
||||
namespace Constants
|
||||
{
|
||||
const char * const WK_BOTNAMES = "bot_names_wk.txt";
|
||||
const char * const WK_ITEM = "item_words_wk.txt";
|
||||
const char * const WK_CREATURE = "creature_words_wk.txt";
|
||||
const char * const WK_SBRICK = "sbrick_words_wk.txt";
|
||||
const char * const WK_SPHRASE = "sphrase_words_wk.txt";
|
||||
const char * const WK_PLACE = "place_words_wk.txt";
|
||||
const char * const WK_CONTINENT = "place_words_wk.txt";
|
||||
const char * const WK_STABLE = "place_words_wk.txt";
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* TRANSLATION_MANAGER_CONSTANTS_H */
|
||||
|
Loading…
Reference in a new issue