schorsch1976 / AsciiFlowQT

QT Based Ascii Chart editor
GNU General Public License v3.0
16 stars 5 forks source link

This project can be built with the wxWidget library? #4

Open asmwarrior opened 1 year ago

asmwarrior commented 1 year ago

It's really nice to see that in the commit log message.

Since I'm a wxWidgets user, but not QT user.

I will try the wxWidgets port if it is possible, thanks!

asmwarrior commented 1 year ago

I think the project name "AsciiFlowQT" is not correct, I think the name could be "AsciiFlowQTWX" or "AsciiFlowGUI", thanks.

asmwarrior commented 1 year ago

I just tried to build it under wx library, but it looks like there is a missing header file named "AsciiFlowCommonAPI.h" in the repo.

Do you forgot to commit it to the git repo?

At the beginning of the source code src\Common\include\AsciiFlowCommon\AsciiArtData.h

#pragma once

#include "AsciiFlowCommon/AsciiFlowCommonAPI.h"

#include "AsciiFlowCommon/Point.h"
#include "ITool.h"

#include <functional>
#include <string>
#include <string_view>
#include <vector>
asmwarrior commented 1 year ago

I just tried to build it under wx library, but it looks like there is a missing header file named "AsciiFlowCommonAPI.h" in the repo.

Do you forgot to commit it to the git repo?

At the beginning of the source code src\Common\include\AsciiFlowCommon\AsciiArtData.h

#pragma once

#include "AsciiFlowCommon/AsciiFlowCommonAPI.h"

#include "AsciiFlowCommon/Point.h"
#include "ITool.h"

#include <functional>
#include <string>
#include <string_view>
#include <vector>

Oh, I think this header is generated by CMake. Let me try it again.

asmwarrior commented 1 year ago

OK, I did a very simple test, I just drag all the source file to a Code::Blocks cbp project files, (The project file is created from the wxWidgets sample project wizard), and I make a very simple AsciiFlowCommonAPI.h, which just define the #define AsciiFlowCommon_API to empty string.

Now, here is the screen shot of the result wx application under Windows, and it works(I mean it can create ascii art graphics) Great!

image

You can see the icon of the toolbars are not showing correctly. I will try to debug it later.

asmwarrior commented 1 year ago

My debugging about the icon issue is that maybe the xpm file is not correct, or the xpm file is not load correctly. Because if I set the icon size a lot larger, for example, 120 pixel, I see the content get wrapped. See the image shot below:

image

asmwarrior commented 1 year ago

This is the patch that I used to build this project under Code::Blocks IDE + msys2 + gcc + Windows OS. The wx library is also supplied by the msys2, installed by the pacman command.

See the patch here: add a Code::Blocks cbp project, so that it can be built under msys2's…