当前位置: 首页>>代码示例>>C++>>正文


C++ setHeaderHidden函数代码示例

本文整理汇总了C++中setHeaderHidden函数的典型用法代码示例。如果您正苦于以下问题:C++ setHeaderHidden函数的具体用法?C++ setHeaderHidden怎么用?C++ setHeaderHidden使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了setHeaderHidden函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: QTreeWidget

EnfuseStackList::EnfuseStackList(QWidget* const parent)
    : QTreeWidget(parent),
      d(new Private)
{
    d->progressTimer = new QTimer(this);

    setContextMenuPolicy(Qt::CustomContextMenu);
    setIconSize(QSize(64, 64));
    setSelectionMode(QAbstractItemView::SingleSelection);
    setSortingEnabled(false);
    setAllColumnsShowFocus(true);
    setRootIsDecorated(false);
    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    setColumnCount(3);
    setHeaderHidden(false);
    setDragEnabled(false);
    header()->setSectionResizeMode(QHeaderView::Stretch);

    QStringList labels;
    labels.append( i18nc("@title:column Saving checkbox", "Include during Saving") );
    labels.append( i18nc("@title:column Output file name", "Output") );
    labels.append( i18nc("@title:column Source file names", "Selected Inputs") );
    setHeaderLabels(labels);

    connect(this, SIGNAL(itemClicked(QTreeWidgetItem*,int)),
            this, SLOT(slotItemClicked(QTreeWidgetItem*)));

    connect(this, SIGNAL(customContextMenuRequested(QPoint)),
            this, SLOT(slotContextMenu(QPoint)));

    connect(d->progressTimer, SIGNAL(timeout()),
            this, SLOT(slotProgressTimerDone()));
}
开发者ID:IlyaSukhanov,项目名称:kipi-plugins,代码行数:33,代码来源:enfusestack.cpp

示例2: QTreeWidget

//----------------------------------------------------------------------------------------
OfsTreeWidget::OfsTreeWidget(QWidget *parent, unsigned int capabilities, QStringList initialSelection) : QTreeWidget(parent), mCapabilities(capabilities) 
{
    mSelectedItems = initialSelection;
    mRecycleBinParent = NULL;

    setColumnCount(1);
    setHeaderHidden(true);
    setSelectionMode(QAbstractItemView::ExtendedSelection);
    setSelectionBehavior(QAbstractItemView::SelectItems);
    setContextMenuPolicy(Qt::CustomContextMenu);
    setDragDropOverwriteMode(false);
    setAutoScroll(true);
    
    if(capabilities & CAP_ALLOW_DROPS)
        setDragDropMode(QAbstractItemView::DragDrop);

    mUnknownFileIcon = mOgitorMainWindow->mIconProvider.icon(QFileIconProvider::File);

    mFile = Ogitors::OgitorsRoot::getSingletonPtr()->GetProjectFile();
    mFile->addTrigger(this, OFS::_OfsBase::CLBK_CREATE, &triggerCallback);
    mFile->addTrigger(this, OFS::_OfsBase::CLBK_DELETE, &triggerCallback);

    refreshWidget();

    mAddFilesThread = new AddFilesThread();
    mExtractorThread = new ExtractorThread();
    connect(mAddFilesThread, SIGNAL(finished()), this, SLOT(threadFinished()));
    connect(mExtractorThread, SIGNAL(finished()), this, SLOT(threadFinished()));
}
开发者ID:jacmoe,项目名称:ogitor,代码行数:30,代码来源:ofstreewidget.cpp

示例3: QTreeWidget

BracketStackList::BracketStackList(Interface* iface, QWidget* parent)
                : QTreeWidget(parent), d(new BracketStackListPriv)
{
    d->iface = iface;

    setIconSize(QSize(64, 64));
    setSelectionMode(QAbstractItemView::SingleSelection);
    setSortingEnabled(true);
    setAllColumnsShowFocus(true);
    setRootIsDecorated(false);
    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    setColumnCount(3);
    setHeaderHidden(false);
    setDragEnabled(false);
    header()->setResizeMode(QHeaderView::Stretch);

    QStringList labels;
    labels.append( i18n("To process") );
    labels.append( i18n("File Name") );
    labels.append( i18n("Exposure (EV)") );
    setHeaderLabels(labels);

    if (d->iface)
    {
        connect(d->iface, SIGNAL(gotThumbnail(KUrl,QPixmap)),
                this, SLOT(slotThumbnail(KUrl,QPixmap)));
    }

    d->loadRawThumb = new KPRawThumbThread(this);

    connect(d->loadRawThumb, SIGNAL(signalRawThumb(KUrl,QImage)),
            this, SLOT(slotRawThumb(KUrl,QImage)));

    sortItems(2, Qt::DescendingOrder);
}
开发者ID:SOUMAJYOTI,项目名称:HDR-image-plugin-for-digiKam,代码行数:35,代码来源:bracketstack.cpp

示例4: QTreeView

QompPluginTreeView::QompPluginTreeView(QWidget *parent) :
	QTreeView(parent)
{
	setHeaderHidden(true);
	setItemsExpandable(true);
	setUniformRowHeights(true);
}
开发者ID:SunRain,项目名称:qomp,代码行数:7,代码来源:qompplugintreeview.cpp

示例5: TreeView

START_NS

ModelViewReadOnly::ModelViewReadOnly(QWidget * parent):
	TreeView(parent)
{
	setHeaderHidden(true);
	//header()->setResizeMode(QHeaderView::Stretch);
	setRootIsDecorated(false);
	setIndentation(0);
	setExpandsOnDoubleClick(true);
	setItemDelegateForColumn(0, new ModelTreeDelegate());
	setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);

	setSelectionMode( SingleSelection );
	setSelectionBehavior(SelectRows);
	// we disable the provided dnd features,
	// as we use a proprietary solution
	setDragDropMode(QAbstractItemView::DragDrop);
	setDragEnabled(true);
	setAcceptDrops(false);


	overlay()->setText(tr("Please load a model"));

	connect(this, SIGNAL(clicked(QModelIndex)), this, SLOT(__clicked(QModelIndex)));
}
开发者ID:ohager,项目名称:kantalupe,代码行数:27,代码来源:ModelViewReadOnly.cpp

示例6: model_

AppMenuView::AppMenuView(QWidget* parent):
  model_(new QStandardItemModel()),
  menu_cache(NULL),
  menu_cache_reload_notify(NULL),
  QTreeView(parent) {

  setHeaderHidden(true);
  setSelectionMode(SingleSelection);

  // initialize model
  // TODO: share one model among all app menu view widgets
  // ensure that we're using lxmenu-data (FIXME: should we do this?)
  QByteArray oldenv = qgetenv("XDG_MENU_PREFIX");
  qputenv("XDG_MENU_PREFIX", "lxde-");
  menu_cache = menu_cache_lookup("applications.menu");
  // if(!oldenv.isEmpty())
  qputenv("XDG_MENU_PREFIX", oldenv); // restore the original value if needed

  if(menu_cache) {
    MenuCacheDir* dir = menu_cache_dup_root_dir(menu_cache);
    menu_cache_reload_notify = menu_cache_add_reload_notify(menu_cache, _onMenuCacheReload, this);
    if(dir) { /* content of menu is already loaded */
      addMenuItems(NULL, dir);
      menu_cache_item_unref(MENU_CACHE_ITEM(dir));
    }
  }
  setModel(model_);
  connect(selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SIGNAL(selectionChanged()));
  selectionModel()->select(model_->index(0, 0), QItemSelectionModel::SelectCurrent);
}
开发者ID:GinoM,项目名称:pcmanfm-qt,代码行数:30,代码来源:appmenuview.cpp

示例7: QTreeWidget

EnfuseStackList::EnfuseStackList(QWidget* parent)
               : QTreeWidget(parent), d(new EnfuseStackListPriv)
{
    d->progressTimer = new QTimer(this);

    setContextMenuPolicy(Qt::CustomContextMenu);
    setIconSize(QSize(64, 64));
    setSelectionMode(QAbstractItemView::SingleSelection);
    setSortingEnabled(false);
    setAllColumnsShowFocus(true);
    setRootIsDecorated(false);
    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    setColumnCount(3);
    setHeaderHidden(false);
    setDragEnabled(false);
    header()->setResizeMode(QHeaderView::Stretch);

    QStringList labels;
    labels.append( i18n("To Save") );
    labels.append( i18n("Target") );
    labels.append( i18n("Inputs") );
    setHeaderLabels(labels);

    connect(this, SIGNAL(itemClicked(QTreeWidgetItem*, int)),
            this, SLOT(slotItemClicked(QTreeWidgetItem*)));

    connect(this, SIGNAL(customContextMenuRequested(const QPoint&)),
            this, SLOT(slotContextMenu(const QPoint&)));

    connect(d->progressTimer, SIGNAL(timeout()),
            this, SLOT(slotProgressTimerDone()));
}
开发者ID:UIKit0,项目名称:digikam,代码行数:32,代码来源:enfusestack.cpp

示例8: setHeaderHidden

DisplayTypeTree::DisplayTypeTree()
{
  setHeaderHidden( true );

  connect(this, SIGNAL( currentItemChanged( QTreeWidgetItem*, QTreeWidgetItem* )),
          this, SLOT( onCurrentItemChanged( QTreeWidgetItem*, QTreeWidgetItem* )));
}
开发者ID:JoSungUk,项目名称:My_1st_ROScode,代码行数:7,代码来源:add_display_dialog.cpp

示例9: QTreeView

SideBarView::SideBarView ( QWidget* parent ) : QTreeView(parent), _model(NULL) {
    installEventFilter(this);

    _model = new SideBarModel(this);
    
    setModel(_model);
    setItemsExpandable(true);
    setHeaderHidden(true);
    setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    setContextMenuPolicy(Qt::CustomContextMenu);
    setItemDelegate(new SideBarDelegate(this));
    expandAll();
    
    connect(ArenaWidgetManager::getInstance(), SIGNAL(activated(ArenaWidget*)), this,   SLOT(activated(ArenaWidget*)));
    connect(ArenaWidgetManager::getInstance(), SIGNAL(added(ArenaWidget*)),     this,   SLOT(added(ArenaWidget*)));
    connect(ArenaWidgetManager::getInstance(), SIGNAL(removed(ArenaWidget*)),   this,   SLOT(removed(ArenaWidget*)));
    connect(ArenaWidgetManager::getInstance(), SIGNAL(activated(ArenaWidget*)), _model, SLOT(mapped(ArenaWidget*)));
    connect(ArenaWidgetManager::getInstance(), SIGNAL(toggled(ArenaWidget*)),   _model, SLOT(toggled(ArenaWidget*)));
    connect(ArenaWidgetManager::getInstance(), SIGNAL(updated(ArenaWidget*)),   _model, SLOT(updated(ArenaWidget*)));
    
    connect(this, SIGNAL(doubleClicked(QModelIndex)),           this,   SLOT(slotSideBarDblClicked(QModelIndex)));
    connect(this, SIGNAL(customContextMenuRequested(QPoint)),   this,   SLOT(slotSidebarContextMenu()));
    connect(this, SIGNAL(clicked(QModelIndex)),                 this,   SLOT(slotSidebarHook(QModelIndex)));
    connect(this, SIGNAL(clicked(QModelIndex)),                 _model, SLOT(slotIndexClicked(QModelIndex)));
   
    
    connect(GlobalTimer::getInstance(), SIGNAL(second()), _model, SLOT(redraw()));
    
    connect(_model,    SIGNAL(mapWidget(ArenaWidget*)),     ArenaWidgetManager::getInstance(),  SLOT(activate(ArenaWidget*)));
    connect(_model,    SIGNAL(selectIndex(QModelIndex)),    this,                               SLOT(slotWidgetActivated(QModelIndex)));
}
开发者ID:Acidburn0zzz,项目名称:eiskaltdcpp,代码行数:31,代码来源:SideBar.cpp

示例10: QTreeView

CategoryFilterWidget::CategoryFilterWidget(QWidget *parent)
    : QTreeView(parent)
{
    auto *proxyModel = new CategoryFilterProxyModel(this);
    proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
    proxyModel->setSourceModel(new CategoryFilterModel(this));
    setModel(proxyModel);
    setFrameShape(QFrame::NoFrame);
    setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
    setUniformRowHeights(true);
    setHeaderHidden(true);
    setIconSize(Utils::Gui::smallIconSize());
#ifdef Q_OS_MAC
    setAttribute(Qt::WA_MacShowFocusRect, false);
#endif
    m_defaultIndentation = indentation();
    if (!BitTorrent::Session::instance()->isSubcategoriesEnabled())
        setIndentation(0);
    setContextMenuPolicy(Qt::CustomContextMenu);
    sortByColumn(0, Qt::AscendingOrder);
    setCurrentIndex(model()->index(0, 0));

    connect(this, &QTreeView::collapsed, this, &CategoryFilterWidget::callUpdateGeometry);
    connect(this, &QTreeView::expanded, this, &CategoryFilterWidget::callUpdateGeometry);
    connect(this, &QWidget::customContextMenuRequested, this, &CategoryFilterWidget::showMenu);
    connect(selectionModel(), &QItemSelectionModel::currentRowChanged
            , this, &CategoryFilterWidget::onCurrentRowChanged);
    connect(model(), &QAbstractItemModel::modelReset, this, &CategoryFilterWidget::callUpdateGeometry);
}
开发者ID:paolo-sz,项目名称:qBittorrent,代码行数:31,代码来源:categoryfilterwidget.cpp

示例11: QTreeView

QtTreeWidget::QtTreeWidget(UIEventStream* eventStream, SettingsProvider* settings, MessageTarget messageTarget, QWidget* parent) : QTreeView(parent),  eventStream_(eventStream), settings_(settings), messageTarget_(messageTarget) {
    model_ = new RosterModel(this, settings_->getSetting(QtUISettingConstants::USE_SCREENREADER));
    setModel(model_);
    delegate_ = new RosterDelegate(this, settings_->getSetting(QtUISettingConstants::COMPACT_ROSTER));
    setItemDelegate(delegate_);
    setHeaderHidden(true);
#ifdef SWIFT_PLATFORM_MACOSX
    setAlternatingRowColors(true);
#endif
    setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
    expandAll();
    setAnimated(true);
    setIndentation(0);
#ifdef SWIFT_EXPERIMENTAL_FT
    setAcceptDrops(true);
#endif
    setDragEnabled(true);
    setRootIsDecorated(true);
    connect(this, SIGNAL(activated(const QModelIndex&)), this, SLOT(handleItemActivated(const QModelIndex&)));
    connect(model_, SIGNAL(itemExpanded(const QModelIndex&, bool)), this, SLOT(handleModelItemExpanded(const QModelIndex&, bool)));
    connect(this, SIGNAL(expanded(const QModelIndex&)), this, SLOT(handleExpanded(const QModelIndex&)));
    connect(this, SIGNAL(collapsed(const QModelIndex&)), this, SLOT(handleCollapsed(const QModelIndex&)));
    connect(this, SIGNAL(clicked(const QModelIndex&)), this, SLOT(handleClicked(const QModelIndex&)));

    settings_->onSettingChanged.connect(boost::bind(&QtTreeWidget::handleSettingChanged, this, _1));

    QFont lato = font();
    lato.setFamily("Lato");
    setFont(lato);
}
开发者ID:swift,项目名称:swift,代码行数:30,代码来源:QtTreeWidget.cpp

示例12: QTreeView

CategoryFilterWidget::CategoryFilterWidget(QWidget *parent)
    : QTreeView(parent)
{
    CategoryFilterProxyModel *proxyModel = new CategoryFilterProxyModel(this);
    proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
    proxyModel->setSourceModel(new CategoryFilterModel(this));
    setModel(proxyModel);
    setFrameShape(QFrame::NoFrame);
    setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
    setUniformRowHeights(true);
    setHeaderHidden(true);
    setIconSize(Utils::Misc::smallIconSize());
#if defined(Q_OS_MAC)
    setAttribute(Qt::WA_MacShowFocusRect, false);
#endif
    setContextMenuPolicy(Qt::CustomContextMenu);
    sortByColumn(0, Qt::AscendingOrder);
    setCurrentIndex(model()->index(0, 0));

    connect(this, SIGNAL(collapsed(QModelIndex)), SLOT(callUpdateGeometry()));
    connect(this, SIGNAL(expanded(QModelIndex)), SLOT(callUpdateGeometry()));
    connect(this, SIGNAL(customContextMenuRequested(QPoint)), SLOT(showMenu(QPoint)));
    connect(selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex))
            , SLOT(onCurrentRowChanged(QModelIndex,QModelIndex)));
    connect(model(), SIGNAL(modelReset()), SLOT(callUpdateGeometry()));
}
开发者ID:ATGardner,项目名称:qBittorrent,代码行数:28,代码来源:categoryfilterwidget.cpp

示例13: QTreeView

ProgressTreeView::ProgressTreeView( QWidget* parent )
    : QTreeView( parent )
{
    s_instance = this; //FIXME: should assert when s_instance gets written and it wasn't nullptr

    setFrameShape( QFrame::NoFrame );
    setContentsMargins( 0, 0, 0, 0 );

    setHeaderHidden( true );
    setRootIsDecorated( true );
    setExpandsOnDoubleClick( true );

    setSelectionMode( QAbstractItemView::NoSelection );
    setDragDropMode( QAbstractItemView::NoDragDrop );
    setAcceptDrops( false );
    setUniformRowHeights( false );

    setIndentation( 0 );
    setSortingEnabled( false );

    m_delegate = new ProgressTreeDelegate( this );
    setItemDelegate( m_delegate );

    QPalette plt = palette();
    plt.setColor( QPalette::Base, Calamares::Branding::instance()->
        styleString( Calamares::Branding::SidebarBackground ) );
    setPalette( plt );
}
开发者ID:AOSC-Dev,项目名称:calamares,代码行数:28,代码来源:ProgressTreeView.cpp

示例14: QTreeView

/*!
 * \brief SimulationOutputTree::SimulationOutputTree
 * \param pSimulationOutputWidget
 */
SimulationOutputTree::SimulationOutputTree(SimulationOutputWidget *pSimulationOutputWidget)
  : QTreeView(pSimulationOutputWidget), mpSimulationOutputWidget(pSimulationOutputWidget)
{
  setItemDelegate(new ItemDelegate(this, true));
  setTextElideMode(Qt::ElideNone);
  setIndentation(Helper::treeIndentation);
  setExpandsOnDoubleClick(false);
  setHeaderHidden(true);
  setMouseTracking(true); /* important for Debug more links. */
  setSelectionMode(QAbstractItemView::ExtendedSelection);
  setContextMenuPolicy(Qt::CustomContextMenu);
  connect(this, SIGNAL(customContextMenuRequested(QPoint)), SLOT(showContextMenu(QPoint)));
  connect(header(), SIGNAL(sectionResized(int,int,int)), SLOT(callLayoutChanged(int,int,int)));
  // create actions
  mpSelectAllAction = new QAction(tr("Select All"), this);
  mpSelectAllAction->setShortcut(QKeySequence("Ctrl+a"));
  mpSelectAllAction->setStatusTip(tr("Selects all the Messages"));
  connect(mpSelectAllAction, SIGNAL(triggered()), SLOT(selectAllMessages()));
  mpCopyAction = new QAction(QIcon(":/Resources/icons/copy.svg"), Helper::copy, this);
  mpCopyAction->setShortcut(QKeySequence("Ctrl+c"));
  mpCopyAction->setStatusTip(tr("Copy the Message"));
  connect(mpCopyAction, SIGNAL(triggered()), SLOT(copyMessages()));
  mpExpandAllAction = new QAction(Helper::expandAll, this);
  mpExpandAllAction->setStatusTip(tr("Copy the Message"));
  connect(mpExpandAllAction, SIGNAL(triggered()), SLOT(expandAll()));
  mpCollapseAllAction = new QAction(Helper::collapseAll, this);
  mpCollapseAllAction->setStatusTip(tr("Copy the Message"));
  connect(mpCollapseAllAction, SIGNAL(triggered()), SLOT(collapseAll()));
}
开发者ID:OpenModelica,项目名称:OMEdit,代码行数:33,代码来源:SimulationOutputWidget.cpp

示例15: QTreeView

/**
 * @brief Creates an empty dialogs tree view.
 * @param parent The parent object or nullptr.
 */
DialogsTreeView::DialogsTreeView(QWidget* parent) :
  QTreeView(parent),
  model(nullptr) {

  setSelectionMode(QAbstractItemView::SingleSelection);
  setHeaderHidden(true);

  create_action = new QAction(
        QIcon(":/images/icon_add.png"), tr("New dialog..."), this);
  connect(create_action, SIGNAL(triggered()),
          this, SIGNAL(create_dialog_requested()));
  addAction(create_action);

  duplicate_action = new QAction(
        QIcon(":/images/icon_copy.png"), tr("Duplicate dialog(s)..."), this);
  connect(duplicate_action, SIGNAL(triggered()),
          this, SIGNAL(duplicate_dialog_requested()));
  addAction(duplicate_action);

  set_id_action = new QAction(
        QIcon(":/images/icon_rename.png"), tr("Change id..."), this);
  set_id_action->setShortcut(tr("F2"));
  set_id_action->setShortcutContext(Qt::WidgetShortcut);
  connect(set_id_action, SIGNAL(triggered()),
          this, SIGNAL(set_dialog_id_requested()));
  addAction(set_id_action);

  delete_action = new QAction(
        QIcon(":/images/icon_delete.png"), tr("Delete..."), this);
  delete_action->setShortcut(QKeySequence::Delete);
  delete_action->setShortcutContext(Qt::WidgetShortcut);
  connect(delete_action, SIGNAL(triggered()),
          this, SIGNAL(delete_dialog_requested()));
  addAction(delete_action);
}
开发者ID:christopho,项目名称:solarus-quest-editor,代码行数:39,代码来源:dialogs_tree_view.cpp


注:本文中的setHeaderHidden函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。