packages feed

qtah-qt5-0.8.0: src/Graphics/UI/Qtah/Generated/Widgets/QTreeWidgetItem.hs

{-# LANGUAGE FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MonoLocalBinds, MultiParamTypeClasses, ScopedTypeVariables, TypeSynonymInstances, UndecidableInstances #-}
---------- GENERATED FILE, EDITS WILL BE LOST ----------

module Graphics.UI.Qtah.Generated.Widgets.QTreeWidgetItem (
  QTreeWidgetItemValue (..),
  QTreeWidgetItemConstPtr (..),
  background,
  checkState,
  child,
  childCount,
  childIndicatorPolicy,
  clone,
  columnCount,
  getData,
  flags,
  font,
  foreground,
  icon,
  indexOfChild,
  isDisabled,
  isExpanded,
  isFirstColumnSpanned,
  isHidden,
  isSelected,
  parent,
  sizeHint,
  statusTip,
  text,
  textAlignment,
  toolTip,
  treeWidget,
  getType,
  whatsThis,
  QTreeWidgetItemPtr (..),
  addChild,
  addChildren,
  insertChild,
  insertChildren,
  removeChild,
  setBackground,
  setCheckState,
  setChildIndicatorPolicy,
  setData,
  setDisabled,
  setExpanded,
  setFirstColumnSpanned,
  setFlags,
  setFont,
  setForeground,
  setHidden,
  setIcon,
  setSelected,
  setSizeHint,
  setStatusTip,
  setText,
  setTextAlignment,
  setToolTip,
  setWhatsThis,
  sortChildren,
  takeChild,
  takeChildren,
  lT,
  aSSIGN,
  QTreeWidgetItemConst (..),
  castQTreeWidgetItemToConst,
  QTreeWidgetItem (..),
  castQTreeWidgetItemToNonconst,
  new,
  newWithType,
  newWithStrings,
  newWithStringsAndType,
  newWithParentTree,
  newWithParentTreeAndType,
  newWithParentTreeAndStrings,
  newWithParentTreeAndStringsAndType,
  newWithParentItem,
  newWithParentItemAndType,
  newWithParentItemAndStrings,
  newWithParentItemAndStringsAndType,
  QTreeWidgetItemSuper (..),
  QTreeWidgetItemSuperConst (..),
  QTreeWidgetItemChildIndicatorPolicy (..),
  QTreeWidgetItemItemType (..),
  ) where

import qualified Foreign as HoppyF
import qualified Foreign.C as HoppyFC
import qualified Foreign.Hoppy.Runtime as HoppyFHR
import qualified Graphics.UI.Qtah.Core.HSize as HSize
import qualified Graphics.UI.Qtah.Flags as QtahFlags
import {-# SOURCE #-} qualified Graphics.UI.Qtah.Generated.Core.QList.QTreeWidgetItem as M212
import qualified Graphics.UI.Qtah.Generated.Core.QSize as M134
import qualified Graphics.UI.Qtah.Generated.Core.QString as M142
import qualified Graphics.UI.Qtah.Generated.Core.QStringList as M144
import qualified Graphics.UI.Qtah.Generated.Core.QVariant as M168
import qualified Graphics.UI.Qtah.Generated.Core.Types as M190
import {-# SOURCE #-} qualified Graphics.UI.Qtah.Generated.Gui.QBrush as M246
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.QTreeWidget as M500
import Prelude (($), (.), (/=), (=<<), (==), (>>), (>>=))
import qualified Prelude as HoppyP
import qualified Prelude as QtahP

foreign import ccall "genpop__QTreeWidgetItem_new" new' ::  HoppyP.IO (HoppyF.Ptr QTreeWidgetItem)
foreign import ccall "genpop__QTreeWidgetItem_newWithType" newWithType' ::  HoppyFC.CInt -> HoppyP.IO (HoppyF.Ptr QTreeWidgetItem)
foreign import ccall "genpop__QTreeWidgetItem_newWithStrings" newWithStrings' ::  HoppyF.Ptr M144.QStringListConst -> HoppyP.IO (HoppyF.Ptr QTreeWidgetItem)
foreign import ccall "genpop__QTreeWidgetItem_newWithStringsAndType" newWithStringsAndType' ::  HoppyF.Ptr M144.QStringListConst -> HoppyFC.CInt -> HoppyP.IO (HoppyF.Ptr QTreeWidgetItem)
foreign import ccall "genpop__QTreeWidgetItem_newWithParentTree" newWithParentTree' ::  HoppyF.Ptr M500.QTreeWidget -> HoppyP.IO (HoppyF.Ptr QTreeWidgetItem)
foreign import ccall "genpop__QTreeWidgetItem_newWithParentTreeAndType" newWithParentTreeAndType' ::  HoppyF.Ptr M500.QTreeWidget -> HoppyFC.CInt -> HoppyP.IO (HoppyF.Ptr QTreeWidgetItem)
foreign import ccall "genpop__QTreeWidgetItem_newWithParentTreeAndStrings" newWithParentTreeAndStrings' ::  HoppyF.Ptr M500.QTreeWidget -> HoppyF.Ptr M144.QStringListConst -> HoppyP.IO (HoppyF.Ptr QTreeWidgetItem)
foreign import ccall "genpop__QTreeWidgetItem_newWithParentTreeAndStringsAndType" newWithParentTreeAndStringsAndType' ::  HoppyF.Ptr M500.QTreeWidget -> HoppyF.Ptr M144.QStringListConst -> HoppyFC.CInt -> HoppyP.IO (HoppyF.Ptr QTreeWidgetItem)
foreign import ccall "genpop__QTreeWidgetItem_newWithParentItem" newWithParentItem' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyP.IO (HoppyF.Ptr QTreeWidgetItem)
foreign import ccall "genpop__QTreeWidgetItem_newWithParentItemAndType" newWithParentItemAndType' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CInt -> HoppyP.IO (HoppyF.Ptr QTreeWidgetItem)
foreign import ccall "genpop__QTreeWidgetItem_newWithParentItemAndStrings" newWithParentItemAndStrings' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyF.Ptr M144.QStringListConst -> HoppyP.IO (HoppyF.Ptr QTreeWidgetItem)
foreign import ccall "genpop__QTreeWidgetItem_newWithParentItemAndStringsAndType" newWithParentItemAndStringsAndType' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyF.Ptr M144.QStringListConst -> HoppyFC.CInt -> HoppyP.IO (HoppyF.Ptr QTreeWidgetItem)
foreign import ccall "genpop__QTreeWidgetItem_addChild" addChild' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyF.Ptr QTreeWidgetItem -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_addChildren" addChildren' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyF.Ptr M212.QListQTreeWidgetItemConst -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_background" background' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyFC.CInt -> HoppyP.IO (HoppyF.Ptr M246.QBrushConst)
foreign import ccall "genpop__QTreeWidgetItem_checkState" checkState' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyFC.CInt -> HoppyP.IO HoppyFC.CInt
foreign import ccall "genpop__QTreeWidgetItem_child" child' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyFC.CInt -> HoppyP.IO (HoppyF.Ptr QTreeWidgetItem)
foreign import ccall "genpop__QTreeWidgetItem_childCount" childCount' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyP.IO HoppyFC.CInt
foreign import ccall "genpop__QTreeWidgetItem_childIndicatorPolicy" childIndicatorPolicy' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyP.IO HoppyFC.CInt
foreign import ccall "genpop__QTreeWidgetItem_clone" clone' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyP.IO (HoppyF.Ptr QTreeWidgetItem)
foreign import ccall "genpop__QTreeWidgetItem_columnCount" columnCount' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyP.IO HoppyFC.CInt
foreign import ccall "genpop__QTreeWidgetItem_getData" getData' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyFC.CInt -> HoppyFC.CInt -> HoppyP.IO (HoppyF.Ptr M168.QVariantConst)
foreign import ccall "genpop__QTreeWidgetItem_flags" flags' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyP.IO HoppyFC.CInt
foreign import ccall "genpop__QTreeWidgetItem_font" font' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyFC.CInt -> HoppyP.IO (HoppyF.Ptr M276.QFontConst)
foreign import ccall "genpop__QTreeWidgetItem_foreground" foreground' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyFC.CInt -> HoppyP.IO (HoppyF.Ptr M246.QBrushConst)
foreign import ccall "genpop__QTreeWidgetItem_icon" icon' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyFC.CInt -> HoppyP.IO (HoppyF.Ptr M288.QIconConst)
foreign import ccall "genpop__QTreeWidgetItem_indexOfChild" indexOfChild' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyF.Ptr QTreeWidgetItem -> HoppyP.IO HoppyFC.CInt
foreign import ccall "genpop__QTreeWidgetItem_insertChild" insertChild' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CInt -> HoppyF.Ptr QTreeWidgetItem -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_insertChildren" insertChildren' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CInt -> HoppyF.Ptr M212.QListQTreeWidgetItemConst -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_isDisabled" isDisabled' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyP.IO HoppyFC.CBool
foreign import ccall "genpop__QTreeWidgetItem_isExpanded" isExpanded' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyP.IO HoppyFC.CBool
foreign import ccall "genpop__QTreeWidgetItem_isFirstColumnSpanned" isFirstColumnSpanned' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyP.IO HoppyFC.CBool
foreign import ccall "genpop__QTreeWidgetItem_isHidden" isHidden' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyP.IO HoppyFC.CBool
foreign import ccall "genpop__QTreeWidgetItem_isSelected" isSelected' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyP.IO HoppyFC.CBool
foreign import ccall "genpop__QTreeWidgetItem_parent" parent' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyP.IO (HoppyF.Ptr QTreeWidgetItem)
foreign import ccall "genpop__QTreeWidgetItem_removeChild" removeChild' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyF.Ptr QTreeWidgetItem -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_setBackground" setBackground' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CInt -> HoppyF.Ptr M246.QBrushConst -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_setCheckState" setCheckState' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CInt -> HoppyFC.CInt -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_setChildIndicatorPolicy" setChildIndicatorPolicy' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CInt -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_setData" setData' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CInt -> HoppyFC.CInt -> HoppyF.Ptr M168.QVariantConst -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_setDisabled" setDisabled' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CBool -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_setExpanded" setExpanded' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CBool -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_setFirstColumnSpanned" setFirstColumnSpanned' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CBool -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_setFlags" setFlags' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CInt -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_setFont" setFont' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CInt -> HoppyF.Ptr M276.QFontConst -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_setForeground" setForeground' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CInt -> HoppyF.Ptr M246.QBrushConst -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_setHidden" setHidden' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CBool -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_setIcon" setIcon' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CInt -> HoppyF.Ptr M288.QIconConst -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_setSelected" setSelected' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CBool -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_setSizeHint" setSizeHint' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CInt -> HoppyF.Ptr M134.QSizeConst -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_setStatusTip" setStatusTip' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CInt -> HoppyF.Ptr M142.QStringConst -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_setText" setText' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CInt -> HoppyF.Ptr M142.QStringConst -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_setTextAlignment" setTextAlignment' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CInt -> HoppyFC.CInt -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_setToolTip" setToolTip' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CInt -> HoppyF.Ptr M142.QStringConst -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_setWhatsThis" setWhatsThis' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CInt -> HoppyF.Ptr M142.QStringConst -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_sizeHint" sizeHint' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyFC.CInt -> HoppyP.IO (HoppyF.Ptr M134.QSizeConst)
foreign import ccall "genpop__QTreeWidgetItem_sortChildren" sortChildren' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CInt -> HoppyFC.CInt -> HoppyP.IO ()
foreign import ccall "genpop__QTreeWidgetItem_statusTip" statusTip' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyFC.CInt -> HoppyP.IO (HoppyF.Ptr M142.QStringConst)
foreign import ccall "genpop__QTreeWidgetItem_takeChild" takeChild' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyFC.CInt -> HoppyP.IO (HoppyF.Ptr QTreeWidgetItem)
foreign import ccall "genpop__QTreeWidgetItem_takeChildren" takeChildren' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyP.IO (HoppyF.Ptr M212.QListQTreeWidgetItemConst)
foreign import ccall "genpop__QTreeWidgetItem_text" text' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyFC.CInt -> HoppyP.IO (HoppyF.Ptr M142.QStringConst)
foreign import ccall "genpop__QTreeWidgetItem_textAlignment" textAlignment' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyFC.CInt -> HoppyP.IO HoppyFC.CInt
foreign import ccall "genpop__QTreeWidgetItem_toolTip" toolTip' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyFC.CInt -> HoppyP.IO (HoppyF.Ptr M142.QStringConst)
foreign import ccall "genpop__QTreeWidgetItem_treeWidget" treeWidget' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyP.IO (HoppyF.Ptr M500.QTreeWidget)
foreign import ccall "genpop__QTreeWidgetItem_getType" getType' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyP.IO HoppyFC.CInt
foreign import ccall "genpop__QTreeWidgetItem_whatsThis" whatsThis' ::  HoppyF.Ptr QTreeWidgetItemConst -> HoppyFC.CInt -> HoppyP.IO (HoppyF.Ptr M142.QStringConst)
foreign import ccall "genpop__QTreeWidgetItem_LT" lT' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyF.Ptr QTreeWidgetItemConst -> HoppyP.IO HoppyFC.CBool
foreign import ccall "genpop__QTreeWidgetItem_ASSIGN" aSSIGN' ::  HoppyF.Ptr QTreeWidgetItem -> HoppyF.Ptr QTreeWidgetItemConst -> HoppyP.IO (HoppyF.Ptr QTreeWidgetItem)
foreign import ccall "gendel__QTreeWidgetItem" delete'QTreeWidgetItem :: HoppyF.Ptr QTreeWidgetItemConst -> HoppyP.IO ()
foreign import ccall "&gendel__QTreeWidgetItem" deletePtr'QTreeWidgetItem :: HoppyF.FunPtr (HoppyF.Ptr QTreeWidgetItemConst -> HoppyP.IO ())

class QTreeWidgetItemValue a where
  withQTreeWidgetItemPtr :: a -> (QTreeWidgetItemConst -> HoppyP.IO b) -> HoppyP.IO b

instance {-# OVERLAPPABLE #-} QTreeWidgetItemConstPtr a => QTreeWidgetItemValue a where
  withQTreeWidgetItemPtr = HoppyP.flip ($) . toQTreeWidgetItemConst

class (HoppyFHR.CppPtr this) => QTreeWidgetItemConstPtr this where
  toQTreeWidgetItemConst :: this -> QTreeWidgetItemConst

background :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.Int) -> (HoppyP.IO M246.QBrush)
background arg'1 arg'2 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  (HoppyFHR.decodeAndDelete . M246.QBrushConst) =<<
  (background' arg'1' arg'2')

checkState :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.Int) -> (HoppyP.IO M190.QtCheckState)
checkState arg'1 arg'2 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  (
    HoppyP.return . HoppyFHR.toCppEnum
  ) =<<
  (checkState' arg'1' arg'2')

child :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.Int) -> (HoppyP.IO QTreeWidgetItem)
child arg'1 arg'2 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  HoppyP.fmap QTreeWidgetItem
  (child' arg'1' arg'2')

childCount :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.IO HoppyP.Int)
childCount arg'1 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) =<<
  (childCount' arg'1')

childIndicatorPolicy :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.IO QTreeWidgetItemChildIndicatorPolicy)
childIndicatorPolicy arg'1 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.toCppEnum
  ) =<<
  (childIndicatorPolicy' arg'1')

clone :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.IO QTreeWidgetItem)
clone arg'1 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  HoppyP.fmap QTreeWidgetItem
  (clone' arg'1')

columnCount :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.IO HoppyP.Int)
columnCount arg'1 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) =<<
  (columnCount' arg'1')

getData :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.Int) -> (HoppyP.Int) -> (HoppyP.IO M168.QVariant)
getData arg'1 arg'2 arg'3 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'3 >>= \arg'3' ->
  (HoppyFHR.decodeAndDelete . M168.QVariantConst) =<<
  (getData' arg'1' arg'2' arg'3')

flags :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.IO M190.QtItemFlags)
flags arg'1 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    QtahP.return . QtahFlags.numToFlags
  ) =<<
  (flags' arg'1')

font :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.Int) -> (HoppyP.IO M276.QFont)
font arg'1 arg'2 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  (HoppyFHR.decodeAndDelete . M276.QFontConst) =<<
  (font' arg'1' arg'2')

foreground :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.Int) -> (HoppyP.IO M246.QBrush)
foreground arg'1 arg'2 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  (HoppyFHR.decodeAndDelete . M246.QBrushConst) =<<
  (foreground' arg'1' arg'2')

icon :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.Int) -> (HoppyP.IO M288.QIcon)
icon arg'1 arg'2 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  (HoppyFHR.decodeAndDelete . M288.QIconConst) =<<
  (icon' arg'1' arg'2')

indexOfChild :: (QTreeWidgetItemValue this, QTreeWidgetItemPtr arg'2) => (this) {- ^ this -} -> (arg'2) -> (HoppyP.IO HoppyP.Int)
indexOfChild arg'1 arg'2 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'2) $ \arg'2' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) =<<
  (indexOfChild' arg'1' arg'2')

isDisabled :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.IO HoppyP.Bool)
isDisabled arg'1 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    (HoppyP.return . (/= 0))
  ) =<<
  (isDisabled' arg'1')

isExpanded :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.IO HoppyP.Bool)
isExpanded arg'1 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    (HoppyP.return . (/= 0))
  ) =<<
  (isExpanded' arg'1')

isFirstColumnSpanned :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.IO HoppyP.Bool)
isFirstColumnSpanned arg'1 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    (HoppyP.return . (/= 0))
  ) =<<
  (isFirstColumnSpanned' arg'1')

isHidden :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.IO HoppyP.Bool)
isHidden arg'1 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    (HoppyP.return . (/= 0))
  ) =<<
  (isHidden' arg'1')

isSelected :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.IO HoppyP.Bool)
isSelected arg'1 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    (HoppyP.return . (/= 0))
  ) =<<
  (isSelected' arg'1')

parent :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.IO QTreeWidgetItem)
parent arg'1 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  HoppyP.fmap QTreeWidgetItem
  (parent' arg'1')

sizeHint :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.Int) -> (HoppyP.IO HSize.HSize)
sizeHint arg'1 arg'2 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  (HoppyFHR.decodeAndDelete . M134.QSizeConst) =<<
  (sizeHint' arg'1' arg'2')

statusTip :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.Int) -> (HoppyP.IO QtahP.String)
statusTip arg'1 arg'2 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  (HoppyFHR.decodeAndDelete . M142.QStringConst) =<<
  (statusTip' arg'1' arg'2')

text :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.Int) -> (HoppyP.IO QtahP.String)
text arg'1 arg'2 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  (HoppyFHR.decodeAndDelete . M142.QStringConst) =<<
  (text' arg'1' arg'2')

textAlignment :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.Int) -> (HoppyP.IO HoppyP.Int)
textAlignment arg'1 arg'2 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) =<<
  (textAlignment' arg'1' arg'2')

toolTip :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.Int) -> (HoppyP.IO QtahP.String)
toolTip arg'1 arg'2 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  (HoppyFHR.decodeAndDelete . M142.QStringConst) =<<
  (toolTip' arg'1' arg'2')

treeWidget :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.IO M500.QTreeWidget)
treeWidget arg'1 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  HoppyP.fmap M500.QTreeWidget
  (treeWidget' arg'1')

getType :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.IO HoppyP.Int)
getType arg'1 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) =<<
  (getType' arg'1')

whatsThis :: (QTreeWidgetItemValue this) => (this) {- ^ this -} -> (HoppyP.Int) -> (HoppyP.IO QtahP.String)
whatsThis arg'1 arg'2 =
  withQTreeWidgetItemPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  (HoppyFHR.decodeAndDelete . M142.QStringConst) =<<
  (whatsThis' arg'1' arg'2')

class (QTreeWidgetItemConstPtr this) => QTreeWidgetItemPtr this where
  toQTreeWidgetItem :: this -> QTreeWidgetItem

addChild :: (QTreeWidgetItemPtr this, QTreeWidgetItemPtr arg'2) => (this) {- ^ this -} -> (arg'2) -> (HoppyP.IO ())
addChild arg'1 arg'2 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'2) $ \arg'2' ->
  (addChild' arg'1' arg'2')

addChildren :: (QTreeWidgetItemPtr this, M212.QListQTreeWidgetItemValue arg'2) => (this) {- ^ this -} -> (arg'2) -> (HoppyP.IO ())
addChildren arg'1 arg'2 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  M212.withQListQTreeWidgetItemPtr arg'2 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'2' ->
  (addChildren' arg'1' arg'2')

insertChild :: (QTreeWidgetItemPtr this, QTreeWidgetItemPtr arg'3) => (this) {- ^ this -} -> (HoppyP.Int) -> (arg'3) -> (HoppyP.IO ())
insertChild arg'1 arg'2 arg'3 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'3) $ \arg'3' ->
  (insertChild' arg'1' arg'2' arg'3')

insertChildren :: (QTreeWidgetItemPtr this, M212.QListQTreeWidgetItemValue arg'3) => (this) {- ^ this -} -> (HoppyP.Int) -> (arg'3) -> (HoppyP.IO ())
insertChildren arg'1 arg'2 arg'3 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  M212.withQListQTreeWidgetItemPtr arg'3 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'3' ->
  (insertChildren' arg'1' arg'2' arg'3')

removeChild :: (QTreeWidgetItemPtr this, QTreeWidgetItemPtr arg'2) => (this) {- ^ this -} -> (arg'2) -> (HoppyP.IO ())
removeChild arg'1 arg'2 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'2) $ \arg'2' ->
  (removeChild' arg'1' arg'2')

setBackground :: (QTreeWidgetItemPtr this, M246.QBrushValue arg'3) => (this) {- ^ this -} -> (HoppyP.Int) -> (arg'3) -> (HoppyP.IO ())
setBackground arg'1 arg'2 arg'3 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  M246.withQBrushPtr arg'3 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'3' ->
  (setBackground' arg'1' arg'2' arg'3')

setCheckState :: (QTreeWidgetItemPtr this) => (this) {- ^ this -} -> (HoppyP.Int) -> (M190.QtCheckState) -> (HoppyP.IO ())
setCheckState arg'1 arg'2 arg'3 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  (
    HoppyP.return . HoppyFHR.fromCppEnum
  ) arg'3 >>= \arg'3' ->
  (setCheckState' arg'1' arg'2' arg'3')

setChildIndicatorPolicy :: (QTreeWidgetItemPtr this) => (this) {- ^ this -} -> (QTreeWidgetItemChildIndicatorPolicy) -> (HoppyP.IO ())
setChildIndicatorPolicy arg'1 arg'2 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.fromCppEnum
  ) arg'2 >>= \arg'2' ->
  (setChildIndicatorPolicy' arg'1' arg'2')

setData :: (QTreeWidgetItemPtr this, M168.QVariantValue arg'4) => (this) {- ^ this -} -> (HoppyP.Int) -> (HoppyP.Int) -> (arg'4) -> (HoppyP.IO ())
setData arg'1 arg'2 arg'3 arg'4 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'3 >>= \arg'3' ->
  M168.withQVariantPtr arg'4 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'4' ->
  (setData' arg'1' arg'2' arg'3' arg'4')

setDisabled :: (QTreeWidgetItemPtr this) => (this) {- ^ this -} -> (HoppyP.Bool) -> (HoppyP.IO ())
setDisabled arg'1 arg'2 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    \x -> HoppyP.return $ if x then 1 else 0
  ) arg'2 >>= \arg'2' ->
  (setDisabled' arg'1' arg'2')

setExpanded :: (QTreeWidgetItemPtr this) => (this) {- ^ this -} -> (HoppyP.Bool) -> (HoppyP.IO ())
setExpanded arg'1 arg'2 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    \x -> HoppyP.return $ if x then 1 else 0
  ) arg'2 >>= \arg'2' ->
  (setExpanded' arg'1' arg'2')

setFirstColumnSpanned :: (QTreeWidgetItemPtr this) => (this) {- ^ this -} -> (HoppyP.Bool) -> (HoppyP.IO ())
setFirstColumnSpanned arg'1 arg'2 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    \x -> HoppyP.return $ if x then 1 else 0
  ) arg'2 >>= \arg'2' ->
  (setFirstColumnSpanned' arg'1' arg'2')

setFlags :: (QTreeWidgetItemPtr this, M190.IsQtItemFlags arg'2) => (this) {- ^ this -} -> (arg'2) -> (HoppyP.IO ())
setFlags arg'1 arg'2 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    QtahP.return . QtahFlags.flagsToNum . M190.toQtItemFlags
  ) arg'2 >>= \arg'2' ->
  (setFlags' arg'1' arg'2')

setFont :: (QTreeWidgetItemPtr this, M276.QFontValue arg'3) => (this) {- ^ this -} -> (HoppyP.Int) -> (arg'3) -> (HoppyP.IO ())
setFont arg'1 arg'2 arg'3 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  M276.withQFontPtr arg'3 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'3' ->
  (setFont' arg'1' arg'2' arg'3')

setForeground :: (QTreeWidgetItemPtr this, M246.QBrushValue arg'3) => (this) {- ^ this -} -> (HoppyP.Int) -> (arg'3) -> (HoppyP.IO ())
setForeground arg'1 arg'2 arg'3 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  M246.withQBrushPtr arg'3 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'3' ->
  (setForeground' arg'1' arg'2' arg'3')

setHidden :: (QTreeWidgetItemPtr this) => (this) {- ^ this -} -> (HoppyP.Bool) -> (HoppyP.IO ())
setHidden arg'1 arg'2 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    \x -> HoppyP.return $ if x then 1 else 0
  ) arg'2 >>= \arg'2' ->
  (setHidden' arg'1' arg'2')

setIcon :: (QTreeWidgetItemPtr this, M288.QIconValue arg'3) => (this) {- ^ this -} -> (HoppyP.Int) -> (arg'3) -> (HoppyP.IO ())
setIcon arg'1 arg'2 arg'3 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  M288.withQIconPtr arg'3 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'3' ->
  (setIcon' arg'1' arg'2' arg'3')

setSelected :: (QTreeWidgetItemPtr this) => (this) {- ^ this -} -> (HoppyP.Bool) -> (HoppyP.IO ())
setSelected arg'1 arg'2 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    \x -> HoppyP.return $ if x then 1 else 0
  ) arg'2 >>= \arg'2' ->
  (setSelected' arg'1' arg'2')

setSizeHint :: (QTreeWidgetItemPtr this, M134.QSizeValue arg'3) => (this) {- ^ this -} -> (HoppyP.Int) -> (arg'3) -> (HoppyP.IO ())
setSizeHint arg'1 arg'2 arg'3 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  M134.withQSizePtr arg'3 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'3' ->
  (setSizeHint' arg'1' arg'2' arg'3')

setStatusTip :: (QTreeWidgetItemPtr this, M142.QStringValue arg'3) => (this) {- ^ this -} -> (HoppyP.Int) -> (arg'3) -> (HoppyP.IO ())
setStatusTip arg'1 arg'2 arg'3 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  M142.withQStringPtr arg'3 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'3' ->
  (setStatusTip' arg'1' arg'2' arg'3')

setText :: (QTreeWidgetItemPtr this, M142.QStringValue arg'3) => (this) {- ^ this -} -> (HoppyP.Int) -> (arg'3) -> (HoppyP.IO ())
setText arg'1 arg'2 arg'3 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  M142.withQStringPtr arg'3 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'3' ->
  (setText' arg'1' arg'2' arg'3')

setTextAlignment :: (QTreeWidgetItemPtr this) => (this) {- ^ this -} -> (HoppyP.Int) -> (HoppyP.Int) -> (HoppyP.IO ())
setTextAlignment arg'1 arg'2 arg'3 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'3 >>= \arg'3' ->
  (setTextAlignment' arg'1' arg'2' arg'3')

setToolTip :: (QTreeWidgetItemPtr this, M142.QStringValue arg'3) => (this) {- ^ this -} -> (HoppyP.Int) -> (arg'3) -> (HoppyP.IO ())
setToolTip arg'1 arg'2 arg'3 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  M142.withQStringPtr arg'3 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'3' ->
  (setToolTip' arg'1' arg'2' arg'3')

setWhatsThis :: (QTreeWidgetItemPtr this, M142.QStringValue arg'3) => (this) {- ^ this -} -> (HoppyP.Int) -> (arg'3) -> (HoppyP.IO ())
setWhatsThis arg'1 arg'2 arg'3 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  M142.withQStringPtr arg'3 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'3' ->
  (setWhatsThis' arg'1' arg'2' arg'3')

sortChildren :: (QTreeWidgetItemPtr this) => (this) {- ^ this -} -> (HoppyP.Int) -> (M190.QtSortOrder) -> (HoppyP.IO ())
sortChildren arg'1 arg'2 arg'3 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  (
    HoppyP.return . HoppyFHR.fromCppEnum
  ) arg'3 >>= \arg'3' ->
  (sortChildren' arg'1' arg'2' arg'3')

takeChild :: (QTreeWidgetItemPtr this) => (this) {- ^ this -} -> (HoppyP.Int) -> (HoppyP.IO QTreeWidgetItem)
takeChild arg'1 arg'2 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  HoppyP.fmap QTreeWidgetItem
  (takeChild' arg'1' arg'2')

takeChildren :: (QTreeWidgetItemPtr this) => (this) {- ^ this -} -> (HoppyP.IO [QTreeWidgetItem])
takeChildren arg'1 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (HoppyFHR.decodeAndDelete . M212.QListQTreeWidgetItemConst) =<<
  (takeChildren' arg'1')

lT :: (QTreeWidgetItemPtr this, QTreeWidgetItemValue arg'2) => (this) {- ^ this -} -> (arg'2) -> (HoppyP.IO HoppyP.Bool)
lT arg'1 arg'2 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  withQTreeWidgetItemPtr arg'2 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'2' ->
  (
    (HoppyP.return . (/= 0))
  ) =<<
  (lT' arg'1' arg'2')

aSSIGN :: (QTreeWidgetItemPtr this, QTreeWidgetItemValue arg'2) => (this) {- ^ this -} -> (arg'2) -> (HoppyP.IO QTreeWidgetItem)
aSSIGN arg'1 arg'2 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  withQTreeWidgetItemPtr arg'2 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'2' ->
  HoppyP.fmap QTreeWidgetItem
  (aSSIGN' arg'1' arg'2')

data QTreeWidgetItemConst =
    QTreeWidgetItemConst (HoppyF.Ptr QTreeWidgetItemConst)
  | QTreeWidgetItemConstGc (HoppyF.ForeignPtr ()) (HoppyF.Ptr QTreeWidgetItemConst)
  deriving (HoppyP.Show)

instance HoppyP.Eq QTreeWidgetItemConst where
  x == y = HoppyFHR.toPtr x == HoppyFHR.toPtr y

instance HoppyP.Ord QTreeWidgetItemConst where
  compare x y = HoppyP.compare (HoppyFHR.toPtr x) (HoppyFHR.toPtr y)

castQTreeWidgetItemToConst :: QTreeWidgetItem -> QTreeWidgetItemConst
castQTreeWidgetItemToConst (QTreeWidgetItem ptr') = QTreeWidgetItemConst $ HoppyF.castPtr ptr'
castQTreeWidgetItemToConst (QTreeWidgetItemGc fptr' ptr') = QTreeWidgetItemConstGc fptr' $ HoppyF.castPtr ptr'

instance HoppyFHR.CppPtr QTreeWidgetItemConst where
  nullptr = QTreeWidgetItemConst HoppyF.nullPtr
  
  withCppPtr (QTreeWidgetItemConst ptr') f' = f' ptr'
  withCppPtr (QTreeWidgetItemConstGc fptr' ptr') f' = HoppyF.withForeignPtr fptr' $ \_ -> f' ptr'
  
  toPtr (QTreeWidgetItemConst ptr') = ptr'
  toPtr (QTreeWidgetItemConstGc _ ptr') = ptr'
  
  touchCppPtr (QTreeWidgetItemConst _) = HoppyP.return ()
  touchCppPtr (QTreeWidgetItemConstGc fptr' _) = HoppyF.touchForeignPtr fptr'

instance HoppyFHR.Deletable QTreeWidgetItemConst where
  delete (QTreeWidgetItemConst ptr') = delete'QTreeWidgetItem ptr'
  delete (QTreeWidgetItemConstGc _ _) = HoppyP.fail $ HoppyP.concat ["Deletable.delete: Asked to delete a GC-managed ", "QTreeWidgetItemConst", " object."]
  
  toGc this'@(QTreeWidgetItemConst ptr') = if ptr' == HoppyF.nullPtr then HoppyP.return this' else HoppyP.fmap (HoppyP.flip QTreeWidgetItemConstGc ptr') $ HoppyF.newForeignPtr (HoppyF.castFunPtr deletePtr'QTreeWidgetItem :: HoppyF.FunPtr (HoppyF.Ptr () -> HoppyP.IO ())) (HoppyF.castPtr ptr' :: HoppyF.Ptr ())
  toGc this'@(QTreeWidgetItemConstGc {}) = HoppyP.return this'

instance QTreeWidgetItemConstPtr QTreeWidgetItemConst where
  toQTreeWidgetItemConst = HoppyP.id

data QTreeWidgetItem =
    QTreeWidgetItem (HoppyF.Ptr QTreeWidgetItem)
  | QTreeWidgetItemGc (HoppyF.ForeignPtr ()) (HoppyF.Ptr QTreeWidgetItem)
  deriving (HoppyP.Show)

instance HoppyP.Eq QTreeWidgetItem where
  x == y = HoppyFHR.toPtr x == HoppyFHR.toPtr y

instance HoppyP.Ord QTreeWidgetItem where
  compare x y = HoppyP.compare (HoppyFHR.toPtr x) (HoppyFHR.toPtr y)

castQTreeWidgetItemToNonconst :: QTreeWidgetItemConst -> QTreeWidgetItem
castQTreeWidgetItemToNonconst (QTreeWidgetItemConst ptr') = QTreeWidgetItem $ HoppyF.castPtr ptr'
castQTreeWidgetItemToNonconst (QTreeWidgetItemConstGc fptr' ptr') = QTreeWidgetItemGc fptr' $ HoppyF.castPtr ptr'

instance HoppyFHR.CppPtr QTreeWidgetItem where
  nullptr = QTreeWidgetItem HoppyF.nullPtr
  
  withCppPtr (QTreeWidgetItem ptr') f' = f' ptr'
  withCppPtr (QTreeWidgetItemGc fptr' ptr') f' = HoppyF.withForeignPtr fptr' $ \_ -> f' ptr'
  
  toPtr (QTreeWidgetItem ptr') = ptr'
  toPtr (QTreeWidgetItemGc _ ptr') = ptr'
  
  touchCppPtr (QTreeWidgetItem _) = HoppyP.return ()
  touchCppPtr (QTreeWidgetItemGc fptr' _) = HoppyF.touchForeignPtr fptr'

instance HoppyFHR.Deletable QTreeWidgetItem where
  delete (QTreeWidgetItem ptr') = delete'QTreeWidgetItem $ (HoppyF.castPtr ptr' :: HoppyF.Ptr QTreeWidgetItemConst)
  delete (QTreeWidgetItemGc _ _) = HoppyP.fail $ HoppyP.concat ["Deletable.delete: Asked to delete a GC-managed ", "QTreeWidgetItem", " object."]
  
  toGc this'@(QTreeWidgetItem ptr') = if ptr' == HoppyF.nullPtr then HoppyP.return this' else HoppyP.fmap (HoppyP.flip QTreeWidgetItemGc ptr') $ HoppyF.newForeignPtr (HoppyF.castFunPtr deletePtr'QTreeWidgetItem :: HoppyF.FunPtr (HoppyF.Ptr () -> HoppyP.IO ())) (HoppyF.castPtr ptr' :: HoppyF.Ptr ())
  toGc this'@(QTreeWidgetItemGc {}) = HoppyP.return this'

instance QTreeWidgetItemConstPtr QTreeWidgetItem where
  toQTreeWidgetItemConst (QTreeWidgetItem ptr') = QTreeWidgetItemConst $ (HoppyF.castPtr :: HoppyF.Ptr QTreeWidgetItem -> HoppyF.Ptr QTreeWidgetItemConst) ptr'
  toQTreeWidgetItemConst (QTreeWidgetItemGc fptr' ptr') = QTreeWidgetItemConstGc fptr' $ (HoppyF.castPtr :: HoppyF.Ptr QTreeWidgetItem -> HoppyF.Ptr QTreeWidgetItemConst) ptr'

instance QTreeWidgetItemPtr QTreeWidgetItem where
  toQTreeWidgetItem = HoppyP.id

new :: (HoppyP.IO QTreeWidgetItem)
new =
  HoppyP.fmap QTreeWidgetItem
  (new')

newWithType :: (HoppyP.Int) -> (HoppyP.IO QTreeWidgetItem)
newWithType arg'1 =
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'1 >>= \arg'1' ->
  HoppyP.fmap QTreeWidgetItem
  (newWithType' arg'1')

newWithStrings :: (M144.QStringListValue arg'1) => (arg'1) -> (HoppyP.IO QTreeWidgetItem)
newWithStrings arg'1 =
  M144.withQStringListPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  HoppyP.fmap QTreeWidgetItem
  (newWithStrings' arg'1')

newWithStringsAndType :: (M144.QStringListValue arg'1) => (arg'1) -> (HoppyP.Int) -> (HoppyP.IO QTreeWidgetItem)
newWithStringsAndType arg'1 arg'2 =
  M144.withQStringListPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  HoppyP.fmap QTreeWidgetItem
  (newWithStringsAndType' arg'1' arg'2')

newWithParentTree :: (M500.QTreeWidgetPtr arg'1) => (arg'1) -> (HoppyP.IO QTreeWidgetItem)
newWithParentTree arg'1 =
  HoppyFHR.withCppPtr (M500.toQTreeWidget arg'1) $ \arg'1' ->
  HoppyP.fmap QTreeWidgetItem
  (newWithParentTree' arg'1')

newWithParentTreeAndType :: (M500.QTreeWidgetPtr arg'1) => (arg'1) -> (HoppyP.Int) -> (HoppyP.IO QTreeWidgetItem)
newWithParentTreeAndType arg'1 arg'2 =
  HoppyFHR.withCppPtr (M500.toQTreeWidget arg'1) $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  HoppyP.fmap QTreeWidgetItem
  (newWithParentTreeAndType' arg'1' arg'2')

newWithParentTreeAndStrings :: (M500.QTreeWidgetPtr arg'1, M144.QStringListValue arg'2) => (arg'1) -> (arg'2) -> (HoppyP.IO QTreeWidgetItem)
newWithParentTreeAndStrings arg'1 arg'2 =
  HoppyFHR.withCppPtr (M500.toQTreeWidget arg'1) $ \arg'1' ->
  M144.withQStringListPtr arg'2 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'2' ->
  HoppyP.fmap QTreeWidgetItem
  (newWithParentTreeAndStrings' arg'1' arg'2')

newWithParentTreeAndStringsAndType :: (M500.QTreeWidgetPtr arg'1, M144.QStringListValue arg'2) => (arg'1) -> (arg'2) -> (HoppyP.Int) -> (HoppyP.IO QTreeWidgetItem)
newWithParentTreeAndStringsAndType arg'1 arg'2 arg'3 =
  HoppyFHR.withCppPtr (M500.toQTreeWidget arg'1) $ \arg'1' ->
  M144.withQStringListPtr arg'2 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'2' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'3 >>= \arg'3' ->
  HoppyP.fmap QTreeWidgetItem
  (newWithParentTreeAndStringsAndType' arg'1' arg'2' arg'3')

newWithParentItem :: (QTreeWidgetItemPtr arg'1) => (arg'1) -> (HoppyP.IO QTreeWidgetItem)
newWithParentItem arg'1 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  HoppyP.fmap QTreeWidgetItem
  (newWithParentItem' arg'1')

newWithParentItemAndType :: (QTreeWidgetItemPtr arg'1) => (arg'1) -> (HoppyP.Int) -> (HoppyP.IO QTreeWidgetItem)
newWithParentItemAndType arg'1 arg'2 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'2 >>= \arg'2' ->
  HoppyP.fmap QTreeWidgetItem
  (newWithParentItemAndType' arg'1' arg'2')

newWithParentItemAndStrings :: (QTreeWidgetItemPtr arg'1, M144.QStringListValue arg'2) => (arg'1) -> (arg'2) -> (HoppyP.IO QTreeWidgetItem)
newWithParentItemAndStrings arg'1 arg'2 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  M144.withQStringListPtr arg'2 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'2' ->
  HoppyP.fmap QTreeWidgetItem
  (newWithParentItemAndStrings' arg'1' arg'2')

newWithParentItemAndStringsAndType :: (QTreeWidgetItemPtr arg'1, M144.QStringListValue arg'2) => (arg'1) -> (arg'2) -> (HoppyP.Int) -> (HoppyP.IO QTreeWidgetItem)
newWithParentItemAndStringsAndType arg'1 arg'2 arg'3 =
  HoppyFHR.withCppPtr (toQTreeWidgetItem arg'1) $ \arg'1' ->
  M144.withQStringListPtr arg'2 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'2' ->
  (
    HoppyP.return . HoppyFHR.coerceIntegral
  ) arg'3 >>= \arg'3' ->
  HoppyP.fmap QTreeWidgetItem
  (newWithParentItemAndStringsAndType' arg'1' arg'2' arg'3')

class QTreeWidgetItemSuper a where
  downToQTreeWidgetItem :: a -> QTreeWidgetItem


class QTreeWidgetItemSuperConst a where
  downToQTreeWidgetItemConst :: a -> QTreeWidgetItemConst


instance HoppyFHR.Assignable (HoppyF.Ptr (HoppyF.Ptr QTreeWidgetItem)) QTreeWidgetItem where
  assign ptr' value' = HoppyF.poke ptr' $ HoppyFHR.toPtr value'

instance QTreeWidgetItemValue a => HoppyFHR.Assignable QTreeWidgetItem a where
  assign x' y' = aSSIGN x' y' >> HoppyP.return ()

instance HoppyFHR.Decodable (HoppyF.Ptr (HoppyF.Ptr QTreeWidgetItem)) QTreeWidgetItem where
  decode = HoppyP.fmap QTreeWidgetItem . HoppyF.peek

data QTreeWidgetItemChildIndicatorPolicy =
  ShowIndicator
  | DontShowIndicator
  | DontShowIndicatorWhenChildless
  | UnknownQTreeWidgetItemChildIndicatorPolicy (HoppyFC.CInt)
  deriving (HoppyP.Show)

instance HoppyFHR.CppEnum (HoppyFC.CInt) QTreeWidgetItemChildIndicatorPolicy where
  fromCppEnum ShowIndicator = 0
  fromCppEnum DontShowIndicator = 1
  fromCppEnum DontShowIndicatorWhenChildless = 2
  fromCppEnum (UnknownQTreeWidgetItemChildIndicatorPolicy n) = n
  
  toCppEnum (0) = ShowIndicator
  toCppEnum (1) = DontShowIndicator
  toCppEnum (2) = DontShowIndicatorWhenChildless
  toCppEnum n = UnknownQTreeWidgetItemChildIndicatorPolicy n

instance HoppyP.Eq QTreeWidgetItemChildIndicatorPolicy where
  x == y = HoppyFHR.fromCppEnum x == HoppyFHR.fromCppEnum y

instance HoppyP.Ord QTreeWidgetItemChildIndicatorPolicy where
  compare x y = HoppyP.compare (HoppyFHR.fromCppEnum x) (HoppyFHR.fromCppEnum y)

data QTreeWidgetItemItemType =
  Typ
  | UserType
  | UnknownQTreeWidgetItemItemType (HoppyFC.CInt)
  deriving (HoppyP.Show)

instance HoppyFHR.CppEnum (HoppyFC.CInt) QTreeWidgetItemItemType where
  fromCppEnum Typ = 0
  fromCppEnum UserType = 1000
  fromCppEnum (UnknownQTreeWidgetItemItemType n) = n
  
  toCppEnum (0) = Typ
  toCppEnum (1000) = UserType
  toCppEnum n = UnknownQTreeWidgetItemItemType n

instance HoppyP.Eq QTreeWidgetItemItemType where
  x == y = HoppyFHR.fromCppEnum x == HoppyFHR.fromCppEnum y

instance HoppyP.Ord QTreeWidgetItemItemType where
  compare x y = HoppyP.compare (HoppyFHR.fromCppEnum x) (HoppyFHR.fromCppEnum y)