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

C++ createContextMenu函数代码示例

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

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



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

示例1: slotMultiSelect

void OutlinePalette::slotRightClick(QPoint point)
{
	if (!m_MainWindow || m_MainWindow->scriptIsRunning())
		return;
	QTreeWidgetItem *ite = reportDisplay->itemAt(point);
	if (ite == NULL)
		return;
	if (!ite->isSelected())
		slotMultiSelect();
	OutlineTreeItem *item = (OutlineTreeItem*)ite;
	
	if (item != NULL)
	{
		if ((item->type == 0) || (item->type == 2))
			createContextMenu(NULL, point.x(), point.y());
		else if ((item->type == 1) || (item->type == 3) || (item->type == 4))
		{
			PageItem *currItem = item->PageItemObject;
			if (currItem!=NULL)
			{
				currentObject = ite;
				createContextMenu(currItem, point.x(), point.y());
			}
		}
	}
}
开发者ID:moceap,项目名称:scribus,代码行数:26,代码来源:outlinepalette.cpp


示例2: createWidgets

void chanFileSystemDockWidget::init() {

    createWidgets();
    createContextMenu();
    createFileSystemTree();
    createRoot();
}
开发者ID:jzsun,项目名称:ChanIDE,代码行数:7,代码来源:chanFileSystemDockWidget.cpp


示例3: QTableView

SyncErrorsTableView::SyncErrorsTableView(QWidget *parent)
    : QTableView(parent)
{
    verticalHeader()->hide();
    verticalHeader()->setDefaultSectionSize(36);
    horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
    horizontalHeader()->setStretchLastSection(true);
    horizontalHeader()->setCascadingSectionResizes(true);
    horizontalHeader()->setHighlightSections(false);
    horizontalHeader()->setDefaultAlignment(Qt::AlignLeft | Qt::AlignVCenter);

    setGridStyle(Qt::NoPen);
    setShowGrid(false);
    setContentsMargins(0, 0, 0, 0);
    setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);

    setSelectionBehavior(QAbstractItemView::SelectRows);
    setSelectionMode(QAbstractItemView::ExtendedSelection);
    setMouseTracking(true);

    createContextMenu();

    connect(this, SIGNAL(doubleClicked(const QModelIndex&)),
            this, SLOT(onItemDoubleClicked(const QModelIndex&)));
}
开发者ID:XilongPei,项目名称:seafile-client,代码行数:25,代码来源:sync-errors-dialog.cpp


示例4: QFrame

/*" + gaycolor.red() + "," + gaycolor.green() + "," + gaycolor.blue() + "*/
PluginGeneratorGUI::PluginGeneratorGUI(PluginManager& pman,QWidget* parent )
:QDockWidget(parent),plugscriptname(),author(),mail(),init(false),finfo(QApplication::applicationDirPath()),doc(NULL),PM(pman)
{
	QFrame* f = new QFrame(this);
	QGridLayout* lay = new QGridLayout();
	tabs = new QTabWidget(this);
	tabs->setUsesScrollButtons(true);
	//setWidget(tabs);
	int openedtabs = tabs->count();
	if (openedtabs == 0)
		addNewFilter();
	else 
	{
		if (openedtabs > 1)
			for (int ii = 1;ii < openedtabs;++ii)
				tabs->removeTab(ii);
		addNewFilter();
	}
	lay->addWidget(tabs);
	lay->setAlignment(Qt::AlignVCenter);
	f->setLayout(lay);
	setWidget(f);
	createContextMenu();
	this->setVisible(false);
	//this->setScroll
}
开发者ID:HaiJiaoXinHeng,项目名称:meshlab,代码行数:27,代码来源:xmlgeneratorgui.cpp


示例5: QAbstractScrollArea

ByteViewText::ByteViewText(const QByteArray &data, packet_char_enc encoding, QWidget *parent) :
    QAbstractScrollArea(parent),
    layout_(new QTextLayout()),
    data_(data),
    encoding_(encoding),
    hovered_byte_offset_(-1),
    marked_byte_offset_(-1),
    proto_start_(0),
    proto_len_(0),
    field_start_(0),
    field_len_(0),
    field_a_start_(0),
    field_a_len_(0),
    show_offset_(true),
    show_hex_(true),
    show_ascii_(true),
    row_width_(recent.gui_bytes_view == BYTES_HEX ? 16 : 8),
    font_width_(0),
    line_height_(0)
{
    layout_->setCacheEnabled(true);

    offset_normal_fg_ = ColorUtils::alphaBlend(palette().windowText(), palette().window(), 0.35);
    offset_field_fg_ = ColorUtils::alphaBlend(palette().windowText(), palette().window(), 0.65);

    createContextMenu();

    setMouseTracking(true);

#ifdef Q_OS_MAC
    setAttribute(Qt::WA_MacShowFocusRect, true);
#endif
}
开发者ID:acaceres2176,项目名称:wireshark,代码行数:33,代码来源:byte_view_text.cpp


示例6: QTabWidget

MainWindow::MainWindow()
    :documents()
{
    tabWidget = new QTabWidget(this);
    tabWidget -> setTabsClosable(true);
    tabWidget -> setUsesScrollButtons(true);
    tabWidget -> setDocumentMode(true);
    connect(tabWidget, SIGNAL(tabCloseRequested(int)), this, SLOT(closeTab(int)));
    connect(tabWidget, SIGNAL(currentChanged(int)), this, SLOT(currentTabChanged(int)));
    setCentralWidget(tabWidget);

	createActions();
	createMenus();
    createContextMenu(0);
	createToolBars();
	createStatusBar();
	readSettings();
    findDialog = 0;
    setWindowIcon(QIcon(":/images/pics/ss.png"));
	setCurrentFile("");

    //test
    setWindowModified(true);
    setCurrentFile(tr("data.sp"));
    setCurrentFile(tr("money.sp"));
    setCurrentFile(tr("students.sp"));
    setCurrentFile(tr("teachers.sp"));
    setCurrentFile(tr("total.sp"));
}
开发者ID:kernelhcy,项目名称:hcyprojects,代码行数:29,代码来源:mainwindow.cpp


示例7: QSystemTrayIcon

SeafileTrayIcon::SeafileTrayIcon(QObject *parent)
    : QSystemTrayIcon(parent),
      nth_trayicon_(0),
      rotate_counter_(0)
{
    setToolTip(SEAFILE_CLIENT_BRAND);
    setState(STATE_DAEMON_DOWN);
    rotate_timer_ = new QTimer(this);
    connect(rotate_timer_, SIGNAL(timeout()), this, SLOT(rotateTrayIcon()));

    refresh_timer_ = new QTimer(this);
    connect(refresh_timer_, SIGNAL(timeout()), this, SLOT(refreshTrayIcon()));

    createActions();
    createContextMenu();

    connect(this, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
            this, SLOT(onActivated(QSystemTrayIcon::ActivationReason)));

    hide();

#if defined(Q_WS_MAC)
    tnm = new TrayNotificationManager(this);
#endif
}
开发者ID:arthur-zhang,项目名称:seafile-client,代码行数:25,代码来源:tray-icon.cpp


示例8: setCentralWidget

/** Default Constructor
  *
  * The parent parameter is not needed here unlike in the
  * dialogs because the main window doesn't have a parrent.
  * how sad...
  * */
MainWindow::MainWindow()
{
    /* Create a spreadsheet widget which will be implimented
     * in chapter 4 of the book. It is then set as the central
     * widget of the main window.
     * */
    spreadsheet = new Spreadsheet;
    setCentralWidget(spreadsheet);

    /* These functions set up the rest of the main window */
    createActions();
    createMenus();
    createContextMenu();
    createToolBar();
    createStatusBar();

    /* Read the application's saved settings */
    readSettings();

    /* Not created as an object yet just as a NULL pointer for now */
    findDialog = 0;

    /* Set the icon at the top of the window. this is platform independent
     * unfortunately there is no platform independent way of setting the
     * desktop icon. :(
     *
     * to refer to resources define in the pro file we use ':/' as
     * demonstrated below. More in Ch 12 in book.
     * */
    setWindowIcon(QIcon(":/images/icon.png"));
    setCurrentFile("");
}
开发者ID:cweidner3,项目名称:QtTutorialRunThrough,代码行数:38,代码来源:mainwindow.cpp


示例9: QSystemTrayIcon

SeafileTrayIcon::SeafileTrayIcon(QObject *parent)
    : QSystemTrayIcon(parent),
      nth_trayicon_(0),
      rotate_counter_(0)
{
    setState(STATE_DAEMON_DOWN);
    rotate_timer_ = new QTimer(this);
    connect(rotate_timer_, SIGNAL(timeout()), this, SLOT(rotateTrayIcon()));

    refresh_timer_ = new QTimer(this);
    connect(refresh_timer_, SIGNAL(timeout()), this, SLOT(refreshTrayIcon()));

    createActions();
    createContextMenu();

    connect(this, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
            this, SLOT(onActivated(QSystemTrayIcon::ActivationReason)));

    connect(SeahubNotificationsMonitor::instance(), SIGNAL(notificationsChanged()),
            this, SLOT(onSeahubNotificationsChanged()));

    hide();

#if defined(Q_WS_MAC)
    tnm = new TrayNotificationManager(this);
#endif
}
开发者ID:SmartCloud2025,项目名称:seafile-client,代码行数:27,代码来源:tray-icon.cpp


示例10: QSystemTrayIcon

SeafileTrayIcon::SeafileTrayIcon(QObject *parent)
    : QSystemTrayIcon(parent),
      nth_trayicon_(0),
      rotate_counter_(0),
      state_(STATE_DAEMON_UP)
{
    setState(STATE_DAEMON_DOWN);
    rotate_timer_ = new QTimer(this);
    connect(rotate_timer_, SIGNAL(timeout()), this, SLOT(rotateTrayIcon()));

    refresh_timer_ = new QTimer(this);
    connect(refresh_timer_, SIGNAL(timeout()), this, SLOT(refreshTrayIcon()));
    connect(refresh_timer_, SIGNAL(timeout()), this, SLOT(refreshTrayIconToolTip()));

    createActions();
    createContextMenu();

    connect(this, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
            this, SLOT(onActivated(QSystemTrayIcon::ActivationReason)));

    connect(SeahubNotificationsMonitor::instance(), SIGNAL(notificationsChanged()),
            this, SLOT(onSeahubNotificationsChanged()));

#if defined(Q_OS_WIN32) || (defined(Q_OS_MAC) && (QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)))
    connect(this, SIGNAL(messageClicked()),
            this, SLOT(onMessageClicked()));
#endif

    hide();

    createGlobalMenuBar();
#if defined(Q_OS_MAC)
    tnm = new TrayNotificationManager(this);
#endif
}
开发者ID:eaglexmw,项目名称:seafile-client,代码行数:35,代码来源:tray-icon.cpp


示例11: QWebView

lmcMessageLog::lmcMessageLog(QWidget *parent)
    : QWebView(parent)
{

	connect(this, SIGNAL(linkClicked(QUrl)), this, SLOT(log_linkClicked(QUrl)));
	connect(this->page()->mainFrame(), SIGNAL(contentsSizeChanged(QSize)),
			this, SLOT(log_contentsSizeChanged(QSize)));
	connect(this->page(), SIGNAL(linkHovered(QString, QString, QString)),
			this, SLOT(log_linkHovered(QString, QString, QString)));

	setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
	page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
	setRenderHints(QPainter::TextAntialiasing | QPainter::SmoothPixmapTransform);

	createContextMenu();

	participantAvatars.clear();
	hasData = false;
	messageTime = false;
	messageDate = false;
	allowLinks = false;
	pathToLink = false;
	trimMessage = true;
	fontSizeVal = 0;
	sendFileMap.clear();
	receiveFileMap.clear();
	lastId = QString::null;
	messageLog.clear();
	linkHovered = false;
	outStyle = false;
	autoScroll = true;
}
开发者ID:j2doll,项目名称:lmc-clone,代码行数:32,代码来源:messagelog.cpp


示例12: showContextMenu

void WebContextMenuProxyQt::showContextMenu(const IntPoint& position, const Vector<WebContextMenuItemData>& items)
{
    if (QMenu* menu = createContextMenu(items)) {
        menu->move(position);
        emit m_page->showContextMenu(menu);
    }
}
开发者ID:mcgrawp,项目名称:webkit-webcl,代码行数:7,代码来源:WebContextMenuProxyQt.cpp


示例13: createContextMenu

void ContextMenuController::handleContextMenuEvent(Event* event)
{
    m_contextMenu = createContextMenu(event);
    if (!m_contextMenu)
        return;

    showContextMenu(event);
}
开发者ID:halton,项目名称:blink-crosswalk,代码行数:8,代码来源:ContextMenuController.cpp


示例14: rightClickMenu

void MusicLrcSearchTableWidget::contextMenuEvent(QContextMenuEvent *event)
{
    MusicQueryTableWidget::contextMenuEvent(event);
    QMenu rightClickMenu(this);
    createContextMenu(rightClickMenu);

    rightClickMenu.exec(QCursor::pos());
}
开发者ID:karllen,项目名称:TTKMusicplayer,代码行数:8,代码来源:musiclrcsearchtablewidget.cpp


示例15: createActions

void BatDown::init() {
    createActions();
    createMenus();
    createContextMenu();
    createToolBars();
    createStatusBar();
    createCentralArea();
}
开发者ID:tasosbull,项目名称:yewtic,代码行数:8,代码来源:BatDown.cpp


示例16: createContextMenu

MapViewContextMenu::MapViewContextMenu(MapView* map_view)
{
    map_view_ = map_view;
    createContextMenu();

    // create publisher for augmentations on the grid map
    augment_grid_map_pub_ = nh_.advertise<vigir_ocs_msgs::OCSAugmentRegions>( "/flor/worldmodel/ocs_augmented_regions", 1, false );
}
开发者ID:team-vigir,项目名称:vigir_ocs_common,代码行数:8,代码来源:map_context_menu.cpp


示例17: QLabel

XlLabelDisplay::XlLabelDisplay(QWidget *parent)
	: QLabel(parent)
{
	this->saveAction = new QAction("&Save", this);
	this->tempPath = "";
	connect(this->saveAction, SIGNAL(triggered()), this, SLOT(saveImageLocally()));	
	createContextMenu();
}
开发者ID:gulimujyujyu,项目名称:xlzhuathku,代码行数:8,代码来源:xllabeldisplay.cpp


示例18: createContextMenu

void TreeWidget::contextMenuEvent(QContextMenuEvent* event)
{
    TreeItem* item = static_cast<TreeItem*>(itemAt(event->pos()));
    if (item) {
        QMenu* menu = createContextMenu(item);
        menu->exec(event->globalPos());
        delete menu;
    }
}
开发者ID:jpnurmi,项目名称:communi-desktop,代码行数:9,代码来源:treewidget.cpp


示例19: init_NowPlaying

// ---------------------------------------------------------------------------
void init_NowPlaying() {
  NowPlaying_ShowMenu = 0;
  menu_now_playing = NULL;
  NowPlaying_Sel = 0;
  NowPlaying_ScrollOffset = 0;
  NowPlaying_ScrollDir = 1;
  
  createContextMenu();
}
开发者ID:BackupGGCode,项目名称:raspberry-webradio,代码行数:10,代码来源:screen_now_playing.c


示例20: createWidgets

MainWindow::MainWindow()
{
  createWidgets();
  createActions();
  createMenus();
  createContextMenu();
  createToolBars();
  createStatusBar();
}
开发者ID:patnotz,项目名称:cj,代码行数:9,代码来源:gui_mainWindow.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ createControls函数代码示例发布时间:2022-05-30
下一篇:
C++ createContext函数代码示例发布时间: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