本文整理汇总了C++中setAllColumnsShowFocus函数的典型用法代码示例。如果您正苦于以下问题:C++ setAllColumnsShowFocus函数的具体用法?C++ setAllColumnsShowFocus怎么用?C++ setAllColumnsShowFocus使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setAllColumnsShowFocus函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setRootIsDecorated
QNodeTreeView::QNodeTreeView(QWidget *parent, const char *name)
: Inherited (parent, name ),
_pRoot (NullFC ),
_uiAspect (Thread::getCurrent()->getAspect())
{
setRootIsDecorated (true );
setAllColumnsShowFocus(true );
setSorting (-1 );
addColumn (QString("FC Type"));
addColumn (QString("FC Name"));
}
示例2: QTreeView
ItemViewWidget::ItemViewWidget(QWidget *parent) : QTreeView(parent),
m_model(NULL),
m_dropRow(-1),
m_isModified(false)
{
optionChanged(QLatin1String("Interface/ShowScrollBars"), SettingsManager::getValue(QLatin1String("Interface/ShowScrollBars")));
setIndentation(0);
setAllColumnsShowFocus(true);
viewport()->setAcceptDrops(true);
}
示例3: QTreeWidget
KrTreeWidget::KrTreeWidget(QWidget * parent) : QTreeWidget(parent), _inResize(false)
{
setRootIsDecorated(false);
setSortingEnabled(true);
setAllColumnsShowFocus(true);
_stretchingColumn = -1;
KrStyleProxy *krstyle = new KrStyleProxy();
krstyle->setParent(this);
setStyle(krstyle);
}
示例4: header
/** Initializes the view. */
void CBookmarkIndex::initView()
{
//qDebug("CBookmarkIndex::initView");
header()->hide();
setFocusPolicy(Qt::WheelFocus);
//d'n'd related settings
setDragEnabled( true );
setAcceptDrops( true );
setDragDropMode(QAbstractItemView::DragDrop);
viewport()->setAcceptDrops(true);
setAutoScroll(true);
setAutoExpandDelay(800);
setItemsExpandable(true);
setRootIsDecorated(true);
setAllColumnsShowFocus(true);
setSelectionMode(QAbstractItemView::ExtendedSelection);
//setup the popup menu
m_popup = new QMenu(viewport());
m_popup->setTitle(tr("Bookmarks"));
m_actions.newFolder = newQAction(tr("New folder"), CResMgr::mainIndex::newFolder::icon, 0, this, SLOT(createNewFolder()), this);
m_actions.changeFolder = newQAction(tr("Rename folder"),CResMgr::mainIndex::changeFolder::icon, 0, this, SLOT(changeFolder()), this);
m_actions.changeBookmark = newQAction(tr("Change bookmark description..."), CResMgr::mainIndex::changeBookmark::icon, 0, this, SLOT(changeBookmark()), this);
m_actions.importBookmarks = newQAction(tr("Import to folder..."), CResMgr::mainIndex::importBookmarks::icon, 0, this, SLOT(importBookmarks()), this);
m_actions.exportBookmarks = newQAction(tr("Export from folder..."), CResMgr::mainIndex::exportBookmarks::icon, 0, this, SLOT(exportBookmarks()), this);
m_actions.printBookmarks = newQAction(tr("Print bookmarks..."), CResMgr::mainIndex::printBookmarks::icon, 0, this, SLOT(printBookmarks()), this);
m_actions.deleteEntries = newQAction(tr("Remove selected items..."), CResMgr::mainIndex::deleteItems::icon, 0, this, SLOT(deleteEntries()), this);
//fill the popup menu itself
m_popup->addAction(m_actions.newFolder);
m_popup->addAction(m_actions.changeFolder);
QAction* separator = new QAction(this);
separator->setSeparator(true);
m_popup->addAction(separator);
m_popup->addAction(m_actions.changeBookmark);
m_popup->addAction(m_actions.importBookmarks);
m_popup->addAction(m_actions.exportBookmarks);
m_popup->addAction(m_actions.printBookmarks);
separator = new QAction(this);
separator->setSeparator(true);
m_popup->addAction(separator);
m_popup->addAction(m_actions.deleteEntries);
//qDebug("CBookmarkIndex::initView end");
}
示例5: setUniformRowHeights
MailBoxTreeView::MailBoxTreeView()
{
setUniformRowHeights(true);
setContextMenuPolicy(Qt::CustomContextMenu);
setSelectionMode(QAbstractItemView::SingleSelection);
setAllColumnsShowFocus(true);
setAcceptDrops(true);
setDropIndicatorShown(true);
setHeaderHidden(true);
// I wonder what's the best value to use here. Unfortunately, the default is to disable auto expanding.
setAutoExpandDelay(800);
}
示例6: QListView
PhraseLV::PhraseLV( QWidget *parent, const char *name )
: QListView( parent, name )
{
setAllColumnsShowFocus( TRUE );
setShowSortIndicator( TRUE );
for ( int i = 0; i < 3; i++ )
addColumn( QString::null, 120 );
setColumnText( PhraseLVI::SourceTextShown, tr("Source phrase") );
setColumnText( PhraseLVI::TargetTextShown, tr("Translation") );
setColumnText( PhraseLVI::DefinitionText, tr("Definition") );
header()->setStretchEnabled( TRUE, -1 );
what = new WhatPhrase( this );
}
示例7: K3ListView
TreeView::TreeView( bool controlCenter, KActionCollection *ac, QWidget *parent, const char *name )
: K3ListView(parent), m_ac(ac), m_rmb(0), m_clipboard(0),
m_clipboardFolderInfo(0), m_clipboardEntryInfo(0),
m_controlCenter(controlCenter), m_layoutDirty(false)
{
setObjectName(name);
setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
setAllColumnsShowFocus(true);
setRootIsDecorated(true);
setSorting(-1);
setAcceptDrops(true);
setDropVisualizer(true);
setDragEnabled(true);
setMinimumWidth(240);
addColumn("");
header()->hide();
connect(this, SIGNAL(dropped(QDropEvent*, Q3ListViewItem*, Q3ListViewItem*)),
SLOT(slotDropped(QDropEvent*, Q3ListViewItem*, Q3ListViewItem*)));
connect(this, SIGNAL(clicked( Q3ListViewItem* )),
SLOT(itemSelected( Q3ListViewItem* )));
connect(this,SIGNAL(selectionChanged ( Q3ListViewItem * )),
SLOT(itemSelected( Q3ListViewItem* )));
connect(this, SIGNAL(rightButtonPressed(Q3ListViewItem*, const QPoint&, int)),
SLOT(slotRMBPressed(Q3ListViewItem*, const QPoint&)));
// connect actions
connect(m_ac->action("newitem"), SIGNAL(activated()), SLOT(newitem()));
connect(m_ac->action("newsubmenu"), SIGNAL(activated()), SLOT(newsubmenu()));
if (m_ac->action("newsep"))
connect(m_ac->action("newsep"), SIGNAL(activated()), SLOT(newsep()));
m_menuFile = new MenuFile( KStandardDirs::locateLocal("xdgconf-menu", "applications-kmenuedit.menu"));
m_rootFolder = new MenuFolderInfo;
m_separator = new MenuSeparatorInfo;
m_drag = 0;
// Read menu format configuration information
KSharedConfig::Ptr pConfig = KSharedConfig::openConfig("kickerrc");
KConfigGroup cg(pConfig, "menus");
m_detailedMenuEntries = cg.readEntry("DetailedMenuEntries", true);
if (m_detailedMenuEntries)
{
m_detailedEntriesNamesFirst = cg.readEntry("DetailedEntriesNamesFirst", false);
}
}
示例8: QTreeWidget
SearchListView::SearchListView(SearchFilter* filter, QWidget* parent, const char* name)
: QTreeWidget(parent), mFilter(filter), mN(0) {
QStringList headers;
headers << QString::null << tr("User") << tr("Filename") << tr("Size") << tr("Speed") << tr("Queued") << tr("Imm.") << tr("Length") << tr("Bitrate") << tr("Path") << QString::null;
setHeaderLabels(headers);
setSortingEnabled(false);
header()->setClickable(true);
setRootIsDecorated(false);
setSelectionMode(QAbstractItemView::ExtendedSelection);
setAllColumnsShowFocus(true);
setColumnWidth ( 0, 30 );
setColumnWidth ( 1, 100 );
setColumnWidth ( 2, 250 );
setColumnWidth ( 3, 100 );
setColumnWidth ( 4, 100 );
setColumnWidth ( 5, 75 );
setColumnWidth ( 6, 30 );
setColumnWidth ( 7, 75 );
setColumnWidth ( 8, 75 );
setColumnWidth ( 9, 150 );
setColumnWidth ( 10, 250 );
setColumnWidth ( 11, 0 );
mPopupMenu = new QMenu(this);
QAction * ActionDownloadFiles, * ActionDownloadFilesTo, * ActionDownloadFolders;
ActionDownloadFiles = new QAction(tr("Download file(s)"), this);
connect(ActionDownloadFiles, SIGNAL(triggered()), this, SLOT(downloadFiles()));
mPopupMenu->addAction(ActionDownloadFiles);
ActionDownloadFilesTo = new QAction(tr("Download file(s) to..."), this);
connect(ActionDownloadFilesTo, SIGNAL(triggered()), this, SLOT(downloadFilesTo()));
mPopupMenu->addAction(ActionDownloadFilesTo);
ActionDownloadFolders = new QAction(tr("Download selected folder(s)"), this);
connect(ActionDownloadFolders, SIGNAL(triggered()), this, SLOT(downloadFolders()));
mPopupMenu->addAction(ActionDownloadFolders);
mPopupMenu->addSeparator();
mUsersMenu = mPopupMenu->addMenu(tr("Users"));
setContextMenuPolicy(Qt::CustomContextMenu);
connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), SLOT(slotContextMenu(const QPoint&)));
connect(this, SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)), SLOT(slotActivate(QTreeWidgetItem*, int)));
connect(this, SIGNAL(itemActivated(QTreeWidgetItem*, int)), SLOT(slotActivate(QTreeWidgetItem*, int)));
connect(header(), SIGNAL(sectionClicked(int)), this, SLOT(headerClicked(int)));
setDragEnabled(true);
}
示例9: Q3ListView
SEQListView::SEQListView(const QString prefName,
QWidget* parent, const char* name, Qt::WFlags f)
: Q3ListView(parent, name, f),
m_preferenceName(prefName),
m_sortColumn(0),
m_sortIncreasing(true)
{
// setup common listview defaults
setShowSortIndicator(true);
setRootIsDecorated(false);
setSelectionMode(Single);
setAllColumnsShowFocus(true);
setShowSortIndicator(true);
}
示例10: QTreeWidget
CoverageView::CoverageView(bool showCallers, TraceItemView* parentView, QWidget* parent)
: QTreeWidget(parent), TraceItemView(parentView)
{
_showCallers = showCallers;
QStringList labels;
labels << tr( "Incl." );
if (_showCallers) {
setColumnCount(4);
labels << tr( "Distance" ),
labels << tr( "Called" ),
labels << tr( "Caller" );
}
else {
setColumnCount(5);
labels << tr( "Self" ),
labels << tr( "Distance" ),
labels << tr( "Calling" ),
labels << tr( "Callee" );
}
setHeaderLabels(labels);
// forbid scaling icon pixmaps to smaller size
setIconSize(QSize(99,99));
setAllColumnsShowFocus(true);
setRootIsDecorated(false);
setUniformRowHeights(true);
// sorting will be enabled after refresh()
sortByColumn(0, Qt::DescendingOrder);
setMinimumHeight(50);
this->setWhatsThis( whatsThis() );
connect( this,
SIGNAL( currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),
SLOT( selectedSlot(QTreeWidgetItem*,QTreeWidgetItem*) ) );
setContextMenuPolicy(Qt::CustomContextMenu);
connect( this,
SIGNAL(customContextMenuRequested(const QPoint &) ),
SLOT(context(const QPoint &)));
connect(this,
SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)),
SLOT(activatedSlot(QTreeWidgetItem*,int)));
connect(header(), SIGNAL(sectionClicked(int)),
this, SLOT(headerClicked(int)));
}
示例11: QTreeWidget
ChannelListWidget::ChannelListWidget(QWidget *parent, YellowPage *yellowPage)
: QTreeWidget(parent), m_active(false), m_linkHovered(false), m_pressedChannel(0)
{
setYellowPage(yellowPage);
m_lastUpdatedTime = QDateTime::currentDateTime();
QVector<QString> labels(LabelCount);
labels[Status] = tr("S");
labels[Name] = tr("配信者");
labels[Description] = tr("詳細");
labels[Listeners] = tr("視聴者数");
labels[Relays] = tr("リレー数");
labels[Score] = tr("スコア");
labels[Uptime] = tr("配信時間");
labels[Bitrate] = tr("ビットレート");
labels[Type] = tr("種類");
setHeaderLabels(labels.toList());
header()->setStretchLastSection(true);
header()->setContextMenuPolicy(Qt::CustomContextMenu);
connect(header(), SIGNAL(customContextMenuRequested(QPoint)),
SLOT(headerContextMenuRequested(QPoint)));
readSettings();
int lastSection = -1;
for (int i = 0; i < header()->count(); ++i)
if (header()->sectionSize(i))
lastSection = i;
if (lastSection != -1)
header()->resizeSection(lastSection, fontMetrics().width(labels[lastSection])
+ style()->pixelMetric(QStyle::PM_HeaderGripMargin) * 2);
setAllColumnsShowFocus(true);
setSortingEnabled(true);
setRootIsDecorated(false);
setMouseTracking(linkEnabled());
#ifdef Q_WS_MAC
QFont f(font());
f.setPointSize(f.pointSize() - 2);
setFont(f);
#endif
installEventFilter(new ViEmacsBindings(this));
updateActions();
connect(this, SIGNAL(itemActivated(QTreeWidgetItem *, int)), SLOT(playChannel()));
connect(this, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)),
SLOT(currentItemChanged(QTreeWidgetItem *)));
connect(this, SIGNAL(linkHovered(Channel *)), SLOT(onLinkHovered(Channel *)));
connect(this, SIGNAL(linkClicked(Channel *)), SLOT(onLinkClicked(Channel *)));
}
示例12: QTreeWidget
KBJobListView::KBJobListView(QWidget *parent)
: QTreeWidget(parent)
{
setColumnCount(7);
setAllColumnsShowFocus(true);
setHeaderLabels(QStringList() << i18n("Job Id")
<< i18n("Job Type")
<< i18n("Institute")
<< i18n("Account")
<< i18n("Status")
<< i18n("Backend")
<< i18n("Application"));
header()->setSortIndicatorShown(true);
}
示例13: QTreeView
CGroupListView::CGroupListView(QWidget *parent, CGroupList *model)
: QTreeView(parent)
{
setModel(model);
setItemDelegate(new CGroupListViewDelegate(this));
sortByColumn(COL_GROUP_NAME, Qt::AscendingOrder);
setSelectionMode(QAbstractItemView::SingleSelection);
setSortingEnabled(true);
setAllColumnsShowFocus(true);
setAlternatingRowColors(true);
setAcceptDrops(true);
setDragDropMode(QAbstractItemView::DropOnly);
setDropIndicatorShown(true);
setDragEnabled(false);
header()->setSortIndicatorShown(true);
setRootIsDecorated(false);
itsMenu=new QMenu(this);
itsDeleteAct=itsMenu->addAction(QIcon::fromTheme("list-remove"), i18n("Remove"),
this, SIGNAL(del()));
itsMenu->addSeparator();
itsEnableAct=itsMenu->addAction(QIcon::fromTheme("enablefont"), i18n("Enable"),
this, SIGNAL(enable()));
itsDisableAct=itsMenu->addAction(QIcon::fromTheme("disablefont"), i18n("Disable"),
this, SIGNAL(disable()));
itsMenu->addSeparator();
itsRenameAct=itsMenu->addAction(QIcon::fromTheme("edit-rename"), i18n("Rename..."),
this, SLOT(rename()));
if(!Misc::app(KFI_PRINTER).isEmpty())
{
itsMenu->addSeparator();
itsPrintAct=itsMenu->addAction(QIcon::fromTheme("document-print"), i18n("Print..."),
this, SIGNAL(print()));
}
else
itsPrintAct=0L;
itsMenu->addSeparator();
itsExportAct=itsMenu->addAction(QIcon::fromTheme("document-export"), i18n("Export..."),
this, SIGNAL(zip()));
setWhatsThis(model->whatsThis());
header()->setWhatsThis(whatsThis());
connect(this, SIGNAL(addFamilies(QModelIndex,QSet<QString>)),
model, SLOT(addToGroup(QModelIndex,QSet<QString>)));
connect(this, SIGNAL(removeFamilies(QModelIndex,QSet<QString>)),
model, SLOT(removeFromGroup(QModelIndex,QSet<QString>)));
}
示例14: QTreeView
KateFileTree::KateFileTree(QWidget *parent): QTreeView(parent)
{
setAcceptDrops(false);
setIndentation(12);
setAllColumnsShowFocus(true);
setTextElideMode(Qt::ElideLeft);
connect( this, SIGNAL(clicked(QModelIndex)), this, SLOT(mouseClicked(QModelIndex)));
m_filelistCloseDocument = new QAction( KIcon("window-close"), i18n( "Close" ), this );
connect( m_filelistCloseDocument, SIGNAL(triggered()), this, SLOT(slotDocumentClose()) );
m_filelistCloseDocument->setWhatsThis(i18n("Close the current document."));
m_filelistCopyFilename = new QAction( KIcon("copy"), i18n( "Copy Filename" ), this );
connect( m_filelistCopyFilename, SIGNAL(triggered()), this, SLOT(slotCopyFilename()) );
m_filelistCopyFilename->setWhatsThis(i18n("Copy the filename of the file."));
QActionGroup *modeGroup = new QActionGroup(this);
m_treeModeAction = setupOption(modeGroup, KIcon("view-list-tree"), i18n("Tree Mode"),
i18n("Set view style to Tree Mode"),
SLOT(slotTreeMode()), true);
m_listModeAction = setupOption(modeGroup, KIcon("view-list-text"), i18n("List Mode"),
i18n("Set view style to List Mode"),
SLOT(slotListMode()), false);
QActionGroup *sortGroup = new QActionGroup(this);
m_sortByFile = setupOption(sortGroup, KIcon(), i18n("Document Name"),
i18n("Sort by Document Name"),
SLOT(slotSortName()), true);
m_sortByPath = setupOption(sortGroup, KIcon(), i18n("Document Path"),
i18n("Sort by Document Path"),
SLOT(slotSortPath()), false);
m_sortByOpeningOrder = setupOption(sortGroup, KIcon(), i18n("Opening Order"),
i18n("Sort by Opening Order"),
SLOT(slotSortOpeningOrder()), false);
QPalette p = palette();
p.setColor(QPalette::Inactive, QPalette::Highlight, p.color(QPalette::Active, QPalette::Highlight));
p.setColor(QPalette::Inactive, QPalette::HighlightedText, p.color(QPalette::Active, QPalette::HighlightedText));
setPalette(p);
}
示例15: KListView
TOC::TOC(QWidget *parent, KPDFDocument *document) : KListView(parent), m_document(document)
{
addColumn( i18n("Topic") );
#ifdef TOC_ENABLE_PAGE_COLUMN
addColumn( i18n("Page") );
#else
header() -> hide();
#endif
setSorting(-1);
setRootIsDecorated(true);
// the next line causes bug:147233
// setResizeMode(AllColumns);
setAllColumnsShowFocus(true);
connect(this, SIGNAL(clicked(QListViewItem *)), this, SLOT(slotExecuted(QListViewItem *)));
connect(this, SIGNAL(returnPressed(QListViewItem *)), this, SLOT(slotExecuted(QListViewItem *)));
}