~ubuntu-branches/debian/jessie/basket/jessie

« back to all changes in this revision

Viewing changes to src/popupmenu.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Sune Vuorela
  • Date: 2008-06-25 20:11:23 UTC
  • mfrom: (4.1.11 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080625201123-06wsi9dla3rs3486
Tags: 1.0.2-5
* Also allow automake 1.10 usage - and just build-dep on automake i
  (Closes: #487981)
* Bye bye ana

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/***************************************************************************
2
2
 *   Copyright (C) 2003 by S�bastien Lao�t                                 *
3
 
 *   sebastien.laout@tuxfamily.org                                         *
 
3
 *   slaout@linux62.org                                                    *
4
4
 *                                                                         *
5
5
 *   This program is free software; you can redistribute it and/or modify  *
6
6
 *   it under the terms of the GNU General Public License as published by  *
37
37
  * NOTE 2 : This implementation do not support virtual desktop with more than
38
38
  *          one screen. Pehrapse QPopupMenu solve it by itself but I can't
39
39
  *          try : I have only one screen.
40
 
  * => Have those methods directly in QT (or KDE) would be a great benefits !
 
40
  * => Have those methods directly in Qt (or KDE) would be a great benefits !
41
41
  */
42
42
 
43
43
void PopupMenu::execAtRectCenter(QPopupMenu &menu, const QRect &rect)
57
57
        if (point.y() < 0)                                     point.setY(0);*/
58
58
 
59
59
        // And show the menu :
60
 
        menu.exec( point + QPoint(0, MENU_Y_OFFSET) ); // Stupid offset (QT bug ?) : we should show the menus 2 pixels more bottom !
 
60
        menu.exec( point + QPoint(0, MENU_Y_OFFSET) ); // Stupid offset (Qt bug ?) : we should show the menus 2 pixels more bottom !
61
61
}
62
62
 
63
63
// Needed on debug to draw the passed global rectangle :
103
103
        // No need to clip : it will be done by menu.exec(...)
104
104
 
105
105
        // And show the menu :
106
 
        menu.exec( point + QPoint(0, MENU_Y_OFFSET) ); // Stupid offset (QT bug ?) : we should show the menus 2 pixels more bottom !
 
106
        menu.exec( point + QPoint(0, MENU_Y_OFFSET) ); // Stupid offset (Qt bug ?) : we should show the menus 2 pixels more bottom !
107
107
}
108
108
 
109
109
void PopupMenu::execAtRectRight(QPopupMenu &menu, const QRect &rect, bool centered)
145
145
        // No need to clip : it will be done by menu.exec(...)
146
146
 
147
147
        // And show the menu :
148
 
        menu.exec( point + QPoint(0, MENU_Y_OFFSET) ); // Stupid offset (QT bug ?) : we should show the menus 2 pixels more bottom !
 
148
        menu.exec( point + QPoint(0, MENU_Y_OFFSET) ); // Stupid offset (Qt bug ?) : we should show the menus 2 pixels more bottom !
149
149
}
150
150
 
151
 
//#include "popupmenu.moc" // Comment this if you don't compile PopupMenuTest class
 
151
// # i n  c l u d e   " p o p u p m e n u . m o c " // Comment this if you don't compile PopupMenuTest class