Dump from SVN
This commit is contained in:
7
PlottWareControl/ChangeLog.txt
Normal file
7
PlottWareControl/ChangeLog.txt
Normal file
@ -0,0 +1,7 @@
|
||||
06 December 2017
|
||||
released version 0.1.5 of PlottWareControl
|
||||
|
||||
Change log:
|
||||
-Added: UI now completely ready and working (I hope so)
|
||||
-Typo: Todo: saving in JSON and class serializations
|
||||
|
60
PlottWareControl/GcodeEditorDialog.cpp
Normal file
60
PlottWareControl/GcodeEditorDialog.cpp
Normal file
@ -0,0 +1,60 @@
|
||||
#include "GcodeEditorDialog.h"
|
||||
|
||||
//(*InternalHeaders(GcodeEditorDialog)
|
||||
#include <wx/settings.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/string.h>
|
||||
//*)
|
||||
|
||||
//(*IdInit(GcodeEditorDialog)
|
||||
const long GcodeEditorDialog::ID_TEXTCTRL1 = wxNewId();
|
||||
const long GcodeEditorDialog::ID_STATICTEXT1 = wxNewId();
|
||||
const long GcodeEditorDialog::ID_BUTTON1 = wxNewId();
|
||||
const long GcodeEditorDialog::ID_BUTTON2 = wxNewId();
|
||||
//*)
|
||||
|
||||
BEGIN_EVENT_TABLE(GcodeEditorDialog,wxDialog)
|
||||
//(*EventTable(GcodeEditorDialog)
|
||||
//*)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
GcodeEditorDialog::GcodeEditorDialog(wxWindow* parent,wxWindowID id,std::string* _gcode,const wxPoint& pos,const wxSize& size)
|
||||
{
|
||||
gcode=_gcode;
|
||||
//(*Initialize(GcodeEditorDialog)
|
||||
Create(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("id"));
|
||||
SetClientSize(wxSize(902,565));
|
||||
Move(wxDefaultPosition);
|
||||
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
|
||||
GcodeText = new wxTextCtrl(this, ID_TEXTCTRL1, wxEmptyString, wxPoint(16,48), wxSize(872,500), wxTE_MULTILINE, wxDefaultValidator, _T("ID_TEXTCTRL1"));
|
||||
wxFont GcodeTextFont(10,wxFONTFAMILY_SWISS,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,false,_T("Courier New"),wxFONTENCODING_DEFAULT);
|
||||
GcodeText->SetFont(GcodeTextFont);
|
||||
StaticText1 = new wxStaticText(this, ID_STATICTEXT1, _("G code editor"), wxPoint(24,16), wxDefaultSize, 0, _T("ID_STATICTEXT1"));
|
||||
wxFont StaticText1Font(16,wxFONTFAMILY_SWISS,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,false,wxEmptyString,wxFONTENCODING_DEFAULT);
|
||||
StaticText1->SetFont(StaticText1Font);
|
||||
SaveButton = new wxButton(this, ID_BUTTON1, _("Save"), wxPoint(704,16), wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON1"));
|
||||
CancelButton = new wxButton(this, ID_BUTTON2, _("Cancel"), wxPoint(792,16), wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON2"));
|
||||
|
||||
Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&GcodeEditorDialog::OnSaveButtonClick);
|
||||
Connect(ID_BUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&GcodeEditorDialog::OnCancelButtonClick);
|
||||
//*)
|
||||
GcodeText->SetValue(*gcode);
|
||||
}
|
||||
|
||||
GcodeEditorDialog::~GcodeEditorDialog()
|
||||
{
|
||||
//(*Destroy(GcodeEditorDialog)
|
||||
//*)
|
||||
}
|
||||
|
||||
|
||||
void GcodeEditorDialog::OnSaveButtonClick(wxCommandEvent& event)
|
||||
{
|
||||
*gcode=GcodeText->GetValue();
|
||||
}
|
||||
|
||||
void GcodeEditorDialog::OnCancelButtonClick(wxCommandEvent& event)
|
||||
{
|
||||
GcodeText->SetValue(*gcode);
|
||||
}
|
47
PlottWareControl/GcodeEditorDialog.h
Normal file
47
PlottWareControl/GcodeEditorDialog.h
Normal file
@ -0,0 +1,47 @@
|
||||
#ifndef GCODEEDITORDIALOG_H
|
||||
#define GCODEEDITORDIALOG_H
|
||||
|
||||
#include <string>
|
||||
|
||||
//(*Headers(GcodeEditorDialog)
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/dialog.h>
|
||||
//*)
|
||||
|
||||
class GcodeEditorDialog: public wxDialog
|
||||
{
|
||||
public:
|
||||
|
||||
GcodeEditorDialog(wxWindow* parent,wxWindowID id=wxID_ANY,std::string* _gcode=NULL,const wxPoint& pos=wxDefaultPosition,const wxSize& size=wxDefaultSize);
|
||||
virtual ~GcodeEditorDialog();
|
||||
|
||||
//(*Declarations(GcodeEditorDialog)
|
||||
wxTextCtrl* GcodeText;
|
||||
wxStaticText* StaticText1;
|
||||
wxButton* CancelButton;
|
||||
wxButton* SaveButton;
|
||||
//*)
|
||||
|
||||
protected:
|
||||
|
||||
//(*Identifiers(GcodeEditorDialog)
|
||||
static const long ID_TEXTCTRL1;
|
||||
static const long ID_STATICTEXT1;
|
||||
static const long ID_BUTTON1;
|
||||
static const long ID_BUTTON2;
|
||||
//*)
|
||||
|
||||
private:
|
||||
|
||||
//(*Handlers(GcodeEditorDialog)
|
||||
void OnSaveButtonClick(wxCommandEvent& event);
|
||||
void OnCancelButtonClick(wxCommandEvent& event);
|
||||
//*)
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
std::string* gcode;
|
||||
};
|
||||
|
||||
#endif
|
619
PlottWareControl/LICENSE.txt
Normal file
619
PlottWareControl/LICENSE.txt
Normal file
@ -0,0 +1,619 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
146
PlottWareControl/PlottWareControl.cbp
Normal file
146
PlottWareControl/PlottWareControl.cbp
Normal file
@ -0,0 +1,146 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_project_file>
|
||||
<FileVersion major="1" minor="6" />
|
||||
<Project>
|
||||
<Option title="PlottWareControl" />
|
||||
<Option pch_mode="2" />
|
||||
<Option compiler="gcc" />
|
||||
<Build>
|
||||
<Target title="Release">
|
||||
<Option output="bin/Release/PlottWareControl" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj/Release/" />
|
||||
<Option type="0" />
|
||||
<Option compiler="gcc" />
|
||||
<Option projectLinkerOptionsRelation="2" />
|
||||
<Compiler>
|
||||
<Add option="-O2" />
|
||||
<Add option="-std=c++14" />
|
||||
<Add option="-m64" />
|
||||
<Add directory="D:/wxWidgets-3.0.3/lib/gcc_dll/mswu" />
|
||||
<Add directory="D:/opencv-3.3.1/build/include" />
|
||||
</Compiler>
|
||||
<ResourceCompiler>
|
||||
<Add directory="D:/wxWidgets-3.0.3/lib/gcc_dll/mswu" />
|
||||
</ResourceCompiler>
|
||||
<Linker>
|
||||
<Add option="-s" />
|
||||
<Add option="-m64" />
|
||||
<Add library="libwxmsw30u_core.a" />
|
||||
<Add library="libwxbase30u.a" />
|
||||
<Add library="libwxpng.a" />
|
||||
<Add library="libwxzlib.a" />
|
||||
<Add library="libopencv_core331.dll.a" />
|
||||
<Add library="libopencv_imgproc331.dll.a" />
|
||||
<Add library="libopencv_imgcodecs331.dll.a" />
|
||||
<Add library="libopencv_highgui331.dll.a" />
|
||||
<Add directory="D:/wxWidgets-3.0.3/lib/gcc_dll" />
|
||||
<Add directory="D:/opencv-3.3.1/build/x64/gcc/lib" />
|
||||
<Add directory="D:/opencv-3.3.1/build/x64/gcc/bin" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Debug">
|
||||
<Option output="bin/Release/PlottWareControl" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj/Release/" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Option use_console_runner="0" />
|
||||
<Option projectLinkerOptionsRelation="2" />
|
||||
<Compiler>
|
||||
<Add option="-O2" />
|
||||
<Add option="-std=c++14" />
|
||||
<Add option="-m64" />
|
||||
<Add option="-DPWC_DEBUG" />
|
||||
<Add directory="D:/wxWidgets-3.0.3/lib/gcc_dll/mswu" />
|
||||
<Add directory="D:/opencv-3.3.1/build/include" />
|
||||
</Compiler>
|
||||
<ResourceCompiler>
|
||||
<Add directory="D:/wxWidgets-3.0.3/lib/gcc_dll/mswu" />
|
||||
</ResourceCompiler>
|
||||
<Linker>
|
||||
<Add option="-s" />
|
||||
<Add option="-m64" />
|
||||
<Add library="libwxmsw30u_core.a" />
|
||||
<Add library="libwxbase30u.a" />
|
||||
<Add library="libwxpng.a" />
|
||||
<Add library="libwxzlib.a" />
|
||||
<Add library="libopencv_core331.dll.a" />
|
||||
<Add library="libopencv_imgproc331.dll.a" />
|
||||
<Add library="libopencv_imgcodecs331.dll.a" />
|
||||
<Add library="libopencv_highgui331.dll.a" />
|
||||
<Add directory="D:/wxWidgets-3.0.3/lib/gcc_dll" />
|
||||
<Add directory="D:/opencv-3.3.1/build/x64/gcc/lib" />
|
||||
<Add directory="D:/opencv-3.3.1/build/x64/gcc/bin" />
|
||||
</Linker>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-pipe" />
|
||||
<Add option="-mthreads" />
|
||||
<Add option="-D__GNUWIN32__" />
|
||||
<Add option="-D__WXMSW__" />
|
||||
<Add option="-DWXUSINGDLL" />
|
||||
<Add option="-DwxUSE_UNICODE" />
|
||||
<Add option="-Wall" />
|
||||
<Add directory="D:/wxWidgets-3.0.3/include" />
|
||||
</Compiler>
|
||||
<ResourceCompiler>
|
||||
<Add directory="D:/wxWidgets-3.0.3/include" />
|
||||
</ResourceCompiler>
|
||||
<Linker>
|
||||
<Add option="-mthreads" />
|
||||
</Linker>
|
||||
<Unit filename="GcodeEditorDialog.cpp" />
|
||||
<Unit filename="GcodeEditorDialog.h" />
|
||||
<Unit filename="PlottWareControlApp.cpp" />
|
||||
<Unit filename="PlottWareControlApp.h" />
|
||||
<Unit filename="PlottWareControlMain.cpp" />
|
||||
<Unit filename="PlottWareControlMain.h" />
|
||||
<Unit filename="SettingDialog.cpp" />
|
||||
<Unit filename="SettingDialog.h" />
|
||||
<Unit filename="image.cpp" />
|
||||
<Unit filename="image.h" />
|
||||
<Unit filename="imageViewer.cpp" />
|
||||
<Unit filename="imageViewer.h" />
|
||||
<Unit filename="json.hpp" />
|
||||
<Unit filename="point.cpp" />
|
||||
<Unit filename="point.h" />
|
||||
<Unit filename="printer.cpp" />
|
||||
<Unit filename="printer.h" />
|
||||
<Unit filename="project.cpp" />
|
||||
<Unit filename="project.h" />
|
||||
<Unit filename="res/gCode.txt">
|
||||
<Option target="<{~None~}>" />
|
||||
</Unit>
|
||||
<Unit filename="res/icon.bmp" />
|
||||
<Unit filename="resource.rc">
|
||||
<Option compilerVar="WINDRES" />
|
||||
</Unit>
|
||||
<Unit filename="serial.cpp" />
|
||||
<Unit filename="serial.h" />
|
||||
<Unit filename="settings.cpp" />
|
||||
<Unit filename="settings.h" />
|
||||
<Unit filename="version.h" />
|
||||
<Unit filename="wxsmith/GcodeEditorDialog.wxs" />
|
||||
<Unit filename="wxsmith/PlottWareControlframe.wxs" />
|
||||
<Unit filename="wxsmith/SettingDialog.wxs" />
|
||||
<Extensions>
|
||||
<AutoVersioning>
|
||||
<Scheme minor_max="10" build_max="0" rev_max="0" rev_rand_max="10" build_times_to_increment_minor="5" />
|
||||
<Settings autoincrement="1" date_declarations="1" use_define="0" update_manifest="1" do_auto_increment="0" ask_to_increment="0" language="C++" svn="0" svn_directory="" header_path="version.h" />
|
||||
<Changes_Log show_changes_editor="1" app_title="released version %M.%m.%b of %p" changeslog_path="ChangeLog.txt" />
|
||||
<Code header_guard="VERSION_H" namespace="Version" prefix="" />
|
||||
</AutoVersioning>
|
||||
<code_completion />
|
||||
<envvars />
|
||||
<debugger />
|
||||
<wxsmith version="1">
|
||||
<gui name="wxWidgets" src="PlottWareControlApp.cpp" main="PlottWareControlFrame" init_handlers="necessary" language="CPP" />
|
||||
<resources>
|
||||
<wxFrame wxs="wxsmith/PlottWareControlframe.wxs" src="PlottWareControlMain.cpp" hdr="PlottWareControlMain.h" fwddecl="0" i18n="1" name="PlottWareControlFrame" language="CPP" />
|
||||
<wxDialog wxs="wxsmith/SettingDialog.wxs" src="SettingDialog.cpp" hdr="SettingDialog.h" fwddecl="0" i18n="1" name="SettingDialog" language="CPP" />
|
||||
<wxDialog wxs="wxsmith/GcodeEditorDialog.wxs" src="GcodeEditorDialog.cpp" hdr="GcodeEditorDialog.h" fwddecl="0" i18n="1" name="GcodeEditorDialog" language="CPP" />
|
||||
</resources>
|
||||
</wxsmith>
|
||||
</Extensions>
|
||||
</Project>
|
||||
</CodeBlocks_project_file>
|
4078
PlottWareControl/PlottWareControl.depend
Normal file
4078
PlottWareControl/PlottWareControl.depend
Normal file
File diff suppressed because it is too large
Load Diff
105
PlottWareControl/PlottWareControl.layout
Normal file
105
PlottWareControl/PlottWareControl.layout
Normal file
@ -0,0 +1,105 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_layout_file>
|
||||
<FileVersion major="1" minor="0" />
|
||||
<ActiveTarget name="Release" />
|
||||
<File name="project.cpp" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1901" topLine="129" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="settings.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="297" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="PlottWareControlMain.cpp" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="49963" topLine="810" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="imageViewer.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="493" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="SettingDialog.cpp" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="10102" topLine="250" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="GcodeEditorDialog.cpp" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2393" topLine="4" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="json.hpp" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3176" topLine="39" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="PlottWareControlMain.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="472" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="imageViewer.cpp" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="480" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="PlottWareControlApp.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="801" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="printer.h" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="673" topLine="5" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="SettingDialog.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="141" topLine="12" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="image.cpp" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="798" topLine="27" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="serial.cpp" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3692" topLine="92" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="GcodeEditorDialog.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="348" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="settings.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="348" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="printer.cpp" open="1" top="1" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="988" topLine="12" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="image.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="517" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="project.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1487" topLine="22" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="serial.h" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="107" topLine="6" />
|
||||
</Cursor>
|
||||
</File>
|
||||
</CodeBlocks_layout_file>
|
33
PlottWareControl/PlottWareControlApp.cpp
Normal file
33
PlottWareControl/PlottWareControlApp.cpp
Normal file
@ -0,0 +1,33 @@
|
||||
/***************************************************************
|
||||
* Name: PlottWareControlApp.cpp
|
||||
* Purpose: Code for Application Class
|
||||
* Author: Fandly Gergo (fandlygergo@gmail.hu)
|
||||
* Created: 2017-11-25
|
||||
* Copyright: Fandly Gergo (systemtest.tk)
|
||||
* License:
|
||||
**************************************************************/
|
||||
|
||||
#include "PlottWareControlApp.h"
|
||||
|
||||
//(*AppHeaders
|
||||
#include "PlottWareControlMain.h"
|
||||
#include <wx/image.h>
|
||||
//*)
|
||||
|
||||
IMPLEMENT_APP(PlottWareControlApp);
|
||||
|
||||
bool PlottWareControlApp::OnInit()
|
||||
{
|
||||
//(*AppInitialize
|
||||
bool wxsOK = true;
|
||||
wxInitAllImageHandlers();
|
||||
if ( wxsOK )
|
||||
{
|
||||
PlottWareControlFrame* Frame = new PlottWareControlFrame(0);
|
||||
Frame->Show();
|
||||
SetTopWindow(Frame);
|
||||
}
|
||||
//*)
|
||||
return wxsOK;
|
||||
|
||||
}
|
21
PlottWareControl/PlottWareControlApp.h
Normal file
21
PlottWareControl/PlottWareControlApp.h
Normal file
@ -0,0 +1,21 @@
|
||||
/***************************************************************
|
||||
* Name: PlottWareControlApp.h
|
||||
* Purpose: Defines Application Class
|
||||
* Author: Fandly Gergo (fandlygergo@gmail.hu)
|
||||
* Created: 2017-11-25
|
||||
* Copyright: Fandly Gergo (systemtest.tk)
|
||||
* License:
|
||||
**************************************************************/
|
||||
|
||||
#ifndef PLOTTWARECONTROLAPP_H
|
||||
#define PLOTTWARECONTROLAPP_H
|
||||
|
||||
#include <wx/app.h>
|
||||
|
||||
class PlottWareControlApp : public wxApp
|
||||
{
|
||||
public:
|
||||
virtual bool OnInit();
|
||||
};
|
||||
|
||||
#endif // PLOTTWARECONTROLAPP_H
|
1029
PlottWareControl/PlottWareControlMain.cpp
Normal file
1029
PlottWareControl/PlottWareControlMain.cpp
Normal file
File diff suppressed because it is too large
Load Diff
303
PlottWareControl/PlottWareControlMain.h
Normal file
303
PlottWareControl/PlottWareControlMain.h
Normal file
@ -0,0 +1,303 @@
|
||||
/***************************************************************
|
||||
* Name: PlottWareControlMain.h
|
||||
* Purpose: Defines Application Frame
|
||||
* Author: Fandly Gergo (fandlygergo@gmail.hu)
|
||||
* Created: 2017-11-25
|
||||
* Copyright: Fandly Gergo (systemtest.tk)
|
||||
* License:
|
||||
**************************************************************/
|
||||
|
||||
#ifndef PLOTTWARECONTROLMAIN_H
|
||||
#define PLOTTWARECONTROLMAIN_H
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
#include <sstream>
|
||||
|
||||
#include "settings.h"
|
||||
#include "project.h"
|
||||
|
||||
//(*Headers(PlottWareControlFrame)
|
||||
#include <wx/notebook.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/menu.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/listbox.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/radiobut.h>
|
||||
#include <wx/stopwatch.h>
|
||||
#include <wx/slider.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/frame.h>
|
||||
#include <wx/timer.h>
|
||||
#include <wx/gauge.h>
|
||||
#include <wx/statusbr.h>
|
||||
//*)
|
||||
|
||||
class PlottWareControlFrame: public wxFrame
|
||||
{
|
||||
public:
|
||||
|
||||
PlottWareControlFrame(wxWindow* parent,wxWindowID id = -1);
|
||||
virtual ~PlottWareControlFrame();
|
||||
Settings* getSettings();
|
||||
Project* getProject();
|
||||
|
||||
private:
|
||||
|
||||
//(*Handlers(PlottWareControlFrame)
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
void OnListBox1Select(wxCommandEvent& event);
|
||||
void OnScrollBar1Scroll(wxScrollEvent& event);
|
||||
void OnMenuItemSettingsSelected(wxCommandEvent& event);
|
||||
void OnProjNewButtonClick(wxCommandEvent& event);
|
||||
void OnProjOpenButtonClick(wxCommandEvent& event);
|
||||
void OnProjCloseButtonClick(wxCommandEvent& event);
|
||||
void OnImagesAddButtonClick(wxCommandEvent& event);
|
||||
void OnImagesDeleteButtonClick(wxCommandEvent& event);
|
||||
void OnImagesImageListBoxSelect(wxCommandEvent& event);
|
||||
void OnImagesPositionXSpinnerChange(wxSpinEvent& event);
|
||||
void OnImagesPositionYSpinnerChange(wxSpinEvent& event);
|
||||
void OnImagesCropX1SpinnerChange(wxSpinEvent& event);
|
||||
void OnImagesCropY1SpinnerChange(wxSpinEvent& event);
|
||||
void OnImagesCropX2SpinnerChange(wxSpinEvent& event);
|
||||
void OnImagesCropY2SpinnerChange(wxSpinEvent& event);
|
||||
void OnImagesPreviewButtonClick(wxCommandEvent& event);
|
||||
void OnImagesImageListMoveUpButtonClick(wxCommandEvent& event);
|
||||
void OnImagesImageListMoveDownButtonClick(wxCommandEvent& event);
|
||||
void OnImagesScaleTextText(wxCommandEvent& event);
|
||||
void OnProcessingRetrAllRadioSelect(wxCommandEvent& event);
|
||||
void OnProcessingRetrExtRadioSelect(wxCommandEvent& event);
|
||||
void OnProcessingCannyThreshSliderCmdScroll(wxScrollEvent& event);
|
||||
void OnProcessingPreviewButtonClick(wxCommandEvent& event);
|
||||
void OnProcessingColorLineSelectSelect(wxCommandEvent& event);
|
||||
void OnProcessingColorColorSelectSelect(wxCommandEvent& event);
|
||||
void OnProcessingColorForAllButtonClick(wxCommandEvent& event);
|
||||
void OnGcodeGenerateButtonClick(wxCommandEvent& event);
|
||||
void OnGcodeEditButtonClick(wxCommandEvent& event);
|
||||
void OnGcodeExportButtonClick(wxCommandEvent& event);
|
||||
void OnNotebook1PageChanged(wxNotebookEvent& event);
|
||||
void OnPrintingPrinterConnectButtonClick(wxCommandEvent& event);
|
||||
void OnPrintingPrinterHomeButtonClick(wxCommandEvent& event);
|
||||
void OnPrintingPrinterPowerButtonClick(wxCommandEvent& event);
|
||||
void OnPrintingPrinterHeadSelectSelect(wxCommandEvent& event);
|
||||
void OnPrintingPrinterUpButtonClick(wxCommandEvent& event);
|
||||
void OnPrintingPrinterDownButtonClick(wxCommandEvent& event);
|
||||
void OnPrintingPrinterRightButtonClick(wxCommandEvent& event);
|
||||
void OnPrintingPrinterLeftButtonClick(wxCommandEvent& event);
|
||||
void OnPrintingPrinterConsoleText(wxCommandEvent& event);
|
||||
void OnPrintingPrinterConsoleTextEnter(wxCommandEvent& event);
|
||||
void OnPrintingPrintButtonClick(wxCommandEvent& event);
|
||||
void OnPrintingElapsedTimeCheckerTimerTrigger(wxTimerEvent& event);
|
||||
void OnButton1Click(wxCommandEvent& event);
|
||||
void OnPrintingStopButtonClick(wxCommandEvent& event);
|
||||
void OnPrintingEmergencyButtonClick(wxCommandEvent& event);
|
||||
//*)
|
||||
|
||||
//(*Identifiers(PlottWareControlFrame)
|
||||
static const long ID_BUTTON1;
|
||||
static const long ID_STATICTEXT1;
|
||||
static const long ID_BUTTON2;
|
||||
static const long ID_BUTTON3;
|
||||
static const long ID_BUTTON4;
|
||||
static const long ID_PANEL2;
|
||||
static const long ID_STATICTEXT2;
|
||||
static const long ID_LISTBOX1;
|
||||
static const long ID_BUTTON5;
|
||||
static const long ID_BUTTON6;
|
||||
static const long ID_BUTTON9;
|
||||
static const long ID_BUTTON23;
|
||||
static const long ID_BUTTON24;
|
||||
static const long ID_STATICTEXT25;
|
||||
static const long ID_STATICTEXT26;
|
||||
static const long ID_STATICTEXT27;
|
||||
static const long ID_TEXTCTRL2;
|
||||
static const long ID_SPINCTRL1;
|
||||
static const long ID_SPINCTRL2;
|
||||
static const long ID_SPINCTRL3;
|
||||
static const long ID_SPINCTRL4;
|
||||
static const long ID_SPINCTRL5;
|
||||
static const long ID_SPINCTRL6;
|
||||
static const long ID_STATICTEXT4;
|
||||
static const long ID_STATICTEXT5;
|
||||
static const long ID_STATICTEXT3;
|
||||
static const long ID_STATICTEXT7;
|
||||
static const long ID_STATICTEXT9;
|
||||
static const long ID_STATICTEXT8;
|
||||
static const long ID_STATICTEXT10;
|
||||
static const long ID_STATICTEXT6;
|
||||
static const long ID_PANEL3;
|
||||
static const long ID_STATICTEXT12;
|
||||
static const long ID_STATICTEXT11;
|
||||
static const long ID_RADIOBUTTON1;
|
||||
static const long ID_RADIOBUTTON2;
|
||||
static const long ID_STATICTEXT13;
|
||||
static const long ID_SLIDER1;
|
||||
static const long ID_STATICTEXT14;
|
||||
static const long ID_STATICTEXT15;
|
||||
static const long ID_STATICTEXT16;
|
||||
static const long ID_CHOICE1;
|
||||
static const long ID_CHOICE2;
|
||||
static const long ID_BUTTON25;
|
||||
static const long ID_BUTTON8;
|
||||
static const long ID_PANEL4;
|
||||
static const long ID_STATICTEXT17;
|
||||
static const long ID_BUTTON10;
|
||||
static const long ID_BUTTON12;
|
||||
static const long ID_BUTTON13;
|
||||
static const long ID_PANEL5;
|
||||
static const long ID_STATICTEXT18;
|
||||
static const long ID_STATICTEXT19;
|
||||
static const long ID_STATICTEXT20;
|
||||
static const long ID_STATICTEXT21;
|
||||
static const long ID_BUTTON7;
|
||||
static const long ID_BUTTON16;
|
||||
static const long ID_BUTTON17;
|
||||
static const long ID_BUTTON18;
|
||||
static const long ID_BUTTON19;
|
||||
static const long ID_BUTTON20;
|
||||
static const long ID_CHOICE3;
|
||||
static const long ID_STATICTEXT22;
|
||||
static const long ID_BUTTON21;
|
||||
static const long ID_SPINCTRL7;
|
||||
static const long ID_STATICTEXT24;
|
||||
static const long ID_STATICTEXT23;
|
||||
static const long ID_STATICTEXT28;
|
||||
static const long ID_STATICTEXT29;
|
||||
static const long ID_STATICTEXT30;
|
||||
static const long ID_STATICTEXT32;
|
||||
static const long ID_STATICTEXT33;
|
||||
static const long ID_STATICTEXT31;
|
||||
static const long ID_TEXTCTRL1;
|
||||
static const long ID_LISTBOX2;
|
||||
static const long ID_STATICTEXT34;
|
||||
static const long ID_PANEL1;
|
||||
static const long ID_BUTTON11;
|
||||
static const long ID_BUTTON14;
|
||||
static const long ID_BUTTON15;
|
||||
static const long ID_STATICTEXT35;
|
||||
static const long ID_GAUGE1;
|
||||
static const long ID_STATICTEXT36;
|
||||
static const long ID_STATICTEXT37;
|
||||
static const long ID_PANEL6;
|
||||
static const long ID_NOTEBOOK2;
|
||||
static const long MenuSettingItem;
|
||||
static const long MenuQuitItem;
|
||||
static const long idMenuAbout;
|
||||
static const long ID_STATUSBAR1;
|
||||
static const long ID_MESSAGEDIALOG1;
|
||||
static const long ID_TIMER1;
|
||||
//*)
|
||||
|
||||
//(*Declarations(PlottWareControlFrame)
|
||||
wxStaticText* StaticText10;
|
||||
wxStaticText* StaticText22;
|
||||
wxSpinCtrl* ImagesCropX1Spinner;
|
||||
wxStaticText* StaticText9;
|
||||
wxStaticText* StaticText20;
|
||||
wxChoice* ProcessingColorLineSelect;
|
||||
wxButton* ProjCloseButton;
|
||||
wxListBox* ImagesImageListBox;
|
||||
wxNotebook* MenuChanger;
|
||||
wxButton* ProcessingColorForAllButton;
|
||||
wxButton* ImagesPreviewButton;
|
||||
wxStaticText* StaticText29;
|
||||
wxButton* PrintingEmergencyButton;
|
||||
wxStaticText* StaticText13;
|
||||
wxStaticText* StaticText2;
|
||||
wxStaticText* StaticText14;
|
||||
wxRadioButton* ProcessingRetrAllRadio;
|
||||
wxStaticText* PrintingStatusLabel;
|
||||
wxPanel* MenuChangerProjectPage;
|
||||
wxStaticText* StaticText26;
|
||||
wxStaticText* StaticText6;
|
||||
wxSpinCtrl* ImagesPositionXSpinner;
|
||||
wxPanel* MenuChangerPrintingPage;
|
||||
wxChoice* ProcessingColorColorSelect;
|
||||
wxButton* PrintingPrinterPowerButton;
|
||||
wxButton* PrintingPrinterConnectButton;
|
||||
wxSpinCtrl* ImagesCropY1Spinner;
|
||||
wxSpinCtrl* ImagesCropY2Spinner;
|
||||
wxButton* ImagesImageListMoveDownButton;
|
||||
wxStaticText* StaticText19;
|
||||
wxRadioButton* ProcessingRetrExtRadio;
|
||||
wxButton* ProjOpenButton;
|
||||
wxStaticText* StaticText8;
|
||||
wxTextCtrl* ImagesScaleText;
|
||||
wxStaticText* StaticText11;
|
||||
wxStaticText* StaticText18;
|
||||
wxButton* PrintingPrinterRightButton;
|
||||
wxButton* PrintingPrinterDownButton;
|
||||
wxStaticText* PrintingPrinterStatusLabel;
|
||||
wxPanel* Panel1;
|
||||
wxStaticText* StaticText1;
|
||||
wxStaticText* StaticText27;
|
||||
wxFileDialog* FileDialog1;
|
||||
wxButton* ImagesDeleteButton;
|
||||
wxPanel* MenuChangerProcessingPage;
|
||||
wxStaticText* StaticText3;
|
||||
wxSpinCtrl* ImagesCropX2Spinner;
|
||||
wxButton* PrintingStopButton;
|
||||
wxListBox* PrintingPrinterLog;
|
||||
wxButton* GcodeEditButton;
|
||||
wxTextCtrl* PrintingPrinterConsole;
|
||||
wxStaticText* StaticText21;
|
||||
wxTimer PrintingElapsedTimeCheckerTimer;
|
||||
wxStaticText* StaticText23;
|
||||
wxButton* ProcessingPreviewButton;
|
||||
wxStaticText* StaticText24;
|
||||
wxButton* ImagesAddButton;
|
||||
wxButton* PrintingPrinterUpButton;
|
||||
wxPanel* MenuChangerGcodePage;
|
||||
wxStaticText* PrintingPrinterPowerLabel;
|
||||
wxStaticText* StaticText5;
|
||||
wxStaticText* StaticText7;
|
||||
wxButton* ProjNewButton;
|
||||
wxButton* PrintingPrinterLeftButton;
|
||||
wxStatusBar* StatusBar1;
|
||||
wxButton* ImagesImageListMoveUpButton;
|
||||
wxStopWatch PrintingStopWatch;
|
||||
wxButton* PrintingPrinterHomeButton;
|
||||
wxSlider* ProcessingCannyThreshSlider;
|
||||
wxStaticText* StaticText28;
|
||||
wxGauge* PrintingStatusGauge;
|
||||
wxChoice* PrintingPrinterHeadSelect;
|
||||
wxPanel* MenuChangerImagesPage;
|
||||
wxStaticText* ImagesSizeLabel;
|
||||
wxStaticText* StaticText15;
|
||||
wxStaticText* StaticText12;
|
||||
wxButton* ProjSaveButton;
|
||||
wxStaticText* PrintingPrinterYLabel;
|
||||
wxStaticText* PrintingElapsedTimeLabelLabel;
|
||||
wxMessageDialog* MessageDialog1;
|
||||
wxMenuItem* MenuItemSettings;
|
||||
wxStaticText* StaticText25;
|
||||
wxStaticText* StaticText17;
|
||||
wxStaticText* StaticText4;
|
||||
wxButton* GcodeExportButton;
|
||||
wxStaticText* PrintingElapsedTimeLabel;
|
||||
wxStaticText* PrintingPrinterXLabel;
|
||||
wxStaticText* StaticText16;
|
||||
wxButton* PrintingPrintButton;
|
||||
wxSpinCtrl* PrintingPrinterMoveSpinner;
|
||||
wxSpinCtrl* ImagesPositionYSpinner;
|
||||
wxButton* GcodeGenerateButton;
|
||||
//*)
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
Settings *settings;
|
||||
Project *project;
|
||||
|
||||
//helper functions
|
||||
void projectControlEnable(bool to);
|
||||
void printerControlEnable(bool to);
|
||||
void printingControlShow(bool to);
|
||||
};
|
||||
|
||||
#endif // PLOTTWARECONTROLMAIN_H
|
BIN
PlottWareControl/Release/PlottWareControl.exe
Normal file
BIN
PlottWareControl/Release/PlottWareControl.exe
Normal file
Binary file not shown.
BIN
PlottWareControl/Release/Release.zip
Normal file
BIN
PlottWareControl/Release/Release.zip
Normal file
Binary file not shown.
BIN
PlottWareControl/Release/libopencv_core331.dll
Normal file
BIN
PlottWareControl/Release/libopencv_core331.dll
Normal file
Binary file not shown.
BIN
PlottWareControl/Release/libopencv_highgui331.dll
Normal file
BIN
PlottWareControl/Release/libopencv_highgui331.dll
Normal file
Binary file not shown.
BIN
PlottWareControl/Release/libopencv_imgcodecs331.dll
Normal file
BIN
PlottWareControl/Release/libopencv_imgcodecs331.dll
Normal file
Binary file not shown.
BIN
PlottWareControl/Release/libopencv_imgproc331.dll
Normal file
BIN
PlottWareControl/Release/libopencv_imgproc331.dll
Normal file
Binary file not shown.
21
PlottWareControl/Release/res/gCode.txt
Normal file
21
PlottWareControl/Release/res/gCode.txt
Normal file
@ -0,0 +1,21 @@
|
||||
commands:
|
||||
G0 Xx Yy - Rapid move to (z,y) coordinates
|
||||
G1 Xx Yy - Move to (x,y) coordinates
|
||||
G4 Pn - Wait n ms
|
||||
M300 S10 - Pen down
|
||||
M300 S50 - Pen up
|
||||
Tn - change to nth tool
|
||||
G28 - Home
|
||||
G90 - Set to absolute positioning
|
||||
G91 - Set to relative positioning
|
||||
M2 - Program end
|
||||
M17 - Enable steppers
|
||||
M18 - Disable steppers
|
||||
M80 - ATX power on
|
||||
M81 - ATX power off
|
||||
M112 - Emergency stop
|
||||
M114 - Get current position
|
||||
M703 - Get info from printer firmware
|
||||
M118 OK - Response to host when line done
|
||||
; - line comment
|
||||
(...) - block comment
|
BIN
PlottWareControl/Release/res/icon.bmp
Normal file
BIN
PlottWareControl/Release/res/icon.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 117 KiB |
BIN
PlottWareControl/Release/wxbase30u_gcc510TDM_x64.dll
Normal file
BIN
PlottWareControl/Release/wxbase30u_gcc510TDM_x64.dll
Normal file
Binary file not shown.
BIN
PlottWareControl/Release/wxmsw30u_core_gcc510TDM_x64.dll
Normal file
BIN
PlottWareControl/Release/wxmsw30u_core_gcc510TDM_x64.dll
Normal file
Binary file not shown.
189
PlottWareControl/SettingDialog.cpp
Normal file
189
PlottWareControl/SettingDialog.cpp
Normal file
@ -0,0 +1,189 @@
|
||||
#include "SettingDialog.h"
|
||||
|
||||
#include <string>
|
||||
#include "printer.h"
|
||||
|
||||
//(*InternalHeaders(SettingDialog)
|
||||
|
||||
#include <wx/settings.h>
|
||||
|
||||
#include <wx/font.h>
|
||||
|
||||
#include <wx/intl.h>
|
||||
|
||||
#include <wx/string.h>
|
||||
|
||||
//*)
|
||||
|
||||
//(*IdInit(SettingDialog)
|
||||
|
||||
const long SettingDialog::ID_STATICTEXT1 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_STATICBOX1 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_STATICTEXT2 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_SPINCTRL1 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_STATICTEXT3 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_STATICTEXT4 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_SPINCTRL2 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_STATICTEXT5 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_STATICTEXT6 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_SPINCTRL3 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_STATICTEXT7 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_LISTBOX1 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_TEXTCTRL1 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_STATICTEXT8 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_BUTTON1 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_STATICLINE1 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_STATICTEXT9 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_STATICTEXT10 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_BUTTON2 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_STATICTEXT11 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_CHECKBOX1 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_BUTTON3 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_BUTTON4 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_CHOICE2 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_SPINCTRL4 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_STATICTEXT12 = wxNewId();
|
||||
|
||||
const long SettingDialog::ID_MESSAGEDIALOG1 = wxNewId();
|
||||
|
||||
//*)
|
||||
|
||||
BEGIN_EVENT_TABLE(SettingDialog,wxDialog)
|
||||
//(*EventTable(SettingDialog)
|
||||
//*)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
SettingDialog::SettingDialog(wxWindow* parent,wxWindowID id,PlottWareControlFrame *_p)
|
||||
{
|
||||
p=_p;
|
||||
//(*Initialize(SettingDialog)
|
||||
|
||||
Create(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("id"));
|
||||
|
||||
SetClientSize(wxSize(389,432));
|
||||
|
||||
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
|
||||
|
||||
StaticText1 = new wxStaticText(this, ID_STATICTEXT1, _("Settings"), wxPoint(0,8), wxDefaultSize, 0, _T("ID_STATICTEXT1"));
|
||||
|
||||
wxFont StaticText1Font(14,wxFONTFAMILY_SWISS,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,false,wxEmptyString,wxFONTENCODING_DEFAULT);
|
||||
|
||||
StaticText1->SetFont(StaticText1Font);
|
||||
|
||||
StaticBox1 = new wxStaticBox(this, ID_STATICBOX1, _("Printer"), wxPoint(8,48), wxSize(376,280), 0, _T("ID_STATICBOX1"));
|
||||
|
||||
StaticText2 = new wxStaticText(this, ID_STATICTEXT2, _("Length:"), wxPoint(32,72), wxDefaultSize, 0, _T("ID_STATICTEXT2"));
|
||||
|
||||
LengthSpinner = new wxSpinCtrl(this, ID_SPINCTRL1, _T("0"), wxPoint(104,64), wxDefaultSize, 0, -1, 100000, 0, _T("ID_SPINCTRL1"));
|
||||
|
||||
LengthSpinner->SetValue(_T("0"));
|
||||
|
||||
LengthSpinner->SetToolTip(_("Length of printing area (-1 for infinite)"));
|
||||
|
||||
StaticText3 = new wxStaticText(this, ID_STATICTEXT3, _("mm"), wxPoint(248,72), wxDefaultSize, 0, _T("ID_STATICTEXT3"));
|
||||
|
||||
StaticText4 = new wxStaticText(this, ID_STATICTEXT4, _("Width:"), wxPoint(32,96), wxDefaultSize, 0, _T("ID_STATICTEXT4"));
|
||||
|
||||
WidthSpinner = new wxSpinCtrl(this, ID_SPINCTRL2, _T("0"), wxPoint(104,88), wxDefaultSize, 0, -1, 100000, 0, _T("ID_SPINCTRL2"));
|
||||
|
||||
WidthSpinner->SetValue(_T("0"));
|
||||
|
||||
WidthSpinner->SetToolTip(_("Width of printing area (-1 for infinite)"));
|
||||
|
||||
StaticText5 = new wxStaticText(this, ID_STATICTEXT5, _("mm"), wxPoint(248,96), wxDefaultSize, 0, _T("ID_STATICTEXT5"));
|
||||
|
||||
StaticText6 = new wxStaticText(this, ID_STATICTEXT6, _("Pen count:"), wxPoint(32,120), wxDefaultSize, 0, _T("ID_STATICTEXT6"));
|
||||
|
||||
PencountSpinner = new wxSpinCtrl(this, ID_SPINCTRL3, _T("0"), wxPoint(104,112), wxDefaultSize, 0, 0, 100, 0, _T("ID_SPINCTRL3"));
|
||||
|
||||
PencountSpinner->SetValue(_T("0"));
|
||||
|
||||
PencountSpinner->SetToolTip(_("Number of available drawing pens"));
|
||||
|
||||
StaticText7 = new wxStaticText(this, ID_STATICTEXT7, _("Pens:"), wxPoint(32,144), wxDefaultSize, 0, _T("ID_STATICTEXT7"));
|
||||
|
||||
PensListBox = new wxListBox(this, ID_LISTBOX1, wxPoint(104,136), wxSize(120,80), 0, 0, 0, wxDefaultValidator, _T("ID_LISTBOX1"));
|
||||
|
||||
PensListBox->SetToolTip(_("List of pens"));
|
||||
|
||||
PenColorText = new wxTextCtrl(this, ID_TEXTCTRL1, wxEmptyString, wxPoint(264,152), wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL1"));
|
||||
|
||||
PenColorText->SetToolTip(_("Color of pen"));
|
||||
|
||||
StaticText8 = new wxStaticText(this, ID_STATICTEXT8, _("Color:"), wxPoint(232,160), wxDefaultSize, 0, _T("ID_STATICTEXT8"));
|
||||
|
||||
PenColorSetButton = new wxButton(this, ID_BUTTON1, _("Set"), wxPoint(232,176), wxSize(136,23), 0, wxDefaultValidator, _T("ID_BUTTON1"));
|
||||
|
||||
PenColorSetButton->SetToolTip(_("Set color"));
|
||||
|
||||
StaticLine1 = new wxStaticLine(this, ID_STATICLINE1, wxPoint(24,232), wxSize(344,3), wxLI_HORIZONTAL, _T("ID_STATICLINE1"));
|
||||
|
||||
StaticText9 = new wxStaticText(this, ID_STATICTEXT9, _("Serial port:"), wxPoint(32,248), wxDefaultSize, 0, _T("ID_STATICTEXT9"));
|
||||
|
||||
StaticText10 = new wxStaticText(this, ID_STATICTEXT10, _("Baud rate:"), wxPoint(32,272), wxDefaultSize, 0, _T("ID_STATICTEXT10"));
|
||||
|
||||
PrinterAutoDetectButton = new wxButton(this, ID_BUTTON2, _("Auto detect"), wxPoint(32,296), wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON2"));
|
||||
|
||||
PrinterAutoDetectButton->SetToolTip(_("Auto detect printer settings (only works if serial port and baud rate is set)"));
|
||||
|
||||
StaticText11 = new wxStaticText(this, ID_STATICTEXT11, _("Debug mode:"), wxPoint(16,352), wxDefaultSize, 0, _T("ID_STATICTEXT11"));
|
||||
|
||||
DebugModeCheck = new wxCheckBox(this, ID_CHECKBOX1, _("Enable"), wxPoint(96,352), wxDefaultSize, 0, wxDefaultValidator, _T("ID_CHECKBOX1"));
|
||||
|
||||
DebugModeCheck->SetValue(false);
|
||||
|
||||
DebugModeCheck->SetToolTip(_("Enable debug mode (show stages of image processing)"));
|
||||
|
||||
SaveSettingsButton = new wxButton(this, ID_BUTTON3, _("Save"), wxPoint(176,384), wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON3"));
|
||||
|
||||
SaveSettingsButton->SetToolTip(_("Save settings"));
|
||||
|
||||
CancelSettingsButton = new wxButton(this, ID_BUTTON4, _("Cancel"), wxPoint(272,384), wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON4"));
|
||||
|
||||
CancelSettingsButton->SetToolTip(_("Dismiss changes"));
|
||||
|
||||
BaudRateChoice = new wxChoice(this, ID_CHOICE2, wxPoint(104,264), wxSize(120,21), 0, 0, 0, wxDefaultValidator, _T("ID_CHOICE2"));
|
||||
|
||||
BaudRateChoice->SetSelection( BaudRateChoice->Append(_("300")) );
|
||||
|
||||
BaudRateChoice->Append(_("600"));
|
||||
|
||||
BaudRateChoice->Append(_("1200"));
|
||||
|
||||
BaudRateChoice->Append(_("2400"));
|
||||
|
||||
BaudRateChoice->Append(_("4800"));
|
||||
|
||||
BaudRateChoice->Append(_("9600"));
|
||||
|
||||
BaudRateChoice->Append(_("14400"));
|
||||
|
||||
BaudRateChoice->Append(_("19200"));
|
||||
|
||||
BaudRateChoice->Append(_("28800"));
|
||||
|
110
PlottWareControl/SettingDialog.h
Normal file
110
PlottWareControl/SettingDialog.h
Normal file
@ -0,0 +1,110 @@
|
||||
#ifndef SETTINGDIALOG_H
|
||||
#define SETTINGDIALOG_H
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include "settings.h"
|
||||
#include "PlottWareControlMain.h"
|
||||
|
||||
//(*Headers(SettingDialog)
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/listbox.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/dialog.h>
|
||||
//*)
|
||||
|
||||
class SettingDialog: public wxDialog
|
||||
{
|
||||
public:
|
||||
|
||||
SettingDialog(wxWindow* parent,wxWindowID id=wxID_ANY,PlottWareControlFrame *_p=NULL);
|
||||
virtual ~SettingDialog();
|
||||
|
||||
//(*Declarations(SettingDialog)
|
||||
wxStaticText* StaticText10;
|
||||
wxCheckBox* DebugModeCheck;
|
||||
wxTextCtrl* PenColorText;
|
||||
wxStaticText* StaticText9;
|
||||
wxButton* CancelSettingsButton;
|
||||
wxChoice* BaudRateChoice;
|
||||
wxButton* PrinterAutoDetectButton;
|
||||
wxStaticText* StaticText2;
|
||||
wxStaticText* StaticText6;
|
||||
wxListBox* PensListBox;
|
||||
wxSpinCtrl* PencountSpinner;
|
||||
wxStaticText* StaticText8;
|
||||
wxStaticText* StaticText11;
|
||||
wxButton* PenColorSetButton;
|
||||
wxStaticText* StaticText1;
|
||||
wxStaticText* StaticText3;
|
||||
wxSpinCtrl* LengthSpinner;
|
||||
wxStaticBox* StaticBox1;
|
||||
wxSpinCtrl* WidthSpinner;
|
||||
wxButton* SaveSettingsButton;
|
||||
wxSpinCtrl* SerialPortSpinner;
|
||||
wxStaticText* StaticText5;
|
||||
wxStaticText* StaticText7;
|
||||
wxStaticLine* StaticLine1;
|
||||
wxStaticText* StaticText12;
|
||||
wxMessageDialog* MessageDialog1;
|
||||
wxStaticText* StaticText4;
|
||||
//*)
|
||||
|
||||
protected:
|
||||
|
||||
//(*Identifiers(SettingDialog)
|
||||
static const long ID_STATICTEXT1;
|
||||
static const long ID_STATICBOX1;
|
||||
static const long ID_STATICTEXT2;
|
||||
static const long ID_SPINCTRL1;
|
||||
static const long ID_STATICTEXT3;
|
||||
static const long ID_STATICTEXT4;
|
||||
static const long ID_SPINCTRL2;
|
||||
static const long ID_STATICTEXT5;
|
||||
static const long ID_STATICTEXT6;
|
||||
static const long ID_SPINCTRL3;
|
||||
static const long ID_STATICTEXT7;
|
||||
static const long ID_LISTBOX1;
|
||||
static const long ID_TEXTCTRL1;
|
||||
static const long ID_STATICTEXT8;
|
||||
static const long ID_BUTTON1;
|
||||
static const long ID_STATICLINE1;
|
||||
static const long ID_STATICTEXT9;
|
||||
static const long ID_STATICTEXT10;
|
||||
static const long ID_BUTTON2;
|
||||
static const long ID_STATICTEXT11;
|
||||
static const long ID_CHECKBOX1;
|
||||
static const long ID_BUTTON3;
|
||||
static const long ID_BUTTON4;
|
||||
static const long ID_CHOICE2;
|
||||
static const long ID_SPINCTRL4;
|
||||
static const long ID_STATICTEXT12;
|
||||
static const long ID_MESSAGEDIALOG1;
|
||||
//*)
|
||||
|
||||
private:
|
||||
|
||||
//(*Handlers(SettingDialog)
|
||||
void OnSpinCtrl1Change(wxSpinEvent& event);
|
||||
void OnCancelSettingsButtonClick(wxCommandEvent& event);
|
||||
void OnPencountSpinnerChange(wxSpinEvent& event);
|
||||
void OnPenColorSetButtonClick(wxCommandEvent& event);
|
||||
void OnPensListBoxSelect(wxCommandEvent& event);
|
||||
void OnSaveSettingsButtonClick(wxCommandEvent& event);
|
||||
void OnPrinterAutoDetectButtonClick(wxCommandEvent& event);
|
||||
//*)
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
PlottWareControlFrame *p;
|
||||
std::map<int, std::string> s_pens;
|
||||
};
|
||||
|
||||
#endif
|
BIN
PlottWareControl/bin/Debug/PlottWareControl.exe
Normal file
BIN
PlottWareControl/bin/Debug/PlottWareControl.exe
Normal file
Binary file not shown.
BIN
PlottWareControl/bin/Release/PlottWareControl.exe
Normal file
BIN
PlottWareControl/bin/Release/PlottWareControl.exe
Normal file
Binary file not shown.
67
PlottWareControl/image.cpp
Normal file
67
PlottWareControl/image.cpp
Normal file
@ -0,0 +1,67 @@
|
||||
#include "image.h"
|
||||
|
||||
Image::Image(){
|
||||
filename="";
|
||||
scale=1;
|
||||
}
|
||||
|
||||
Image::Image(std::string _filename){
|
||||
filename=_filename;
|
||||
scale=1;
|
||||
load();
|
||||
}
|
||||
|
||||
Image::~Image(){
|
||||
img.release();
|
||||
}
|
||||
|
||||
std::string Image::getFilename(){
|
||||
return filename;
|
||||
}
|
||||
|
||||
cv::Mat* Image::getMat(){
|
||||
return &img;
|
||||
}
|
||||
|
||||
Point Image::getPosition(){
|
||||
return position;
|
||||
}
|
||||
|
||||
Point Image::getCrop1(){
|
||||
return crop1;
|
||||
}
|
||||
|
||||
Point Image::getCrop2(){
|
||||
return crop2;
|
||||
}
|
||||
|
||||
double Image::getScale(){
|
||||
return scale;
|
||||
}
|
||||
|
||||
void Image::setScale(double _scale){
|
||||
scale=_scale;
|
||||
}
|
||||
|
||||
void Image::setFilename(std::string _filename){
|
||||
filename=_filename;
|
||||
}
|
||||
|
||||
bool Image::load(){
|
||||
img=cv::imread(filename, CV_LOAD_IMAGE_COLOR);
|
||||
if(!img.data){
|
||||
fprintf(stderr, "Error> Image can not be found or can not be loaded. At: Image::load() (file: %s, line: %d)\n", __FILE__, __LINE__);
|
||||
return false;
|
||||
}
|
||||
crop2=Point(img.cols, img.rows);
|
||||
return true;
|
||||
}
|
||||
|
||||
void Image::setPosition(Point _position){
|
||||
position=_position;
|
||||
}
|
||||
|
||||
void Image::setCrop(Point _crop1, Point _crop2){
|
||||
crop1=_crop1;
|
||||
crop2=_crop2;
|
||||
}
|
32
PlottWareControl/image.h
Normal file
32
PlottWareControl/image.h
Normal file
@ -0,0 +1,32 @@
|
||||
#ifndef IMAGE_H_INCLUDED
|
||||
#define IMAGE_H_INCLUDED
|
||||
|
||||
#include <string>
|
||||
#include <opencv2/opencv.hpp>
|
||||
#include "point.h"
|
||||
|
||||
class Image{
|
||||
std::string filename;
|
||||
cv::Mat img;
|
||||
Point position;
|
||||
Point crop1;
|
||||
Point crop2;
|
||||
double scale;
|
||||
public:
|
||||
Image();
|
||||
Image(std::string _filename);
|
||||
~Image();
|
||||
std::string getFilename();
|
||||
cv::Mat* getMat();
|
||||
Point getPosition();
|
||||
Point getCrop1();
|
||||
Point getCrop2();
|
||||
double getScale();
|
||||
void setScale(double _scale);
|
||||
void setFilename(std::string _filename);
|
||||
bool load();
|
||||
void setPosition(Point _position);
|
||||
void setCrop(Point _crop1, Point _crop2);
|
||||
};
|
||||
|
||||
#endif // IMAGE_H_INCLUDED
|
40
PlottWareControl/imageViewer.cpp
Normal file
40
PlottWareControl/imageViewer.cpp
Normal file
@ -0,0 +1,40 @@
|
||||
#include "imageViewer.h"
|
||||
|
||||
ImageViewer::ImageViewer(){
|
||||
name="";
|
||||
}
|
||||
|
||||
ImageViewer::ImageViewer(cv::Mat* _img, std::string _name){
|
||||
img=_img;
|
||||
name=_name;
|
||||
}
|
||||
|
||||
ImageViewer::ImageViewer(cv::Mat _cimg, std::string _name){
|
||||
cimg=_cimg;
|
||||
name=_name;
|
||||
img=&cimg;
|
||||
}
|
||||
|
||||
ImageViewer::~ImageViewer(){
|
||||
show(false);
|
||||
img->release();
|
||||
}
|
||||
|
||||
void ImageViewer::assignImage(cv::Mat* _img){
|
||||
img=_img;
|
||||
}
|
||||
|
||||
void ImageViewer::show(bool show){
|
||||
if(show){
|
||||
cv::namedWindow(name, CV_WINDOW_AUTOSIZE);
|
||||
cv::imshow(name, *img);
|
||||
}
|
||||
else{
|
||||
cv::destroyWindow(name);
|
||||
}
|
||||
}
|
||||
|
||||
void ImageViewer::refresh(){
|
||||
show(false);
|
||||
show(true);
|
||||
}
|
23
PlottWareControl/imageViewer.h
Normal file
23
PlottWareControl/imageViewer.h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef IMAGEVIEWER_H_INCLUDED
|
||||
#define IMAGEVIEWER_H_INCLUDED
|
||||
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <opencv2/opencv.hpp>
|
||||
#include <opencv2/highgui.hpp>
|
||||
|
||||
class ImageViewer{
|
||||
cv::Mat* img;
|
||||
cv::Mat cimg;
|
||||
std::string name;
|
||||
public:
|
||||
ImageViewer();
|
||||
ImageViewer(cv::Mat* _img, std::string _name);
|
||||
ImageViewer(cv::Mat _cimg, std::string _name);
|
||||
~ImageViewer();
|
||||
void assignImage(cv::Mat* _img);
|
||||
void show(bool show=true);
|
||||
void refresh();
|
||||
};
|
||||
|
||||
#endif // IMAGEVIEWER_H_INCLUDED
|
14742
PlottWareControl/json.hpp
Normal file
14742
PlottWareControl/json.hpp
Normal file
File diff suppressed because it is too large
Load Diff
BIN
PlottWareControl/obj/Debug/PlottWareControlApp.o
Normal file
BIN
PlottWareControl/obj/Debug/PlottWareControlApp.o
Normal file
Binary file not shown.
BIN
PlottWareControl/obj/Debug/PlottWareControlMain.o
Normal file
BIN
PlottWareControl/obj/Debug/PlottWareControlMain.o
Normal file
Binary file not shown.
BIN
PlottWareControl/obj/Debug/SettingDialog.o
Normal file
BIN
PlottWareControl/obj/Debug/SettingDialog.o
Normal file
Binary file not shown.
BIN
PlottWareControl/obj/Debug/image.o
Normal file
BIN
PlottWareControl/obj/Debug/image.o
Normal file
Binary file not shown.
BIN
PlottWareControl/obj/Debug/point.o
Normal file
BIN
PlottWareControl/obj/Debug/point.o
Normal file
Binary file not shown.
BIN
PlottWareControl/obj/Debug/printer.o
Normal file
BIN
PlottWareControl/obj/Debug/printer.o
Normal file
Binary file not shown.
BIN
PlottWareControl/obj/Debug/project.o
Normal file
BIN
PlottWareControl/obj/Debug/project.o
Normal file
Binary file not shown.
BIN
PlottWareControl/obj/Debug/resource.res
Normal file
BIN
PlottWareControl/obj/Debug/resource.res
Normal file
Binary file not shown.
BIN
PlottWareControl/obj/Debug/serial.o
Normal file
BIN
PlottWareControl/obj/Debug/serial.o
Normal file
Binary file not shown.
BIN
PlottWareControl/obj/Debug/settings.o
Normal file
BIN
PlottWareControl/obj/Debug/settings.o
Normal file
Binary file not shown.
BIN
PlottWareControl/obj/Release/GcodeEditorDialog.o
Normal file
BIN
PlottWareControl/obj/Release/GcodeEditorDialog.o
Normal file
Binary file not shown.
BIN
PlottWareControl/obj/Release/PlottWareControlApp.o
Normal file
BIN
PlottWareControl/obj/Release/PlottWareControlApp.o
Normal file
Binary file not shown.
BIN
PlottWareControl/obj/Release/PlottWareControlMain.o
Normal file
BIN
PlottWareControl/obj/Release/PlottWareControlMain.o
Normal file
Binary file not shown.
BIN
PlottWareControl/obj/Release/SettingDialog.o
Normal file
BIN
PlottWareControl/obj/Release/SettingDialog.o
Normal file
Binary file not shown.
BIN
PlottWareControl/obj/Release/image.o
Normal file
BIN
PlottWareControl/obj/Release/image.o
Normal file
Binary file not shown.
BIN
PlottWareControl/obj/Release/imageViewer.o
Normal file
BIN
PlottWareControl/obj/Release/imageViewer.o
Normal file
Binary file not shown.
BIN
PlottWareControl/obj/Release/point.o
Normal file
BIN
PlottWareControl/obj/Release/point.o
Normal file
Binary file not shown.
BIN
PlottWareControl/obj/Release/printer.o
Normal file
BIN
PlottWareControl/obj/Release/printer.o
Normal file
Binary file not shown.
BIN
PlottWareControl/obj/Release/project.o
Normal file
BIN
PlottWareControl/obj/Release/project.o
Normal file
Binary file not shown.
BIN
PlottWareControl/obj/Release/resource.res
Normal file
BIN
PlottWareControl/obj/Release/resource.res
Normal file
Binary file not shown.
BIN
PlottWareControl/obj/Release/serial.o
Normal file
BIN
PlottWareControl/obj/Release/serial.o
Normal file
Binary file not shown.
BIN
PlottWareControl/obj/Release/settings.o
Normal file
BIN
PlottWareControl/obj/Release/settings.o
Normal file
Binary file not shown.
27
PlottWareControl/point.cpp
Normal file
27
PlottWareControl/point.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#include "point.h"
|
||||
|
||||
Point::Point(){
|
||||
x=0;
|
||||
y=0;
|
||||
}
|
||||
|
||||
Point::Point(float _x, float _y){
|
||||
x=_x;
|
||||
y=_y;
|
||||
}
|
||||
|
||||
float Point::getX(){
|
||||
return x;
|
||||
}
|
||||
|
||||
float Point::getY(){
|
||||
return y;
|
||||
}
|
||||
|
||||
void Point::setX(float _x){
|
||||
x=_x;
|
||||
}
|
||||
|
||||
void Point::setY(float _y){
|
||||
y=_y;
|
||||
}
|
16
PlottWareControl/point.h
Normal file
16
PlottWareControl/point.h
Normal file
@ -0,0 +1,16 @@
|
||||
#ifndef POINT_H_INCLUDED
|
||||
#define POINT_H_INCLUDED
|
||||
|
||||
class Point{
|
||||
float x;
|
||||
float y;
|
||||
public:
|
||||
Point();
|
||||
Point(float _x, float _y);
|
||||
float getX();
|
||||
float getY();
|
||||
void setX(float _x);
|
||||
void setY(float _y);
|
||||
};
|
||||
|
||||
#endif // POINT_H_INCLUDED
|
143
PlottWareControl/printer.cpp
Normal file
143
PlottWareControl/printer.cpp
Normal file
@ -0,0 +1,143 @@
|
||||
#include "printer.h"
|
||||
|
||||
Printer::Printer(){
|
||||
position=Point(-1, -1);
|
||||
length=0;
|
||||
width=0;
|
||||
pencount=0;
|
||||
port=0;
|
||||
}
|
||||
|
||||
Printer::Printer(long int _length, long int _width, int _pencount, std::map<int, std::string> _pens, int _port, long int _baudrate){
|
||||
length=_length;
|
||||
width=_width;
|
||||
pencount=_pencount;
|
||||
pens=_pens;
|
||||
port=_port;
|
||||
baudrate=_baudrate;
|
||||
com=Serial();
|
||||
}
|
||||
|
||||
Point Printer::getPosition(){
|
||||
//get head position
|
||||
send("M114\n");
|
||||
std::string r=recv();
|
||||
position=Point(std::stoi(r.substr(r.find("X:")+2, r.find(" ", r.find("X:")))), std::stoi(r.substr(r.find("Y:")+2, r.find(" ", r.find("Y:")))));
|
||||
return position;
|
||||
}
|
||||
|
||||
long int Printer::getLength(){
|
||||
return length;
|
||||
}
|
||||
|
||||
long int Printer::getWidth(){
|
||||
return width;
|
||||
}
|
||||
|
||||
int Printer::getPenCount(){
|
||||
return pencount;
|
||||
}
|
||||
|
||||
std::map<int, std::string> Printer::getPens(){
|
||||
return pens;
|
||||
}
|
||||
|
||||
bool Printer::getPowerState(){
|
||||
return power;
|
||||
}
|
||||
|
||||
std::string Printer::getPort(){
|
||||
return "COM"+std::to_string(port);
|
||||
}
|
||||
|
||||
int Printer::getPortInt(){
|
||||
return port;
|
||||
}
|
||||
|
||||
long int Printer::getBaudRate(){
|
||||
return baudrate;
|
||||
}
|
||||
|
||||
bool Printer::setSettings(long int _length, long int _width, int _pencount, std::map<int, std::string> _pens, int _port, long int _baudrate){
|
||||
length=_length;
|
||||
width=_width;
|
||||
pencount=_pencount;
|
||||
pens=_pens;
|
||||
port=_port;
|
||||
baudrate=_baudrate;
|
||||
}
|
||||
|
||||
bool Printer::setComParameters(int _port, long int _baudrate){
|
||||
port=_port;
|
||||
baudrate=_baudrate;
|
||||
}
|
||||
|
||||
bool Printer::connect(){
|
||||
std::string p="\\\\.\\COM"+std::to_string(port);
|
||||
if(!com.conn(p.c_str(), baudrate)){
|
||||
return false;
|
||||
}
|
||||
|
||||
//get pwr state
|
||||
send("M115\n");
|
||||
std::string r=recv();
|
||||
try{
|
||||
nlohmann::json j=nlohmann::json::parse(r);
|
||||
power=j["power"];
|
||||
}
|
||||
catch(nlohmann::json::parse_error &e){
|
||||
fprintf(stderr, "ERROR> Can not parse JSON response from printer for M115. Message: %s; position: %i. At: Printer::autoDetect() (file: %s, line: %i)\n", e.what(), e.byte, __FILE__, __LINE__);
|
||||
return false;
|
||||
}
|
||||
|
||||
//get head position
|
||||
getPosition();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Printer::disconnect(){
|
||||
com.disconn();
|
||||
}
|
||||
|
||||
bool Printer::isConnected(){
|
||||
return com.IsConnected();
|
||||
}
|
||||
|
||||
bool Printer::send(std::string s){
|
||||
if(!isConnected()){
|
||||
return false;
|
||||
}
|
||||
com.WriteData(s.c_str(), s.size());
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string Printer::recv(){
|
||||
char buff[501];
|
||||
com.ReadData(buff, 500);
|
||||
return std::string(buff);
|
||||
}
|
||||
|
||||
bool Printer::autoDetect(){
|
||||
if(isConnected()){
|
||||
send("M115\n"); //get info from the firmware
|
||||
std::string r=recv();
|
||||
try{
|
||||
nlohmann::json j=nlohmann::json::parse(r);
|
||||
length=j["length"];
|
||||
width=j["width"];
|
||||
pencount=j["pencount"];
|
||||
pens.clear();
|
||||
for(int i=0; i<pencount; i++){
|
||||
pens[i]=j["pens"][i];
|
||||
}
|
||||
}
|
||||
catch(nlohmann::json::parse_error &e){
|
||||
fprintf(stderr, "ERROR> Can not parse JSON response from printer for M115. Message: %s; position: %i. At: Printer::autoDetect() (file: %s, line: %i)\n", e.what(), e.byte, __FILE__, __LINE__);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
45
PlottWareControl/printer.h
Normal file
45
PlottWareControl/printer.h
Normal file
@ -0,0 +1,45 @@
|
||||
#ifndef PRINTER_H_INCLUDED
|
||||
#define PRINTER_H_INCLUDED
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include "serial.h"
|
||||
#include "json.hpp"
|
||||
#include "point.h"
|
||||
|
||||
class Printer{
|
||||
Point position;
|
||||
long int length;
|
||||
long int width;
|
||||
int pencount;
|
||||
std::map<int, std::string> pens;
|
||||
bool power;
|
||||
int port;
|
||||
long int baudrate;
|
||||
Serial com;
|
||||
public:
|
||||
Printer();
|
||||
Printer(long int _length, long int _width, int _pencount, std::map<int, std::string> _pens, int _port, long int _baudrate);
|
||||
|
||||
Point getPosition();
|
||||
long int getLength();
|
||||
long int getWidth();
|
||||
int getPenCount();
|
||||
std::map<int, std::string> getPens();
|
||||
bool getPowerState();
|
||||
std::string getPort();
|
||||
int getPortInt();
|
||||
long int getBaudRate();
|
||||
|
||||
bool setSettings(long int _length, long int _width, int _pencount, std::map<int, std::string> _pens, int _port, long int _baudrate);
|
||||
bool setComParameters(int _port, long int _baudrate);
|
||||
|
||||
bool connect();
|
||||
void disconnect();
|
||||
bool isConnected();
|
||||
bool send(std::string s);
|
||||
std::string recv();
|
||||
bool autoDetect();
|
||||
};
|
||||
|
||||
#endif // PRINTER_H_INCLUDED
|
317
PlottWareControl/project.cpp
Normal file
317
PlottWareControl/project.cpp
Normal file
@ -0,0 +1,317 @@
|
||||
#include "project.h"
|
||||
|
||||
Project::Project(Settings* _settings){
|
||||
settings=_settings;
|
||||
filename="";
|
||||
retrmode=CV_RETR_LIST;
|
||||
cannythresh=100;
|
||||
gcode="";
|
||||
ivcombined=ImageViewer(&combined, "Images");
|
||||
ivprocessed=ImageViewer(&processed, "Processing");
|
||||
}
|
||||
|
||||
Project::Project(Settings* _settings, std::string _filename){
|
||||
settings=_settings;
|
||||
filename=_filename;
|
||||
retrmode=CV_RETR_LIST;
|
||||
cannythresh=100;
|
||||
gcode="";
|
||||
ivcombined=ImageViewer(&combined, "Images");
|
||||
ivprocessed=ImageViewer(&processed, "Processing");
|
||||
}
|
||||
|
||||
std::vector<Image>* Project::getImages(){
|
||||
return &images;
|
||||
}
|
||||
|
||||
int Project::getRetrMode(){
|
||||
return retrmode;
|
||||
}
|
||||
|
||||
int Project::getCannyThresh(){
|
||||
return cannythresh;
|
||||
}
|
||||
|
||||
std::map<int, int>* Project::getColoring(){
|
||||
return &coloring;
|
||||
}
|
||||
|
||||
std::string* Project::getGcode(){
|
||||
return &gcode;
|
||||
}
|
||||
|
||||
void Project::setFileName(std::string _filename){
|
||||
filename=_filename;
|
||||
}
|
||||
|
||||
void Project::setRetrMode(int _retrmode){
|
||||
retrmode=_retrmode;
|
||||
}
|
||||
|
||||
void Project::setCannyThresh(int _cannythresh){
|
||||
cannythresh=_cannythresh;
|
||||
}
|
||||
|
||||
bool Project::newProj(){
|
||||
//create files, save def, etc
|
||||
FILE* f=fopen(filename.c_str(), "w");
|
||||
if(!f){
|
||||
fprintf(stderr, "Error> Creating file for project. At: Project::newProj() (file: %s, line: %i)\n", __FILE__, __LINE__);
|
||||
return false;
|
||||
}
|
||||
fprintf(f,"");
|
||||
fclose(f);
|
||||
return true;
|
||||
}
|
||||
|
||||
void Project::loadProj(){
|
||||
//load stuff, deserialize
|
||||
}
|
||||
|
||||
void Project::save(){
|
||||
//serialize, save to file
|
||||
}
|
||||
|
||||
void Project::close(){
|
||||
//close project, free up resources;
|
||||
cv::destroyAllWindows();
|
||||
}
|
||||
|
||||
bool Project::combine(){
|
||||
//get col and row count
|
||||
int colmax=0, rowmax=0;
|
||||
for(std::vector<Image>::iterator it=images.begin(); it<images.end(); it++){
|
||||
//get current mat
|
||||
cv::Mat cur=*it->getMat();
|
||||
|
||||
//get resized mat
|
||||
cv::Mat resz;
|
||||
cv::resize(cur, resz, cv::Size(cur.cols*it->getScale(), cur.rows*it->getScale()));
|
||||
|
||||
//get cropped mat
|
||||
cv::Mat crop=resz(cv::Rect(it->getCrop1().getX(), it->getCrop1().getY(), (it->getCrop2().getX()-it->getCrop1().getX())*it->getScale(), (it->getCrop2().getY()-it->getCrop1().getY())*it->getScale()));
|
||||
|
||||
//crop debug
|
||||
if(settings->isDebug()){
|
||||
ImageViewer* iv=new ImageViewer(crop, "DEBUG:combine> "+it->getFilename());
|
||||
iv->show();
|
||||
}
|
||||
|
||||
if(it->getPosition().getX()+crop.cols > colmax){
|
||||
colmax=it->getPosition().getX()+crop.cols;
|
||||
}
|
||||
if(it->getPosition().getY()+crop.rows > rowmax){
|
||||
rowmax=it->getPosition().getY()+crop.rows;
|
||||
}
|
||||
|
||||
//cleanup
|
||||
resz.release();
|
||||
crop.release();
|
||||
}
|
||||
|
||||
if(settings->isDebug()){
|
||||
printf("DEBUG:combine> colmax=%i, rowmax=%i\n", colmax, rowmax);
|
||||
}
|
||||
|
||||
//create new mat
|
||||
combined=cv::Mat::zeros(rowmax, colmax, CV_8UC3);
|
||||
|
||||
//add layers
|
||||
for(std::vector<Image>::iterator it=images.begin(); it<images.end(); it++){
|
||||
//get current mat
|
||||
cv::Mat cur=*it->getMat();
|
||||
|
||||
//get resized mat
|
||||
cv::Mat resz;
|
||||
cv::resize(cur, resz, cv::Size(cur.cols*it->getScale(), cur.rows*it->getScale()));
|
||||
|
||||
//get cropped mat
|
||||
cv::Mat crop=resz(cv::Rect(it->getCrop1().getX()*it->getScale(), it->getCrop1().getY()*it->getScale(), (it->getCrop2().getX()-it->getCrop1().getX())*it->getScale(), (it->getCrop2().getY()-it->getCrop1().getY())*it->getScale()));
|
||||
|
||||
//add layer
|
||||
crop.copyTo(combined(cv::Rect(it->getPosition().getX(), it->getPosition().getY(), crop.cols, crop.rows)));
|
||||
|
||||
//cleanup
|
||||
resz.release();
|
||||
crop.release();
|
||||
}
|
||||
|
||||
//show results
|
||||
ivcombined.refresh();
|
||||
|
||||
//everything alright
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Project::process(){
|
||||
if(combined.empty()){
|
||||
return false;
|
||||
}
|
||||
|
||||
//convert mat to gray
|
||||
cv::Mat graymat;
|
||||
cv::cvtColor(combined, graymat, CV_BGR2GRAY);
|
||||
if(settings->isDebug()){
|
||||
ImageViewer* iv=new ImageViewer(graymat, "DEBUG:process> cvtColor");
|
||||
iv->show();
|
||||
}
|
||||
|
||||
//blur edges
|
||||
cv::blur(graymat, graymat, cv::Size(3, 3));
|
||||
if(settings->isDebug()){
|
||||
ImageViewer* iv=new ImageViewer(graymat, "DEBUG:process> blur");
|
||||
iv->show();
|
||||
}
|
||||
|
||||
//canny edge detection
|
||||
cv::Mat canny;
|
||||
cv::Canny(graymat, canny, cannythresh, cannythresh*2, 3);
|
||||
if(settings->isDebug()){
|
||||
ImageViewer* iv=new ImageViewer(canny, "DEBUG:process> Canny");
|
||||
iv->show();
|
||||
}
|
||||
|
||||
//find contours
|
||||
cv::findContours(canny, contours, hierarchy, retrmode, CV_CHAIN_APPROX_SIMPLE, cv::Point(0, 0));
|
||||
|
||||
//build color map if not ready
|
||||
if(coloring.size()!=contours.size()){
|
||||
coloring.clear();
|
||||
for(int i=0; i<contours.size(); i++){
|
||||
coloring[i]=-1; //set to default head to use
|
||||
}
|
||||
}
|
||||
|
||||
//draw output
|
||||
processed=cv::Mat::zeros(canny.size(), CV_8UC3);
|
||||
for(int i=0; i<contours.size(); i++){
|
||||
cv::Scalar color=cv::Scalar(30, 200, 30);
|
||||
cv::drawContours(processed, contours, i, color, 2, 8, hierarchy, 0, cv::Point());
|
||||
}
|
||||
|
||||
//show results
|
||||
ivprocessed.refresh();
|
||||
|
||||
//cleanup
|
||||
graymat.release();
|
||||
canny.release();
|
||||
|
||||
//it's k
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Project::printEdge(int n){
|
||||
//the same story
|
||||
if(combined.empty()){
|
||||
return false;
|
||||
}
|
||||
|
||||
//draw contours
|
||||
processed=cv::Mat::zeros(processed.size(), CV_8UC3);
|
||||
for(int i=0; i<contours.size(); i++){
|
||||
cv::Scalar color=cv::Scalar(30, 200, 30);
|
||||
cv::drawContours(processed, contours, i, color, 2, 8, hierarchy, 0, cv::Point());
|
||||
}
|
||||
|
||||
//highlight "The One"
|
||||
cv::Scalar color=cv::Scalar(30, 30, 200);
|
||||
cv::drawContours(processed, contours, n, color, 2, 8, hierarchy, 0, cv::Point());
|
||||
|
||||
//show results
|
||||
ivprocessed.refresh();
|
||||
|
||||
//kkk
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Project::generateGcode(){
|
||||
//check if the stuff is set
|
||||
if(contours.empty()){
|
||||
return false;
|
||||
}
|
||||
|
||||
//clear previous gcode
|
||||
gcode="";
|
||||
|
||||
//statistics
|
||||
unsigned int lines=0;
|
||||
double maxX=0, maxY=0;
|
||||
|
||||
//add info
|
||||
gcode+=";Generated by: PlottWareControl\n;Project: "+filename+"\n;Program created by: Fandly Gergo (fandlygergo@gmail.hu, systemtest.tk)\n\n\n\n";
|
||||
|
||||
//startup code
|
||||
gcode+="G90 ;absolute positioning\n";
|
||||
gcode+="M17 ;enable steppers\n";
|
||||
gcode+="T1000 ;deselect all tools\n";
|
||||
gcode+="G28 ;home axises\n";
|
||||
lines+=10;
|
||||
|
||||
//iterate through contours
|
||||
for(int i=0; i<contours.size(); i++){
|
||||
//if we need to eliminate the contour...
|
||||
if(coloring[i]==0){
|
||||
continue; //we do so
|
||||
}
|
||||
|
||||
if(coloring[i]==-1){
|
||||
coloring[i]=1; //set to the default if not set...
|
||||
}
|
||||
|
||||
//start contour drawing
|
||||
gcode+=";printing contour #"+std::to_string(i)+"\n";
|
||||
//select tool
|
||||
gcode+="T"+std::to_string(coloring[i])+"\n";
|
||||
|
||||
//move to first point
|
||||
gcode+="G0 X"+std::to_string(contours[i][0].x/10.0)+" Y"+std::to_string(contours[i][0].y/10.0)+"\n";
|
||||
if(contours[i][0].x/10.0 > maxX){
|
||||
maxX=contours[i][0].x/10.0;
|
||||
}
|
||||
if(contours[i][0].y/10.0 > maxY){
|
||||
maxY=contours[i][0].y/10.0;
|
||||
}
|
||||
|
||||
//move pen down
|
||||
gcode+="M300 S10\n";
|
||||
lines+=4;
|
||||
|
||||
//iterate through points
|
||||
for(int o=1; o<contours[i].size(); o++){
|
||||
gcode+="G1 X"+std::to_string(contours[i][o].x/10.0)+" Y"+std::to_string(contours[i][o].y/10.0)+"\n";
|
||||
if(contours[i][o].x/10.0 > maxX){
|
||||
maxX=contours[i][o].x/10.0;
|
||||
}
|
||||
if(contours[i][o].y/10.0 > maxY){
|
||||
maxY=contours[i][o].y/10.0;
|
||||
}
|
||||
lines++;
|
||||
}
|
||||
|
||||
//lift up pen
|
||||
gcode+="M300 S50\n";
|
||||
lines+=1;
|
||||
}
|
||||
|
||||
//end
|
||||
gcode+="T1000 ;deselect tool\n";
|
||||
gcode+="M18 ;disable steppers\n";
|
||||
gcode+="M2 ;program end\n";
|
||||
lines+=3;
|
||||
|
||||
//print "final thoughts"
|
||||
lines+=7;
|
||||
gcode+="\n\n\n;Line count: "+std::to_string(lines)+"\n;Max X: "+std::to_string(maxX)+"\n;Max Y: "+std::to_string(maxY)+"\n;ENJOY!";
|
||||
}
|
||||
|
||||
bool Project::exportGcode(std::string file){
|
||||
FILE* f=fopen(file.c_str(), "w");
|
||||
if(!f){
|
||||
fprintf(stderr, "Error> Can't create file for gcode export. At: Project::exportGcode(std::string file) (file: %s, line: %i)\n", __FILE__, __LINE__);
|
||||
return false;
|
||||
}
|
||||
|
||||
fprintf(f, "%s", gcode.c_str());
|
||||
fclose(f);
|
||||
return true;
|
||||
}
|
63
PlottWareControl/project.h
Normal file
63
PlottWareControl/project.h
Normal file
@ -0,0 +1,63 @@
|
||||
#ifndef PROJECT_H_INCLUDED
|
||||
#define PROJECT_H_INCLUDED
|
||||
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <opencv2/opencv.hpp>
|
||||
#include <opencv2/imgproc.hpp>
|
||||
#include <opencv2/highgui.hpp>
|
||||
#include "image.h"
|
||||
#include "settings.h"
|
||||
#include "imageViewer.h"
|
||||
|
||||
class Project{
|
||||
Settings* settings;
|
||||
std::string filename;
|
||||
std::vector<Image> images;
|
||||
cv::Mat combined;
|
||||
cv::Mat processed;
|
||||
int retrmode;
|
||||
int cannythresh;
|
||||
std::vector< std::vector<cv::Point> > contours;
|
||||
std::vector<cv::Vec4i> hierarchy;
|
||||
std::map<int, int> coloring;
|
||||
std::string gcode;
|
||||
|
||||
//image viewers:
|
||||
ImageViewer ivcombined;
|
||||
ImageViewer ivprocessed;
|
||||
public:
|
||||
Project(Settings* _settings);
|
||||
Project(Settings* _settings, std::string _filename);
|
||||
std::vector<Image>* getImages();
|
||||
int getRetrMode();
|
||||
int getCannyThresh();
|
||||
std::map<int, int>* getColoring();
|
||||
std::string* getGcode();
|
||||
void setFileName(std::string _filename);
|
||||
void setRetrMode(int _retrmode);
|
||||
void setCannyThresh(int _cannythresh);
|
||||
|
||||
//project operations
|
||||
bool newProj();
|
||||
void loadProj();
|
||||
void save();
|
||||
void close();
|
||||
|
||||
//processing operations
|
||||
bool combine();
|
||||
bool process();
|
||||
bool printEdge(int n);
|
||||
|
||||
//gcode operations
|
||||
bool generateGcode();
|
||||
bool exportGcode(std::string file);
|
||||
|
||||
//print status
|
||||
unsigned long int printStatus;
|
||||
bool printStop;
|
||||
};
|
||||
|
||||
#endif // PROJECT_H_INCLUDED
|
24
PlottWareControl/res/gCode.txt
Normal file
24
PlottWareControl/res/gCode.txt
Normal file
@ -0,0 +1,24 @@
|
||||
commands:
|
||||
G0 Xx Yy - Rapid move to (z,y) coordinates
|
||||
G1 Xx Yy - Move to (x,y) coordinates
|
||||
G4 Pn - Wait n ms
|
||||
G28 - Home
|
||||
G90 - Set to absolute positioning
|
||||
G91 - Set to relative positioning
|
||||
Tn - change to nth tool
|
||||
M2 - Program end
|
||||
M17 - Enable steppers
|
||||
M18 - Disable steppers
|
||||
M80 - ATX power on
|
||||
M81 - ATX power off
|
||||
M112 - Emergency stop
|
||||
M114 - Get current position
|
||||
M115 - Get info from printer firmware
|
||||
M118 OK - Response to host when line done
|
||||
; - line comment
|
||||
(...) - block comment
|
||||
|
||||
|
||||
M114 response: X:x Y:y
|
||||
M115 response: {"software":"PlottWareFirmware v1.0","power":true/false,"length":L,"width":W,"pencount":PC,"pens":["C1","C2","C3"]}
|
||||
Deselect tool: T0 ot T1000
|
BIN
PlottWareControl/res/icon.bmp
Normal file
BIN
PlottWareControl/res/icon.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 117 KiB |
3
PlottWareControl/resource.rc
Normal file
3
PlottWareControl/resource.rc
Normal file
@ -0,0 +1,3 @@
|
||||
aaaa ICON "wx/msw/std.ico"
|
||||
|
||||
#include "wx/msw/wx.rc"
|
175
PlottWareControl/serial.cpp
Normal file
175
PlottWareControl/serial.cpp
Normal file
@ -0,0 +1,175 @@
|
||||
#include "serial.h"
|
||||
|
||||
/**
|
||||
Got from: https://playground.arduino.cc/Interfacing/CPPWindows
|
||||
**/
|
||||
|
||||
Serial::Serial(){
|
||||
//We're not yet connected
|
||||
this->connected = false;
|
||||
return;
|
||||
}
|
||||
|
||||
bool Serial::conn(const char *portName, int baud)
|
||||
{
|
||||
if(this->connected){
|
||||
return false; //we're already connected;
|
||||
}
|
||||
//Try to connect to the given port throuh CreateFile
|
||||
this->hSerial = CreateFileA(portName,
|
||||
GENERIC_READ | GENERIC_WRITE,
|
||||
0,
|
||||
NULL,
|
||||
OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
NULL);
|
||||
|
||||
//Check if the connection was successfull
|
||||
if(this->hSerial==INVALID_HANDLE_VALUE)
|
||||
{
|
||||
//If not success full display an Error
|
||||
if(GetLastError()==ERROR_FILE_NOT_FOUND){
|
||||
|
||||
//Print Error if neccessary
|
||||
fprintf(stderr, "ERROR> Handle was not attached. Reason: %s not available. At: Serial::conn(const char *portName, int baud) (file: %s, line: %i)\n", portName, __FILE__, __LINE__);
|
||||
return false;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "ERROR> Serial connection failed. At: Serial::conn(const char *portName, int baud) (file: %s, line: %i)\n", __FILE__, __LINE__);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//If connected we try to set the comm parameters
|
||||
DCB dcbSerialParams = {0};
|
||||
|
||||
//Try to get the current
|
||||
if (!GetCommState(this->hSerial, &dcbSerialParams))
|
||||
{
|
||||
//If impossible, show an error
|
||||
fprintf(stderr, "ERROR> Failed to get current serial parameters! At: Serial::conn(const char *portName, int baud) (file: %s, line: %i)\n", __FILE__, __LINE__);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Define serial connection parameters for the arduino board
|
||||
dcbSerialParams.BaudRate=baud;
|
||||
dcbSerialParams.ByteSize=8;
|
||||
dcbSerialParams.StopBits=ONESTOPBIT;
|
||||
dcbSerialParams.Parity=NOPARITY;
|
||||
//Setting the DTR to Control_Enable ensures that the Arduino is properly
|
||||
//reset upon establishing a connection
|
||||
dcbSerialParams.fDtrControl = DTR_CONTROL_ENABLE;
|
||||
|
||||
//Set the parameters and check for their proper application
|
||||
if(!SetCommState(hSerial, &dcbSerialParams))
|
||||
{
|
||||
fprintf(stderr, "ERROR> Could not set Serial Port parameters At: Serial::conn(const char *portName, int baud) (file: %s, line: %i)\n", __FILE__, __LINE__);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//If everything went fine we're connected
|
||||
this->connected = true;
|
||||
//Flush any remaining characters in the buffers
|
||||
PurgeComm(this->hSerial, PURGE_RXCLEAR | PURGE_TXCLEAR);
|
||||
//We wait 2s as the arduino board will be reseting
|
||||
Sleep(ARDUINO_WAIT_TIME);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Serial::~Serial()
|
||||
{
|
||||
//Check if we are connected before trying to disconnect
|
||||
if(this->connected)
|
||||
{
|
||||
//We're no longer connected
|
||||
this->connected = false;
|
||||
//Close the serial handler
|
||||
CloseHandle(this->hSerial);
|
||||
}
|
||||
}
|
||||
|
||||
void Serial::disconn(){
|
||||
//Check if we are connected before trying to disconnect
|
||||
if(this->connected)
|
||||
{
|
||||
//We're no longer connected
|
||||
this->connected = false;
|
||||
//Close the serial handler
|
||||
CloseHandle(this->hSerial);
|
||||
}
|
||||
}
|
||||
|
||||
int Serial::ReadData(char *buffer, unsigned int nbChar)
|
||||
{
|
||||
//Number of bytes we'll have read
|
||||
DWORD bytesRead;
|
||||
//Number of bytes we'll really ask to read
|
||||
unsigned int toRead;
|
||||
|
||||
//Use the ClearCommError function to get status info on the Serial port
|
||||
ClearCommError(this->hSerial, &this->errors, &this->status);
|
||||
|
||||
//block till there's something to read
|
||||
while(this->status.cbInQue<=0){
|
||||
Sleep(10);
|
||||
}
|
||||
|
||||
//Check if there is something to read
|
||||
if(this->status.cbInQue>0)
|
||||
{
|
||||
//If there is we check if there is enough data to read the required number
|
||||
//of characters, if not we'll read only the available characters to prevent
|
||||
//locking of the application.
|
||||
if(this->status.cbInQue>nbChar)
|
||||
{
|
||||
toRead = nbChar;
|
||||
}
|
||||
else
|
||||
{
|
||||
toRead = this->status.cbInQue;
|
||||
}
|
||||
|
||||
//Try to read the require number of chars, and return the number of read bytes on success
|
||||
if(ReadFile(this->hSerial, buffer, toRead, &bytesRead, NULL))
|
||||
{
|
||||
return bytesRead;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//If nothing has been read, or that an error was detected return 0
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
bool Serial::WriteData(const char *buffer, unsigned int nbChar)
|
||||
{
|
||||
DWORD bytesSend;
|
||||
|
||||
//Try to write the buffer on the Serial port
|
||||
if(!WriteFile(this->hSerial, (void *)buffer, nbChar, &bytesSend, 0))
|
||||
{
|
||||
//In case it don't work get comm error and return false
|
||||
ClearCommError(this->hSerial, &this->errors, &this->status);
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Serial::IsConnected()
|
||||
{
|
||||
//Simply return the connection status
|
||||
return this->connected;
|
||||
}
|
46
PlottWareControl/serial.h
Normal file
46
PlottWareControl/serial.h
Normal file
@ -0,0 +1,46 @@
|
||||
#ifndef SERIAL_H_INCLUDED
|
||||
#define SERIAL_H_INCLUDED
|
||||
|
||||
//#include <windows.h>
|
||||
#include <wx/msw/private.h>
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
|
||||
#define ARDUINO_WAIT_TIME 2000
|
||||
|
||||
/**
|
||||
Got from: https://playground.arduino.cc/Interfacing/CPPWindows
|
||||
**/
|
||||
|
||||
class Serial
|
||||
{
|
||||
private:
|
||||
//Serial comm handler
|
||||
HANDLE hSerial;
|
||||
//Connection status
|
||||
bool connected;
|
||||
//Get various information about the connection
|
||||
COMSTAT status;
|
||||
//Keep track of last error
|
||||
DWORD errors;
|
||||
|
||||
public:
|
||||
//Initialize Serial communication with the given COM port
|
||||
Serial();
|
||||
bool conn(const char *portName, int baud);
|
||||
//Close the connection
|
||||
~Serial();
|
||||
void disconn();
|
||||
//Read data in a buffer, if nbChar is greater than the
|
||||
//maximum number of bytes available, it will return only the
|
||||
//bytes available. The function return -1 when nothing could
|
||||
//be read, the number of bytes actually read.
|
||||
int ReadData(char *buffer, unsigned int nbChar);
|
||||
//Writes data from a buffer through the Serial connection
|
||||
//return true on success.
|
||||
bool WriteData(const char *buffer, unsigned int nbChar);
|
||||
//Check if we are actually connected
|
||||
bool IsConnected();
|
||||
};
|
||||
|
||||
#endif // SERIAL_H_INCLUDED
|
29
PlottWareControl/settings.cpp
Normal file
29
PlottWareControl/settings.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
#include "settings.h"
|
||||
|
||||
Settings::Settings(){
|
||||
printer=Printer();
|
||||
#ifdef PWC_DEBUG
|
||||
debugmode=true;
|
||||
#else
|
||||
debugmode=false;
|
||||
#endif // PWC_DEBUG
|
||||
}
|
||||
|
||||
Settings::Settings(Printer _printer, bool _debugmode){
|
||||
printer=_printer;
|
||||
debugmode=_debugmode;
|
||||
}
|
||||
|
||||
Printer* Settings::getPrinter(){
|
||||
return &printer;
|
||||
}
|
||||
|
||||
bool Settings::isDebug(){
|
||||
return debugmode;
|
||||
}
|
||||
|
||||
bool Settings::setSettings(Printer _printer, bool _debugmode){
|
||||
printer=_printer;
|
||||
debugmode=_debugmode;
|
||||
return true;
|
||||
}
|
20
PlottWareControl/settings.h
Normal file
20
PlottWareControl/settings.h
Normal file
@ -0,0 +1,20 @@
|
||||
#ifndef SETTINGS_H_INCLUDED
|
||||
#define SETTINGS_H_INCLUDED
|
||||
|
||||
#include <string>
|
||||
#include "printer.h"
|
||||
|
||||
class Settings{
|
||||
Printer printer;
|
||||
bool debugmode;
|
||||
public:
|
||||
Settings();
|
||||
Settings(Printer _printer, bool _debugmode);
|
||||
|
||||
Printer* getPrinter();
|
||||
bool isDebug();
|
||||
|
||||
bool setSettings(Printer _printer, bool _debugmode);
|
||||
};
|
||||
|
||||
#endif // SETTINGS_H_INCLUDED
|
33
PlottWareControl/version.h
Normal file
33
PlottWareControl/version.h
Normal file
@ -0,0 +1,33 @@
|
||||
#ifndef VERSION_H
|
||||
#define VERSION_H
|
||||
|
||||
namespace Version{
|
||||
|
||||
//Date Version Types
|
||||
static const char DATE[] = "06";
|
||||
static const char MONTH[] = "12";
|
||||
static const char YEAR[] = "2017";
|
||||
static const char UBUNTU_VERSION_STYLE[] = "17.12";
|
||||
|
||||
//Software Status
|
||||
static const char STATUS[] = "Alpha";
|
||||
static const char STATUS_SHORT[] = "a";
|
||||
|
||||
//Standard Version Type
|
||||
static const long MAJOR = 0;
|
||||
static const long MINOR = 1;
|
||||
static const long BUILD = 5;
|
||||
static const long REVISION = 28;
|
||||
|
||||
//Miscellaneous Version Types
|
||||
static const long BUILDS_COUNT = 356;
|
||||
#define RC_FILEVERSION 0,1,5,28
|
||||
#define RC_FILEVERSION_STRING "0, 1, 5, 28\0"
|
||||
static const char FULLVERSION_STRING [] = "0.1.5.28";
|
||||
|
||||
//These values are to keep track of your versioning state, don't modify them.
|
||||
static const long BUILD_HISTORY = 0;
|
||||
|
||||
|
||||
}
|
||||
#endif //VERSION_H
|
44
PlottWareControl/wxsmith/GcodeEditorDialog.wxs
Normal file
44
PlottWareControl/wxsmith/GcodeEditorDialog.wxs
Normal file
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<wxsmith>
|
||||
<object class="wxDialog" name="GcodeEditorDialog">
|
||||
<size>902,565</size>
|
||||
<bg>wxSYS_COLOUR_WINDOW</bg>
|
||||
<pos_arg>1</pos_arg>
|
||||
<size_arg>1</size_arg>
|
||||
<object class="wxTextCtrl" name="ID_TEXTCTRL1" variable="GcodeText" member="yes">
|
||||
<pos>16,48</pos>
|
||||
<size>872,500</size>
|
||||
<font>
|
||||
<size>10</size>
|
||||
<style>normal</style>
|
||||
<weight>normal</weight>
|
||||
<underlined>0</underlined>
|
||||
<family>swiss</family>
|
||||
<face>Courier New</face>
|
||||
</font>
|
||||
<style>wxTE_MULTILINE</style>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT1" variable="StaticText1" member="yes">
|
||||
<label>G code editor</label>
|
||||
<pos>24,16</pos>
|
||||
<font>
|
||||
<size>16</size>
|
||||
<style>normal</style>
|
||||
<weight>normal</weight>
|
||||
<underlined>0</underlined>
|
||||
<family>swiss</family>
|
||||
<face></face>
|
||||
</font>
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON1" variable="SaveButton" member="yes">
|
||||
<label>Save</label>
|
||||
<pos>704,16</pos>
|
||||
<handler function="OnSaveButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON2" variable="CancelButton" member="yes">
|
||||
<label>Cancel</label>
|
||||
<pos>792,16</pos>
|
||||
<handler function="OnCancelButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
</object>
|
||||
</wxsmith>
|
621
PlottWareControl/wxsmith/PlottWareControlframe.wxs
Normal file
621
PlottWareControl/wxsmith/PlottWareControlframe.wxs
Normal file
@ -0,0 +1,621 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<wxsmith>
|
||||
<object class="wxFrame" name="PlottWareControlFrame">
|
||||
<title>PlottWareControl</title>
|
||||
<icon>.\res\icon.bmp</icon>
|
||||
<size>473,543</size>
|
||||
<bg>wxSYS_COLOUR_WINDOW</bg>
|
||||
<id_arg>0</id_arg>
|
||||
<object class="wxNotebook" name="ID_NOTEBOOK2" variable="MenuChanger" member="yes">
|
||||
<pos>680,72</pos>
|
||||
<size>475,536</size>
|
||||
<object class="notebookpage">
|
||||
<object class="wxPanel" name="ID_PANEL2" variable="MenuChangerProjectPage" member="yes">
|
||||
<size>467,421</size>
|
||||
<bg>wxSYS_COLOUR_WINDOW</bg>
|
||||
<object class="wxButton" name="ID_BUTTON1" variable="ProjNewButton" member="yes">
|
||||
<label>New</label>
|
||||
<pos>16,56</pos>
|
||||
<tooltip>Create new project</tooltip>
|
||||
<handler function="OnProjNewButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT1" variable="StaticText1" member="yes">
|
||||
<label>Project</label>
|
||||
<pos>16,16</pos>
|
||||
<font>
|
||||
<size>14</size>
|
||||
<style>normal</style>
|
||||
<weight>normal</weight>
|
||||
<underlined>0</underlined>
|
||||
<family>swiss</family>
|
||||
</font>
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON2" variable="ProjOpenButton" member="yes">
|
||||
<label>Open</label>
|
||||
<pos>104,56</pos>
|
||||
<tooltip>Open an existing project</tooltip>
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON3" variable="ProjSaveButton" member="yes">
|
||||
<label>Save</label>
|
||||
<pos>192,56</pos>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>Save current project</tooltip>
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON4" variable="ProjCloseButton" member="yes">
|
||||
<label>Close</label>
|
||||
<pos>280,56</pos>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>Close current project</tooltip>
|
||||
<handler function="OnProjCloseButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
</object>
|
||||
<label>Project</label>
|
||||
</object>
|
||||
<object class="notebookpage">
|
||||
<object class="wxPanel" name="ID_PANEL3" variable="MenuChangerImagesPage" member="yes">
|
||||
<size>467,479</size>
|
||||
<bg>wxSYS_COLOUR_WINDOW</bg>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT2" variable="StaticText2" member="yes">
|
||||
<label>Images</label>
|
||||
<pos>16,16</pos>
|
||||
<font>
|
||||
<size>14</size>
|
||||
<style>normal</style>
|
||||
<weight>normal</weight>
|
||||
<underlined>0</underlined>
|
||||
<family>swiss</family>
|
||||
</font>
|
||||
</object>
|
||||
<object class="wxListBox" name="ID_LISTBOX1" variable="ImagesImageListBox" member="yes">
|
||||
<default>-1</default>
|
||||
<pos>24,56</pos>
|
||||
<size>120,168</size>
|
||||
<handler function="OnImagesImageListBoxSelect" entry="EVT_LISTBOX" />
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON5" variable="ImagesAddButton" member="yes">
|
||||
<label>Add image</label>
|
||||
<pos>160,56</pos>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>Load new image</tooltip>
|
||||
<handler function="OnImagesAddButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON6" variable="ImagesDeleteButton" member="yes">
|
||||
<label>Delete</label>
|
||||
<pos>160,88</pos>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>Delete selected image</tooltip>
|
||||
<handler function="OnImagesDeleteButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON9" variable="ImagesPreviewButton" member="yes">
|
||||
<label>Combine</label>
|
||||
<pos>16,464</pos>
|
||||
<size>432,23</size>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>Preview images on canvas</tooltip>
|
||||
<handler function="OnImagesPreviewButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON23" variable="ImagesImageListMoveUpButton" member="yes">
|
||||
<label>/\\</label>
|
||||
<pos>160,168</pos>
|
||||
<size>24,23</size>
|
||||
<enabled>0</enabled>
|
||||
<handler function="OnImagesImageListMoveUpButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON24" variable="ImagesImageListMoveDownButton" member="yes">
|
||||
<label>\\/</label>
|
||||
<pos>160,200</pos>
|
||||
<size>24,23</size>
|
||||
<enabled>0</enabled>
|
||||
<handler function="OnImagesImageListMoveDownButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT25" variable="StaticText24" member="yes">
|
||||
<label>Size:</label>
|
||||
<pos>24,248</pos>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT26" variable="ImagesSizeLabel" member="yes">
|
||||
<label>0x0</label>
|
||||
<pos>88,248</pos>
|
||||
<size>120,13</size>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT27" variable="StaticText25" member="yes">
|
||||
<label>Scale:</label>
|
||||
<pos>24,272</pos>
|
||||
</object>
|
||||
<object class="wxTextCtrl" name="ID_TEXTCTRL2" variable="ImagesScaleText" member="yes">
|
||||
<value>0</value>
|
||||
<pos>88,264</pos>
|
||||
<size>120,21</size>
|
||||
<enabled>0</enabled>
|
||||
<handler function="OnImagesScaleTextText" entry="EVT_TEXT" />
|
||||
</object>
|
||||
<object class="wxSpinCtrl" name="ID_SPINCTRL1" variable="ImagesPositionXSpinner" member="yes">
|
||||
<value>0</value>
|
||||
<max>999999999</max>
|
||||
<pos>88,288</pos>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>X coordinate of image</tooltip>
|
||||
<handler function="OnImagesPositionXSpinnerChange" entry="EVT_SPINCTRL" />
|
||||
</object>
|
||||
<object class="wxSpinCtrl" name="ID_SPINCTRL2" variable="ImagesPositionYSpinner" member="yes">
|
||||
<value>0</value>
|
||||
<max>999999999</max>
|
||||
<pos>88,312</pos>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>X coordinate of image</tooltip>
|
||||
<handler function="OnImagesPositionYSpinnerChange" entry="EVT_SPINCTRL" />
|
||||
</object>
|
||||
<object class="wxSpinCtrl" name="ID_SPINCTRL3" variable="ImagesCropX1Spinner" member="yes">
|
||||
<value>0</value>
|
||||
<max>999999999</max>
|
||||
<pos>88,336</pos>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>X coordinate of top-left crop point</tooltip>
|
||||
<handler function="OnImagesCropX1SpinnerChange" entry="EVT_SPINCTRL" />
|
||||
</object>
|
||||
<object class="wxSpinCtrl" name="ID_SPINCTRL4" variable="ImagesCropY1Spinner" member="yes">
|
||||
<value>0</value>
|
||||
<max>999999999</max>
|
||||
<pos>88,360</pos>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>Y coordinate of top-left crop point</tooltip>
|
||||
<handler function="OnImagesCropY1SpinnerChange" entry="EVT_SPINCTRL" />
|
||||
</object>
|
||||
<object class="wxSpinCtrl" name="ID_SPINCTRL5" variable="ImagesCropX2Spinner" member="yes">
|
||||
<value>0</value>
|
||||
<max>999999999</max>
|
||||
<pos>88,384</pos>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>X coordinate of bottom-right crop point</tooltip>
|
||||
<handler function="OnImagesCropX2SpinnerChange" entry="EVT_SPINCTRL" />
|
||||
</object>
|
||||
<object class="wxSpinCtrl" name="ID_SPINCTRL6" variable="ImagesCropY2Spinner" member="yes">
|
||||
<value>0</value>
|
||||
<max>999999999</max>
|
||||
<pos>88,408</pos>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>Y coordinate of bottom-right crop point</tooltip>
|
||||
<handler function="OnImagesCropY2SpinnerChange" entry="EVT_SPINCTRL" />
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT4" variable="StaticText4" member="yes">
|
||||
<label>X</label>
|
||||
<pos>72,296</pos>
|
||||
<size>8,13</size>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT5" variable="StaticText5" member="yes">
|
||||
<label>Y</label>
|
||||
<pos>72,320</pos>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT3" variable="StaticText3" member="yes">
|
||||
<label>Position:</label>
|
||||
<pos>24,296</pos>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT7" variable="StaticText7" member="yes">
|
||||
<label>X1</label>
|
||||
<pos>72,344</pos>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT9" variable="StaticText9" member="yes">
|
||||
<label>Y1</label>
|
||||
<pos>72,368</pos>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT8" variable="StaticText8" member="yes">
|
||||
<label>X2</label>
|
||||
<pos>72,392</pos>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT10" variable="StaticText10" member="yes">
|
||||
<label>Y2</label>
|
||||
<pos>72,416</pos>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT6" variable="StaticText6" member="yes">
|
||||
<label>Crop:</label>
|
||||
<pos>24,344</pos>
|
||||
</object>
|
||||
</object>
|
||||
<label>Images</label>
|
||||
</object>
|
||||
<object class="notebookpage">
|
||||
<object class="wxPanel" name="ID_PANEL4" variable="MenuChangerProcessingPage" member="yes">
|
||||
<bg>wxSYS_COLOUR_WINDOW</bg>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT12" variable="StaticText12" member="yes">
|
||||
<label>Retrival mode:</label>
|
||||
<pos>16,56</pos>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT11" variable="StaticText11" member="yes">
|
||||
<label>Processing</label>
|
||||
<pos>16,16</pos>
|
||||
<font>
|
||||
<size>14</size>
|
||||
<style>normal</style>
|
||||
<weight>normal</weight>
|
||||
<underlined>0</underlined>
|
||||
<family>swiss</family>
|
||||
</font>
|
||||
</object>
|
||||
<object class="wxRadioButton" name="ID_RADIOBUTTON1" variable="ProcessingRetrAllRadio" member="yes">
|
||||
<label>All</label>
|
||||
<selected>1</selected>
|
||||
<pos>144,56</pos>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>Retrive all borders</tooltip>
|
||||
<style>wxRB_GROUP</style>
|
||||
<handler function="OnProcessingRetrAllRadioSelect" entry="EVT_RADIOBUTTON" />
|
||||
</object>
|
||||
<object class="wxRadioButton" name="ID_RADIOBUTTON2" variable="ProcessingRetrExtRadio" member="yes">
|
||||
<label>External</label>
|
||||
<pos>192,56</pos>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>Retrive only the external border</tooltip>
|
||||
<handler function="OnProcessingRetrExtRadioSelect" entry="EVT_RADIOBUTTON" />
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT13" variable="StaticText13" member="yes">
|
||||
<label>Canny threshold:</label>
|
||||
<pos>16,88</pos>
|
||||
</object>
|
||||
<object class="wxSlider" name="ID_SLIDER1" variable="ProcessingCannyThreshSlider" member="yes">
|
||||
<value>100</value>
|
||||
<max>255</max>
|
||||
<pos>144,80</pos>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>Threshold for canny edge detection</tooltip>
|
||||
<handler function="OnProcessingCannyThreshSliderCmdScroll" entry="EVT_COMMAND_SCROLL" />
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT14" variable="StaticText14" member="yes">
|
||||
<label>Coloring:</label>
|
||||
<pos>16,136</pos>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT15" variable="StaticText15" member="yes">
|
||||
<label>Edge:</label>
|
||||
<pos>144,136</pos>
|
||||
<size>32,13</size>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT16" variable="StaticText16" member="yes">
|
||||
<label>Color:</label>
|
||||
<pos>144,160</pos>
|
||||
</object>
|
||||
<object class="wxChoice" name="ID_CHOICE1" variable="ProcessingColorLineSelect" member="yes">
|
||||
<pos>184,128</pos>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>Edge to be colored</tooltip>
|
||||
<handler function="OnProcessingColorLineSelectSelect" entry="EVT_CHOICE" />
|
||||
</object>
|
||||
<object class="wxChoice" name="ID_CHOICE2" variable="ProcessingColorColorSelect" member="yes">
|
||||
<content>
|
||||
<item>Leave out</item>
|
||||
</content>
|
||||
<pos>184,152</pos>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>Used color</tooltip>
|
||||
<handler function="OnProcessingColorColorSelectSelect" entry="EVT_CHOICE" />
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON25" variable="ProcessingColorForAllButton" member="yes">
|
||||
<label>Set for all</label>
|
||||
<pos>320,152</pos>
|
||||
<enabled>0</enabled>
|
||||
<handler function="OnProcessingColorForAllButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON8" variable="ProcessingPreviewButton" member="yes">
|
||||
<label>Process</label>
|
||||
<pos>16,208</pos>
|
||||
<size>440,23</size>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>Preview the processed image</tooltip>
|
||||
<handler function="OnProcessingPreviewButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
</object>
|
||||
<label>Processing</label>
|
||||
</object>
|
||||
<object class="notebookpage">
|
||||
<object class="wxPanel" name="ID_PANEL5" variable="MenuChangerGcodePage" member="yes">
|
||||
<bg>wxSYS_COLOUR_WINDOW</bg>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT17" variable="StaticText17" member="yes">
|
||||
<label>G code</label>
|
||||
<pos>16,16</pos>
|
||||
<font>
|
||||
<size>14</size>
|
||||
<style>normal</style>
|
||||
<weight>normal</weight>
|
||||
<underlined>0</underlined>
|
||||
<family>swiss</family>
|
||||
</font>
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON10" variable="GcodeGenerateButton" member="yes">
|
||||
<label>Generate</label>
|
||||
<pos>16,56</pos>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>Generate G code</tooltip>
|
||||
<handler function="OnGcodeGenerateButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON12" variable="GcodeEditButton" member="yes">
|
||||
<label>Edit</label>
|
||||
<pos>104,56</pos>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>Edit generate G code</tooltip>
|
||||
<handler function="OnGcodeEditButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON13" variable="GcodeExportButton" member="yes">
|
||||
<label>Export</label>
|
||||
<pos>192,56</pos>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>Export G code to file</tooltip>
|
||||
<handler function="OnGcodeExportButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
</object>
|
||||
<label>G code</label>
|
||||
</object>
|
||||
<object class="notebookpage">
|
||||
<object class="wxPanel" name="ID_PANEL6" variable="MenuChangerPrintingPage" member="yes">
|
||||
<bg>wxSYS_COLOUR_WINDOW</bg>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT18" variable="StaticText18" member="yes">
|
||||
<label>Printing</label>
|
||||
<pos>16,16</pos>
|
||||
<font>
|
||||
<size>14</size>
|
||||
<style>normal</style>
|
||||
<weight>normal</weight>
|
||||
<underlined>0</underlined>
|
||||
<family>swiss</family>
|
||||
</font>
|
||||
</object>
|
||||
<object class="wxPanel" name="ID_PANEL1" variable="Panel1" member="yes">
|
||||
<pos>8,120</pos>
|
||||
<size>440,280</size>
|
||||
<bg>#E0E0E0</bg>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT19" variable="StaticText19" member="yes">
|
||||
<label>Printer</label>
|
||||
<pos>8,8</pos>
|
||||
<font>
|
||||
<size>12</size>
|
||||
<style>normal</style>
|
||||
<weight>normal</weight>
|
||||
<underlined>0</underlined>
|
||||
<family>swiss</family>
|
||||
</font>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT20" variable="StaticText20" member="yes">
|
||||
<label>Status:</label>
|
||||
<pos>88,8</pos>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT21" variable="PrintingPrinterStatusLabel" member="yes">
|
||||
<label>Offline</label>
|
||||
<pos>128,8</pos>
|
||||
<size>48,13</size>
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON7" variable="PrintingPrinterConnectButton" member="yes">
|
||||
<label>Connect</label>
|
||||
<pos>8,32</pos>
|
||||
<size>72,23</size>
|
||||
<tooltip>Connect/Disconnect to the printer</tooltip>
|
||||
<handler function="OnPrintingPrinterConnectButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON16" variable="PrintingPrinterUpButton" member="yes">
|
||||
<label>/\\</label>
|
||||
<pos>208,40</pos>
|
||||
<size>20,20</size>
|
||||
<enabled>0</enabled>
|
||||
<handler function="OnPrintingPrinterUpButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON17" variable="PrintingPrinterDownButton" member="yes">
|
||||
<label>\\/</label>
|
||||
<pos>208,72</pos>
|
||||
<size>20,20</size>
|
||||
<enabled>0</enabled>
|
||||
<handler function="OnPrintingPrinterDownButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON18" variable="PrintingPrinterLeftButton" member="yes">
|
||||
<label><</label>
|
||||
<pos>184,56</pos>
|
||||
<size>20,20</size>
|
||||
<enabled>0</enabled>
|
||||
<font>
|
||||
<size>12</size>
|
||||
<style>normal</style>
|
||||
<weight>normal</weight>
|
||||
<underlined>0</underlined>
|
||||
<family>swiss</family>
|
||||
<face>Arial</face>
|
||||
</font>
|
||||
<handler function="OnPrintingPrinterLeftButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON19" variable="PrintingPrinterRightButton" member="yes">
|
||||
<label>></label>
|
||||
<pos>232,56</pos>
|
||||
<size>20,20</size>
|
||||
<enabled>0</enabled>
|
||||
<font>
|
||||
<size>12</size>
|
||||
<style>normal</style>
|
||||
<weight>normal</weight>
|
||||
<underlined>0</underlined>
|
||||
<family>swiss</family>
|
||||
</font>
|
||||
<handler function="OnPrintingPrinterRightButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON20" variable="PrintingPrinterHomeButton" member="yes">
|
||||
<label>Home</label>
|
||||
<pos>320,8</pos>
|
||||
<size>50,23</size>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>Home axises</tooltip>
|
||||
<handler function="OnPrintingPrinterHomeButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxChoice" name="ID_CHOICE3" variable="PrintingPrinterHeadSelect" member="yes">
|
||||
<content>
|
||||
<item>No tool</item>
|
||||
</content>
|
||||
<selection>0</selection>
|
||||
<pos>320,32</pos>
|
||||
<size>112,21</size>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>Select used drawing head</tooltip>
|
||||
<handler function="OnPrintingPrinterHeadSelectSelect" entry="EVT_CHOICE" />
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT22" variable="StaticText21" member="yes">
|
||||
<label>Head:</label>
|
||||
<pos>280,40</pos>
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON21" variable="PrintingPrinterPowerButton" member="yes">
|
||||
<label>Power</label>
|
||||
<pos>384,8</pos>
|
||||
<size>50,23</size>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>Cycle power supply</tooltip>
|
||||
<handler function="OnPrintingPrinterPowerButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxSpinCtrl" name="ID_SPINCTRL7" variable="PrintingPrinterMoveSpinner" member="yes">
|
||||
<value>25</value>
|
||||
<pos>320,64</pos>
|
||||
<size>48,21</size>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>Amount in mm to move when button pressed</tooltip>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT24" variable="StaticText23" member="yes">
|
||||
<label>Move:</label>
|
||||
<pos>280,72</pos>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT23" variable="StaticText22" member="yes">
|
||||
<label>Power:</label>
|
||||
<pos>88,32</pos>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT28" variable="PrintingPrinterPowerLabel" member="yes">
|
||||
<label></label>
|
||||
<pos>128,32</pos>
|
||||
<size>48,13</size>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT29" variable="StaticText26" member="yes">
|
||||
<label>X:</label>
|
||||
<pos>8,64</pos>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT30" variable="StaticText27" member="yes">
|
||||
<label>Y:</label>
|
||||
<pos>8,80</pos>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT32" variable="PrintingPrinterXLabel" member="yes">
|
||||
<label></label>
|
||||
<pos>24,64</pos>
|
||||
<size>48,13</size>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT33" variable="PrintingPrinterYLabel" member="yes">
|
||||
<label></label>
|
||||
<pos>24,80</pos>
|
||||
<size>48,13</size>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT31" variable="StaticText28" member="yes">
|
||||
<label>Console:</label>
|
||||
<pos>8,120</pos>
|
||||
</object>
|
||||
<object class="wxTextCtrl" name="ID_TEXTCTRL1" variable="PrintingPrinterConsole" member="yes">
|
||||
<pos>64,112</pos>
|
||||
<size>360,21</size>
|
||||
<enabled>0</enabled>
|
||||
<handler function="OnPrintingPrinterConsoleTextEnter" entry="EVT_TEXT_ENTER" />
|
||||
</object>
|
||||
<object class="wxListBox" name="ID_LISTBOX2" variable="PrintingPrinterLog" member="yes">
|
||||
<default>-1</default>
|
||||
<pos>8,160</pos>
|
||||
<size>424,104</size>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT34" variable="StaticText29" member="yes">
|
||||
<label>Log:</label>
|
||||
<pos>8,144</pos>
|
||||
</object>
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON11" variable="PrintingPrintButton" member="yes">
|
||||
<label>Print</label>
|
||||
<pos>16,56</pos>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>Start printing</tooltip>
|
||||
<handler function="OnPrintingPrintButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON14" variable="PrintingStopButton" member="yes">
|
||||
<label>Stop</label>
|
||||
<pos>104,56</pos>
|
||||
<enabled>0</enabled>
|
||||
<tooltip>Stop printing</tooltip>
|
||||
<handler function="OnPrintingStopButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON15" variable="PrintingEmergencyButton" member="yes">
|
||||
<label>Emergency stop</label>
|
||||
<pos>320,16</pos>
|
||||
<size>128,56</size>
|
||||
<enabled>0</enabled>
|
||||
<bg>#F81F5A</bg>
|
||||
<font>
|
||||
<size>10</size>
|
||||
<style>normal</style>
|
||||
<weight>bold</weight>
|
||||
<underlined>0</underlined>
|
||||
<family>swiss</family>
|
||||
</font>
|
||||
<tooltip>Reset printer immediately</tooltip>
|
||||
<handler function="OnPrintingEmergencyButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT35" variable="PrintingStatusLabel" member="yes">
|
||||
<label>Print status:</label>
|
||||
<pos>24,440</pos>
|
||||
<hidden>1</hidden>
|
||||
</object>
|
||||
<object class="wxGauge" name="ID_GAUGE1" variable="PrintingStatusGauge" member="yes">
|
||||
<range>1</range>
|
||||
<pos>104,432</pos>
|
||||
<size>336,36</size>
|
||||
<hidden>1</hidden>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT36" variable="PrintingElapsedTimeLabelLabel" member="yes">
|
||||
<label>Elapsed time:</label>
|
||||
<pos>24,488</pos>
|
||||
<size>72,13</size>
|
||||
<hidden>1</hidden>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT37" variable="PrintingElapsedTimeLabel" member="yes">
|
||||
<label>00:00:00</label>
|
||||
<pos>104,488</pos>
|
||||
<size>336,13</size>
|
||||
<hidden>1</hidden>
|
||||
</object>
|
||||
</object>
|
||||
<label>Printing</label>
|
||||
</object>
|
||||
</object>
|
||||
<object class="wxMenuBar" variable="MenuBar1" member="no">
|
||||
<object class="wxMenu" variable="Menu1" member="no">
|
||||
<label>&File</label>
|
||||
<object class="wxMenuItem" name="MenuSettingItem" variable="MenuItemSettings" member="yes">
|
||||
<label>Settings</label>
|
||||
<accel>Ctrl-s</accel>
|
||||
<help>Change settings</help>
|
||||
<handler function="OnMenuItemSettingsSelected" entry="EVT_MENU" />
|
||||
</object>
|
||||
<object class="wxMenuItem" name="MenuQuitItem" variable="MenuItem1" member="no">
|
||||
<label>Quit</label>
|
||||
<accel>Alt-F4</accel>
|
||||
<help>Quit the application</help>
|
||||
<handler function="OnQuit" entry="EVT_MENU" />
|
||||
</object>
|
||||
</object>
|
||||
<object class="wxMenu" variable="Menu2" member="no">
|
||||
<label>Help</label>
|
||||
<object class="wxMenuItem" name="idMenuAbout" variable="MenuItem2" member="no">
|
||||
<label>About</label>
|
||||
<accel>F1</accel>
|
||||
<help>Show info about this application</help>
|
||||
<handler function="OnAbout" entry="EVT_MENU" />
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="wxStatusBar" name="ID_STATUSBAR1" variable="StatusBar1" member="yes">
|
||||
<fields>2</fields>
|
||||
<widths>375,100</widths>
|
||||
<styles>wxSB_NORMAL,wxSB_NORMAL</styles>
|
||||
</object>
|
||||
<object class="wxFileDialog" variable="FileDialog1" member="yes">
|
||||
<message>Select file</message>
|
||||
</object>
|
||||
<object class="wxMessageDialog" name="ID_MESSAGEDIALOG1" variable="MessageDialog1" member="yes">
|
||||
<caption>Message</caption>
|
||||
<message></message>
|
||||
</object>
|
||||
<object class="wxStopWatch" variable="PrintingStopWatch" member="yes" />
|
||||
<object class="wxTimer" name="ID_TIMER1" variable="PrintingElapsedTimeCheckerTimer" member="yes">
|
||||
<handler function="OnPrintingElapsedTimeCheckerTimerTrigger" entry="EVT_TIMER" />
|
||||
</object>
|
||||
</object>
|
||||
</wxsmith>
|
162
PlottWareControl/wxsmith/SettingDialog.wxs
Normal file
162
PlottWareControl/wxsmith/SettingDialog.wxs
Normal file
@ -0,0 +1,162 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<wxsmith>
|
||||
<object class="wxDialog" name="SettingDialog">
|
||||
<size>389,432</size>
|
||||
<bg>wxSYS_COLOUR_WINDOW</bg>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT1" variable="StaticText1" member="yes">
|
||||
<label>Settings</label>
|
||||
<pos>0,8</pos>
|
||||
<font>
|
||||
<size>14</size>
|
||||
<style>normal</style>
|
||||
<weight>normal</weight>
|
||||
<underlined>0</underlined>
|
||||
<family>swiss</family>
|
||||
</font>
|
||||
</object>
|
||||
<object class="wxStaticBox" name="ID_STATICBOX1" variable="StaticBox1" member="yes">
|
||||
<label>Printer</label>
|
||||
<pos>8,48</pos>
|
||||
<size>376,280</size>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT2" variable="StaticText2" member="yes">
|
||||
<label>Length:</label>
|
||||
<pos>32,72</pos>
|
||||
</object>
|
||||
<object class="wxSpinCtrl" name="ID_SPINCTRL1" variable="LengthSpinner" member="yes">
|
||||
<value>0</value>
|
||||
<min>-1</min>
|
||||
<max>100000</max>
|
||||
<pos>104,64</pos>
|
||||
<tooltip>Length of printing area (-1 for infinite)</tooltip>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT3" variable="StaticText3" member="yes">
|
||||
<label>mm</label>
|
||||
<pos>248,72</pos>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT4" variable="StaticText4" member="yes">
|
||||
<label>Width:</label>
|
||||
<pos>32,96</pos>
|
||||
</object>
|
||||
<object class="wxSpinCtrl" name="ID_SPINCTRL2" variable="WidthSpinner" member="yes">
|
||||
<value>0</value>
|
||||
<min>-1</min>
|
||||
<max>100000</max>
|
||||
<pos>104,88</pos>
|
||||
<tooltip>Width of printing area (-1 for infinite)</tooltip>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT5" variable="StaticText5" member="yes">
|
||||
<label>mm</label>
|
||||
<pos>248,96</pos>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT6" variable="StaticText6" member="yes">
|
||||
<label>Pen count:</label>
|
||||
<pos>32,120</pos>
|
||||
</object>
|
||||
<object class="wxSpinCtrl" name="ID_SPINCTRL3" variable="PencountSpinner" member="yes">
|
||||
<value>0</value>
|
||||
<pos>104,112</pos>
|
||||
<tooltip>Number of available drawing pens</tooltip>
|
||||
<handler function="OnPencountSpinnerChange" entry="EVT_SPINCTRL" />
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT7" variable="StaticText7" member="yes">
|
||||
<label>Pens:</label>
|
||||
<pos>32,144</pos>
|
||||
</object>
|
||||
<object class="wxListBox" name="ID_LISTBOX1" variable="PensListBox" member="yes">
|
||||
<default>-1</default>
|
||||
<pos>104,136</pos>
|
||||
<size>120,80</size>
|
||||
<tooltip>List of pens</tooltip>
|
||||
<handler function="OnPensListBoxSelect" entry="EVT_LISTBOX" />
|
||||
</object>
|
||||
<object class="wxTextCtrl" name="ID_TEXTCTRL1" variable="PenColorText" member="yes">
|
||||
<pos>264,152</pos>
|
||||
<tooltip>Color of pen</tooltip>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT8" variable="StaticText8" member="yes">
|
||||
<label>Color:</label>
|
||||
<pos>232,160</pos>
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON1" variable="PenColorSetButton" member="yes">
|
||||
<label>Set</label>
|
||||
<pos>232,176</pos>
|
||||
<size>136,23</size>
|
||||
<tooltip>Set color</tooltip>
|
||||
<handler function="OnPenColorSetButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxStaticLine" name="ID_STATICLINE1" variable="StaticLine1" member="yes">
|
||||
<pos>24,232</pos>
|
||||
<size>344,3</size>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT9" variable="StaticText9" member="yes">
|
||||
<label>Serial port:</label>
|
||||
<pos>32,248</pos>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT10" variable="StaticText10" member="yes">
|
||||
<label>Baud rate:</label>
|
||||
<pos>32,272</pos>
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON2" variable="PrinterAutoDetectButton" member="yes">
|
||||
<label>Auto detect</label>
|
||||
<pos>32,296</pos>
|
||||
<tooltip>Auto detect printer settings (only works if serial port and baud rate is set)</tooltip>
|
||||
<handler function="OnPrinterAutoDetectButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT11" variable="StaticText11" member="yes">
|
||||
<label>Debug mode:</label>
|
||||
<pos>16,352</pos>
|
||||
</object>
|
||||
<object class="wxCheckBox" name="ID_CHECKBOX1" variable="DebugModeCheck" member="yes">
|
||||
<label>Enable</label>
|
||||
<pos>96,352</pos>
|
||||
<tooltip>Enable debug mode (show stages of image processing)</tooltip>
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON3" variable="SaveSettingsButton" member="yes">
|
||||
<label>Save</label>
|
||||
<pos>176,384</pos>
|
||||
<tooltip>Save settings</tooltip>
|
||||
<handler function="OnSaveSettingsButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxButton" name="ID_BUTTON4" variable="CancelSettingsButton" member="yes">
|
||||
<label>Cancel</label>
|
||||
<pos>272,384</pos>
|
||||
<tooltip>Dismiss changes</tooltip>
|
||||
<handler function="OnCancelSettingsButtonClick" entry="EVT_BUTTON" />
|
||||
</object>
|
||||
<object class="wxChoice" name="ID_CHOICE2" variable="BaudRateChoice" member="yes">
|
||||
<content>
|
||||
<item>300</item>
|
||||
<item>600</item>
|
||||
<item>1200</item>
|
||||
<item>2400</item>
|
||||
<item>4800</item>
|
||||
<item>9600</item>
|
||||
<item>14400</item>
|
||||
<item>19200</item>
|
||||
<item>28800</item>
|
||||
<item>38400</item>
|
||||
<item>57600</item>
|
||||
<item>115200</item>
|
||||
</content>
|
||||
<selection>0</selection>
|
||||
<pos>104,264</pos>
|
||||
<size>120,21</size>
|
||||
<tooltip>Baud rate of device</tooltip>
|
||||
</object>
|
||||
<object class="wxSpinCtrl" name="ID_SPINCTRL4" variable="SerialPortSpinner" member="yes">
|
||||
<value>0</value>
|
||||
<pos>136,240</pos>
|
||||
<size>88,21</size>
|
||||
<tooltip>Serial port on which the plotter is connected</tooltip>
|
||||
</object>
|
||||
<object class="wxStaticText" name="ID_STATICTEXT12" variable="StaticText12" member="yes">
|
||||
<label>COM</label>
|
||||
<pos>104,248</pos>
|
||||
</object>
|
||||
<object class="wxMessageDialog" name="ID_MESSAGEDIALOG1" variable="MessageDialog1" member="yes">
|
||||
<caption>Message</caption>
|
||||
<message></message>
|
||||
</object>
|
||||
</object>
|
||||
</wxsmith>
|
Reference in New Issue
Block a user