]> git.lyx.org Git - features.git/commitdiff
QWorkArea.[Ch]: Wheel one-liner mouse fix
authorAbdelrazak Younes <younes@lyx.org>
Tue, 14 Mar 2006 14:50:00 +0000 (14:50 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Tue, 14 Mar 2006 14:50:00 +0000 (14:50 +0000)
QWorkArea.h: Added comments
Reverted to Q_WS_X11 and Q_WS_MACX instead of Q_OS_*

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13371 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/ChangeLog
src/frontends/qt4/QLMenubar.C
src/frontends/qt4/QLPopupMenu.C
src/frontends/qt4/QWorkArea.C
src/frontends/qt4/QWorkArea.h

index 7e7ad244f58caeae72baa3716f7d0170f72c2877..26329469eb251b8cbc0f5bfda1e8c548f8cbb233 100644 (file)
@@ -1,8 +1,23 @@
-2006-03-01  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
+2006-03-14  Abdelrazak Younes  <younes.a@free.fr>\r
+\r
+       * QWorkArea.[Ch]: Wheel one-liner mouse fix\r
+       * QWorkArea.C: Reverted to Q_WS_X11 and Q_WS_MACX instead of Q_OS_*\r
+       * QWorkArea.h: Added comments\r
+\r
+2006-03-12  Lars Gullik Bjønnes  <larsbj@lyx.org>\r
+\r
+       * ui/pch.h: new file\r
+\r
+2006-03-11  Abdelrazak Younes  <younes.a@free.fr>\r
+\r
+       * Various Compilation fixes for MacOSX. There is still a problem\r
+         with Dialog.C:275 which does not recognize \r
+\r
+2006-03-10  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
 
        * QLMenubar.h: compile fix for gcc-4.1.
 
-2006-03-01  Abdelrazak Younes  <younes.a@free.fr>
+2006-03-10  Abdelrazak Younes  <younes.a@free.fr>
 
        * QWorkArea.[Ch] cleanup:
        - Added private members workWidth_ and workHeight_ in order to
          separate place at the end of QWorkArea.C.
        - initial support for Wheel mouse (still does not work).
 
-2006-03-12  Lars Gullik Bjønnes  <larsbj@lyx.org>
-
-       * ui/pch.h: new file
-
 2006-03-10  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
 
        * QWorkArea.C (getClipboard): convert MAC to UNIX line endings on OSX
index d853fc5276fc85a02d0dd13f2aec69d11dac0759..e7af1862eb6626a747334f2ae71a0e2d54f9330b 100644 (file)
@@ -149,7 +149,7 @@ MenuBackend const & QLMenubar::backend()
 */
 QMenuBar * QLMenubar::menuBar() const
 {
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
        return mac_menubar_.get();
 #else
        return owner_->menuBar();
@@ -158,7 +158,7 @@ QMenuBar * QLMenubar::menuBar() const
 
 void QLMenubar::macxMenuBarInit()
 {
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
        mac_menubar_.reset(new QMenuBar);
 
        // this is the name of the menu that contains our special entries
index ecc7d0315a1475816b4e72882119976176965a71..4f03b7ba75aef2f24e3ea1a8c7826f0ead462300 100644 (file)
@@ -28,7 +28,7 @@
 #include "debug.h"
 
 
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
 #include "kbmap.h"
 #include "QLyXKeySym.h"
 extern boost::scoped_ptr<kb_keymap> toplevel_keymap;
@@ -147,7 +147,7 @@ string const QLPopupMenu::getLabel(MenuItem const & mi)
 /// \todo Mac specific binding handling.
 void QLPopupMenu::addBinding(string & label, MenuItem const & mi)
 {
-#ifndef Q_OS_MACX
+#ifndef Q_WS_MACX
 
                string const binding(mi.binding());
                if (!binding.empty()) {
@@ -177,7 +177,7 @@ void QLPopupMenu::addBinding(string & label, MenuItem const & mi)
 /// \todo Fix Mac specific menu hack
 void QLPopupMenu::specialMacXmenuHack()
 {
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
        /* The qt/mac menu code has a very silly hack that
           moves some menu entries that it recognizes by name
           (e.g. "Preferences...") to the "LyX" menu. This
index 74dc2bd84e8d818180f619465306320fbfdb3a88..3ccf2b4b7906661ccc771780505a6136230a7b5f 100644 (file)
@@ -43,7 +43,7 @@
 #include <X11/Xlib.h>
 #endif
 
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
 #include <Carbon/Carbon.h>
 #include <support/lstrings.h>
 using lyx::support::subst;
@@ -185,7 +185,7 @@ QWorkArea::QWorkArea(LyXView &, int w, int h)
        setInputMethodEnabled(true);
 #endif
 
-#ifdef Q_OS_X11
+#ifdef Q_WS_X11
        // doubleClickInterval() is 400 ms on X11 witch is just too long.
        // On Windows and Mac OS X, the operating system's value is used.
        // On Microsoft Windows, calling this function sets the double
@@ -193,7 +193,7 @@ QWorkArea::QWorkArea(LyXView &, int w, int h)
        QApplication::setDoubleClickInterval(300);
 #endif
 
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
        wa_ptr = this;
 #endif
 }
@@ -249,7 +249,7 @@ string const QWorkArea::getClipboard() const
        lyxerr[Debug::ACTION] << "getClipboard: " << (const char*) str << endl;
        if (str.isNull())
                return string();
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
        // The MAC clipboard uses \r for lineendings, and we use \n
        return subst(fromqstr(str), '\r', '\n');
 #else
@@ -260,7 +260,7 @@ string const QWorkArea::getClipboard() const
 
 void QWorkArea::putClipboard(string const & str) const
 {
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
        // The MAC clipboard uses \r for lineendings, and we use \n
        QApplication::clipboard()->setText(toqstr(subst(str, '\n', '\r')),
                                           QClipboard::Selection);
@@ -390,6 +390,7 @@ void QWorkArea::mouseMoveEvent(QMouseEvent * e)
 void QWorkArea::wheelEvent(QWheelEvent * e)
 {
        verticalScrollBar()->setValue(verticalScrollBar()->value() - e->delta());
+       adjustViewWithScrollBar();\r
 }
 
 void QWorkArea::generateSyntheticMouseEvent()
@@ -573,7 +574,7 @@ bool lyxX11EventFilter(XEvent * xev)
 ////////////////////////////////////////////////////////////////////////
 // Mac OSX specific stuff goes here...
 
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
 namespace{
 OSErr checkAppleEventForMissingParams(const AppleEvent& theAppleEvent)
  {
@@ -637,4 +638,4 @@ pascal OSErr handleOpenDocuments(const AppleEvent* inEvent,
        AEDisposeDesc(&documentList);
        return err;
 }
-#endif  // Q_OS_MACX
+#endif  // Q_WS_MACX
index 0e650ec7b868f11add534e4b38e07b4a4e952a05..aa1cf5b89c6407e2346e53928e5e05f713232fea 100644 (file)
@@ -168,35 +168,46 @@ protected:
 #endif
 
 public slots:
-
-       void keyeventTimeout();
-       void adjustViewWithScrollBar(int action);
+\r
+       /// Timeout event Slot for keyboard bufferring.\r
+       /// \todo This is not used currently in the code, remove?
+       void keyeventTimeout();\r
+\r
+       /// Adjust the LyX buffer view with the position of the scrollbar.\r
+       /**\r
+       * The action argument is not used in the the code, it is there\r
+       * only for the connection to the vertical srollbar signal which \r
+       * emits an 'int' action.\r
+       */
+       void adjustViewWithScrollBar(int action = 0);
 
 private:
 
-       /// 
+       /// Buffer view width.
        int workWidth_;
-       ///
+\r
+       /// Buffer view height.\r
        int workHeight_;
 
-       /// our painter
+       /// Our painter.
        QLPainter painter_;
 
        /// The slot connected to SyntheticMouseEvent::timeout.
        void generateSyntheticMouseEvent();
 
+       ///\r
        SyntheticMouseEvent synthetic_mouse_event_;
 
        /// the double buffered pixmap
        boost::scoped_ptr<QPixmap> pixmap_;
 
+       /// \todo remove\r
        QTimer step_timer_;
+\r
+       /// \todo remove\r
        std::queue<boost::shared_ptr<QKeyEvent> > keyeventQueue_;
 
        double_click dc_event_;
-
-       bool scrolled_with_mouse_;
-       bool scrolled_with_keyboard_;
 };
 
 #endif // QWORKAREA_H