Author Topic: Source code  (Read 6099 times)

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10968
Re: Source code
« Reply #15 on: June 26, 2013, 05:33:02 PM »
you need to modify the gui ressource file
the gui2.ui for Qt4
and the similar one for gtk (cant remember the name)
and then hook the button to a new ACT_xxx

You will end up in the main loop with ACT_xxx when the button is pressed

ClemD

  • Jr. Member
  • **
  • Posts: 54
Re: Source code
« Reply #16 on: June 27, 2013, 07:05:38 AM »
you need to modify the gui ressource file
the gui2.ui for Qt4
and the similar one for gtk (cant remember the name)
and then hook the button to a new ACT_xxx

You will end up in the main loop with ACT_xxx when the button is pressed

Thank you very much ! :D

I'll see what I can do with your help :)

I'll surely come back sooner or later ;)

ClemD

  • Jr. Member
  • **
  • Posts: 54
Re: Source code
« Reply #17 on: June 27, 2013, 01:03:05 PM »
Quote
the gui2.ui for Qt4
and the similar one for gtk (cant remember the name)

GUI_bindings ? GUI_menumap ? :)

you need to modify the gui ressource file

Well in fact, before modifying anything, I'd like to make a sequence diagram in which appear :
- what happens, when a user launches avidemux, in order to display the markA button
- what happens, when a user clicks on the markA button.

That way, I think I would obtain a clear path of all the files I need to modify, and it will be even easier to do so.

What I'm still missing is : how and where is the  "clicking on the mark A button" event handled ?
I saw there are files like translation_table.h that could link a signal "clicked" to an object (like toolButtonSetMarkerA), or GUI_bindings.cpp in which we could connect a button (bt) to a signal "clicked" and to a specific action (for instance ACT_MarkA), etc.

But it's still quite fuzzy for me to see what "linked" or "connected" exactly implies.

It's pretty much the same problem with the button displaying : I looked into gui2.ui, found where the QToolButton is defined, with some properties about it (its icon, its size, its ability to autoraise, etc), but where is it say that the software has to display it ?

By the way, I found a CMakeLists.txt file which refers to gui2.ui, is it the file I'm looking for ?

Thank you :)
« Last Edit: June 27, 2013, 01:06:22 PM by ClemD »

ClemD

  • Jr. Member
  • **
  • Posts: 54
Re: Source code
« Reply #18 on: July 01, 2013, 11:07:20 AM »
Another question : why is everything "doubled" between qt4 and gtk ? :)

Was it a question of compatibility ? Wasn't it possible to code things once ? :)
« Last Edit: July 02, 2013, 09:07:25 AM by ClemD »

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10968
Re: Source code
« Reply #19 on: July 02, 2013, 09:02:50 AM »
80% of the code is common between the 2
Only the UI is different
Originally, avidemux was gtk, later on the engine was cut from the UI
Qt4 is better suited for windows/mac/...

So basically do what you need to do with the Qt4 flavor, and make sure the Gtk one still compiles

ClemD

  • Jr. Member
  • **
  • Posts: 54
Re: Source code
« Reply #20 on: July 02, 2013, 09:07:01 AM »
80% of the code is common between the 2
Only the UI is different
Originally, avidemux was gtk, later on the engine was cut from the UI
Qt4 is better suited for windows/mac/...

So basically do what you need to do with the Qt4 flavor, and make sure the Gtk one still compiles

Thank you very much again :D

As the company in which I'm doing my internship only works on windows, I guess I won't touch the gtk part and will only modify the qt4 one.

Thanks ! I got quite confused with that matter ;)