You are not logged in.

#1 2011-12-03 20:24:38

aliasbody
Member
From: Portugal
Registered: 2010-12-16
Posts: 157
Website

Integrate "Linux Binary Library" into program

Hello Everyone,

I am trying to create diferent kind of application, like a DVD burner, ArchLinux usb Creator, WBFS Manager (I know that they exist a lot out there but I want to create mine in qt) etc..  and I know how to do this by using the command line, but I want to integrate those features with a Gui in QT (or another language like java, but I still prefer QT for this).

I just don't understand how this can be made, how can I import the function of "dd" for example to my program ? Some library have a especific api for python, qt etc... but not all. I have thought about using Qt to launch terminal command like if I was in the terminal, but there will be no interaction with the gui I think.

And for the "Command Visual Commands" ? Like for example, with wit (Wiimms ISO Tools),
I can do this : "wwt LIST /dev/sdf2" and this game me the fallowing output from the terminal :
ID6     4/214 discs (11 GiB)
---------------------------------------------------------------------
RMCE01  MarioKartWii
SP7PAF  PAC-MAN PARTY
SOUP01  The Legend of Zelda Skyward Sword
SLVP41  We Dare
---------------------------------------------------------------------
Total: 4/214 discs, 11224 MiB ~ 11 GiB used, 91174 MiB ~ 89 GiB free.

How could I organize those information ?... Maybe if the software propose to separate them and Then it is my work to just organize them, but if the command line software don't propose how can I do so ?

Sorry for so many questions, and my horrible english.

PS : Don't be worried about posting "complicating" language terms of Linux functions, I have "a lot of experience" with those two and if I don't understand something I will just move my ass and search before asking ^^

Thanks in Advance,
Luis Da Costa.

Offline

#2 2011-12-04 06:18:00

aspidites
Member
Registered: 2011-03-11
Posts: 30

Re: Integrate "Linux Binary Library" into program

aliasbody wrote:

Hello Everyone,

how can I import the function of "dd" for example to my program ?

QProcess

aliasbody wrote:

And for the "Command Visual Commands" ? Like for example, with wit (Wiimms ISO Tools),
I can do this : "wwt LIST /dev/sdf2" and this game me the fallowing output from the terminal :
ID6     4/214 discs (11 GiB)
---------------------------------------------------------------------
RMCE01  MarioKartWii
SP7PAF  PAC-MAN PARTY
SOUP01  The Legend of Zelda Skyward Sword
SLVP41  We Dare
---------------------------------------------------------------------
Total: 4/214 discs, 11224 MiB ~ 11 GiB used, 91174 MiB ~ 89 GiB free.

How could I organize those information ?

I'm thinking QString and/or QRegExp.

I know this isn't a detailed reply, but I'm in a bit of a daze right now (past midnight here), plus I figure you just want hints, not your hand held.


coder formally known as EnvoyRising

Offline

#3 2011-12-04 13:39:34

aliasbody
Member
From: Portugal
Registered: 2010-12-16
Posts: 157
Website

Re: Integrate "Linux Binary Library" into program

Thank you for the reply I'm gonna try those ^^ But just to see it I understand well... If there is no kind of API we have to use this kind of "tricks", am I right ?

Offline

#4 2011-12-05 06:36:31

aspidites
Member
Registered: 2011-03-11
Posts: 30

Re: Integrate "Linux Binary Library" into program

Can and should are two different things. You can, but man would say doing so is frowned upon. Keep in mind, even if there isn't a Qt API for what you want, that doesn't stop you from using other C/C++ libraries to accomplish the task.


coder formally known as EnvoyRising

Offline

Board footer

Powered by FluxBB