Coder Social home page Coder Social logo

ghorwin / blockmod Goto Github PK

View Code? Open in Web Editor NEW
33.0 33.0 16.0 3.5 MB

A C++ programming library (based on Qt) for graphical block modeling, with graphical connection editing and serialization of the block schematics.

License: BSD 3-Clause "New" or "Revised" License

QMake 3.20% CMake 3.26% C++ 89.50% Shell 1.20% Batchfile 0.86% Python 1.99%
block-modeling network routing visualization

blockmod's People

Contributors

ghorwin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

blockmod's Issues

a few questions

I am trying to follow the Quick Start guide and have run into a few issues.

Where is the "demo.bm" file that is mentioned?

Is it possible to select multiple blocks using a lasso / rubber band?

I am able to add blocks in code and all is well until I try to add a connector. I successfully add the connector ( no exceptions generated ) but it never gets drawn. Can you tell me what I am missing?

`

const double GS = BLOCKMOD::Globals::GridSpacing;

BLOCKMOD::Block b;
b.m_name = "blk_0"; // give it a name
b.m_size = QSizeF(5*GS, 10*GS); // size - aligned to grid
b.m_pos = QPointF(20*GS, 5*GS); // position - aligned to grid

// add an inlet socket to the left of the block
BLOCKMOD::Socket s;
s.m_name = "in_0";
s.m_inlet = true;
s.m_pos = QPointF(0, 2*GS);
s.m_orientation = Qt::Horizontal;
b.m_sockets.append(s);

// add an outlet socket to the right
BLOCKMOD::Socket s2("out_0", QPointF(b.m_size.width(), 2*GS), Qt::Horizontal, false);
b.m_sockets.append(s2);

// finally add the block to the managed network
networkManager->addBlock(b);

// add another block
b.m_pos = QPointF(40*GS, 5*GS); // position - aligned to grid
b.m_name = "blk_1"; // give it a name
networkManager->addBlock(b);

BLOCKMOD::Connector con;
con.m_name = QString("con1");
con.m_sourceSocket = QString("blk_0.out_0");
con.m_targetSocket = QString("blk_1.in_0");
networkManager->addConnector(con);

`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.