本文整理汇总了C++中setUniformRowHeights函数的典型用法代码示例。如果您正苦于以下问题:C++ setUniformRowHeights函数的具体用法?C++ setUniformRowHeights怎么用?C++ setUniformRowHeights使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setUniformRowHeights函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: QTreeWidget
akuTreeWidget::akuTreeWidget(QWidget *parent) : QTreeWidget(parent)
{
setDragEnabled(false);
setDragDropOverwriteMode(false);
setDragDropMode(QAbstractItemView::NoDragDrop);
setAlternatingRowColors(true);
setSelectionMode(QAbstractItemView::ExtendedSelection);
setAutoExpandDelay(-1);
setRootIsDecorated(true);
setUniformRowHeights(false);
setSortingEnabled(true);
setAnimated(true);
setAllColumnsShowFocus(true);
headerItem()->setText(0, i18n("File Name", 0));
headerItem()->setText(1, i18n("Size", 0));
headerItem()->setText(2, i18n("Packed Size", 0));
headerItem()->setText(3, i18n("Ratio", 0));
headerItem()->setText(4, i18n("Modified", 0));
headerItem()->setText(5, i18n("Attributes", 0));
headerItem()->setText(6, i18n("CRC", 0));
headerItem()->setText(7, i18n("Method", 0));
headerItem()->setText(8, i18n("Version", 0));
headerItem()->setText(9, i18n("MIME Type", 0));
headerItem()->setText(10,"");
headerItem()->setIcon(10,KIcon("document-properties"));
headerItem()->setToolTip(10, i18n("Status: a key is shown if the file is crypted"));
header() -> moveSection(10,0);
header() -> setResizeMode(10,QHeaderView::ResizeToContents);
header() -> setResizeMode(4,QHeaderView::ResizeToContents);
setupActions();
}
开发者ID:alediaferia,项目名称:aku,代码行数:31,代码来源:akutreewidget.cpp
示例2: QTreeView
DeviceExplorerView::DeviceExplorerView(QWidget* parent)
: QTreeView(parent), m_hasProxy(false)
{
setAllColumnsShowFocus(true);
setSelectionBehavior(QAbstractItemView::SelectRows);
setSelectionMode(QAbstractItemView::ExtendedSelection);
header()->setContextMenuPolicy(Qt::CustomContextMenu);
connect(
header(),
&QWidget::customContextMenuRequested,
this,
&DeviceExplorerView::headerMenuRequested);
header()->setMaximumHeight(20);
//- Drag'n Drop.
setDragEnabled(true);
setAcceptDrops(true);
setUniformRowHeights(true);
setDragDropMode(QAbstractItemView::DragDrop);
setDropIndicatorShown(true);
setDefaultDropAction(Qt::MoveAction);
setDragDropOverwriteMode(false);
QFile f(":/DeviceExplorer.qss");
if (f.open(QFile::ReadOnly))
setStyleSheet(f.readAll());
}
开发者ID:OSSIA,项目名称:Score,代码行数:34,代码来源:DeviceExplorerView.cpp
示例3: 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
示例4: setEditTriggers
void PropertyBrowser::initView()
{
setEditTriggers(QAbstractItemView::AllEditTriggers);
setAlternatingRowColors(true);
setUniformRowHeights(true);
setTabKeyNavigation(true);
}
开发者ID:Tobias1595,项目名称:libzeug,代码行数:7,代码来源:PropertyBrowser.cpp
示例5: QTreeView
SensorBrowserTreeWidget::SensorBrowserTreeWidget( QWidget* parent, KSGRD::SensorManager* sm ) : QTreeView( parent ), mSensorManager( sm )
{
mSortFilterProxyModel.setSourceModel(&mSensorBrowserModel);
mSortFilterProxyModel.setShowAllChildren(true);
setModel(&mSortFilterProxyModel);
connect( mSensorManager, SIGNAL(update()), &mSensorBrowserModel, SLOT(update()) );
connect( mSensorManager, SIGNAL(hostAdded(KSGRD::SensorAgent*,QString)), &mSensorBrowserModel, SLOT(hostAdded(KSGRD::SensorAgent*,QString)) );
connect( mSensorManager, SIGNAL(hostConnectionLost(QString)), &mSensorBrowserModel, SLOT(hostRemoved(QString)) );
// connect( mSensorManager, SIGNAL(hostAdded(KSGRD::SensorAgent*,QString)), SLOT(updateView()) );
// connect( mSensorManager, SIGNAL(hostConnectionLost(QString)), SLOT(updateView()) );
connect( &mSortFilterProxyModel, SIGNAL(rowsInserted(QModelIndex,int,int)), SLOT(updateView()) );
setDragDropMode(QAbstractItemView::DragOnly);
setUniformRowHeights(true);
//setMinimumWidth( 1 );
retranslateUi();
connect( &mSensorBrowserModel, SIGNAL(sensorsAddedToHost(QModelIndex)), this, SLOT(expandItem(QModelIndex)));
KSGRD::SensorManagerIterator it( mSensorManager );
while ( it.hasNext() ) {
KSGRD::SensorAgent* sensorAgent = it.next().value();
QString hostName = mSensorManager->hostName( sensorAgent );
mSensorBrowserModel.addHost(sensorAgent, hostName);
}
updateView();
}
开发者ID:fluxer,项目名称:kde-workspace,代码行数:27,代码来源:SensorBrowser.cpp
示例6: QTreeWidget
InterfaceTree::InterfaceTree(QWidget *parent) :
QTreeWidget(parent)
#ifdef HAVE_LIBPCAP
,stat_cache_(NULL)
,stat_timer_(NULL)
#endif // HAVE_LIBPCAP
{
QTreeWidgetItem *ti;
qRegisterMetaType< PointList >("PointList");
header()->setVisible(false);
setRootIsDecorated(false);
setUniformRowHeights(true);
/* Seems to have no effect, still the default value (2) is being used, as it
* was set in the .ui file. But better safe, then sorry. */
resetColumnCount();
setSelectionMode(QAbstractItemView::ExtendedSelection);
setAccessibleName(tr("Welcome screen list"));
setItemDelegateForColumn(IFTREE_COL_STATS, new SparkLineDelegate(this));
setDisabled(true);
ti = new QTreeWidgetItem();
ti->setText(IFTREE_COL_NAME, tr("Waiting for startup%1").arg(UTF8_HORIZONTAL_ELLIPSIS));
addTopLevelItem(ti);
resizeColumnToContents(IFTREE_COL_NAME);
connect(wsApp, SIGNAL(appInitialized()), this, SLOT(getInterfaceList()));
connect(wsApp, SIGNAL(localInterfaceListChanged()), this, SLOT(interfaceListChanged()));
connect(this, SIGNAL(itemSelectionChanged()), this, SLOT(updateSelectedInterfaces()));
}
开发者ID:velichkov,项目名称:wireshark,代码行数:32,代码来源:interface_tree.cpp
示例7: 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
示例8: QTreeView
KNMusicStoreAlbumTreeView::KNMusicStoreAlbumTreeView(QWidget *parent) :
QTreeView(parent),
m_mouseAnime(new QTimeLine(200, this))
{
//Set properties.
setAllColumnsShowFocus(true);
setAlternatingRowColors(false); //We will use our own alternating drawing.
setContentsMargins(0, 0, 0, 0);
setFrameShape(QFrame::NoFrame);
setIndentation(0);
setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents);
setSelectionBehavior(QAbstractItemView::SelectRows);
setSelectionMode(QAbstractItemView::ExtendedSelection);
setUniformRowHeights(true);
setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
//Configure the time line.
m_mouseAnime->setEasingCurve(QEasingCurve::OutCubic);
m_mouseAnime->setUpdateInterval(10);
//Link the time line.
connect(m_mouseAnime, &QTimeLine::frameChanged,
this, &KNMusicStoreAlbumTreeView::onActionMouseInOut);
//Initial the sense header.
KNMouseSenseHeader *header=new KNMouseSenseHeader(this);
header->setSectionsMovable(false);
header->setSectionsClickable(false);
header->setFixedHeight(38);
setHeader(header);
//Link with theme manager.
connect(knTheme, &KNThemeManager::themeChange,
this, &KNMusicStoreAlbumTreeView::onActionThemeUpdate);
}
开发者ID:ZhenZinian,项目名称:Mu,代码行数:34,代码来源:knmusicstorealbumtreeview.cpp
示例9: QTreeWidget
InterfaceTree::InterfaceTree(QWidget *parent) :
QTreeWidget(parent)
#ifdef HAVE_LIBPCAP
,stat_cache_(NULL)
,stat_timer_(NULL)
#endif // HAVE_LIBPCAP
{
QTreeWidgetItem *ti;
header()->setVisible(false);
setRootIsDecorated(false);
setUniformRowHeights(true);
setColumnCount(2);
setSelectionMode(QAbstractItemView::ExtendedSelection);
setAccessibleName(tr("Welcome screen list"));
setItemDelegateForColumn(1, new SparkLineDelegate());
setDisabled(true);
ti = new QTreeWidgetItem();
ti->setText(0, tr("Waiting for startup" UTF8_HORIZONTAL_ELLIPSIS));
addTopLevelItem(ti);
resizeColumnToContents(0);
connect(wsApp, SIGNAL(appInitialized()), this, SLOT(getInterfaceList()));
connect(this, SIGNAL(itemSelectionChanged()), this, SLOT(updateSelectedInterfaces()));
}
开发者ID:lubing521,项目名称:wireshark,代码行数:27,代码来源:interface_tree.cpp
示例10: QTreeView
MsgListView::MsgListView(QWidget *parent): QTreeView(parent), m_autoActivateAfterKeyNavigation(true), m_autoResizeSections(true)
{
connect(header(), SIGNAL(geometriesChanged()), this, SLOT(slotFixSize()));
connect(this, SIGNAL(expanded(QModelIndex)), this, SLOT(slotExpandWholeSubtree(QModelIndex)));
connect(header(), SIGNAL(sectionCountChanged(int,int)), this, SLOT(slotSectionCountChanged()));
header()->setContextMenuPolicy(Qt::ActionsContextMenu);
headerFieldsMapper = new QSignalMapper(this);
connect(headerFieldsMapper, SIGNAL(mapped(int)), this, SLOT(slotHeaderSectionVisibilityToggled(int)));
setUniformRowHeights(true);
setAllColumnsShowFocus(true);
setSelectionMode(ExtendedSelection);
setDragEnabled(true);
setRootIsDecorated(false);
// Some subthreads might be huuuuuuuuuuge, so prevent indenting them too heavily
setIndentation(15);
setSortingEnabled(true);
// By default, we don't do any sorting
header()->setSortIndicator(-1, Qt::AscendingOrder);
m_naviActivationTimer = new QTimer(this);
m_naviActivationTimer->setSingleShot(true);
connect (m_naviActivationTimer, SIGNAL(timeout()), SLOT(slotCurrentActivated()));
}
开发者ID:RonnyPfannschmidt,项目名称:trojita,代码行数:25,代码来源:MsgListView.cpp
示例11: QTreeView
EntryView::EntryView(QWidget* parent)
: QTreeView(parent)
, m_model(new EntryModel(this))
, m_sortModel(new SortFilterHideProxyModel(this))
, m_inEntryListMode(false)
{
m_sortModel->setSourceModel(m_model);
m_sortModel->setDynamicSortFilter(true);
m_sortModel->setSortLocaleAware(true);
m_sortModel->setSortCaseSensitivity(Qt::CaseInsensitive);
m_sortModel->setSupportedDragActions(m_model->supportedDragActions());
QTreeView::setModel(m_sortModel);
setUniformRowHeights(true);
setRootIsDecorated(false);
setAlternatingRowColors(true);
setDragEnabled(true);
setSortingEnabled(true);
setSelectionMode(QAbstractItemView::ExtendedSelection);
// QAbstractItemView::startDrag() uses this property as the default drag action
setDefaultDropAction(Qt::MoveAction);
connect(this, SIGNAL(doubleClicked(QModelIndex)), SLOT(emitEntryActivated(QModelIndex)));
connect(selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SIGNAL(entrySelectionChanged()));
connect(m_model, SIGNAL(switchedToEntryListMode()), SLOT(switchToEntryListMode()));
connect(m_model, SIGNAL(switchedToGroupMode()), SLOT(switchToGroupMode()));
}
开发者ID:afontenot,项目名称:keepassx,代码行数:28,代码来源:EntryView.cpp
示例12: QTreeView
MshView::MshView( QWidget* parent /*= 0*/ )
: QTreeView(parent)
{
setUniformRowHeights(true);
//resizeColumnsToContents();
//resizeRowsToContents();
}
开发者ID:xingyuanmiao,项目名称:ogs,代码行数:7,代码来源:MshView.cpp
示例13: ananasListViewModel
configTreeView::configTreeView(DomCfgItem *config,QWidget *parent):QTreeView(parent)
{
QAbstractItemModel *data = new ananasListViewModel(config,parent);
QItemSelectionModel *selections = new QItemSelectionModel(data);
m_tabEditors=0;
//QTreeView *mdtree = new QTreeView;
setModel(data);
setHeaderHidden(true);
setSelectionModel(selections);
setUniformRowHeights(true);
header()->setStretchLastSection(false);
viewport()->setAttribute(Qt::WA_StaticContents);
header()->setResizeMode(QHeaderView::Stretch);
setAttribute(Qt::WA_MacShowFocusRect, false);
setContextMenuPolicy(Qt::CustomContextMenu);
setWindowFlags(Qt::Widget);
connect(this,
SIGNAL( customContextMenuRequested(const QPoint &) ),
this,SLOT(showmenu(const QPoint &)));
connect(this,SIGNAL(doubleClicked ( const QModelIndex & )),this,SLOT(doubleClicked ( const QModelIndex & )));
m_tabStopWidth = 4;
m_lineNumbers = m_selectionBorder = m_autoIndent = m_cppHighlighter = true;
crossButton = 0;
menuBookmarks=((MainForm*)parent->parentWidget())->menuBookmarks;
actionActiveBookmark=menuBookmarks->activeAction();
//setCrossButton( !m_closeButtonInTabs );
//connect(actionOptions, SIGNAL(triggered()), this, SLOT(slotOptions()));
loadINI();
}
开发者ID:heiheshang,项目名称:ananas-labs-qt4,代码行数:30,代码来源:atreeitems.cpp
示例14: QTreeView
QompPluginTreeView::QompPluginTreeView(QWidget *parent) :
QTreeView(parent)
{
setHeaderHidden(true);
setItemsExpandable(true);
setUniformRowHeights(true);
}
开发者ID:SunRain,项目名称:qomp,代码行数:7,代码来源:qompplugintreeview.cpp
示例15: QTreeView
DiveListView::DiveListView(QWidget *parent) : QTreeView(parent), mouseClickSelection(false),
currentHeaderClicked(-1), searchBox(new QLineEdit(this))
{
setUniformRowHeights(true);
setItemDelegateForColumn(TreeItemDT::RATING, new StarWidgetsDelegate());
QSortFilterProxyModel *model = new QSortFilterProxyModel(this);
model->setSortRole(TreeItemDT::SORT_ROLE);
model->setFilterKeyColumn(-1); // filter all columns
setModel(model);
connect(model, SIGNAL(layoutChanged()), this, SLOT(fixMessyQtModelBehaviour()));
setSortingEnabled(false);
setContextMenuPolicy(Qt::DefaultContextMenu);
header()->setContextMenuPolicy(Qt::ActionsContextMenu);
QAction *showSearchBox = new QAction(tr("Show Search Box"), this);
showSearchBox->setShortcut( Qt::CTRL + Qt::Key_F);
showSearchBox->setShortcutContext(Qt::ApplicationShortcut);
addAction(showSearchBox);
searchBox->installEventFilter(this);
searchBox->hide();
connect(showSearchBox, SIGNAL(triggered(bool)), this, SLOT(showSearchEdit()));
connect(searchBox, SIGNAL(textChanged(QString)), model, SLOT(setFilterFixedString(QString)));
selectedTrips.clear();
}
开发者ID:dbinoj,项目名称:subsurface,代码行数:25,代码来源:divelistview.cpp
示例16: 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
示例17: setHeader
views::treeView::treeView(QWidget *parent,QString name)
:QTreeView(parent),_ratingColumn(-1),_playOnDoubleCl(true)
{
setHeader(new treeViewHeader(this));
setUniformRowHeights(true);
setAlternatingRowColors(false);
delegate=new treeViewDelegate(this);
setItemDelegate(delegate);
setSelectionMode(QAbstractItemView::ExtendedSelection);
setSelectionBehavior(QAbstractItemView::SelectRows);
setDragEnabled(true);
setDragDropMode( QAbstractItemView::DragDrop );
setRootIsDecorated(false);
setSortingEnabled (true);
setMouseTracking(true);
if (!name.isEmpty() )
{
setObjectName(name);
readSettings();
}
setEditTriggers(QAbstractItemView::SelectedClicked);
setExpandsOnDoubleClick(false);
connect(this, SIGNAL(clicked(const QModelIndex &)), this, SLOT(itemClicked(const QModelIndex &)) );
}
开发者ID:tavu,项目名称:karakaxa,代码行数:30,代码来源:treeView.cpp
示例18: QTreeView
PlTreeView::PlTreeView( QAbstractItemModel *, QWidget *parent ) : QTreeView( parent )
{
setItemDelegate( new PlTreeViewItemDelegate( this ) );
setItemDelegateForColumn( VLCModel::metaToColumn(COLUMN_COVER),
new CellPixmapDelegate( this ) );
setIconSize( QSize( 20, 20 ) );
setAlternatingRowColors( true );
setAnimated( true );
setUniformRowHeights( true );
setSortingEnabled( true );
setAttribute( Qt::WA_MacShowFocusRect, false );
viewport()->setAttribute( Qt::WA_Hover );
header()->setSortIndicator( -1 , Qt::AscendingOrder );
header()->setSortIndicatorShown( true );
#if HAS_QT5
header()->setSectionsClickable( true );
#else
header()->setClickable( true );
#endif
header()->setContextMenuPolicy( Qt::CustomContextMenu );
setSelectionBehavior( QAbstractItemView::SelectRows );
setSelectionMode( QAbstractItemView::ExtendedSelection );
setDragEnabled( true );
setAcceptDrops( true );
setDropIndicatorShown( true );
setContextMenuPolicy( Qt::CustomContextMenu );
}
开发者ID:0xheart0,项目名称:vlc,代码行数:28,代码来源:views.cpp
示例19: QTreeView
QgsLocatorResultsView::QgsLocatorResultsView( QWidget *parent )
: QTreeView( parent )
{
setRootIsDecorated( false );
setUniformRowHeights( true );
header()->hide();
header()->setStretchLastSection( true );
}
开发者ID:CS-SI,项目名称:QGIS,代码行数:8,代码来源:qgslocatorwidget.cpp
示例20: QTreeView
//
// DependenciesView
//
DependenciesView::DependenciesView(QWidget *parent)
: QTreeView(parent)
{
m_sizeHint = QSize(250, 250);
setUniformRowHeights(true);
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::MinimumExpanding);
setRootIsDecorated(false);
}
开发者ID:RDFS,项目名称:qt-creator,代码行数:11,代码来源:dependenciespanel.cpp
注:本文中的setUniformRowHeights函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论