-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathxml2object.cpp
More file actions
72 lines (61 loc) · 1.95 KB
/
xml2object.cpp
File metadata and controls
72 lines (61 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
# PostgreSQL Database Modeler (pgModeler)
#
# Copyright 2006-2019 - Raphael Araújo e Silva <raphael@pgmodeler.io>
#
# 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 version 3.
#
# 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.
#
# The complete text of GPLv3 is at LICENSE file on source code root directory.
# Also, you can get the complete GNU General Public License at <http://www.gnu.org/licenses/>
*/
#include "xml2object.h"
#include "exception.h"
#include "messagebox.h"
Xml2Object::Xml2Object(void)
{
configurePluginInfo(getPluginTitle(),
getPluginVersion(),
getPluginAuthor(),
getPluginDescription(),
GlobalAttributes::getPluginsDir() +
GlobalAttributes::DirSeparator +
QString("xml2object") +
GlobalAttributes::DirSeparator + QString("xml2object.png"));
}
QString Xml2Object::getPluginTitle(void)
{
return(trUtf8("Xml2Object"));
}
QString Xml2Object::getPluginVersion(void)
{
return(QString("0.1"));
}
QString Xml2Object::getPluginAuthor(void)
{
return(QString("Raphael A. Silva"));
}
QString Xml2Object::getPluginDescription(void)
{
return(trUtf8("This plugin permits the creation of objects from XML code and inserting them on the currently opened model."));
}
void Xml2Object::showPluginInfo(void)
{
plugin_info_frm->show();
}
void Xml2Object::executePlugin(ModelWidget *model)
{
if(!model)
throw Exception(trUtf8("This plugin must be executed with at least one model opened!"),ErrorCode::Custom,__PRETTY_FUNCTION__,__FILE__,__LINE__);
xml2obj_wgt.show(model->getDatabaseModel(), model->getOperationList());
}
QKeySequence Xml2Object::getPluginShortcut(void)
{
return(QKeySequence(QString("Ctrl+K")));
}