Skip to content
This repository has been archived by the owner on May 27, 2023. It is now read-only.

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
FangCunWuChang authored Jul 30, 2021
1 parent c01e132 commit ed5e655
Show file tree
Hide file tree
Showing 37 changed files with 9,968 additions and 0 deletions.
36 changes: 36 additions & 0 deletions DVMT4/Plugin/DVMT_Plugin.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
QT += widgets

TEMPLATE = lib
DEFINES += DVMT_PLUGIN_LIBRARY

CONFIG += c++11

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
cvvcsymbol.cpp \
dvmt_plugin.cpp \
plugindialog.cpp \
project.cpp

HEADERS += \
DVMT_Plugin_global.h \
cvvcsymbol.h \
dvmt_plugin.h \
plugindialog.h \
project.h

# Default rules for deployment.
unix {
target.path = /usr/lib
}
!isEmpty(target.path): INSTALLS += target

FORMS += \
plugindialog.ui

RESOURCES += \
icon.qrc \
src.qrc
4,229 changes: 4,229 additions & 0 deletions DVMT4/Plugin/DVMT_Plugin.pro.user

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions DVMT4/Plugin/DVMT_Plugin_global.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#ifndef DVMT_PLUGIN_GLOBAL_H
#define DVMT_PLUGIN_GLOBAL_H

#include <QtCore/qglobal.h>

#if defined(DVMT_PLUGIN_LIBRARY)
# define DVMT_PLUGIN_EXPORT Q_DECL_EXPORT
#else
# define DVMT_PLUGIN_EXPORT Q_DECL_IMPORT
#endif

#endif // DVMT_PLUGIN_GLOBAL_H
8 changes: 8 additions & 0 deletions DVMT4/Plugin/DVMT_plugin.pri
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
HEADERS += \
$$PWD/plugindialog.h

SOURCES += \
$$PWD/plugindialog.cpp

FORMS += \
$$PWD/plugindialog.ui
21 changes: 21 additions & 0 deletions DVMT4/Plugin/cvvcsymbol.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include "cvvcsymbol.h"

CVVCSymbol::CVVCSymbol()
{

}

CVVCSymbol CVVCSymbol::operator=(CVVCSymbol arg)
{
this->name=arg.name;
this->isCV=arg.isCV;
this->l1=arg.l1;
this->l2=arg.l2;
this->l3=arg.l3;
this->l4=arg.l4;
this->path=arg.path;
this->file=arg.file;
this->pitch=arg.pitch;
this->mes=arg.mes;
return *this;
}
20 changes: 20 additions & 0 deletions DVMT4/Plugin/cvvcsymbol.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#ifndef CVVCSYMBOL_H
#define CVVCSYMBOL_H

#include <QString>

class CVVCSymbol
{
public:
CVVCSymbol();
QString name;
int isCV=1;
double l1=0,l2=0,l3=0,l4=0;
QString path;
QString file;
QString pitch="C4";
QString mes="未标记";
CVVCSymbol operator=(CVVCSymbol arg);
};

#endif // CVVCSYMBOL_H
18 changes: 18 additions & 0 deletions DVMT4/Plugin/dvmt_plugin.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include "dvmt_plugin.h"

QString DVMT_PluInfo2()
{
QJsonObject Infojson;
Infojson.insert("Plugin Name","pluginsample1");
Infojson.insert("Plugin Info","This is a sample plugin!");
Infojson.insert("Plugin Version",4.0);
QJsonDocument jsondoc(Infojson);
QString out=QString(jsondoc.toJson(QJsonDocument::Compact));
return out;

}

PluginDialog* DVMT_PluRun2(QWidget* parent,Project* pro)
{
return new PluginDialog(parent,pro);
}
13 changes: 13 additions & 0 deletions DVMT4/Plugin/dvmt_plugin.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#ifndef DVMT_PLUGIN_H
#define DVMT_PLUGIN_H

#include "DVMT_Plugin_global.h"
#include "plugindialog.h"
#include <QString>
#include <QWidget>
#include "project.h"

extern "C" QString DVMT_PLUGIN_EXPORT DVMT_PluInfo2();
extern "C" PluginDialog* DVMT_PLUGIN_EXPORT DVMT_PluRun2(QWidget* parent,Project* pro);

#endif // DVMT_PLUGIN_H
Binary file added DVMT4/Plugin/icon.ico
Binary file not shown.
Binary file added DVMT4/Plugin/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions DVMT4/Plugin/icon.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<RCC>
<qresource prefix="/icon">
<file>icon.ico</file>
</qresource>
</RCC>
1 change: 1 addition & 0 deletions DVMT4/Plugin/icon.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
IDI_ICON1 ICON "icon.ico"
23 changes: 23 additions & 0 deletions DVMT4/Plugin/plugindialog.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include "plugindialog.h"
#include "ui_plugindialog.h"

PluginDialog::PluginDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::PluginDialog)
{
ui->setupUi(this);
}

PluginDialog::PluginDialog(QWidget *parent,Project *pro):
QDialog(parent),
ui(new Ui::PluginDialog),
project(pro)
{
ui->setupUi(this);
}

PluginDialog::~PluginDialog()
{
delete ui;
}

28 changes: 28 additions & 0 deletions DVMT4/Plugin/plugindialog.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#ifndef PLUGINDIALOG_H
#define PLUGINDIALOG_H

#include <QDialog>
#include <QJsonObject>
#include <QJsonDocument>
#include <QString>
#include "project.h"

namespace Ui {
class PluginDialog;
}

class PluginDialog : public QDialog
{
Q_OBJECT

public:
explicit PluginDialog(QWidget *parent = nullptr);
explicit PluginDialog(QWidget *parent,Project *pro);
~PluginDialog();

private:
Ui::PluginDialog *ui;
Project *project=nullptr;
};

#endif // PLUGINDIALOG_H
35 changes: 35 additions & 0 deletions DVMT4/Plugin/plugindialog.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PluginDialog</class>
<widget class="QDialog" name="PluginDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>703</width>
<height>381</height>
</rect>
</property>
<property name="windowTitle">
<string>DVMT插件</string>
</property>
<property name="windowIcon">
<iconset>
<normaloff>:/png/icon.png</normaloff>:/png/icon.png</iconset>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>DVMT插件</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
Loading

0 comments on commit ed5e655

Please sign in to comment.