5 @SuppressWarnings public class QTabBar : QWidget{
6 protected onTabBarEventListener listener = nilptr;
16 nativehandle = QtXnl.createQObject(QType.qtTabBar,
this, 0);
17 if (nativehandle == 0){
23 public bool create(@NotNilptr QWidget parent)
override {
24 nativehandle = QtXnl.createQObject(QType.qtTabBar,
this, parent.nativehandle);
25 if (nativehandle == 0){
31 enum Shape { RoundedNorth, RoundedSouth, RoundedWest,
RoundedEast,
41 enum SelectionBehavior {
52 if (listener != nilptr){
53 listener.currentChanged(
this,index);
58 if (listener != nilptr){
59 listener.tabCloseRequested(
this,index);
64 if (listener != nilptr){
65 listener.tabMoved(
this, from, _to);
70 if (listener != nilptr){
71 listener.tabBarClicked(
this,index);
76 if (listener != nilptr){
77 listener.tabBarDoubleClicked(
this,index);
83 return (Shape)QtXnl.widget_get_int_value(nativehandle, Constant.TABBARSHAPE);
87 QtXnl.widget_set_vint_value(nativehandle, Constant.TABBARSETSHAPE, shape);
91 return QtXnl.widget_set_intstring_value(nativehandle, Constant.TABBARADDTAB, 0, text);
94 return QtXnl.long_longstring(nativehandle, Constant.TABBARADDTAB, icon.nativehandle, text);
98 return QtXnl.widget_set_intstring_value(nativehandle, Constant.TABBARINSERTTAB, index, text);
102 QtXnl.widget_set_vint_value(nativehandle, Constant.TABBARREMOVETAB, index);
105 QtXnl.widget_set_v2int_value(nativehandle, Constant.TABBARMOVETAB, from, _to);
109 return QtXnl.widget_get_int_bool(nativehandle, Constant.TABBARISTABENABLED, index);
113 QtXnl.widget_set_int_bool_value(nativehandle, Constant.TABBARSETTABENABLED, index, b);
117 return (
String)QtXnl.core_getStringlongint(nativehandle, Constant.TABBARTABTEXT, 0, index);
121 QtXnl.widget_set_intstring_value(nativehandle, Constant.TABBARSETTABTEXT, index, text);
125 return QtXnl.long_intlong(nativehandle, Constant.TABBARTABTEXTCOLOR, index);
129 QtXnl.void_long2(nativehandle, Constant.TABBARSETTABTEXTCOLOR, index, color);
133 QtXnl.object_set_long_int_long(nativehandle, Constant.TABBARSETTABICON, 0, index, icon.nativehandle);
137 return (TextElideMode)QtXnl.widget_get_int_value(nativehandle, Constant.TABBARELIDEMODE);
141 QtXnl.widget_set_vint_value(nativehandle, Constant.TABBARSETELIDEMODE, tem);
146 QtXnl.widget_set_intstring_value(nativehandle, Constant.TABBARSETTABTOOLTIP, index, tip);
150 return (
String)QtXnl.core_getStringlongint(nativehandle, Constant.TABBARTABTOOLTIP, 0, index);
154 QtXnl.widget_set_intstring_value(nativehandle, Constant.TABBARSETTABWHATSTHIS, index, text);
158 return (
String)QtXnl.core_getStringlongint(nativehandle, Constant.TABBARTABWHATSTHIS, 0, index);
175 return QtXnl.widget_set_v2int_value(nativehandle, Constant.TABBARTABAT, pos.x, pos.y);
179 return QtXnl.widget_get_int_value(nativehandle, Constant.TABBARCURRENTINDEX);
183 return QtXnl.widget_get_int_value(nativehandle, Constant.TABBARCOUNT);
187 long lsize = QtXnl.long_get(nativehandle, Constant.TABBARSIZEHINT);
188 return new QSize(lsize >> 32 & 0xffffffff, lsize & 0xffffffff);
192 long lsize = QtXnl.long_get(nativehandle, Constant.TABBARMINIMUMSIZEHINT);
193 return new QSize(lsize >> 32 & 0xffffffff, lsize & 0xffffffff);
197 QtXnl.widget_set_bool_value(nativehandle, Constant.TABBARSETDRAWBASE, drawTheBase);
201 return QtXnl.widget_get_bool_value(nativehandle,Constant.TABBARDRAWBASE);
205 long lsize = QtXnl.long_get(nativehandle, Constant.TABBARICONSIZE);
206 return new QSize(lsize >> 32 & 0xffffffff, lsize & 0xffffffff);
210 QtXnl.widget_set_v2int_value(nativehandle, Constant.TABBARSETICONSIZE, size.cx, size.cy);
214 return QtXnl.widget_get_bool_value(nativehandle,Constant.TABBARUSESSCROLLBUTTONS);
218 QtXnl.widget_set_bool_value(nativehandle, Constant.TABBARUSEBUTTONS, useButtons);
222 return QtXnl.widget_get_bool_value(nativehandle,Constant.TABBARTABSCLOSABLE);
226 QtXnl.widget_set_bool_value(nativehandle, Constant.TABBARSETTABSCLOSABLE, closable);
229 public void setTabButton(
int index, ButtonPosition position, QWidget widget){
230 QtXnl.object_set_long_int_long(nativehandle, Constant.TABBARSETTABBUTTON, index, position, widget.nativehandle);
233 public QWidget
tabButton(
int index, ButtonPosition position) {
234 return (QWidget)QtXnl.object_get_handle2(nativehandle, Constant.TABBARTABBUTTON, index, position);
238 return (SelectionBehavior)QtXnl.widget_get_int_value(nativehandle, Constant.TABBARSELECTIONBEHAVIORONREMOVE);
242 QtXnl.widget_set_vint_value(nativehandle, Constant.TABBARSETSELECTIONBEHAVIORONREMOVE, behavior);
246 return QtXnl.widget_get_bool_value(nativehandle,Constant.TABBAREXPANDING);
250 QtXnl.widget_set_bool_value(nativehandle, Constant.TABBARSETEXPANDING, enabled);
254 return QtXnl.widget_get_bool_value(nativehandle,Constant.TABBARISMOVABLE);
258 QtXnl.widget_set_bool_value(nativehandle, Constant.TABBARSETMOVABLE, movable);
262 return QtXnl.widget_get_bool_value(nativehandle,Constant.TABBARDOCUMENTMODE);
266 QtXnl.widget_set_bool_value(nativehandle, Constant.TABBARSETDOCUMENTMODE,
set);
270 return QtXnl.widget_get_bool_value(nativehandle,Constant.TABBARAUTOHIDE);
274 QtXnl.widget_set_bool_value(nativehandle, Constant.TABBARSETAUTOHIDE, hide);
278 return QtXnl.widget_get_bool_value(nativehandle,Constant.TABBARCHANGECURRENTONDRAG);
282 QtXnl.widget_set_bool_value(nativehandle, Constant.TABBARSETCHANGECURRENTONDRAG, change);
287 return (
String)QtXnl.object_get_handle(nativehandle, Constant.TABBARACCESSIBLETABNAME, index);
291 QtXnl.widget_set_intstring_value(nativehandle, Constant.TABBARSETACCESSIBLETABNAME, index, name);
295 QtXnl.widget_set_vint_value(nativehandle, Constant.TABBARSETCURRENTINDEX, index);
void setDocumentMode(bool set)
void setTabBarEventListener(onTabBarEventListener l)
String accessibleTabName(int index)
void setCurrentIndex(int index)
void setTabIcon(int index, QIcon icon)
TextElideMode elideMode()
void setDrawBase(bool drawTheBase)
String tabText(int index)
void setIconSize( QSize size)
void setShape(Shape shape)
void removeTab(int index)
bool isTabEnabled(int index)
void setTabEnabled(int index, bool b)
void setTabToolTip(int index, String tip)
void tabCloseRequested(int index)
bool changeCurrentOnDrag()
void setTabsClosable(bool closable)
void setTabButton(int index, ButtonPosition position, QWidget widget)
QWidget tabButton(int index, ButtonPosition position)
long tabTextColor(int index)
void setUsesScrollButtons(bool useButtons)
int insertTab(int index, String text)
bool create(@NotNilptr QWidget parent) override
void setTabTextColor(int index, long color)
void setElideMode(TextElideMode tem)
void setTabText(int index, String text)
int addTab( QIcon icon, String text)
void currentChanged(int index)
void setChangeCurrentOnDrag(bool change)
void setAutoHide(bool hide)
String tabWhatsThis(int index)
void setAccessibleTabName(int index, String name)
void tabBarDoubleClicked(int index)
void moveTab(int from, int _to)
SelectionBehavior selectionBehaviorOnRemove()
void setSelectionBehaviorOnRemove(SelectionBehavior behavior)
void setExpanding(bool enabled)
void setTabWhatsThis(int index, String text)
String tabToolTip(int index)
void tabBarClicked(int index)
void tabMoved(int from, int _to)
void setMovable(bool movable)