qtah-qt5-0.8.0: src/Graphics/UI/Qtah/Generated/Widgets/QAction.hs
{-# LANGUAGE FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MonoLocalBinds, MultiParamTypeClasses, ScopedTypeVariables, TypeSynonymInstances, UndecidableInstances #-}
---------- GENERATED FILE, EDITS WILL BE LOST ----------
module Graphics.UI.Qtah.Generated.Widgets.QAction (
castQActionToQObject,
castQObjectToQAction,
QActionValue (..),
QActionConstPtr (..),
actionGroup,
autoRepeat,
isCheckable,
isChecked,
isEnabled,
font,
icon,
iconText,
isIconVisibleInMenu,
menu,
menuRole,
parentWidget,
priority,
isSeparator,
statusTip,
text,
toolTip,
isVisible,
whatsThis,
QActionPtr (..),
setActionGroup,
activate,
setAutoRepeat,
setCheckable,
setChecked,
setEnabled,
setFont,
hover,
setIcon,
setIconText,
setIconVisibleInMenu,
setMenu,
setMenuRole,
setSeparator,
setDisabled,
setPriority,
showStatusText,
setStatusTip,
setText,
toggle,
setToolTip,
trigger,
setVisible,
setWhatsThis,
emitChanged,
emitHovered,
emitToggled,
emitTriggered,
QActionConst (..),
castQActionToConst,
QAction (..),
castQActionToNonconst,
new,
newWithParent,
newWithText,
newWithTextAndParent,
newWithIconAndText,
newWithIconAndTextAndParent,
QActionSuper (..),
QActionSuperConst (..),
QActionActionEvent (..),
QActionMenuRole (..),
QActionPriority (..),
) where
import qualified Foreign as HoppyF
import qualified Foreign.C as HoppyFC
import qualified Foreign.Hoppy.Runtime as HoppyFHR
import qualified Graphics.UI.Qtah.Generated.Core.QObject as M94
import qualified Graphics.UI.Qtah.Generated.Core.QString as M142
import qualified Graphics.UI.Qtah.Generated.Gui.QFont as M276
import {-# SOURCE #-} qualified Graphics.UI.Qtah.Generated.Gui.QIcon as M288
import {-# SOURCE #-} qualified Graphics.UI.Qtah.Generated.Widgets.QActionGroup as M370
import {-# SOURCE #-} qualified Graphics.UI.Qtah.Generated.Widgets.QMenu as M448
import {-# SOURCE #-} qualified Graphics.UI.Qtah.Generated.Widgets.QWidget as M506
import Prelude (($), (.), (/=), (=<<), (==), (>>=))
import qualified Prelude as HoppyP
import qualified Prelude as QtahP
foreign import ccall "genpop__QAction_new" new' :: HoppyP.IO (HoppyF.Ptr QAction)
foreign import ccall "genpop__QAction_newWithParent" newWithParent' :: HoppyF.Ptr M94.QObject -> HoppyP.IO (HoppyF.Ptr QAction)
foreign import ccall "genpop__QAction_newWithText" newWithText' :: HoppyF.Ptr M142.QStringConst -> HoppyP.IO (HoppyF.Ptr QAction)
foreign import ccall "genpop__QAction_newWithTextAndParent" newWithTextAndParent' :: HoppyF.Ptr M142.QStringConst -> HoppyF.Ptr M94.QObject -> HoppyP.IO (HoppyF.Ptr QAction)
foreign import ccall "genpop__QAction_newWithIconAndText" newWithIconAndText' :: HoppyF.Ptr M288.QIconConst -> HoppyF.Ptr M142.QStringConst -> HoppyP.IO (HoppyF.Ptr QAction)
foreign import ccall "genpop__QAction_newWithIconAndTextAndParent" newWithIconAndTextAndParent' :: HoppyF.Ptr M288.QIconConst -> HoppyF.Ptr M142.QStringConst -> HoppyF.Ptr M94.QObject -> HoppyP.IO (HoppyF.Ptr QAction)
foreign import ccall "genpop__QAction_actionGroup" actionGroup' :: HoppyF.Ptr QActionConst -> HoppyP.IO (HoppyF.Ptr M370.QActionGroup)
foreign import ccall "genpop__QAction_setActionGroup" setActionGroup' :: HoppyF.Ptr QAction -> HoppyF.Ptr M370.QActionGroup -> HoppyP.IO ()
foreign import ccall "genpop__QAction_activate" activate' :: HoppyF.Ptr QAction -> HoppyFC.CInt -> HoppyP.IO ()
foreign import ccall "genpop__QAction_autoRepeat" autoRepeat' :: HoppyF.Ptr QActionConst -> HoppyP.IO HoppyFC.CBool
foreign import ccall "genpop__QAction_setAutoRepeat" setAutoRepeat' :: HoppyF.Ptr QAction -> HoppyFC.CBool -> HoppyP.IO ()
foreign import ccall "genpop__QAction_isCheckable" isCheckable' :: HoppyF.Ptr QActionConst -> HoppyP.IO HoppyFC.CBool
foreign import ccall "genpop__QAction_setCheckable" setCheckable' :: HoppyF.Ptr QAction -> HoppyFC.CBool -> HoppyP.IO ()
foreign import ccall "genpop__QAction_isChecked" isChecked' :: HoppyF.Ptr QActionConst -> HoppyP.IO HoppyFC.CBool
foreign import ccall "genpop__QAction_setChecked" setChecked' :: HoppyF.Ptr QAction -> HoppyFC.CBool -> HoppyP.IO ()
foreign import ccall "genpop__QAction_isEnabled" isEnabled' :: HoppyF.Ptr QActionConst -> HoppyP.IO HoppyFC.CBool
foreign import ccall "genpop__QAction_setEnabled" setEnabled' :: HoppyF.Ptr QAction -> HoppyFC.CBool -> HoppyP.IO ()
foreign import ccall "genpop__QAction_font" font' :: HoppyF.Ptr QActionConst -> HoppyP.IO (HoppyF.Ptr M276.QFontConst)
foreign import ccall "genpop__QAction_setFont" setFont' :: HoppyF.Ptr QAction -> HoppyF.Ptr M276.QFontConst -> HoppyP.IO ()
foreign import ccall "genpop__QAction_hover" hover' :: HoppyF.Ptr QAction -> HoppyP.IO ()
foreign import ccall "genpop__QAction_icon" icon' :: HoppyF.Ptr QActionConst -> HoppyP.IO (HoppyF.Ptr M288.QIconConst)
foreign import ccall "genpop__QAction_setIcon" setIcon' :: HoppyF.Ptr QAction -> HoppyF.Ptr M288.QIconConst -> HoppyP.IO ()
foreign import ccall "genpop__QAction_iconText" iconText' :: HoppyF.Ptr QActionConst -> HoppyP.IO (HoppyF.Ptr M142.QStringConst)
foreign import ccall "genpop__QAction_setIconText" setIconText' :: HoppyF.Ptr QAction -> HoppyF.Ptr M142.QStringConst -> HoppyP.IO ()
foreign import ccall "genpop__QAction_isIconVisibleInMenu" isIconVisibleInMenu' :: HoppyF.Ptr QActionConst -> HoppyP.IO HoppyFC.CBool
foreign import ccall "genpop__QAction_setIconVisibleInMenu" setIconVisibleInMenu' :: HoppyF.Ptr QAction -> HoppyFC.CBool -> HoppyP.IO ()
foreign import ccall "genpop__QAction_menu" menu' :: HoppyF.Ptr QActionConst -> HoppyP.IO (HoppyF.Ptr M448.QMenu)
foreign import ccall "genpop__QAction_setMenu" setMenu' :: HoppyF.Ptr QAction -> HoppyF.Ptr M448.QMenu -> HoppyP.IO ()
foreign import ccall "genpop__QAction_menuRole" menuRole' :: HoppyF.Ptr QActionConst -> HoppyP.IO HoppyFC.CInt
foreign import ccall "genpop__QAction_setMenuRole" setMenuRole' :: HoppyF.Ptr QAction -> HoppyFC.CInt -> HoppyP.IO ()
foreign import ccall "genpop__QAction_parentWidget" parentWidget' :: HoppyF.Ptr QActionConst -> HoppyP.IO (HoppyF.Ptr M506.QWidget)
foreign import ccall "genpop__QAction_priority" priority' :: HoppyF.Ptr QActionConst -> HoppyP.IO HoppyFC.CInt
foreign import ccall "genpop__QAction_isSeparator" isSeparator' :: HoppyF.Ptr QActionConst -> HoppyP.IO HoppyFC.CBool
foreign import ccall "genpop__QAction_setSeparator" setSeparator' :: HoppyF.Ptr QAction -> HoppyFC.CBool -> HoppyP.IO ()
foreign import ccall "genpop__QAction_setDisabled" setDisabled' :: HoppyF.Ptr QAction -> HoppyFC.CBool -> HoppyP.IO ()
foreign import ccall "genpop__QAction_setPriority" setPriority' :: HoppyF.Ptr QAction -> HoppyFC.CInt -> HoppyP.IO ()
foreign import ccall "genpop__QAction_showStatusText" showStatusText' :: HoppyF.Ptr QAction -> HoppyF.Ptr M506.QWidget -> HoppyP.IO HoppyFC.CBool
foreign import ccall "genpop__QAction_statusTip" statusTip' :: HoppyF.Ptr QActionConst -> HoppyP.IO (HoppyF.Ptr M142.QStringConst)
foreign import ccall "genpop__QAction_setStatusTip" setStatusTip' :: HoppyF.Ptr QAction -> HoppyF.Ptr M142.QStringConst -> HoppyP.IO ()
foreign import ccall "genpop__QAction_text" text' :: HoppyF.Ptr QActionConst -> HoppyP.IO (HoppyF.Ptr M142.QStringConst)
foreign import ccall "genpop__QAction_setText" setText' :: HoppyF.Ptr QAction -> HoppyF.Ptr M142.QStringConst -> HoppyP.IO ()
foreign import ccall "genpop__QAction_toggle" toggle' :: HoppyF.Ptr QAction -> HoppyP.IO ()
foreign import ccall "genpop__QAction_toolTip" toolTip' :: HoppyF.Ptr QActionConst -> HoppyP.IO (HoppyF.Ptr M142.QStringConst)
foreign import ccall "genpop__QAction_setToolTip" setToolTip' :: HoppyF.Ptr QAction -> HoppyF.Ptr M142.QStringConst -> HoppyP.IO ()
foreign import ccall "genpop__QAction_trigger" trigger' :: HoppyF.Ptr QAction -> HoppyP.IO ()
foreign import ccall "genpop__QAction_isVisible" isVisible' :: HoppyF.Ptr QActionConst -> HoppyP.IO HoppyFC.CBool
foreign import ccall "genpop__QAction_setVisible" setVisible' :: HoppyF.Ptr QAction -> HoppyFC.CBool -> HoppyP.IO ()
foreign import ccall "genpop__QAction_whatsThis" whatsThis' :: HoppyF.Ptr QActionConst -> HoppyP.IO (HoppyF.Ptr M142.QStringConst)
foreign import ccall "genpop__QAction_setWhatsThis" setWhatsThis' :: HoppyF.Ptr QAction -> HoppyF.Ptr M142.QStringConst -> HoppyP.IO ()
foreign import ccall "genpop__QAction_emitChanged" emitChanged' :: HoppyF.Ptr QAction -> HoppyP.IO ()
foreign import ccall "genpop__QAction_emitHovered" emitHovered' :: HoppyF.Ptr QAction -> HoppyP.IO ()
foreign import ccall "genpop__QAction_emitToggled" emitToggled' :: HoppyF.Ptr QAction -> HoppyFC.CBool -> HoppyP.IO ()
foreign import ccall "genpop__QAction_emitTriggered" emitTriggered' :: HoppyF.Ptr QAction -> HoppyFC.CBool -> HoppyP.IO ()
foreign import ccall "gencast__QAction__QObject" castQActionToQObject :: HoppyF.Ptr QActionConst -> HoppyF.Ptr M94.QObjectConst
foreign import ccall "gencast__QObject__QAction" castQObjectToQAction :: HoppyF.Ptr M94.QObjectConst -> HoppyF.Ptr QActionConst
foreign import ccall "gendel__QAction" delete'QAction :: HoppyF.Ptr QActionConst -> HoppyP.IO ()
foreign import ccall "&gendel__QAction" deletePtr'QAction :: HoppyF.FunPtr (HoppyF.Ptr QActionConst -> HoppyP.IO ())
class QActionValue a where
withQActionPtr :: a -> (QActionConst -> HoppyP.IO b) -> HoppyP.IO b
instance {-# OVERLAPPABLE #-} QActionConstPtr a => QActionValue a where
withQActionPtr = HoppyP.flip ($) . toQActionConst
class (M94.QObjectConstPtr this) => QActionConstPtr this where
toQActionConst :: this -> QActionConst
actionGroup :: (QActionValue this) => (this) {- ^ this -} -> (HoppyP.IO M370.QActionGroup)
actionGroup arg'1 =
withQActionPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
HoppyP.fmap M370.QActionGroup
(actionGroup' arg'1')
autoRepeat :: (QActionValue this) => (this) {- ^ this -} -> (HoppyP.IO HoppyP.Bool)
autoRepeat arg'1 =
withQActionPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
(
(HoppyP.return . (/= 0))
) =<<
(autoRepeat' arg'1')
isCheckable :: (QActionValue this) => (this) {- ^ this -} -> (HoppyP.IO HoppyP.Bool)
isCheckable arg'1 =
withQActionPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
(
(HoppyP.return . (/= 0))
) =<<
(isCheckable' arg'1')
isChecked :: (QActionValue this) => (this) {- ^ this -} -> (HoppyP.IO HoppyP.Bool)
isChecked arg'1 =
withQActionPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
(
(HoppyP.return . (/= 0))
) =<<
(isChecked' arg'1')
isEnabled :: (QActionValue this) => (this) {- ^ this -} -> (HoppyP.IO HoppyP.Bool)
isEnabled arg'1 =
withQActionPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
(
(HoppyP.return . (/= 0))
) =<<
(isEnabled' arg'1')
font :: (QActionValue this) => (this) {- ^ this -} -> (HoppyP.IO M276.QFont)
font arg'1 =
withQActionPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
(HoppyFHR.decodeAndDelete . M276.QFontConst) =<<
(font' arg'1')
icon :: (QActionValue this) => (this) {- ^ this -} -> (HoppyP.IO M288.QIcon)
icon arg'1 =
withQActionPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
(HoppyFHR.decodeAndDelete . M288.QIconConst) =<<
(icon' arg'1')
iconText :: (QActionValue this) => (this) {- ^ this -} -> (HoppyP.IO QtahP.String)
iconText arg'1 =
withQActionPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
(HoppyFHR.decodeAndDelete . M142.QStringConst) =<<
(iconText' arg'1')
isIconVisibleInMenu :: (QActionValue this) => (this) {- ^ this -} -> (HoppyP.IO HoppyP.Bool)
isIconVisibleInMenu arg'1 =
withQActionPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
(
(HoppyP.return . (/= 0))
) =<<
(isIconVisibleInMenu' arg'1')
menu :: (QActionValue this) => (this) {- ^ this -} -> (HoppyP.IO M448.QMenu)
menu arg'1 =
withQActionPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
HoppyP.fmap M448.QMenu
(menu' arg'1')
menuRole :: (QActionValue this) => (this) {- ^ this -} -> (HoppyP.IO QActionMenuRole)
menuRole arg'1 =
withQActionPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
(
HoppyP.return . HoppyFHR.toCppEnum
) =<<
(menuRole' arg'1')
parentWidget :: (QActionValue this) => (this) {- ^ this -} -> (HoppyP.IO M506.QWidget)
parentWidget arg'1 =
withQActionPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
HoppyP.fmap M506.QWidget
(parentWidget' arg'1')
priority :: (QActionValue this) => (this) {- ^ this -} -> (HoppyP.IO QActionPriority)
priority arg'1 =
withQActionPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
(
HoppyP.return . HoppyFHR.toCppEnum
) =<<
(priority' arg'1')
isSeparator :: (QActionValue this) => (this) {- ^ this -} -> (HoppyP.IO HoppyP.Bool)
isSeparator arg'1 =
withQActionPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
(
(HoppyP.return . (/= 0))
) =<<
(isSeparator' arg'1')
statusTip :: (QActionValue this) => (this) {- ^ this -} -> (HoppyP.IO QtahP.String)
statusTip arg'1 =
withQActionPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
(HoppyFHR.decodeAndDelete . M142.QStringConst) =<<
(statusTip' arg'1')
text :: (QActionValue this) => (this) {- ^ this -} -> (HoppyP.IO QtahP.String)
text arg'1 =
withQActionPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
(HoppyFHR.decodeAndDelete . M142.QStringConst) =<<
(text' arg'1')
toolTip :: (QActionValue this) => (this) {- ^ this -} -> (HoppyP.IO QtahP.String)
toolTip arg'1 =
withQActionPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
(HoppyFHR.decodeAndDelete . M142.QStringConst) =<<
(toolTip' arg'1')
isVisible :: (QActionValue this) => (this) {- ^ this -} -> (HoppyP.IO HoppyP.Bool)
isVisible arg'1 =
withQActionPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
(
(HoppyP.return . (/= 0))
) =<<
(isVisible' arg'1')
whatsThis :: (QActionValue this) => (this) {- ^ this -} -> (HoppyP.IO QtahP.String)
whatsThis arg'1 =
withQActionPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
(HoppyFHR.decodeAndDelete . M142.QStringConst) =<<
(whatsThis' arg'1')
class (QActionConstPtr this, M94.QObjectPtr this) => QActionPtr this where
toQAction :: this -> QAction
setActionGroup :: (QActionPtr this, M370.QActionGroupPtr arg'2) => (this) {- ^ this -} -> (arg'2) -> (HoppyP.IO ())
setActionGroup arg'1 arg'2 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
HoppyFHR.withCppPtr (M370.toQActionGroup arg'2) $ \arg'2' ->
(setActionGroup' arg'1' arg'2')
activate :: (QActionPtr this) => (this) {- ^ this -} -> (QActionActionEvent) -> (HoppyP.IO ())
activate arg'1 arg'2 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
(
HoppyP.return . HoppyFHR.fromCppEnum
) arg'2 >>= \arg'2' ->
(activate' arg'1' arg'2')
setAutoRepeat :: (QActionPtr this) => (this) {- ^ this -} -> (HoppyP.Bool) -> (HoppyP.IO ())
setAutoRepeat arg'1 arg'2 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
(
\x -> HoppyP.return $ if x then 1 else 0
) arg'2 >>= \arg'2' ->
(setAutoRepeat' arg'1' arg'2')
setCheckable :: (QActionPtr this) => (this) {- ^ this -} -> (HoppyP.Bool) -> (HoppyP.IO ())
setCheckable arg'1 arg'2 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
(
\x -> HoppyP.return $ if x then 1 else 0
) arg'2 >>= \arg'2' ->
(setCheckable' arg'1' arg'2')
setChecked :: (QActionPtr this) => (this) {- ^ this -} -> (HoppyP.Bool) -> (HoppyP.IO ())
setChecked arg'1 arg'2 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
(
\x -> HoppyP.return $ if x then 1 else 0
) arg'2 >>= \arg'2' ->
(setChecked' arg'1' arg'2')
setEnabled :: (QActionPtr this) => (this) {- ^ this -} -> (HoppyP.Bool) -> (HoppyP.IO ())
setEnabled arg'1 arg'2 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
(
\x -> HoppyP.return $ if x then 1 else 0
) arg'2 >>= \arg'2' ->
(setEnabled' arg'1' arg'2')
setFont :: (QActionPtr this, M276.QFontValue arg'2) => (this) {- ^ this -} -> (arg'2) -> (HoppyP.IO ())
setFont arg'1 arg'2 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
M276.withQFontPtr arg'2 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'2' ->
(setFont' arg'1' arg'2')
hover :: (QActionPtr this) => (this) {- ^ this -} -> (HoppyP.IO ())
hover arg'1 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
(hover' arg'1')
setIcon :: (QActionPtr this, M288.QIconValue arg'2) => (this) {- ^ this -} -> (arg'2) -> (HoppyP.IO ())
setIcon arg'1 arg'2 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
M288.withQIconPtr arg'2 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'2' ->
(setIcon' arg'1' arg'2')
setIconText :: (QActionPtr this, M142.QStringValue arg'2) => (this) {- ^ this -} -> (arg'2) -> (HoppyP.IO ())
setIconText arg'1 arg'2 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
M142.withQStringPtr arg'2 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'2' ->
(setIconText' arg'1' arg'2')
setIconVisibleInMenu :: (QActionPtr this) => (this) {- ^ this -} -> (HoppyP.Bool) -> (HoppyP.IO ())
setIconVisibleInMenu arg'1 arg'2 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
(
\x -> HoppyP.return $ if x then 1 else 0
) arg'2 >>= \arg'2' ->
(setIconVisibleInMenu' arg'1' arg'2')
setMenu :: (QActionPtr this, M448.QMenuPtr arg'2) => (this) {- ^ this -} -> (arg'2) -> (HoppyP.IO ())
setMenu arg'1 arg'2 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
HoppyFHR.withCppPtr (M448.toQMenu arg'2) $ \arg'2' ->
(setMenu' arg'1' arg'2')
setMenuRole :: (QActionPtr this) => (this) {- ^ this -} -> (QActionMenuRole) -> (HoppyP.IO ())
setMenuRole arg'1 arg'2 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
(
HoppyP.return . HoppyFHR.fromCppEnum
) arg'2 >>= \arg'2' ->
(setMenuRole' arg'1' arg'2')
setSeparator :: (QActionPtr this) => (this) {- ^ this -} -> (HoppyP.Bool) -> (HoppyP.IO ())
setSeparator arg'1 arg'2 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
(
\x -> HoppyP.return $ if x then 1 else 0
) arg'2 >>= \arg'2' ->
(setSeparator' arg'1' arg'2')
setDisabled :: (QActionPtr this) => (this) {- ^ this -} -> (HoppyP.Bool) -> (HoppyP.IO ())
setDisabled arg'1 arg'2 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
(
\x -> HoppyP.return $ if x then 1 else 0
) arg'2 >>= \arg'2' ->
(setDisabled' arg'1' arg'2')
setPriority :: (QActionPtr this) => (this) {- ^ this -} -> (QActionPriority) -> (HoppyP.IO ())
setPriority arg'1 arg'2 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
(
HoppyP.return . HoppyFHR.fromCppEnum
) arg'2 >>= \arg'2' ->
(setPriority' arg'1' arg'2')
showStatusText :: (QActionPtr this, M506.QWidgetPtr arg'2) => (this) {- ^ this -} -> (arg'2) -> (HoppyP.IO HoppyP.Bool)
showStatusText arg'1 arg'2 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
HoppyFHR.withCppPtr (M506.toQWidget arg'2) $ \arg'2' ->
(
(HoppyP.return . (/= 0))
) =<<
(showStatusText' arg'1' arg'2')
setStatusTip :: (QActionPtr this, M142.QStringValue arg'2) => (this) {- ^ this -} -> (arg'2) -> (HoppyP.IO ())
setStatusTip arg'1 arg'2 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
M142.withQStringPtr arg'2 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'2' ->
(setStatusTip' arg'1' arg'2')
setText :: (QActionPtr this, M142.QStringValue arg'2) => (this) {- ^ this -} -> (arg'2) -> (HoppyP.IO ())
setText arg'1 arg'2 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
M142.withQStringPtr arg'2 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'2' ->
(setText' arg'1' arg'2')
toggle :: (QActionPtr this) => (this) {- ^ this -} -> (HoppyP.IO ())
toggle arg'1 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
(toggle' arg'1')
setToolTip :: (QActionPtr this, M142.QStringValue arg'2) => (this) {- ^ this -} -> (arg'2) -> (HoppyP.IO ())
setToolTip arg'1 arg'2 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
M142.withQStringPtr arg'2 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'2' ->
(setToolTip' arg'1' arg'2')
trigger :: (QActionPtr this) => (this) {- ^ this -} -> (HoppyP.IO ())
trigger arg'1 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
(trigger' arg'1')
setVisible :: (QActionPtr this) => (this) {- ^ this -} -> (HoppyP.Bool) -> (HoppyP.IO ())
setVisible arg'1 arg'2 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
(
\x -> HoppyP.return $ if x then 1 else 0
) arg'2 >>= \arg'2' ->
(setVisible' arg'1' arg'2')
setWhatsThis :: (QActionPtr this, M142.QStringValue arg'2) => (this) {- ^ this -} -> (arg'2) -> (HoppyP.IO ())
setWhatsThis arg'1 arg'2 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
M142.withQStringPtr arg'2 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'2' ->
(setWhatsThis' arg'1' arg'2')
emitChanged :: (QActionPtr this) => (this) {- ^ this -} -> (HoppyP.IO ())
emitChanged arg'1 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
(emitChanged' arg'1')
emitHovered :: (QActionPtr this) => (this) {- ^ this -} -> (HoppyP.IO ())
emitHovered arg'1 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
(emitHovered' arg'1')
emitToggled :: (QActionPtr this) => (this) {- ^ this -} -> (HoppyP.Bool) -> (HoppyP.IO ())
emitToggled arg'1 arg'2 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
(
\x -> HoppyP.return $ if x then 1 else 0
) arg'2 >>= \arg'2' ->
(emitToggled' arg'1' arg'2')
emitTriggered :: (QActionPtr this) => (this) {- ^ this -} -> (HoppyP.Bool) -> (HoppyP.IO ())
emitTriggered arg'1 arg'2 =
HoppyFHR.withCppPtr (toQAction arg'1) $ \arg'1' ->
(
\x -> HoppyP.return $ if x then 1 else 0
) arg'2 >>= \arg'2' ->
(emitTriggered' arg'1' arg'2')
data QActionConst =
QActionConst (HoppyF.Ptr QActionConst)
| QActionConstGc (HoppyF.ForeignPtr ()) (HoppyF.Ptr QActionConst)
deriving (HoppyP.Show)
instance HoppyP.Eq QActionConst where
x == y = HoppyFHR.toPtr x == HoppyFHR.toPtr y
instance HoppyP.Ord QActionConst where
compare x y = HoppyP.compare (HoppyFHR.toPtr x) (HoppyFHR.toPtr y)
castQActionToConst :: QAction -> QActionConst
castQActionToConst (QAction ptr') = QActionConst $ HoppyF.castPtr ptr'
castQActionToConst (QActionGc fptr' ptr') = QActionConstGc fptr' $ HoppyF.castPtr ptr'
instance HoppyFHR.CppPtr QActionConst where
nullptr = QActionConst HoppyF.nullPtr
withCppPtr (QActionConst ptr') f' = f' ptr'
withCppPtr (QActionConstGc fptr' ptr') f' = HoppyF.withForeignPtr fptr' $ \_ -> f' ptr'
toPtr (QActionConst ptr') = ptr'
toPtr (QActionConstGc _ ptr') = ptr'
touchCppPtr (QActionConst _) = HoppyP.return ()
touchCppPtr (QActionConstGc fptr' _) = HoppyF.touchForeignPtr fptr'
instance HoppyFHR.Deletable QActionConst where
delete (QActionConst ptr') = delete'QAction ptr'
delete (QActionConstGc _ _) = HoppyP.fail $ HoppyP.concat ["Deletable.delete: Asked to delete a GC-managed ", "QActionConst", " object."]
toGc this'@(QActionConst ptr') = if ptr' == HoppyF.nullPtr then HoppyP.return this' else HoppyP.fmap (HoppyP.flip QActionConstGc ptr') $ HoppyF.newForeignPtr (HoppyF.castFunPtr deletePtr'QAction :: HoppyF.FunPtr (HoppyF.Ptr () -> HoppyP.IO ())) (HoppyF.castPtr ptr' :: HoppyF.Ptr ())
toGc this'@(QActionConstGc {}) = HoppyP.return this'
instance QActionConstPtr QActionConst where
toQActionConst = HoppyP.id
instance M94.QObjectConstPtr QActionConst where
toQObjectConst (QActionConst ptr') = M94.QObjectConst $ castQActionToQObject ptr'
toQObjectConst (QActionConstGc fptr' ptr') = M94.QObjectConstGc fptr' $ castQActionToQObject ptr'
data QAction =
QAction (HoppyF.Ptr QAction)
| QActionGc (HoppyF.ForeignPtr ()) (HoppyF.Ptr QAction)
deriving (HoppyP.Show)
instance HoppyP.Eq QAction where
x == y = HoppyFHR.toPtr x == HoppyFHR.toPtr y
instance HoppyP.Ord QAction where
compare x y = HoppyP.compare (HoppyFHR.toPtr x) (HoppyFHR.toPtr y)
castQActionToNonconst :: QActionConst -> QAction
castQActionToNonconst (QActionConst ptr') = QAction $ HoppyF.castPtr ptr'
castQActionToNonconst (QActionConstGc fptr' ptr') = QActionGc fptr' $ HoppyF.castPtr ptr'
instance HoppyFHR.CppPtr QAction where
nullptr = QAction HoppyF.nullPtr
withCppPtr (QAction ptr') f' = f' ptr'
withCppPtr (QActionGc fptr' ptr') f' = HoppyF.withForeignPtr fptr' $ \_ -> f' ptr'
toPtr (QAction ptr') = ptr'
toPtr (QActionGc _ ptr') = ptr'
touchCppPtr (QAction _) = HoppyP.return ()
touchCppPtr (QActionGc fptr' _) = HoppyF.touchForeignPtr fptr'
instance HoppyFHR.Deletable QAction where
delete (QAction ptr') = delete'QAction $ (HoppyF.castPtr ptr' :: HoppyF.Ptr QActionConst)
delete (QActionGc _ _) = HoppyP.fail $ HoppyP.concat ["Deletable.delete: Asked to delete a GC-managed ", "QAction", " object."]
toGc this'@(QAction ptr') = if ptr' == HoppyF.nullPtr then HoppyP.return this' else HoppyP.fmap (HoppyP.flip QActionGc ptr') $ HoppyF.newForeignPtr (HoppyF.castFunPtr deletePtr'QAction :: HoppyF.FunPtr (HoppyF.Ptr () -> HoppyP.IO ())) (HoppyF.castPtr ptr' :: HoppyF.Ptr ())
toGc this'@(QActionGc {}) = HoppyP.return this'
instance QActionConstPtr QAction where
toQActionConst (QAction ptr') = QActionConst $ (HoppyF.castPtr :: HoppyF.Ptr QAction -> HoppyF.Ptr QActionConst) ptr'
toQActionConst (QActionGc fptr' ptr') = QActionConstGc fptr' $ (HoppyF.castPtr :: HoppyF.Ptr QAction -> HoppyF.Ptr QActionConst) ptr'
instance QActionPtr QAction where
toQAction = HoppyP.id
instance M94.QObjectConstPtr QAction where
toQObjectConst (QAction ptr') = M94.QObjectConst $ castQActionToQObject $ (HoppyF.castPtr :: HoppyF.Ptr QAction -> HoppyF.Ptr QActionConst) ptr'
toQObjectConst (QActionGc fptr' ptr') = M94.QObjectConstGc fptr' $ castQActionToQObject $ (HoppyF.castPtr :: HoppyF.Ptr QAction -> HoppyF.Ptr QActionConst) ptr'
instance M94.QObjectPtr QAction where
toQObject (QAction ptr') = M94.QObject $ (HoppyF.castPtr :: HoppyF.Ptr M94.QObjectConst -> HoppyF.Ptr M94.QObject) $ castQActionToQObject $ (HoppyF.castPtr :: HoppyF.Ptr QAction -> HoppyF.Ptr QActionConst) ptr'
toQObject (QActionGc fptr' ptr') = M94.QObjectGc fptr' $ (HoppyF.castPtr :: HoppyF.Ptr M94.QObjectConst -> HoppyF.Ptr M94.QObject) $ castQActionToQObject $ (HoppyF.castPtr :: HoppyF.Ptr QAction -> HoppyF.Ptr QActionConst) ptr'
new :: (HoppyP.IO QAction)
new =
HoppyP.fmap QAction
(new')
newWithParent :: (M94.QObjectPtr arg'1) => (arg'1) -> (HoppyP.IO QAction)
newWithParent arg'1 =
HoppyFHR.withCppPtr (M94.toQObject arg'1) $ \arg'1' ->
HoppyP.fmap QAction
(newWithParent' arg'1')
newWithText :: (M142.QStringValue arg'1) => (arg'1) -> (HoppyP.IO QAction)
newWithText arg'1 =
M142.withQStringPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
HoppyP.fmap QAction
(newWithText' arg'1')
newWithTextAndParent :: (M142.QStringValue arg'1, M94.QObjectPtr arg'2) => (arg'1) -> (arg'2) -> (HoppyP.IO QAction)
newWithTextAndParent arg'1 arg'2 =
M142.withQStringPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
HoppyFHR.withCppPtr (M94.toQObject arg'2) $ \arg'2' ->
HoppyP.fmap QAction
(newWithTextAndParent' arg'1' arg'2')
newWithIconAndText :: (M288.QIconValue arg'1, M142.QStringValue arg'2) => (arg'1) -> (arg'2) -> (HoppyP.IO QAction)
newWithIconAndText arg'1 arg'2 =
M288.withQIconPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
M142.withQStringPtr arg'2 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'2' ->
HoppyP.fmap QAction
(newWithIconAndText' arg'1' arg'2')
newWithIconAndTextAndParent :: (M288.QIconValue arg'1, M142.QStringValue arg'2, M94.QObjectPtr arg'3) => (arg'1) -> (arg'2) -> (arg'3) -> (HoppyP.IO QAction)
newWithIconAndTextAndParent arg'1 arg'2 arg'3 =
M288.withQIconPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
M142.withQStringPtr arg'2 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'2' ->
HoppyFHR.withCppPtr (M94.toQObject arg'3) $ \arg'3' ->
HoppyP.fmap QAction
(newWithIconAndTextAndParent' arg'1' arg'2' arg'3')
class QActionSuper a where
downToQAction :: a -> QAction
instance QActionSuper M94.QObject where
downToQAction = castQActionToNonconst . cast' . M94.castQObjectToConst
where
cast' (M94.QObjectConst ptr') = QActionConst $ castQObjectToQAction ptr'
cast' (M94.QObjectConstGc fptr' ptr') = QActionConstGc fptr' $ castQObjectToQAction ptr'
class QActionSuperConst a where
downToQActionConst :: a -> QActionConst
instance QActionSuperConst M94.QObjectConst where
downToQActionConst = cast'
where
cast' (M94.QObjectConst ptr') = QActionConst $ castQObjectToQAction ptr'
cast' (M94.QObjectConstGc fptr' ptr') = QActionConstGc fptr' $ castQObjectToQAction ptr'
instance HoppyFHR.Assignable (HoppyF.Ptr (HoppyF.Ptr QAction)) QAction where
assign ptr' value' = HoppyF.poke ptr' $ HoppyFHR.toPtr value'
instance HoppyFHR.Decodable (HoppyF.Ptr (HoppyF.Ptr QAction)) QAction where
decode = HoppyP.fmap QAction . HoppyF.peek
data QActionActionEvent =
Trigger
| Hover
| UnknownQActionActionEvent (HoppyFC.CInt)
deriving (HoppyP.Show)
instance HoppyFHR.CppEnum (HoppyFC.CInt) QActionActionEvent where
fromCppEnum Trigger = 0
fromCppEnum Hover = 1
fromCppEnum (UnknownQActionActionEvent n) = n
toCppEnum (0) = Trigger
toCppEnum (1) = Hover
toCppEnum n = UnknownQActionActionEvent n
instance HoppyP.Eq QActionActionEvent where
x == y = HoppyFHR.fromCppEnum x == HoppyFHR.fromCppEnum y
instance HoppyP.Ord QActionActionEvent where
compare x y = HoppyP.compare (HoppyFHR.fromCppEnum x) (HoppyFHR.fromCppEnum y)
data QActionMenuRole =
NoRole
| TextHeuristicRole
| ApplicationSpecificRole
| AboutQtRole
| AboutRole
| PreferencesRole
| QuitRole
| UnknownQActionMenuRole (HoppyFC.CInt)
deriving (HoppyP.Show)
instance HoppyFHR.CppEnum (HoppyFC.CInt) QActionMenuRole where
fromCppEnum NoRole = 0
fromCppEnum TextHeuristicRole = 1
fromCppEnum ApplicationSpecificRole = 2
fromCppEnum AboutQtRole = 3
fromCppEnum AboutRole = 4
fromCppEnum PreferencesRole = 5
fromCppEnum QuitRole = 6
fromCppEnum (UnknownQActionMenuRole n) = n
toCppEnum (0) = NoRole
toCppEnum (1) = TextHeuristicRole
toCppEnum (2) = ApplicationSpecificRole
toCppEnum (3) = AboutQtRole
toCppEnum (4) = AboutRole
toCppEnum (5) = PreferencesRole
toCppEnum (6) = QuitRole
toCppEnum n = UnknownQActionMenuRole n
instance HoppyP.Eq QActionMenuRole where
x == y = HoppyFHR.fromCppEnum x == HoppyFHR.fromCppEnum y
instance HoppyP.Ord QActionMenuRole where
compare x y = HoppyP.compare (HoppyFHR.fromCppEnum x) (HoppyFHR.fromCppEnum y)
data QActionPriority =
LowPriority
| NormalPriority
| HighPriority
| UnknownQActionPriority (HoppyFC.CInt)
deriving (HoppyP.Show)
instance HoppyFHR.CppEnum (HoppyFC.CInt) QActionPriority where
fromCppEnum LowPriority = 0
fromCppEnum NormalPriority = 128
fromCppEnum HighPriority = 256
fromCppEnum (UnknownQActionPriority n) = n
toCppEnum (0) = LowPriority
toCppEnum (128) = NormalPriority
toCppEnum (256) = HighPriority
toCppEnum n = UnknownQActionPriority n
instance HoppyP.Eq QActionPriority where
x == y = HoppyFHR.fromCppEnum x == HoppyFHR.fromCppEnum y
instance HoppyP.Ord QActionPriority where
compare x y = HoppyP.compare (HoppyFHR.fromCppEnum x) (HoppyFHR.fromCppEnum y)