Re: qt4: popup widget for insert tabular

2006-06-07 Thread Andre Poenitz
On Wed, May 31, 2006 at 12:12:53PM +0200, Edwin Leuven wrote: > attached my latest patch > > i'd like to put it in > > any objections? As usual: Please stick to LyX style. For examples refer to code in src/*.C, not in frontend/whatever. [It's much better nowadays, though] > +{ > + if (paren

Re: qt4: popup widget for insert tabular

2006-05-31 Thread Edwin Leuven
Lars Gullik Bjønnes wrote: this looks like a switch to me. Use that if it works. done

Re: qt4: popup widget for insert tabular

2006-05-31 Thread Lars Gullik Bjønnes
Edwin Leuven <[EMAIL PROTECTED]> writes: | +bool InsertTableWidget::event(QEvent * event) | +{ | + if (event->type() == QEvent::MouseMove) { | + QMouseEvent * me = static_cast(event); | + mouseMoveEvent(me); | + return true; | + } else if (event->type()

Re: qt4: popup widget for insert tabular

2006-05-31 Thread Edwin Leuven
Angus Leeming wrote: Some points to think about though: 1. Doxygen comments in InsertTableWidget.h. 2. dynamic_cast rather than static_cast in InsertTableWidget::event? 3. You'll upset André with formatting "if (foo!=bar)". Space it out a bit. it is in with these changes 4. Should these colo

Re: qt4: popup widget for insert tabular

2006-05-31 Thread Edwin Leuven
Abdelrazak Younes wrote: Not an objection but I'd like you to keep in mind that this code needs to generalized. So I hope that in due time (in time with math symbols) you (we) clean that up. I thing the right strategy is define a new kind of Action that will do exactly that. It could be a new c

Re: qt4: popup widget for insert tabular

2006-05-31 Thread Abdelrazak Younes
Edwin Leuven wrote: attached my latest patch i'd like to put it in any objections? Not an objection but I'd like you to keep in mind that this code needs to generalized. So I hope that in due time (in time with math symbols) you (we) clean that up. I thing the right strategy is define a new

Re: qt4: popup widget for insert tabular

2006-05-31 Thread Angus Leeming
Edwin Leuven <[EMAIL PROTECTED]> writes: > attached my latest patch > i'd like to put it in > any objections? None from me; looks good. Some points to think about though: 1. Doxygen comments in InsertTableWidget.h. 2. dynamic_cast rather than static_cast in InsertTableWidget::event? 3. You'll up

Re: qt4: popup widget for insert tabular

2006-05-31 Thread Edwin Leuven
attached my latest patch i'd like to put it in any objections? thanks, edwin Index: development/scons/SConscript === --- development/scons/SConscript(revision 13969) +++ development/scons/SConscript(working copy) @@

Re: qt4: popup widget for insert tabular

2006-05-30 Thread Edwin Leuven
Jean-Marc Lasgouttes wrote: You should always dispatch to LyXView::getLyXFunc().dispatch() workAreaDispatch is limited to mouse interaction. got it. thanks!

Re: qt4: popup widget for insert tabular

2006-05-30 Thread Jean-Marc Lasgouttes
> "Edwin" == Edwin Leuven <[EMAIL PROTECTED]> writes: Edwin> thing is: the table gets inserted but not at the cursor Edwin> position but at the beginning of the buffer! You should always dispatch to LyXView::getLyXFunc().dispatch() workAreaDispatch is limited to mouse interaction. JMarc

Re: qt4: popup widget for insert tabular

2006-05-30 Thread Edwin Leuven
guys i have a question about the following. here i dispatch the funcrequest to insert a table: +void InsertTableWidget::mouseReleaseEvent(QMouseEvent * event) +{ + if (underMouse()) { + QString const data = QString("%1 %2").arg(bottom_).arg(right_); + lyxView_

Re: qt4: popup widget for insert tabular

2006-05-29 Thread Jean-Marc Lasgouttes
> "Edwin" == Edwin Leuven <[EMAIL PROTECTED]> writes: >> It seems to me that the icon palettes and menus that we need for a >> math toolbar are static, am I wrong? In this case, supporting them >> is as simple as enumerating in the .ui file. Edwin> unless we want to allow user defined iconpan

Re: qt4: popup widget for insert tabular

2006-05-29 Thread Edwin Leuven
Jean-Marc Lasgouttes wrote: What you can do is create a special casing in ToobarBackend.C for your popup widget. thanks, i'll have a look there icon palette and menu are syntactically the same thing, only the display differs (icons vs. labels). These things should be implemented in toolbarba

Re: qt4: popup widget for insert tabular

2006-05-29 Thread Jean-Marc Lasgouttes
> "Edwin" == Edwin Leuven <[EMAIL PROTECTED]> writes: Edwin> what i haven't done: implement a lyxfunc Edwin> the main reason is that it is not clear to me that we would Edwin> want to introduce special casing in the core in order to avoid Edwin> it in the frontend... What you can do is creat

Re: qt4: popup widget for insert tabular

2006-05-28 Thread Edwin Leuven
Andre Poenitz wrote: We write 'a = 1;', not 'a=1;', and 'for (', not 'for('... i try to be good in the attached... have you an idea on how to catch mouse events outside the iconview widget here: http://leuven.ecodip.net/lyx/iconview.zip Is that the one you send to qt-interest? yeah, bu

Re: qt4: popup widget for insert tabular

2006-05-28 Thread Andre Poenitz
On Tue, May 23, 2006 at 09:23:19PM +0200, Edwin Leuven wrote: > i do what i can andre (although i have no clue what you are referring > to) ... We write 'a = 1;', not 'a=1;', and 'for (', not 'for('... > and now that i have your attention: > > have you an idea on how to catch mouse events outs

Re: qt4: popup widget for insert tabular

2006-05-23 Thread Edwin Leuven
Andre Poenitz wrote: On Tue, May 23, 2006 at 03:49:12PM +0200, Edwin Leuven wrote: the attached slightly modifies qlaction and avoids changing qltoolbar. opinion? You definitely should try harder to stick to LyX coding style no matter whether you agree with the rules or not. It took us severa

Re: qt4: popup widget for insert tabular

2006-05-23 Thread Andre Poenitz
On Mon, May 22, 2006 at 11:07:34PM +0200, Edwin Leuven wrote: > + for(int i=0; i

Re: qt4: popup widget for insert tabular

2006-05-23 Thread Andre Poenitz
On Tue, May 23, 2006 at 03:49:12PM +0200, Edwin Leuven wrote: > the attached slightly modifies qlaction and avoids changing qltoolbar. > opinion? You definitely should try harder to stick to LyX coding style no matter whether you agree with the rules or not. It took us several years to end up wi

Re: qt4: popup widget for insert tabular

2006-05-23 Thread Abdelrazak Younes
Edwin Leuven a écrit : Abdelrazak Younes wrote: OK, you have a point... Forget about it and just create a new LFUN please. ok, the problem then is how to get the pos() of the toolbutton without touching qltoolbar... will try to figure that out I don't have the documentation at hand but I th

Re: qt4: popup widget for insert tabular

2006-05-23 Thread Edwin Leuven
Abdelrazak Younes wrote: OK, you have a point... Forget about it and just create a new LFUN please. ok, the problem then is how to get the pos() of the toolbutton without touching qltoolbar... will try to figure that out thanks, edwin

Re: qt4: popup widget for insert tabular

2006-05-23 Thread Abdelrazak Younes
Edwin Leuven a écrit : Abdelrazak Younes wrote: Hum... thinking more about it, you could as well reuse the same QLAction for the menu item call. I don't think the present dialog version provide any more functionality than what you are proposing. I mean, it's not like one will want to insert a

Re: qt4: popup widget for insert tabular

2006-05-23 Thread Edwin Leuven
Abdelrazak Younes wrote: Hum... thinking more about it, you could as well reuse the same QLAction for the menu item call. I don't think the present dialog version provide any more functionality than what you are proposing. I mean, it's not like one will want to insert a 100x100 table, this just

Re: qt4: popup widget for insert tabular

2006-05-23 Thread Abdelrazak Younes
Abdelrazak Younes a écrit : Edwin Leuven a écrit : Abdelrazak Younes wrote: I agree it's overkill and we already discussed at length the subject. But all other dialogs go through this controller framework so I would prefer that you use that. Besides, I suspect that the change would be even le

Re: qt4: popup widget for insert tabular

2006-05-23 Thread Abdelrazak Younes
Edwin Leuven a écrit : Angus Leeming wrote: only the update() call (and not the action() ), that is: enable/disable the widget See my other mail. I think you should try to reuse that part also. While you're at it, it should be "std::string const & tooltip = std::string()". will change that

Re: qt4: popup widget for insert tabular

2006-05-23 Thread Abdelrazak Younes
Edwin Leuven a écrit : Abdelrazak Younes wrote: I agree it's overkill and we already discussed at length the subject. But all other dialogs go through this controller framework so I would prefer that you use that. Besides, I suspect that the change would be even less intrusive if you do so. No

Re: qt4: popup widget for insert tabular

2006-05-23 Thread Edwin Leuven
Angus Leeming wrote: The "const" in "bool const foo" isn't needed/wanted in the header, only in the .C file. Think of it as an implementation detail. No doxygen comments. ok What does the updateonly do? only the update() call (and not the action() ), that is: enable/disable the widget W

Re: qt4: popup widget for insert tabular

2006-05-23 Thread Angus Leeming
Edwin Leuven <[EMAIL PROTECTED]> writes: Don't forget to add liconview.[Ch] to Makefile.am too: > Index: development/scons/SConscript > === > --- development/scons/SConscript (revision 13913) > +++ development/scons/SConscript

Re: qt4: popup widget for insert tabular

2006-05-23 Thread Edwin Leuven
Abdelrazak Younes wrote: I agree it's overkill and we already discussed at length the subject. But all other dialogs go through this controller framework so I would prefer that you use that. Besides, I suspect that the change would be even less intrusive if you do so. No need need to touch the

Re: qt4: popup widget for insert tabular

2006-05-23 Thread Abdelrazak Younes
Edwin Leuven a écrit : Abdelrazak Younes wrote: I have to admit I don't like the special code below. Did you try to use the Controller framework instead? i must admit i didn't. having a controller for calling a function seems a bit overkill to me, that's why i didn't bother. i guess it can be

Re: qt4: popup widget for insert tabular

2006-05-23 Thread Edwin Leuven
Abdelrazak Younes wrote: Here are my comments Edwin... First I think the LIconview name is not correct. Maybe InsertTableWidget? In any case, please drop the 'L' as we are already in lyx namespace. Second, the file name should be the same as the class including the case. So that would be Inse

Re: qt4: popup widget for insert tabular

2006-05-23 Thread Abdelrazak Younes
Edwin Leuven a écrit : Abdelrazak Younes wrote: In principle it should be as easy as replacing QTabularCreate in "qt4/Dialog.C" with your new dialog. Then, to correctly position your dialog, you will need to add a method in ControlTabularCreate that will give the coordinate of toolbar button.

Re: qt4: popup widget for insert tabular

2006-05-22 Thread Edwin Leuven
Abdelrazak Younes wrote: In principle it should be as easy as replacing QTabularCreate in "qt4/Dialog.C" with your new dialog. Then, to correctly position your dialog, you will need to add a method in ControlTabularCreate that will give the coordinate of toolbar button. the attached patch is

Re: qt4: popup widget for insert tabular

2006-05-19 Thread Abdelrazak Younes
Edwin Leuven a écrit : Abdelrazak Younes wrote: (talking to myself guys, don't pay attention...) I am listening Edwin :-) great! (ready for abuse? ;-) to put this in the toolbar we need to initialize the widget with the proper button as a parent and then connect some signals (or so i think

Re: qt4: popup widget for insert tabular

2006-05-18 Thread Edwin Leuven
Abdelrazak Younes wrote: (talking to myself guys, don't pay attention...) I am listening Edwin :-) great! (ready for abuse? ;-) to put this in the toolbar we need to initialize the widget with the proper button as a parent and then connect some signals (or so i think) have you any ideas h

Re: qt4: popup widget for insert tabular

2006-05-18 Thread Abdelrazak Younes
Edwin Leuven a écrit : Edwin Leuven wrote: atm it is a widget. would be nice it we could make it behave as a qmenu... initializing with a parent, then overloading show() as follows seems to work Good. void LIconView::show() { move(parentWidget()->geometry().x(), parentWidget(

Re: qt4: popup widget for insert tabular

2006-05-18 Thread Edwin Leuven
Edwin Leuven wrote: atm it is a widget. would be nice it we could make it behave as a qmenu... initializing with a parent, then overloading show() as follows seems to work void LIconView::show() { move(parentWidget()->geometry().x(), parentWidget()->geometry().y() +

Re: qt4: popup widget for insert tabular

2006-05-18 Thread Edwin Leuven
Abdelrazak Younes wrote: It looks great. thanks (just a shameless copy of the openoffice widget though...) and in particular hints as how to make it popup and behave as a menu with a toolbutton. haven't been able yet to figure this out... You could do the same as now: create a borderless Mo

Re: qt4: popup widget for insert tabular

2006-05-18 Thread Abdelrazak Younes
Edwin Leuven a écrit : am trying to program up a "insert-tabular-popupwidget" that can be connected to a toolbutton the archive here: http://leuven.ecodip.net/lyx/iconview.zip includes the code + windows executable to illustrate what i am after comments appreciated It looks great

qt4: popup widget for insert tabular

2006-05-18 Thread Edwin Leuven
am trying to program up a "insert-tabular-popupwidget" that can be connected to a toolbutton the archive here: http://leuven.ecodip.net/lyx/iconview.zip includes the code + windows executable to illustrate what i am after comments appreciated and in particular hints as how to mak

Re: insert tabular

2002-07-23 Thread John Levon
On Tue, Jul 23, 2002 at 09:17:26AM +0200, Juergen Vigna wrote: > As much as I know we don't have a really easy way to mark a column or > row have we? if you have a longtabular with a lot of rows it's _very_ > cumbersome to mark all of it to just have a column setting changed. We need spreadsheet

Re: insert tabular

2002-07-23 Thread Juergen Vigna
John Levon wrote: > On Fri, Jul 19, 2002 at 03:27:37PM +0200, Jean-Marc Lasgouttes wrote: > > >>"template/default.table". This file would be read at startup to create >>a table object that can be clone()'d when creating a new table. > > > And then we can remove that silly TabularCreate dialog

Re: insert tabular

2002-07-22 Thread Juergen Vigna
Jean-Marc Lasgouttes wrote: > Concerning having a finite list of possible defaults, this should be > added to the 'tabular create' dialog. Yes! Jug -- -._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._ Dr. Jürgen VignaE-Mail: [EMAIL PROTECTED] Mitterstrich

Re: insert tabular

2002-07-22 Thread Juergen Vigna
Edwin Leuven wrote: > Take alignment. Suppose I have a selection and I want to align right > > if I am in a multicolumn cell or have multicolumn cells in the selection > -> align multicolumn cell(s) right > > in I have selected a column > -> align column right > As much as I know we don't ha

Re: insert tabular

2002-07-19 Thread Andre Poenitz
On Fri, Jul 19, 2002 at 02:59:17PM +0200, Herbert Voss wrote: > I heard that this is already there (since ancient time ... ) Where exactly? Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson)

Re: insert tabular

2002-07-19 Thread Andre Poenitz
On Fri, Jul 19, 2002 at 03:58:44PM +0300, Dekel Tsur wrote: > I suggest not creating any lines by default. Fine with me. Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson)

Re: insert tabular

2002-07-19 Thread Edwin Leuven
> Select the whole tabular and do "Unset borders" that will remove all > borders around all cells! I think an empty table is better. But in the mean time you didn't answer my question: where can I disable it in the code? Thanks, Ed.

Re: insert tabular

2002-07-19 Thread Edwin Leuven
> A button 'Delete _all_ lines' would be nice indeed (not jsut the lines > around a given cell) why not just a clean table? while I am asking (jurgen?) at the moment I find the tabular dialog inconvenient with the separate tabs for cells and columns with basically identical options. Wouldn't

Re: insert tabular

2002-07-19 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: Andre> On Fri, Jul 19, 2002 at 02:37:39PM +0200, Edwin Leuven wrote: >> > You mean the extra horizontal border after the first line? >> >> No I mean *all* lines. I don't want them. First of all I don't like >> vertical lines in tables un

Re: insert tabular

2002-07-19 Thread Juergen Vigna
Andre Poenitz wrote: > On Fri, Jul 19, 2002 at 02:37:39PM +0200, Edwin Leuven wrote: > >>>You mean the extra horizontal border after the first line? >> >>No I mean *all* lines. I don't want them. First of all I don't like vertical >>lines in tables unless they really serve a purpose and usually

Re: insert tabular

2002-07-19 Thread Herbert Voss
Andre Poenitz wrote: > On Fri, Jul 19, 2002 at 02:37:39PM +0200, Edwin Leuven wrote: > >>>You mean the extra horizontal border after the first line? >>> >>No I mean *all* lines. I don't want them. First of all I don't like vertical >>lines in tables unless they really serve a purpose and usual

Re: insert tabular

2002-07-19 Thread Dekel Tsur
On Fri, Jul 19, 2002 at 02:54:19PM +0200, Andre Poenitz wrote: > On Fri, Jul 19, 2002 at 02:37:39PM +0200, Edwin Leuven wrote: > > > You mean the extra horizontal border after the first line? > > > > No I mean *all* lines. I don't want them. First of all I don't like vertical > > lines in table

Re: insert tabular

2002-07-19 Thread Andre Poenitz
On Fri, Jul 19, 2002 at 02:37:39PM +0200, Edwin Leuven wrote: > > You mean the extra horizontal border after the first line? > > No I mean *all* lines. I don't want them. First of all I don't like vertical > lines in tables unless they really serve a purpose and usually they don't. > And why w

Re: insert tabular

2002-07-19 Thread Edwin Leuven
> You mean the extra horizontal border after the first line? No I mean *all* lines. I don't want them. First of all I don't like vertical lines in tables unless they really serve a purpose and usually they don't. And why would I want a horizontal line after every row? So I want a clean table

Re: insert tabular

2002-07-19 Thread Jean-Marc Lasgouttes
> "Edwin" == Edwin Leuven <[EMAIL PROTECTED]> writes: Edwin> I guess this is a question for Jurgen... Where in the code can Edwin> I disable the borders that a new tabular automatically gets? I Edwin> have been "unsetting" them for the last couple of years for Edwin> every table I have used.

insert tabular

2002-07-19 Thread Edwin Leuven
I guess this is a question for Jurgen... Where in the code can I disable the borders that a new tabular automatically gets? I have been "unsetting" them for the last couple of years for every table I have used. Thanks, Ed.