本文整理汇总了C++中setUniformRowHeights函数的典型用法代码示例。如果您正苦于以下问题:C++ setUniformRowHeights函数的具体用法?C++ setUniformRowHeights怎么用?C++ setUniformRowHeights使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setUniformRowHeights函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
示例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());
}
示例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 );
}
示例4: setEditTriggers
void PropertyBrowser::initView()
{
setEditTriggers(QAbstractItemView::AllEditTriggers);
setAlternatingRowColors(true);
setUniformRowHeights(true);
setTabKeyNavigation(true);
}
示例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();
}
示例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()));
}
示例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()));
}
示例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);
}
示例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()));
}
示例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()));
}
示例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()));
}
示例12: QTreeView
MshView::MshView( QWidget* parent /*= 0*/ )
: QTreeView(parent)
{
setUniformRowHeights(true);
//resizeColumnsToContents();
//resizeRowsToContents();
}
示例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();
}
示例14: QTreeView
QompPluginTreeView::QompPluginTreeView(QWidget *parent) :
QTreeView(parent)
{
setHeaderHidden(true);
setItemsExpandable(true);
setUniformRowHeights(true);
}
示例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();
}