Commit f8101372 authored by roangel's avatar roangel
Browse files

Fixed button position in tabs

parent bfc80d7e
...@@ -1011,9 +1011,10 @@ moc_myGraphicsView.cpp: /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGr ...@@ -1011,9 +1011,10 @@ moc_myGraphicsView.cpp: /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QGr
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/bin/moc /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/bin/moc
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/bin/moc $(DEFINES) -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/mkspecs/linux-g++ -I/home/gazebo-cf/work/D-FaLL-System/crazyflie_ws/sandbox/crazypkg/gui/untitled -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include myGraphicsView.h -o moc_myGraphicsView.cpp /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/bin/moc $(DEFINES) -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/mkspecs/linux-g++ -I/home/gazebo-cf/work/D-FaLL-System/crazyflie_ws/sandbox/crazypkg/gui/untitled -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include myGraphicsView.h -o moc_myGraphicsView.cpp
moc_crazyFlyZoneTab.cpp: /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QWidget \ moc_crazyFlyZoneTab.cpp: /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/QObject \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qwidget.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobject.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qwindowdefs.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobjectdefs.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qnamespace.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qglobal.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qglobal.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qconfig.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qconfig.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qfeatures.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qfeatures.h \
...@@ -1036,11 +1037,7 @@ moc_crazyFlyZoneTab.cpp: /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QW ...@@ -1036,11 +1037,7 @@ moc_crazyFlyZoneTab.cpp: /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QW
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qmutex.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qmutex.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qnumeric.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qnumeric.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qversiontagging.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qversiontagging.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobjectdefs.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qnamespace.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobjectdefs_impl.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobjectdefs_impl.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qwindowdefs_win.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobject.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qstring.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qstring.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qchar.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qchar.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qbytearray.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qbytearray.h \
...@@ -1062,6 +1059,10 @@ moc_crazyFlyZoneTab.cpp: /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QW ...@@ -1062,6 +1059,10 @@ moc_crazyFlyZoneTab.cpp: /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QW
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qvarlengtharray.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qvarlengtharray.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qcontainerfwd.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qcontainerfwd.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobject_impl.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobject_impl.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QWidget \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qwidget.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qwindowdefs.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qwindowdefs_win.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qmargins.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qmargins.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpaintdevice.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpaintdevice.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qrect.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qrect.h \
...@@ -1108,6 +1109,10 @@ moc_crazyFlyZoneTab.cpp: /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QW ...@@ -1108,6 +1109,10 @@ moc_crazyFlyZoneTab.cpp: /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QW
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qfiledevice.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qfiledevice.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qvector2d.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qvector2d.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qtouchdevice.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qtouchdevice.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QPushButton \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qpushbutton.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qabstractbutton.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qicon.h \
crazyFlyZoneTab.h \ crazyFlyZoneTab.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/bin/moc /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/bin/moc
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/bin/moc $(DEFINES) -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/mkspecs/linux-g++ -I/home/gazebo-cf/work/D-FaLL-System/crazyflie_ws/sandbox/crazypkg/gui/untitled -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include crazyFlyZoneTab.h -o moc_crazyFlyZoneTab.cpp /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/bin/moc $(DEFINES) -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/mkspecs/linux-g++ -I/home/gazebo-cf/work/D-FaLL-System/crazyflie_ws/sandbox/crazypkg/gui/untitled -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui -I/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include crazyFlyZoneTab.h -o moc_crazyFlyZoneTab.cpp
...@@ -2309,9 +2314,10 @@ tablePiece.o: tablePiece.cpp tablePiece.h \ ...@@ -2309,9 +2314,10 @@ tablePiece.o: tablePiece.cpp tablePiece.h \
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tablePiece.o tablePiece.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tablePiece.o tablePiece.cpp
crazyFlyZoneTab.o: crazyFlyZoneTab.cpp crazyFlyZoneTab.h \ crazyFlyZoneTab.o: crazyFlyZoneTab.cpp crazyFlyZoneTab.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QWidget \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/QObject \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qwidget.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobject.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qwindowdefs.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobjectdefs.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qnamespace.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qglobal.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qglobal.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qconfig.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qconfig.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qfeatures.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qfeatures.h \
...@@ -2334,11 +2340,7 @@ crazyFlyZoneTab.o: crazyFlyZoneTab.cpp crazyFlyZoneTab.h \ ...@@ -2334,11 +2340,7 @@ crazyFlyZoneTab.o: crazyFlyZoneTab.cpp crazyFlyZoneTab.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qmutex.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qmutex.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qnumeric.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qnumeric.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qversiontagging.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qversiontagging.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobjectdefs.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qnamespace.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobjectdefs_impl.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobjectdefs_impl.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qwindowdefs_win.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobject.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qstring.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qstring.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qchar.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qchar.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qbytearray.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qbytearray.h \
...@@ -2360,6 +2362,10 @@ crazyFlyZoneTab.o: crazyFlyZoneTab.cpp crazyFlyZoneTab.h \ ...@@ -2360,6 +2362,10 @@ crazyFlyZoneTab.o: crazyFlyZoneTab.cpp crazyFlyZoneTab.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qvarlengtharray.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qvarlengtharray.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qcontainerfwd.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qcontainerfwd.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobject_impl.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qobject_impl.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QWidget \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qwidget.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qwindowdefs.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qwindowdefs_win.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qmargins.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qmargins.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpaintdevice.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qpaintdevice.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qrect.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qrect.h \
...@@ -2405,7 +2411,16 @@ crazyFlyZoneTab.o: crazyFlyZoneTab.cpp crazyFlyZoneTab.h \ ...@@ -2405,7 +2411,16 @@ crazyFlyZoneTab.o: crazyFlyZoneTab.cpp crazyFlyZoneTab.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qfile.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qfile.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qfiledevice.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtCore/qfiledevice.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qvector2d.h \ /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qvector2d.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qtouchdevice.h /home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qtouchdevice.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QPushButton \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qpushbutton.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qabstractbutton.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtGui/qicon.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QLayout \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qlayout.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qlayoutitem.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qboxlayout.h \
/home/gazebo-cf/Qt5.7.0/5.7/gcc_64/include/QtWidgets/qgridlayout.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o crazyFlyZoneTab.o crazyFlyZoneTab.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o crazyFlyZoneTab.o crazyFlyZoneTab.cpp
moc_mainguiwindow.o: moc_mainguiwindow.cpp moc_mainguiwindow.o: moc_mainguiwindow.cpp
......
...@@ -6,9 +6,25 @@ crazyFlyZoneTab::crazyFlyZoneTab(int index, QWidget *parent) ...@@ -6,9 +6,25 @@ crazyFlyZoneTab::crazyFlyZoneTab(int index, QWidget *parent)
: QWidget(parent) : QWidget(parent)
{ {
_index = index; _index = index;
_num_rows = 3;
_num_columns = 3;
center_button = new QPushButton("Fit view"); center_button = new QPushButton("Fit view");
QVBoxLayout *mainLayout = new QVBoxLayout; QGridLayout *mainLayout = new QGridLayout;
mainLayout->addWidget(center_button); // mainLayout->setRowMinimumHeight(1, 25);
// mainLayout->setRowMinimumHeight(2, 25);
// mainLayout->setRowStretch(1);
// mainLayout->setColumnMinimumWidth(5);
for(int i = 0; i < _num_rows; i++)
{
mainLayout->setRowStretch(i, 1);
}
for(int i = 0; i < _num_columns; i++)
{
mainLayout->setColumnStretch(i, 1);
}
mainLayout->addWidget(center_button, _num_rows - 1, _num_columns - 1);
setLayout(mainLayout); setLayout(mainLayout);
QObject::connect(center_button, SIGNAL(clicked()), this, SLOT(centerButtonClicked())); QObject::connect(center_button, SIGNAL(clicked()), this, SLOT(centerButtonClicked()));
qDebug("tab widget created, index: %d", _index); qDebug("tab widget created, index: %d", _index);
......
...@@ -13,6 +13,8 @@ public: ...@@ -13,6 +13,8 @@ public:
QPushButton* center_button; QPushButton* center_button;
private: private:
int _index; int _index;
int _num_rows;
int _num_columns;
signals: signals:
void centerButtonClickedSignal(int index); void centerButtonClickedSignal(int index);
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.0.2, 2017-04-11T17:01:44. --> <!-- Written by QtCreator 4.0.2, 2017-04-18T16:57:38. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>EnvironmentId</variable> <variable>EnvironmentId</variable>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment