26 #if defined (HAVE_CONFIG_H) 56 #if defined (HAVE_QTABWIDGET_SETMOVABLE) 63 #if defined (HAVE_QTABWIDGET_SETMOVABLE) 75 int old_pos = currentIndex ();
76 int new_pos = currentIndex () + direction;
78 if (new_pos < 0 || new_pos >= tabs)
79 new_pos = new_pos - direction*tabs;
83 #if defined (HAVE_QTABWIDGET_SETMOVABLE) 84 moveTab (old_pos, new_pos);
85 setCurrentIndex (old_pos);
86 setCurrentIndex (new_pos);
90 setCurrentIndex (new_pos);
100 for (
int i = 0;
i < count ();
i++)
102 click_pos = mapToGlobal (me->pos ());
103 if (tabRect (
i).contains (mapFromGlobal (click_pos)))
111 if (clicked_idx >= 0)
113 int current_idx = currentIndex ();
115 if ((me->type () == QEvent::MouseButtonDblClick &&
116 me->button() == Qt::LeftButton) ||
117 (me->type () != QEvent::MouseButtonDblClick &&
118 me->button() == Qt::MidButton))
122 setCurrentIndex (clicked_idx);
126 if (current_idx - clicked_idx > 0)
127 setCurrentIndex (current_idx - 1);
128 else if (current_idx - clicked_idx < 0)
129 setCurrentIndex (current_idx);
131 else if (me->type () != QEvent::MouseButtonDblClick &&
132 me->button() == Qt::RightButton)
135 setCurrentIndex (clicked_idx);
139 setCurrentIndex (current_idx);
147 int new_idx = count () - 1;
150 if (current_idx - clicked_idx > 0)
151 new_idx = current_idx - 1;
152 else if (current_idx - clicked_idx < 0)
153 new_idx = current_idx;
156 setCurrentIndex (new_idx);
162 QTabBar::mousePressEvent (me);
168 QTabBar::mousePressEvent (me);
void switch_left_tab(void)
void close_current_tab_signal(bool)
void move_tab_right(void)
returns the type of the matrix and caches it for future use Called with more than one the function will not attempt to guess the type if it is still unknown This is useful for debugging purposes The possible matrix types depend on whether the matrix is full or and can be one of the following able sis tem and mark type as unknown tem as the structure of the matrix explicitly gives this(Sparse matrices only) tem code
void switch_right_tab(void)
void switch_tab(int direction, bool movetab=false)
void mousePressEvent(QMouseEvent *event)