18 |
18 |
19 #include <qboxlayout.h> |
19 #include <qboxlayout.h> |
20 #include <qradiobutton.h> |
20 #include <qradiobutton.h> |
21 #include "radiobox.h" |
21 #include "radiobox.h" |
22 |
22 |
23 static QBoxLayout::Direction makeDirection (Qt::Orientation orient, bool invert = false) { |
23 QBoxLayout::Direction makeDirection (Qt::Orientation orient, bool invert = false) { |
24 return (orient == (invert ? Qt::Vertical : Qt::Horizontal)) ? QBoxLayout::LeftToRight : QBoxLayout::TopToBottom; |
24 return (orient == (invert ? Qt::Vertical : Qt::Horizontal)) ? QBoxLayout::LeftToRight : QBoxLayout::TopToBottom; |
25 } |
25 } |
26 |
26 |
27 void RadioBox::init (Qt::Orientation orient) { |
27 void RadioBox::init (Qt::Orientation orient) { |
28 m_dir = makeDirection (orient); |
28 m_dir = makeDirection (orient); |