• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ setRootIsDecorated函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: QTreeView

HistoryView::HistoryView(QWidget* parent) : QTreeView(parent) {
  header()->setResizeMode(QHeaderView::Stretch);
  setRootIsDecorated(false);

  _model = new HistoryFilterModel(this);
  setModel(_model);
  setCurrentIndex(model()->index(0, 0, QModelIndex()));

  _removeShortcut = new QShortcut(QKeySequence::Delete, this);
  connect(_removeShortcut, SIGNAL(activated()), this, SLOT(removeCurrentItem()));

  _itemMenu = new QMenu(this);

  _openAction = _itemMenu->addAction(QIcon(":/openTab.png"), trUtf8("Open in new tab"));
  connect(_openAction, SIGNAL(triggered()), this, SLOT(addTabToCurrentItem()));

  _removeAction = _itemMenu->addAction(QIcon(":/delete.png"), trUtf8("Delete"));
  connect(_removeAction, SIGNAL(triggered()), this, SLOT(removeCurrentItem()));
}
开发者ID:Allanis,项目名称:SaraWeb,代码行数:19,代码来源:HistoryView.cpp


示例2: setHeaderLabel

void
query_listview::init()
{
  setHeaderLabel(tr("Quick selection"));
  setRootIsDecorated(true);

  fetch_tag_map();
  tags_definition_list tag_list;
  tag_list.fetch();
  tag_node root;
  root.get_child_tags(tag_list);

  // New messages
  query_lvitem* item_new = new query_lvitem(this, tr("Unread messages"));
  m_item_new_all = new query_lvitem(item_new, query_lvitem::new_all, tr("All"));
  m_item_new_untagged = new query_lvitem(item_new, query_lvitem::new_not_tagged, tr("Not tagged"));
  item_new->setExpanded(true);

  create_branch_current(&root);

  // Tagged messages
  // The root is a pseudo-tag with an id=0
  m_item_tags = new query_tag_lvitem(this, query_lvitem::archived_tagged, tr("Archived tagged mail"));

  insert_child_tags(&root, m_item_tags, query_lvitem::archived_tagged, NULL);
  m_item_tags->sortChildren(0, Qt::AscendingOrder);


  m_item_virtfold_sent = new query_lvitem(this, tr("Sent mail"));
  m_item_virtfold_sent->set_type(query_lvitem::virtfold_sent);

  m_item_virtfold_trashcan = new query_lvitem(this, tr("Trashcan"));
  m_item_virtfold_trashcan->set_type(query_lvitem::virtfold_trashcan);

  // User queries
  m_item_user_queries = new query_lvitem(this, tr("User queries"));
  reload_user_queries();

  display_counter(query_lvitem::new_all);
  display_counter(query_lvitem::nonproc_all);
  display_counter(query_lvitem::new_not_tagged);
}
开发者ID:AleksKots,项目名称:Manitou,代码行数:42,代码来源:query_listview.cpp


示例3: QTreeWidget

TrackerList::TrackerList(PropertiesWidget *properties): QTreeWidget(), properties(properties) {
  // Graphical settings
  setRootIsDecorated(false);
  setAllColumnsShowFocus(true);
  setItemsExpandable(false);
  setSelectionMode(QAbstractItemView::ExtendedSelection);
  // Context menu
  setContextMenuPolicy(Qt::CustomContextMenu);
  connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showTrackerListMenu(QPoint)));
  // Set header
  QStringList header;
  header << "#";
  header << tr("URL");
  header << tr("Status");
  header << tr("Peers");
  header << tr("Message");
  setHeaderItem(new QTreeWidgetItem(header));
  dht_item = new QTreeWidgetItem(QStringList() << "" << "** [DHT] **");
  insertTopLevelItem(0, dht_item);
  setRowColor(0, QColor("grey"));
  pex_item = new QTreeWidgetItem(QStringList() << "" << "** [PeX] **");
  insertTopLevelItem(1, pex_item);
  setRowColor(1, QColor("grey"));
  lsd_item = new QTreeWidgetItem(QStringList() << "" << "** [LSD] **");
  insertTopLevelItem(2, lsd_item);
  setRowColor(2, QColor("grey"));
  editHotkey = new QShortcut(QKeySequence("F2"), this, SLOT(editSelectedTracker()), 0, Qt::WidgetShortcut);
  connect(this, SIGNAL(doubleClicked(QModelIndex)), SLOT(editSelectedTracker()));
  deleteHotkey = new QShortcut(QKeySequence(QKeySequence::Delete), this, SLOT(deleteSelectedTrackers()), 0, Qt::WidgetShortcut);
  copyHotkey = new QShortcut(QKeySequence(Qt::ControlModifier + Qt::Key_C), this, SLOT(copyTrackerUrl()), 0, Qt::WidgetShortcut);

#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
    // This hack fixes reordering of first column with Qt5.
    // https://github.com/qtproject/qtbase/commit/e0fc088c0c8bc61dbcaf5928b24986cd61a22777
    QTableView unused;
    unused.setVerticalHeader(this->header());
    this->header()->setParent(this);
    unused.setVerticalHeader(new QHeaderView(Qt::Horizontal));
#endif

  loadSettings();
}
开发者ID:Godrod,项目名称:qBittorrent,代码行数:42,代码来源:trackerlist.cpp


示例4: toResultView

toResultStorage::toResultStorage(bool available, QWidget *parent, const char *name)
        : toResultView(false, false, parent, name), AvailableGraph(available)
{
    Unit = toConfigurationSingle::Instance().sizeUnit();
    setAllColumnsShowFocus(true);
    setSortingEnabled(false); // enable it after data fetch
    setRootIsDecorated(true);
    addColumn(tr("Name"));
    addColumn(tr("Status"));
    addColumn(tr("Information"));
    addColumn(tr("Contents"));
    addColumn(tr("Logging"));
    addColumn(tr("Size (%1)").arg(Unit));
    addColumn(tr("Free (%1)").arg(Unit));
    addColumn(tr("Free (%)"));
    addColumn(tr("Autoextend (%1)").arg(Unit));
    if (available)
        addColumn(tr("Used/Free/Autoextend"));
    else
        addColumn(tr("Available"));
    addColumn(tr("Coalesced"));
    addColumn(tr("Max free (%1)").arg(Unit));
    addColumn(tr("Free fragments"));
    setSQLName(tr("toResultStorage"));

    setColumnAlignment(COL_SIZE, Qt::AlignRight);
    setColumnAlignment(COL_FREE_UNIT, Qt::AlignRight);
    setColumnAlignment(COL_FREE_PERCENT, Qt::AlignRight);
    setColumnAlignment(COL_AUTOEXT, Qt::AlignCenter);
    setColumnAlignment(COL_USED_FREE_AUTO, Qt::AlignCenter);
    setColumnAlignment(COL_COALESCED, Qt::AlignRight);
    setColumnAlignment(COL_MAX_FREE, Qt::AlignRight);
    setColumnAlignment(COL_FREE_FRAGMENTS, Qt::AlignRight);

    ShowCoalesced = false;
    OnlyFiles = false;

    Tablespaces = Files = NULL;

    connect(&Poll, SIGNAL(timeout()), this, SLOT(poll()));
    setItemDelegate(new toResultStorageItemDelegate());
}
开发者ID:netrunner-debian-kde-extras,项目名称:tora,代码行数:42,代码来源:toresultstorage.cpp


示例5: QTreeWidget

WidgetBoxTreeWidget::WidgetBoxTreeWidget(QDesignerFormEditorInterface *core, QWidget *parent) :
    QTreeWidget(parent),
    m_core(core),
    m_iconMode(false),
    m_scratchPadDeleteTimer(0)
{
    setFocusPolicy(Qt::NoFocus);
    setIndentation(0);
    setRootIsDecorated(false);
    setColumnCount(1);
    header()->hide();
    header()->setResizeMode(QHeaderView::Stretch);
    setTextElideMode(Qt::ElideMiddle);
    setVerticalScrollMode(ScrollPerPixel);

    setItemDelegate(new SheetDelegate(this, this));

    connect(this, SIGNAL(itemPressed(QTreeWidgetItem*,int)),
            this, SLOT(handleMousePress(QTreeWidgetItem*)));
}
开发者ID:mohdpatah,项目名称:qt,代码行数:20,代码来源:widgetboxtreewidget.cpp


示例6: QTreeWidget

PlayerListWidget::PlayerListWidget(TabSupervisor *_tabSupervisor, AbstractClient *_client, TabGame *_game, QWidget *parent)
	: QTreeWidget(parent), tabSupervisor(_tabSupervisor), client(_client), game(_game), gameStarted(false)
{
	readyIcon = QIcon(":/resources/icon_ready_start.svg");
	notReadyIcon = QIcon(":/resources/icon_not_ready_start.svg");
	concededIcon = QIcon(":/resources/icon_conceded.svg");
	playerIcon = QIcon(":/resources/icon_player.svg");
	spectatorIcon = QIcon(":/resources/icon_spectator.svg");

	itemDelegate = new PlayerListItemDelegate(this);
	setItemDelegate(itemDelegate);
	
	setMinimumHeight(60);
	setIconSize(QSize(20, 15));
	setColumnCount(6);
	setHeaderHidden(true);
	setRootIsDecorated(false);
	header()->setResizeMode(QHeaderView::ResizeToContents);
	retranslateUi();
}
开发者ID:Zors,项目名称:Cockatrice,代码行数:20,代码来源:playerlistwidget.cpp


示例7: QTreeView

ContactListView::ContactListView(QWidget* parent)
: QTreeView(parent)
{
	setUniformRowHeights(false);
	setAlternatingRowColors(true);
	// setLargeIcons(false);
	// setShowIcons(true);
	setRootIsDecorated(false);
	// on Macs Enter key is the default EditKey, so we can't use EditKeyPressed
	setEditTriggers(QAbstractItemView::EditKeyPressed); // lesser evil, otherwise no editing will be possible at all due to Qt bug
	// setEditTriggers(QAbstractItemView::NoEditTriggers);
	setIndentation(5);
	header()->hide();

	// setItemDelegate(new PsiContactListViewDelegate(this));

#ifdef Q_WS_MAC
	setFrameShape(QFrame::NoFrame);
#endif
}
开发者ID:AlekSi,项目名称:Jabbin,代码行数:20,代码来源:contactlistview.cpp


示例8: toResultView

toResultLock::toResultLock(QWidget *parent, const char *name)
    : toResultView(false, false, parent, name)
{
    setAllColumnsShowFocus(true);
    setSorting( -1);
    setRootIsDecorated(true);
    addColumn(tr("Session"));
    addColumn(tr("Schema"));
    addColumn(tr("Osuser"));
    addColumn(tr("Program"));
    addColumn(tr("Type"));
    addColumn(tr("Mode"));
    addColumn(tr("Request"));
    addColumn(tr("Object"));
    addColumn(tr("Grabbed"));
    addColumn(tr("Requested"));
    setSQLName(QString::fromLatin1("toResultLock"));

    Query = NULL;
}
开发者ID:nguyentienlong,项目名称:tora,代码行数:20,代码来源:toresultlock.cpp


示例9: QTreeView

BaseTreeView::BaseTreeView(QWidget *parent)
    : QTreeView(parent)
{
    setAttribute(Qt::WA_MacShowFocusRect, false);
    setFrameStyle(QFrame::NoFrame);
    setRootIsDecorated(false);
    setIconSize(QSize(10, 10));
    setSelectionMode(QAbstractItemView::ExtendedSelection);
    setUniformRowHeights(true);

    header()->setDefaultAlignment(Qt::AlignLeft);
    header()->setClickable(true);

    connect(this, SIGNAL(activated(QModelIndex)),
        SLOT(rowActivatedHelper(QModelIndex)));
    connect(header(), SIGNAL(sectionClicked(int)),
        SLOT(headerSectionClicked(int)));

    m_adjustColumnsAction = new QAction(tr("Adjust Column Widths to Contents"), this);
    m_alwaysAdjustColumnsAction = 0;
}
开发者ID:CNOT,项目名称:julia-studio,代码行数:21,代码来源:basetreeview.cpp


示例10: m_appendAction

FileView::FileView( QWidget *parent )
    : Amarok::PrettyTreeView( parent )
    , m_appendAction( 0 )
    , m_loadAction( 0 )
    , m_editAction( 0 )
    , m_moveToTrashAction( 0 )
    , m_deleteAction( 0 )
    , m_pd( 0 )
    , m_ongoingDrag( false )
{
    setFrameStyle( QFrame::NoFrame );
    setItemsExpandable( false );
    setRootIsDecorated( false );
    setAlternatingRowColors( true );
    setUniformRowHeights( true );
    setEditTriggers( EditKeyPressed );

    The::paletteHandler()->updateItemView( this );
    connect( The::paletteHandler(), SIGNAL(newPalette(QPalette)),
                                    SLOT(newPalette(QPalette)) );
}
开发者ID:cancamilo,项目名称:amarok,代码行数:21,代码来源:FileView.cpp


示例11: QListView

CObjectListView::CObjectListView(CSceneGraph &sg, QWidget *parent, const char *name):
	QListView(parent, name), 
	m_pSG(&sg)
{		
    header()->setClickEnabled( TRUE );
    addColumn( "       Name      " );
    addColumn( "  Type " );
	addColumn( " Vertex#" );

    setRootIsDecorated(true);
	setSorting(-1);

	connect(this, SIGNAL(doubleClicked(QListViewItem *, const QPoint &, int)), 
			this, SLOT(slotDoubleClicked(QListViewItem *, const QPoint &, int)));

	//--------------------------------------
	update(sg);
	//--------------------------------------

    resize(180, 100);
}
开发者ID:nanzhang790,项目名称:View3dn,代码行数:21,代码来源:objectlistview.cpp


示例12: QTreeWidget

MetadataListView::MetadataListView(QWidget* parent)
    : QTreeWidget(parent)
{
    setRootIsDecorated(false);
    setSelectionMode(QAbstractItemView::SingleSelection);
    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    setAllColumnsShowFocus(true);
    setColumnCount(2);
    header()->setResizeMode(QHeaderView::Stretch);
    header()->hide();

    QStringList labels;
    labels.append( "Name" );        // no i18n here: hidden header
    labels.append( "Value" );       // no i18n here: hidden header
    setHeaderLabels(labels);

    m_parent = dynamic_cast<MetadataWidget*>(parent);

    connect(this, SIGNAL(itemClicked(QTreeWidgetItem*, int)),
            this, SLOT(slotSelectionChanged(QTreeWidgetItem*, int)));
}
开发者ID:UIKit0,项目名称:digikam,代码行数:21,代码来源:metadatalistview.cpp


示例13: QTreeView

/////////////// TableView
TableView::TableView(QWidget* parent)
    : QTreeView(parent)
    , _imp( new TableViewPrivate() )
{
    setSelectionBehavior(QAbstractItemView::SelectRows);
    setRootIsDecorated(false);
    setItemsExpandable(false);

    ///The table model here doesn't support sorting
    setSortingEnabled(false);

    header()->setStretchLastSection(false);
    header()->setFont( QApplication::font() ); // necessary, or the header font will have the default size, not the application font size
    setTextElideMode(Qt::ElideMiddle);
    setEditTriggers(QAbstractItemView::EditKeyPressed | QAbstractItemView::SelectedClicked | QAbstractItemView::DoubleClicked);
    setContextMenuPolicy(Qt::CustomContextMenu);
    setDragDropMode(QAbstractItemView::NoDragDrop);
    setAttribute(Qt::WA_MacShowFocusRect, 0);
    setAcceptDrops(true);
    setSelectionMode(QAbstractItemView::ExtendedSelection);
}
开发者ID:jessezwd,项目名称:Natron,代码行数:22,代码来源:TableModelView.cpp


示例14: QTreeWidget

RestHistoryWidget::RestHistoryWidget(QWidget *parent) :
    QTreeWidget(parent)
{
    QStringList params;
    params << "ID" << "Type" << "URL" << "Response Code" << "Date";
    setHeaderLabels(params);

    setColumnWidth(0,90);
    setColumnWidth(2,500);

    setAlternatingRowColors(true);
    setRootIsDecorated(true);
    setUniformRowHeights(true);
    setAllColumnsShowFocus(true);
    header()->setCascadingSectionResizes(true);
    header()->setHighlightSections(false);
    header()->setStretchLastSection(true);

    setSelectionMode(QAbstractItemView::ExtendedSelection);
    menu = new QMenu;
}
开发者ID:peterkomar,项目名称:qrestclient,代码行数:21,代码来源:resthistorywidget.cpp


示例15: QTreeView

PlacesView::PlacesView(QWidget* parent):
  QTreeView(parent),
  currentPath_(NULL) {
  setRootIsDecorated(false);
  setHeaderHidden(true);
  setIndentation(12);

  connect(this, &QTreeView::clicked, this, &PlacesView::onClicked);
  connect(this, &QTreeView::pressed, this, &PlacesView::onPressed);

  setIconSize(QSize(24, 24));

  // FIXME: we may share this model amont all views
  model_ = new PlacesModel(this);
  setModel(model_);

  QHeaderView* headerView = header();
  headerView->setSectionResizeMode(0, QHeaderView::Stretch);
  headerView->setSectionResizeMode(1, QHeaderView::Fixed);
  headerView->setStretchLastSection(false);
  expandAll();

  // FIXME: is there any better way to make the first column span the whole row?
  setFirstColumnSpanned(0, QModelIndex(), true); // places root
  setFirstColumnSpanned(1, QModelIndex(), true); // devices root
  setFirstColumnSpanned(2, QModelIndex(), true); // bookmarks root

  // the 2nd column is for the eject buttons
  setSelectionBehavior(QAbstractItemView::SelectRows); // FIXME: why this does not work?
  setAllColumnsShowFocus(false);

  setAcceptDrops(true);
  setDragEnabled(true);

  // update the umount button's column width based on icon size
  onIconSizeChanged(iconSize());
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0) // this signal requires Qt >= 5.5
  connect(this, &QAbstractItemView::iconSizeChanged, this, &PlacesView::onIconSizeChanged);
#endif
}
开发者ID:rbazaud,项目名称:pcmanfm-qt,代码行数:40,代码来源:placesview.cpp


示例16: KListView

PropertyEditor::PropertyEditor(QWidget * parent, const char * name)
        : KListView(parent, name)
        , m_items(101, false)
        , justClickedItem(false) 
	, m_currentEditor(0) {
    m_items.setAutoDelete(false);

    addColumn(i18n("Property"));
    addColumn(i18n("Value"));

    m_topItem = 0;
    m_editItem = 0;

    connect(this, SIGNAL(selectionChanged(QListViewItem *)), this, SLOT(slotClicked(QListViewItem *)));
    connect(this, SIGNAL(currentChanged(QListViewItem *)), this, SLOT(slotCurrentChanged(QListViewItem *)));
    connect(this, SIGNAL(expanded(QListViewItem *)), this, SLOT(slotExpanded(QListViewItem *)));
    connect(this, SIGNAL(collapsed(QListViewItem *)), this, SLOT(slotCollapsed(QListViewItem *)));
    connect(header(), SIGNAL(sizeChange(int, int, int)), this, SLOT(slotColumnSizeChanged(int, int, int)));
    connect(header(), SIGNAL(clicked(int)), this, SLOT(moveEditor()));
    connect(header(), SIGNAL(sectionHandleDoubleClicked(int)), this, SLOT(slotColumnSizeChanged(int)));

    m_defaults = new KPushButton(viewport());
    m_defaults->setFocusPolicy(QWidget::NoFocus);
    setFocusPolicy(QWidget::ClickFocus);
    m_defaults->setPixmap(SmallIcon("undo"));
    QToolTip::add(m_defaults, i18n("Undo changes"));
    m_defaults->hide();
    connect(m_defaults, SIGNAL(clicked()), this, SLOT(resetItem()));

    setRootIsDecorated(false);
    setShowSortIndicator(false);
    setTooltipColumn(0);
    setSorting(0);
    setItemMargin(2);
    setResizeMode(QListView::LastColumn);
    header()->setMovingEnabled(false);
    setTreeStepSize(0);

    m_baseRowHeight = QFontMetrics(font()).height() + itemMargin() * 2;
}
开发者ID:zoltanp,项目名称:ktechlab-0.3,代码行数:40,代码来源:propertyeditor.cpp


示例17: QTreeWidget

BasicMibView::BasicMibView (QWidget * parent) : QTreeWidget(parent)
{
    // Set some properties for the TreeView
    header()->hide();
    setSortingEnabled( false );
    setHorizontalScrollBarPolicy ( Qt::ScrollBarAlwaysOn );
    header()->setSortIndicatorShown( false );
    setLineWidth( 2 );
    setAllColumnsShowFocus( false );
    setFrameShape(QFrame::WinPanel);
    setFrameShadow(QFrame::Plain);
    setRootIsDecorated( true );
    
    // Create context menu actions
    expandAct = new QAction(tr("Expand"), this);
    expandAct->setIcon(QIcon(":/images/expand.png"));
    connect(expandAct, SIGNAL(triggered()), this, SLOT(ExpandFromNode()));
    collapseAct = new QAction(tr("Collapse"), this);
    collapseAct->setIcon(QIcon(":/images/collapse.png"));
    connect(collapseAct, SIGNAL(triggered()), this, SLOT(CollapseFromNode()));
    findAct = new QAction(tr("Find"), this);
    connect(findAct, SIGNAL(triggered()), this, SLOT(FindFromNode()));
    
    // Connect some signals
    connect( this, SIGNAL( itemExpanded( QTreeWidgetItem * ) ),
             this, SLOT( ExpandNode( QTreeWidgetItem * ) ) );
    connect( this, SIGNAL( itemCollapsed( QTreeWidgetItem * ) ),
             this, SLOT( CollapseNode( QTreeWidgetItem * ) ) );
    connect( this, SIGNAL( currentItemChanged( QTreeWidgetItem *, QTreeWidgetItem * ) ),
             this, SLOT( SelectedNode( QTreeWidgetItem *, QTreeWidgetItem * ) ) );

    // Force initial refresh
    isdirty = 1;

    find_string = "";
    find_last = model()->index(0, 0, QModelIndex());
    find_back = false;
    find_cs = false;
    find_word = false;
}
开发者ID:gudkov-konstantin,项目名称:snmpb,代码行数:40,代码来源:mibview.cpp


示例18: KFileTreeView

BaseTreeView::BaseTreeView(QWidget *parent, const char *name)
: KFileTreeView(parent, name), fileInfoDlg(0), m_saveOpenFolder(false), m_openWithMenu(0L), m_openWithMenuId(-1)
{
  m_parent = parent;
  QToolTip::remove(viewport());  // remove the tooltip from QListView
  m_tooltip = new BaseTreeViewToolTip(viewport(), this);
  setFrameStyle( Panel | Sunken );
  setRootIsDecorated(true);
  setSorting(0);
  setLineWidth(2);
  setFullWidth(true);
  setShowSortIndicator(true);
  setFocusPolicy(QWidget::ClickFocus);
  setShowFolderOpenPixmap(false);

  connect(this, SIGNAL(returnPressed(QListViewItem *)),
          this, SLOT(slotReturnPressed(QListViewItem *)));

  connect(this, SIGNAL(dropped(QWidget *, QDropEvent *, KURL::List&, KURL&)),
          this, SLOT(slotDropped(QWidget *, QDropEvent *, KURL::List&, KURL&)));

  connect(this, SIGNAL(itemRenamed(QListViewItem*, const QString &, int )),
          this, SLOT(slotRenameItem(QListViewItem*, const QString &, int )));

  connect(this, SIGNAL(executed(QListViewItem *)),
          this, SLOT(slotSelectFile(QListViewItem *)));

  connect(this, SIGNAL(openFile(const KURL &)),
          quantaApp, SLOT(slotFileOpen(const KURL &)));

  connect(this, SIGNAL(openImage(const KURL &)),
          quantaApp, SLOT(slotImageOpen(const KURL &)));

  connect(this, SIGNAL(closeFile(const KURL &)),
          quantaApp, SLOT(slotFileClose(const KURL &)));

  connect(this, SIGNAL(insertTag(const KURL &, DirInfo)),
          quantaApp, SLOT(slotInsertTag(const KURL &, DirInfo)));
}
开发者ID:serghei,项目名称:kde3-kdewebdev,代码行数:39,代码来源:basetreeview.cpp


示例19: QTreeView

QtChatListWindow::QtChatListWindow(UIEventStream *uiEventStream, SettingsProvider* settings, QWidget* parent) : QTreeView(parent) {
	eventStream_ = uiEventStream;
	settings_ = settings;;
	bookmarksEnabled_ = false;
	model_ = new ChatListModel();
	setModel(model_);
	delegate_ = new ChatListDelegate(settings_->getSetting(QtUISettingConstants::COMPACT_ROSTER));
	setItemDelegate(delegate_);
	setHeaderHidden(true);
#ifdef SWIFT_PLATFORM_MACOSX
	setAlternatingRowColors(true);
#endif
	expandAll();
	setAnimated(true);
	setIndentation(0);
	setRootIsDecorated(true);
	setupContextMenus();
	connect(this, SIGNAL(activated(const QModelIndex&)), this, SLOT(handleItemActivated(const QModelIndex&)));
	connect(this, SIGNAL(clicked(const QModelIndex&)), this, SLOT(handleClicked(const QModelIndex&)));

	settings_->onSettingChanged.connect(boost::bind(&QtChatListWindow::handleSettingChanged, this, _1));
}
开发者ID:smuralireddy,项目名称:swift,代码行数:22,代码来源:QtChatListWindow.cpp


示例20: QTreeWidget

CallView::CallView(bool showCallers, TraceItemView* parentView, QWidget* parent)
    : QTreeWidget(parent), TraceItemView(parentView)
{
    _showCallers = showCallers;

    setColumnCount(4);

    _headerLabels  << tr( "Cost" )
                   << tr( "Cost 2" )
                   << tr( "Count" )
                   << ((_showCallers) ? tr( "Caller" ) : tr( "Callee" ));
    setHeaderLabels(_headerLabels);

    // forbid scaling icon pixmaps to smaller size
    setIconSize(QSize(99,99));
    setAllColumnsShowFocus(true);
    setRootIsDecorated(false);
    // 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)));
}
开发者ID:Zekom,项目名称:kcachegrind,代码行数:39,代码来源:callview.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ setRotation函数代码示例发布时间:2022-05-30
下一篇:
C++ setRoot函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap