module Qtc.Enums.Gui.QTabBar (
QTabBarShape, eRoundedNorth, eRoundedSouth, eRoundedWest, eRoundedEast, eTriangularNorth, eTriangularSouth, eTriangularWest, eTriangularEast
)
where
import Foreign.C.Types
import Qtc.Classes.Base
import Qtc.ClassTypes.Core (QObject, TQObject, qObjectFromPtr)
import Qtc.Core.Base (Qcs, connectSlot, qtc_connectSlot_int, wrapSlotHandler_int)
import Qtc.Enums.Base
import Qtc.Enums.Classes.Core
data CQTabBarShape a = CQTabBarShape a
type QTabBarShape = QEnum(CQTabBarShape Int)
ieQTabBarShape :: Int -> QTabBarShape
ieQTabBarShape x = QEnum (CQTabBarShape x)
instance QEnumC (CQTabBarShape Int) where
qEnum_toInt (QEnum (CQTabBarShape x)) = x
qEnum_fromInt x = QEnum (CQTabBarShape x)
withQEnumResult x
= do
ti <- x
return $ qEnum_fromInt $ fromIntegral ti
withQEnumListResult x
= do
til <- x
return $ map qEnum_fromInt til
instance Qcs (QObject c -> QTabBarShape -> IO ()) where
connectSlot _qsig_obj _qsig_nam _qslt_obj _qslt_nam _handler
= do
funptr <- wrapSlotHandler_int slotHandlerWrapper_int
stptr <- newStablePtr (Wrap _handler)
withObjectPtr _qsig_obj $ \cobj_sig ->
withCWString _qsig_nam $ \cstr_sig ->
withObjectPtr _qslt_obj $ \cobj_slt ->
withCWString _qslt_nam $ \cstr_slt ->
qtc_connectSlot_int cobj_sig cstr_sig cobj_slt cstr_slt (toCFunPtr funptr) (castStablePtrToPtr stptr)
return ()
where
slotHandlerWrapper_int :: Ptr fun -> Ptr () -> Ptr (TQObject c) -> CInt -> IO ()
slotHandlerWrapper_int funptr stptr qobjptr cint
= do qobj <- qObjectFromPtr qobjptr
let hint = fromCInt cint
if (objectIsNull qobj)
then do when (stptr/=ptrNull)
(freeStablePtr (castPtrToStablePtr stptr))
when (funptr/=ptrNull)
(freeHaskellFunPtr (castPtrToFunPtr funptr))
else _handler qobj (qEnum_fromInt hint)
return ()
eRoundedNorth :: QTabBarShape
eRoundedNorth
= ieQTabBarShape $ 0
eRoundedSouth :: QTabBarShape
eRoundedSouth
= ieQTabBarShape $ 1
eRoundedWest :: QTabBarShape
eRoundedWest
= ieQTabBarShape $ 2
eRoundedEast :: QTabBarShape
eRoundedEast
= ieQTabBarShape $ 3
eTriangularNorth :: QTabBarShape
eTriangularNorth
= ieQTabBarShape $ 4
eTriangularSouth :: QTabBarShape
eTriangularSouth
= ieQTabBarShape $ 5
eTriangularWest :: QTabBarShape
eTriangularWest
= ieQTabBarShape $ 6
eTriangularEast :: QTabBarShape
eTriangularEast
= ieQTabBarShape $ 7