本文整理汇总了C++中doubleClicked函数的典型用法代码示例。如果您正苦于以下问题:C++ doubleClicked函数的具体用法?C++ doubleClicked怎么用?C++ doubleClicked使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了doubleClicked函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: QVBoxLayout
void MediaView::initialize() {
QBoxLayout *layout = new QVBoxLayout(this);
layout->setMargin(0);
splitter = new MiniSplitter();
playlistView = new PlaylistView(this);
// respond to the user doubleclicking a playlist item
connect(playlistView, SIGNAL(activated(const QModelIndex &)),
SLOT(itemActivated(const QModelIndex &)));
playlistModel = new PlaylistModel();
connect(playlistModel, SIGNAL(activeRowChanged(int)),
SLOT(activeRowChanged(int)));
// needed to restore the selection after dragndrop
connect(playlistModel, SIGNAL(needSelectionFor(QList<Video*>)),
SLOT(selectVideos(QList<Video*>)));
playlistView->setModel(playlistModel);
connect(playlistView->selectionModel(),
SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)),
SLOT(selectionChanged(const QItemSelection &, const QItemSelection &)));
connect(playlistView, SIGNAL(authorPushed(QModelIndex)), SLOT(authorPushed(QModelIndex)));
sidebar = new SidebarWidget(this);
sidebar->setPlaylist(playlistView);
connect(sidebar->getRefineSearchWidget(), SIGNAL(searchRefined()),
SLOT(searchAgain()));
connect(playlistModel, SIGNAL(haveSuggestions(const QStringList &)),
sidebar, SLOT(showSuggestions(const QStringList &)));
connect(sidebar, SIGNAL(suggestionAccepted(QString)),
MainWindow::instance(), SLOT(search(QString)));
splitter->addWidget(sidebar);
videoAreaWidget = new VideoAreaWidget(this);
// videoAreaWidget->setMinimumSize(320,240);
#ifdef APP_PHONON
videoWidget = new Phonon::VideoWidget(this);
videoAreaWidget->setVideoWidget(videoWidget);
#endif
videoAreaWidget->setListModel(playlistModel);
loadingWidget = new LoadingWidget(this);
videoAreaWidget->setLoadingWidget(loadingWidget);
splitter->addWidget(videoAreaWidget);
splitter->setStretchFactor(0, 0);
splitter->setStretchFactor(1, 8);
// restore splitter state
QSettings settings;
splitter->restoreState(settings.value("splitter").toByteArray());
splitter->setChildrenCollapsible(false);
connect(splitter, SIGNAL(splitterMoved(int,int)), SLOT(maybeAdjustWindowSize()));
layout->addWidget(splitter);
errorTimer = new QTimer(this);
errorTimer->setSingleShot(true);
errorTimer->setInterval(3000);
connect(errorTimer, SIGNAL(timeout()), SLOT(skipVideo()));
#ifdef APP_ACTIVATION
demoTimer = new QTimer(this);
demoTimer->setSingleShot(true);
connect(demoTimer, SIGNAL(timeout()), SLOT(demoMessage()));
#endif
connect(videoAreaWidget, SIGNAL(doubleClicked()),
The::globalActions()->value("fullscreen"), SLOT(trigger()));
QAction* refineSearchAction = The::globalActions()->value("refine-search");
connect(refineSearchAction, SIGNAL(toggled(bool)),
sidebar, SLOT(toggleRefineSearch(bool)));
currentVideoActions
<< The::globalActions()->value("webpage")
<< The::globalActions()->value("pagelink")
<< The::globalActions()->value("videolink")
<< The::globalActions()->value("open-in-browser")
#ifdef APP_SNAPSHOT
<< The::globalActions()->value("snapshot")
#endif
<< The::globalActions()->value("findVideoParts")
<< The::globalActions()->value("skip")
<< The::globalActions()->value("previous")
<< The::globalActions()->value("stopafterthis")
<< The::globalActions()->value("related-videos")
<< The::globalActions()->value("refine-search")
<< The::globalActions()->value("twitter")
<< The::globalActions()->value("facebook")
<< The::globalActions()->value("buffer")
<< The::globalActions()->value("email");
#ifndef APP_PHONON_SEEK
QSlider *slider = MainWindow::instance()->getSlider();
connect(slider, SIGNAL(valueChanged(int)), SLOT(sliderMoved(int)));
//.........这里部分代码省略.........
开发者ID:PatMart,项目名称:minitube,代码行数:101,代码来源:mediaview.cpp
示例2: switch
int Q3ListBox::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = Q3ScrollView::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
switch (_id) {
case 0: highlighted((*reinterpret_cast< int(*)>(_a[1]))); break;
case 1: selected((*reinterpret_cast< int(*)>(_a[1]))); break;
case 2: highlighted((*reinterpret_cast< const QString(*)>(_a[1]))); break;
case 3: selected((*reinterpret_cast< const QString(*)>(_a[1]))); break;
case 4: highlighted((*reinterpret_cast< Q3ListBoxItem*(*)>(_a[1]))); break;
case 5: selected((*reinterpret_cast< Q3ListBoxItem*(*)>(_a[1]))); break;
case 6: selectionChanged(); break;
case 7: selectionChanged((*reinterpret_cast< Q3ListBoxItem*(*)>(_a[1]))); break;
case 8: currentChanged((*reinterpret_cast< Q3ListBoxItem*(*)>(_a[1]))); break;
case 9: clicked((*reinterpret_cast< Q3ListBoxItem*(*)>(_a[1]))); break;
case 10: clicked((*reinterpret_cast< Q3ListBoxItem*(*)>(_a[1])),(*reinterpret_cast< const QPoint(*)>(_a[2]))); break;
case 11: pressed((*reinterpret_cast< Q3ListBoxItem*(*)>(_a[1]))); break;
case 12: pressed((*reinterpret_cast< Q3ListBoxItem*(*)>(_a[1])),(*reinterpret_cast< const QPoint(*)>(_a[2]))); break;
case 13: doubleClicked((*reinterpret_cast< Q3ListBoxItem*(*)>(_a[1]))); break;
case 14: returnPressed((*reinterpret_cast< Q3ListBoxItem*(*)>(_a[1]))); break;
case 15: rightButtonClicked((*reinterpret_cast< Q3ListBoxItem*(*)>(_a[1])),(*reinterpret_cast< const QPoint(*)>(_a[2]))); break;
case 16: rightButtonPressed((*reinterpret_cast< Q3ListBoxItem*(*)>(_a[1])),(*reinterpret_cast< const QPoint(*)>(_a[2]))); break;
case 17: mouseButtonPressed((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< Q3ListBoxItem*(*)>(_a[2])),(*reinterpret_cast< const QPoint(*)>(_a[3]))); break;
case 18: mouseButtonClicked((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< Q3ListBoxItem*(*)>(_a[2])),(*reinterpret_cast< const QPoint(*)>(_a[3]))); break;
case 19: contextMenuRequested((*reinterpret_cast< Q3ListBoxItem*(*)>(_a[1])),(*reinterpret_cast< const QPoint(*)>(_a[2]))); break;
case 20: onItem((*reinterpret_cast< Q3ListBoxItem*(*)>(_a[1]))); break;
case 21: onViewport(); break;
case 22: clear(); break;
case 23: ensureCurrentVisible(); break;
case 24: clearSelection(); break;
case 25: selectAll((*reinterpret_cast< bool(*)>(_a[1]))); break;
case 26: invertSelection(); break;
case 27: clearInputString(); break;
case 28: refreshSlot(); break;
case 29: doAutoScroll(); break;
case 30: adjustItems(); break;
}
_id -= 31;
}
#ifndef QT_NO_PROPERTIES
else if (_c == QMetaObject::ReadProperty) {
void *_v = _a[0];
switch (_id) {
case 0: *reinterpret_cast< uint*>(_v) = count(); break;
case 1: *reinterpret_cast< int*>(_v) = numItemsVisible(); break;
case 2: *reinterpret_cast< int*>(_v) = currentItem(); break;
case 3: *reinterpret_cast< QString*>(_v) = currentText(); break;
case 4: *reinterpret_cast< int*>(_v) = topItem(); break;
case 5: *reinterpret_cast< SelectionMode*>(_v) = selectionMode(); break;
case 6: *reinterpret_cast< bool*>(_v) = isMultiSelection(); break;
case 7: *reinterpret_cast< LayoutMode*>(_v) = columnMode(); break;
case 8: *reinterpret_cast< LayoutMode*>(_v) = rowMode(); break;
case 9: *reinterpret_cast< int*>(_v) = numColumns(); break;
case 10: *reinterpret_cast< int*>(_v) = numRows(); break;
case 11: *reinterpret_cast< bool*>(_v) = variableWidth(); break;
case 12: *reinterpret_cast< bool*>(_v) = variableHeight(); break;
}
_id -= 13;
} else if (_c == QMetaObject::WriteProperty) {
void *_v = _a[0];
switch (_id) {
case 2: setCurrentItem(*reinterpret_cast< int*>(_v)); break;
case 4: setTopItem(*reinterpret_cast< int*>(_v)); break;
case 5: setSelectionMode(*reinterpret_cast< SelectionMode*>(_v)); break;
case 6: setMultiSelection(*reinterpret_cast< bool*>(_v)); break;
case 7: setColumnMode(*reinterpret_cast< LayoutMode*>(_v)); break;
case 8: setRowMode(*reinterpret_cast< LayoutMode*>(_v)); break;
case 11: setVariableWidth(*reinterpret_cast< bool*>(_v)); break;
case 12: setVariableHeight(*reinterpret_cast< bool*>(_v)); break;
}
_id -= 13;
} else if (_c == QMetaObject::ResetProperty) {
_id -= 13;
} else if (_c == QMetaObject::QueryPropertyDesignable) {
_id -= 13;
} else if (_c == QMetaObject::QueryPropertyScriptable) {
_id -= 13;
} else if (_c == QMetaObject::QueryPropertyStored) {
_id -= 13;
} else if (_c == QMetaObject::QueryPropertyEditable) {
_id -= 13;
} else if (_c == QMetaObject::QueryPropertyUser) {
_id -= 13;
}
#endif // QT_NO_PROPERTIES
return _id;
}
开发者ID:pk-codebox-evo,项目名称:remixos-usb-tool,代码行数:89,代码来源:moc_q3listbox.cpp
示例3: QDialog
AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget *parent) :
QDialog(parent),
ui(new Ui::AddressBookPage),
model(0),
optionsModel(0),
mode(mode),
tab(tab)
{
ui->setupUi(this);
#ifdef Q_OS_MAC // Icons on push buttons are very uncommon on Mac
ui->newAddress->setIcon(QIcon());
ui->copyAddress->setIcon(QIcon());
ui->deleteAddress->setIcon(QIcon());
ui->verifyMessage->setIcon(QIcon());
ui->signMessage->setIcon(QIcon());
ui->exportButton->setIcon(QIcon());
#endif
#ifndef USE_QRCODE
ui->showQRCode->setVisible(false);
#endif
switch(mode)
{
case ForSending:
connect(ui->tableView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(accept()));
ui->tableView->setEditTriggers(QAbstractItemView::NoEditTriggers);
ui->tableView->setFocus();
ui->exportButton->hide();
break;
case ForEditing:
ui->buttonBox->setVisible(false);
break;
}
switch(tab)
{
case SendingTab:
ui->labelExplanation->setText(tr("These are your ColoradoPayCertificates addresses for sending payments. Always check the amount and the receiving address before sending coins."));
ui->deleteAddress->setVisible(true);
ui->signMessage->setVisible(false);
break;
case ReceivingTab:
ui->labelExplanation->setText(tr("These are your ColoradoPayCertificates addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you."));
ui->deleteAddress->setVisible(false);
ui->signMessage->setVisible(true);
break;
}
// Context menu actions
QAction *copyAddressAction = new QAction(ui->copyAddress->text(), this);
QAction *copyLabelAction = new QAction(tr("Copy &Label"), this);
QAction *editAction = new QAction(tr("&Edit"), this);
QAction *sendCoinsAction = new QAction(tr("Send &Coins"), this);
QAction *showQRCodeAction = new QAction(ui->showQRCode->text(), this);
QAction *signMessageAction = new QAction(ui->signMessage->text(), this);
QAction *verifyMessageAction = new QAction(ui->verifyMessage->text(), this);
deleteAction = new QAction(ui->deleteAddress->text(), this);
// Build context menu
contextMenu = new QMenu();
contextMenu->addAction(copyAddressAction);
contextMenu->addAction(copyLabelAction);
contextMenu->addAction(editAction);
if(tab == SendingTab)
contextMenu->addAction(deleteAction);
contextMenu->addSeparator();
if(tab == SendingTab)
contextMenu->addAction(sendCoinsAction);
#ifdef USE_QRCODE
contextMenu->addAction(showQRCodeAction);
#endif
if(tab == ReceivingTab)
contextMenu->addAction(signMessageAction);
else if(tab == SendingTab)
contextMenu->addAction(verifyMessageAction);
// Connect signals for context menu actions
connect(copyAddressAction, SIGNAL(triggered()), this, SLOT(on_copyAddress_clicked()));
connect(copyLabelAction, SIGNAL(triggered()), this, SLOT(onCopyLabelAction()));
connect(editAction, SIGNAL(triggered()), this, SLOT(onEditAction()));
connect(deleteAction, SIGNAL(triggered()), this, SLOT(on_deleteAddress_clicked()));
connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(onSendCoinsAction()));
connect(showQRCodeAction, SIGNAL(triggered()), this, SLOT(on_showQRCode_clicked()));
connect(signMessageAction, SIGNAL(triggered()), this, SLOT(on_signMessage_clicked()));
connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(on_verifyMessage_clicked()));
connect(ui->tableView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextualMenu(QPoint)));
// Pass through accept action from button box
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
}
开发者ID:ColoradoPay,项目名称:CPAY,代码行数:92,代码来源:addressbookpage.cpp
示例4: sellist
//.........这里部分代码省略.........
v->setSizeConstraint(QLayout::SetFixedSize);
QMapIterator<QString,QString> itmap(navigator);
while(itmap.hasNext())
{
itmap.next();
QPushButton *btn = new QPushButton();
QPixmap p(itmap.value());
btn->setIconSize(p.size());
p.setMask(p.createMaskFromColor(Qt::white));
btn->setIcon(QIcon(p));
btn->setObjectName(itmap.key());
btn->setFixedSize(btn->iconSize());
v->addWidget(btn);
if(!LEFT.compare(itmap.key()))
{
connect(btn,SIGNAL(clicked(bool)),SLOT(onAddSelectedItems()));
}else if(!UP.compare(itmap.key()))
{
connect(btn,SIGNAL(clicked(bool)),SLOT(onUp()));
}else if(!DOWN.compare(itmap.key()))
{
connect(btn,SIGNAL(clicked(bool)),SLOT(onDown()));
}else if(!RIGHT.compare(itmap.key()))
{
connect(btn,SIGNAL(clicked(bool)),SLOT(onDelSelectedItems()));
}
}
dirModel->setRootPath(imgpath);
dirModel->removeColumn(3);
dirModel->removeColumn(2);
dirModel->setFilter(QDir::NoDotAndDotDot | QDir::AllDirs);
filters << "*.bmp" << "*.png" << "*.jpg";
dirModel->setNameFilters(filters);
treefile->setModel(dirModel);
treefile->setRootIndex(dirModel->index(imgpath));
treefile->setAlternatingRowColors(true);
treefile->hideColumn(3);
treefile->hideColumn(2);
treefile->hideColumn(1);
fileModel->setRootPath(imgpath);
fileModel->setNameFilters(filters);
fileModel->setFilter(QDir::Files);
connect(sellist,&QListWidget::clicked,
[=](QModelIndex index){
sellist->clearSelection();
sellist->setCurrentIndex(index);
findChild<QPushButton*>(UP)->setEnabled(index.row() == 0 ? false : true);
findChild<QPushButton*>(DOWN)->setEnabled(index.row()
== sellist->count() -1 ? false : true);
});
connect(flistview,SIGNAL(doubleClicked(QModelIndex)),
SLOT(onListViewDoubleClicked(QModelIndex)));
connect(treefile,SIGNAL(clicked(QModelIndex)),
SLOT(onTreeViewClicked(QModelIndex)));
/* 主布局是水平布局,左(QListWidget),中(垂直布局),右(文件系统) */
mh->addWidget(sellist);
mh->addLayout(v);
mh->addWidget(flistview);
mh->addWidget(treefile);
QHBoxLayout *mlayout = new QHBoxLayout();
mlayout->setSizeConstraint(QLayout::SetMaximumSize);
QLabel *msg = new QLabel("已经添加的图片数:");
statusBar->setText("0");
mlayout->addWidget(msg);
mlayout->addWidget(statusBar);
mlayout->addWidget(okbtn);
statusBar->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed);
mainLayout->addLayout(mlayout);
foreach (QVariant v, old) {
// example for v "config/images/digital-0.png"
QString str = v.toString();
QString fpath = QDir::currentPath() + BACKSLASH + str;
QPixmap pic = mWindow->mImgMap[fpath];
if(pic.isNull())
{
pic = mWindow->mImgMap[fpath] = QPixmap(fpath);
}
QString sname = str.mid(str.lastIndexOf(BACKSLASH)+1);
QListWidgetItem *nitem = new QListWidgetItem(pic,sname);
sellist->addItem(nitem);
selectedMap[sname] = fpath;
}
开发者ID:yjdwbj,项目名称:ui-tools,代码行数:101,代码来源:mydialog.cpp
示例5: QMainWindow
//.........这里部分代码省略.........
addressBookPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab);
receiveCoinsPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab);
sendCoinsPage = new SendCoinsDialog(this);
signVerifyMessageDialog = new SignVerifyMessageDialog(this);
centralWidget = new QStackedWidget(this);
centralWidget->addWidget(overviewPage);
centralWidget->addWidget(transactionsPage);
centralWidget->addWidget(addressBookPage);
centralWidget->addWidget(receiveCoinsPage);
centralWidget->addWidget(sendCoinsPage);
setCentralWidget(centralWidget);
// Create status bar
statusBar();
// Status bar notification icons
labelEncryptionIcon = new QLabel();
labelStakingIcon = new QLabel();
labelConnectionsIcon = new QLabel();
labelBlocksIcon = new QLabel();
if (GetBoolArg("-staking", true))
{
QTimer *timerStakingIcon = new QTimer(labelStakingIcon);
connect(timerStakingIcon, SIGNAL(timeout()), this, SLOT(updateStakingIcon()));
timerStakingIcon->start(30 * 1000);
updateStakingIcon();
}
// Progress bar and label for blocks download
progressBarLabel = new QLabel();
progressBarLabel->setVisible(false);
progressBar = new QProgressBar();
progressBar->setAlignment(Qt::AlignCenter);
progressBar->setVisible(false);
// Override style sheet for progress bar for styles that have a segmented progress bar,
// as they make the text unreadable (workaround for issue #1071)
// See https://qt-project.org/doc/qt-4.8/gallery.html
QString curStyle = qApp->style()->metaObject()->className();
if(curStyle == "QWindowsStyle" || curStyle == "QWindowsXPStyle")
{
progressBar->setStyleSheet("QProgressBar { background-color: #e8e8e8; border: 1px solid grey; border-radius: 7px; padding: 1px; text-align: center; } QProgressBar::chunk { background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #007FFF, stop: 1 #3B5998); border-radius: 7px; margin: 0px; }");
}
statusBar()->addWidget(progressBarLabel);
statusBar()->addWidget(progressBar);
addToolBarBreak(Qt::LeftToolBarArea);
QToolBar *toolbar2 = addToolBar(tr("Tabs toolbar"));
addToolBar(Qt::LeftToolBarArea,toolbar2);
toolbar2->setOrientation(Qt::Vertical);
toolbar2->setMovable( false );
toolbar2->setObjectName("toolbar2");
toolbar2->setFixedWidth(28);
toolbar2->setIconSize(QSize(28,28));
toolbar2->addWidget(labelEncryptionIcon);
toolbar2->addWidget(labelStakingIcon);
toolbar2->addWidget(labelConnectionsIcon);
toolbar2->addWidget(labelBlocksIcon);
toolbar2->setStyleSheet("#toolbar2 QToolButton { border:none;padding:0px;margin:0px;height:20px;width:28px;margin-top:36px; }");
// toolbar2->setStyleSheet(QString::fromUtf8(style.readAll()));
addToolBarBreak(Qt::TopToolBarArea);
QToolBar *toolbar3 = addToolBar(tr("Green bar"));
addToolBar(Qt::TopToolBarArea,toolbar3);
toolbar3->setOrientation(Qt::Horizontal);
toolbar3->setMovable( false );
toolbar3->setObjectName("toolbar3");
toolbar3->setFixedHeight(2);
syncIconMovie = new QMovie(":/movies/update_spinner", "mng", this);
// Clicking on a transaction on the overview page simply sends you to transaction history page
connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), this, SLOT(gotoHistoryPage()));
connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), transactionView, SLOT(focusTransaction(QModelIndex)));
// Double-clicking on a transaction on the transaction history page shows details
connect(transactionView, SIGNAL(doubleClicked(QModelIndex)), transactionView, SLOT(showDetails()));
rpcConsole = new RPCConsole(this);
connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole, SLOT(show()));
// Clicking on "Verify Message" in the address book sends you to the verify message tab
connect(addressBookPage, SIGNAL(verifyMessage(QString)), this, SLOT(gotoVerifyMessageTab(QString)));
// Clicking on "Sign Message" in the receive coins page sends you to the sign message tab
connect(receiveCoinsPage, SIGNAL(signMessage(QString)), this, SLOT(gotoSignMessageTab(QString)));
gotoOverviewPage();
}
开发者ID:crowetic,项目名称:global-master,代码行数:101,代码来源:bitcoingui.cpp
示例6: ControllerDialog
//.........这里部分代码省略.........
"saw_wave_inactive" ) );
ToolTip::add( saw_wave_btn,
tr( "Click here for a saw-wave." ) );
PixmapButton * sqr_wave_btn = new PixmapButton( this, NULL );
sqr_wave_btn->move( CD_LFO_SHAPES_X + 45, CD_LFO_SHAPES_Y );
sqr_wave_btn->setActiveGraphic( embed::getIconPixmap(
"square_wave_active" ) );
sqr_wave_btn->setInactiveGraphic( embed::getIconPixmap(
"square_wave_inactive" ) );
ToolTip::add( sqr_wave_btn,
tr( "Click here for a square-wave." ) );
PixmapButton * moog_saw_wave_btn =
new PixmapButton( this, NULL );
moog_saw_wave_btn->move( CD_LFO_SHAPES_X, CD_LFO_SHAPES_Y + 15 );
moog_saw_wave_btn->setActiveGraphic(
embed::getIconPixmap( "moog_saw_wave_active" ) );
moog_saw_wave_btn->setInactiveGraphic(
embed::getIconPixmap( "moog_saw_wave_inactive" ) );
ToolTip::add( moog_saw_wave_btn,
tr( "Click here for a moog saw-wave." ) );
PixmapButton * exp_wave_btn = new PixmapButton( this, NULL );
exp_wave_btn->move( CD_LFO_SHAPES_X + 15, CD_LFO_SHAPES_Y + 15 );
exp_wave_btn->setActiveGraphic( embed::getIconPixmap(
"exp_wave_active" ) );
exp_wave_btn->setInactiveGraphic( embed::getIconPixmap(
"exp_wave_inactive" ) );
ToolTip::add( exp_wave_btn,
tr( "Click here for an exponential wave." ) );
PixmapButton * white_noise_btn = new PixmapButton( this, NULL );
white_noise_btn->move( CD_LFO_SHAPES_X + 30, CD_LFO_SHAPES_Y + 15 );
white_noise_btn->setActiveGraphic(
embed::getIconPixmap( "white_noise_wave_active" ) );
white_noise_btn->setInactiveGraphic(
embed::getIconPixmap( "white_noise_wave_inactive" ) );
ToolTip::add( white_noise_btn,
tr( "Click here for white-noise." ) );
m_userWaveBtn = new PixmapButton( this, NULL );
m_userWaveBtn->move( CD_LFO_SHAPES_X + 45, CD_LFO_SHAPES_Y + 15 );
m_userWaveBtn->setActiveGraphic( embed::getIconPixmap(
"usr_wave_active" ) );
m_userWaveBtn->setInactiveGraphic( embed::getIconPixmap(
"usr_wave_inactive" ) );
connect( m_userWaveBtn,
SIGNAL( doubleClicked() ),
this, SLOT( askUserDefWave() ) );
ToolTip::add( m_userWaveBtn,
tr( "Click here for a user-defined shape.\nDouble click to pick a file." ) );
m_waveBtnGrp = new automatableButtonGroup( this );
m_waveBtnGrp->addButton( sin_wave_btn );
m_waveBtnGrp->addButton( triangle_wave_btn );
m_waveBtnGrp->addButton( saw_wave_btn );
m_waveBtnGrp->addButton( sqr_wave_btn );
m_waveBtnGrp->addButton( moog_saw_wave_btn );
m_waveBtnGrp->addButton( exp_wave_btn );
m_waveBtnGrp->addButton( white_noise_btn );
m_waveBtnGrp->addButton( m_userWaveBtn );
PixmapButton * x1 = new PixmapButton( this, NULL );
x1->move( CD_LFO_MULTIPLIER_X, CD_LFO_SHAPES_Y );
x1->setActiveGraphic( embed::getIconPixmap(
"lfo_x1_active" ) );
x1->setInactiveGraphic( embed::getIconPixmap(
"lfo_x1_inactive" ) );
PixmapButton * x100 = new PixmapButton( this, NULL );
x100->move( CD_LFO_MULTIPLIER_X, CD_LFO_SHAPES_Y - 15 );
x100->setActiveGraphic( embed::getIconPixmap(
"lfo_x100_active" ) );
x100->setInactiveGraphic( embed::getIconPixmap(
"lfo_x100_inactive" ) );
PixmapButton * d100 = new PixmapButton( this, NULL );
d100->move( CD_LFO_MULTIPLIER_X, CD_LFO_SHAPES_Y + 15 );
d100->setActiveGraphic( embed::getIconPixmap(
"lfo_d100_active" ) );
d100->setInactiveGraphic( embed::getIconPixmap(
"lfo_d100_inactive" ) );
m_multiplierBtnGrp = new automatableButtonGroup( this );
m_multiplierBtnGrp->addButton( x1 );
m_multiplierBtnGrp->addButton( x100 );
m_multiplierBtnGrp->addButton( d100 );
setModel( _model );
setAutoFillBackground( true );
QPalette pal;
pal.setBrush( backgroundRole(),
embed::getIconPixmap( "lfo_controller_artwork" ) );
setPalette( pal );
}
开发者ID:DanielAeolusLaude,项目名称:lmms,代码行数:101,代码来源:LfoControllerDialog.cpp
示例7: doubleClicked
void SessionStateWidget::mouseDoubleClickEvent(QMouseEvent *e)
{
emit doubleClicked();
QWidget::mouseDoubleClickEvent(e);
}
开发者ID:ericsium,项目名称:qxmledit,代码行数:5,代码来源:sessionstatewidget.cpp
示例8: connect
void CMainWindow::connectSignals()
{
CChatManager *Manager = CChatManager::instance();
CNetworkClient *Network = CNetworkClient::instance();
CBattleManager *BattleManager = CBattleManager::instance();
connect(ui->ChatTabWidget->tabBar(), SIGNAL(tabCloseRequested(int)), Manager, SLOT(closeChannel(int)));
connect(ui->ChatTabWidget->tabBar(), SIGNAL(currentChanged(int)), Manager, SLOT(changeCurrentChannel(int)));
connect(ui->ChatTabWidget->tabBar(), SIGNAL(tabMoved(int,int)), Manager, SLOT(moveChannel(int,int)));
connect(Manager, SIGNAL(joined(CChannel*)), this, SLOT(createTab(CChannel*)));
connect(Manager, SIGNAL(closeTab(int)), this, SLOT(removeTab(int)));
connect(Manager, SIGNAL(currentChanged(CChannel*)), ui->ChatTabWidget->chatView(), SLOT(loadChannel(CChannel*)));
connect(ui->ChannelsView, SIGNAL(doubleClicked(QModelIndex)), CChatManager::instance(), SLOT(doubleClicked(QModelIndex)));
connect(ui->ChannelUserView, SIGNAL(doubleClicked(QModelIndex)),
CUserManager::instance()->chatModel(), SLOT(doubleClicked(QModelIndex)));
connect(ui->actionChatSend, SIGNAL(triggered()), this, SLOT(sendChat()));
connect(ui->actionBattleSend, SIGNAL(triggered()), this, SLOT(sendBattle()));
connect(Manager, SIGNAL(currentChanged(int)), ui->ChatTabWidget->tabBar(), SLOT(setCurrentIndex(int)));
connect(ui->BattleListView->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
CBattleManager::instance(), SLOT(battleSelected(QModelIndex)));
connect(ui->BattleListView, SIGNAL(doubleClicked(QModelIndex)), CBattleManager::instance(), SLOT(doubleClicked(QModelIndex)));
connect(ui->BattlePreviewView, SIGNAL(doubleClicked(QModelIndex)),
CBattleManager::instance()->battlePreviewModel(), SLOT(doubleClicked(QModelIndex)));
connect(ui->actionConnect, SIGNAL(triggered()), this, SLOT(showConnectDialog()));
connect(&ConnectDialog, SIGNAL(connect(QString,int,QString,QString)), Network, SLOT(connectToServer(QString,int,QString,QString)));
connect(Network, SIGNAL(disconnected()), this, SLOT(networkDisconnected()));
connect(Network, SIGNAL(connected()), this, SLOT(networkConnected()));
connect(Network, SIGNAL(multiplayerDisabled()), this, SLOT(disableMultiplayerGUI()));
connect(Network, SIGNAL(multiplayerEnabled()), this, SLOT(enableMultiplayerGUI()));
connect(ui->actionDisconnect, SIGNAL(triggered()), Network, SLOT(disconnect()));
connect(CBattleManager::instance(), SIGNAL(currentMapChanged(CMap*)), ui->MapInfo, SLOT(setMap(CMap*)));
connect(CBattleroomManager::instance(), SIGNAL(mapChanged(CMap*)), ui->BattleMapInfo, SLOT(setMap(CMap*)));
connect(CBattleroomManager::instance(), SIGNAL(updateChat(CChannel*)), ui->BattleChatText, SLOT(loadChannel(CChannel*)));
connect(CBattleroomManager::instance(), SIGNAL(error(int,QString)), this, SLOT(error(int,QString)));
connect(ui->LeaveBattleButton, SIGNAL(clicked()), CBattleroomManager::instance(), SLOT(leaveBattle()));
connect(ui->DownloadButton, SIGNAL(clicked()), this, SLOT(execDownload()));
connect(ui->actionDeleteDownload, SIGNAL(triggered()), this, SLOT(removeDownload()));
connect(ui->actionDownloadMap, SIGNAL(triggered()), BattleManager, SLOT(downloadMapForBattle()));
connect(ui->actionDownloadMod, SIGNAL(triggered()), BattleManager, SLOT(downloadModForBattle()));
connect(ui->DownloadView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showDownloadContextMenu(QPoint)));
connect(ui->BattleListView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showBattleContextMenu(QPoint)));
connect(Network, SIGNAL(error(int,QString)), this, SLOT(error(int,QString)));
connect(CDownloadManager::instance(), SIGNAL(error(int,QString)), this, SLOT(error(int,QString)));
connect(Manager, SIGNAL(error(int,QString)), this, SLOT(error(int,QString)));
connect(CDownloadManager::instance(), SIGNAL(error(int,QString)), this, SLOT(error(int,QString)));
connect(Network, SIGNAL(agreement(QString)), this, SLOT(showAgreement(QString)));
connect(ui->actionReloadUnitSync, SIGNAL(triggered()), CUnitSync::instance(), SLOT(reload()));
connect(CUnitSync::instance(), SIGNAL(error(int,QString)), this, SLOT(error(int,QString)));
connect(CUserManager::instance(), SIGNAL(lobbyUserBattleStatusChanged(CBattleStatus*)),
this, SLOT(updateBattleStatus(CBattleStatus*)));
connect(CUnitSync::instance(), SIGNAL(loaded()), this, SLOT(unitsyncLoaded()));
connect(CUnitSync::instance(), SIGNAL(unloaded()), this, SLOT(unitsyncUnloaded()));
connect(ui->actionUpdateStatus, SIGNAL(triggered()), this, SLOT(changeBattleStatus()));
connect(CBattleroomManager::instance(), SIGNAL(battleJoined(CBattle*)), this, SLOT(enableBattleroom(CBattle*)));
connect(CBattleroomManager::instance(), SIGNAL(battleClosed()), this, SLOT(disableBattleroom()));
connect(CBattleroomManager::instance(), SIGNAL(gameStarted()), this, SLOT(lockBattleroom()));
connect(CBattleroomManager::instance(), SIGNAL(gameEnded()), this, SLOT(unlockBattleroom()));
connect(CBattleroomManager::instance(), SIGNAL(battleStarted()), this, SLOT(onBattleStarted()));
connect(CBattleroomManager::instance(), SIGNAL(battleEnded()), this, SLOT(onBattleEnded()));
connect(ui->SelectColorButton, SIGNAL(clicked()), this, SLOT(selectColor()));
connect(ui->StartBattleButton, SIGNAL(clicked()), CBattleroomManager::instance(), SLOT(startGame()));
connect(&ColorDialog, SIGNAL(colorSelected(QColor)), this, SLOT(colorSelected(QColor)));
}
开发者ID:ObKo,项目名称:HoSpLo,代码行数:72,代码来源:MainWindow.cpp
示例9: mousePressEvent
/**
This event handler can be reimplemented in a subclass to receive
mouse double click events for the system tray entry.
Note that the system tray entry gets a mousePressEvent() and a
mouseReleaseEvent() before the mouseDoubleClickEvent().
\sa mousePressEvent(), mouseReleaseEvent(),
mouseMoveEvent(), QMouseEvent
*/
void TrayIcon::mouseDoubleClickEvent( QMouseEvent *e )
{
if ( e->button() == Qt::LeftButton )
emit doubleClicked( e->globalPos() );
e->accept();
}
开发者ID:AlekSi,项目名称:Jabbin,代码行数:16,代码来源:trayicon.cpp
示例10: QWidget
//.........这里部分代码省略.........
QLabel* searchLabel = new QLabel("");
searchLabel->setObjectName("searchLabel1");
searchLabel->setContentsMargins(0, 0, 0, 0);
hlayout->addWidget(searchLabel);
addressWidget = new QLineEdit(this);
addressWidget->setObjectName("searchBox1");
#if QT_VERSION >= 0x040700
addressWidget->setPlaceholderText(tr("Search label"));
#endif
hlayout->addWidget(addressWidget);
amountWidget = new QLineEdit(this);
amountWidget->setObjectName("amountWidget");
amountWidget->setAlignment(Qt::AlignRight);
#if QT_VERSION >= 0x040700
amountWidget->setPlaceholderText(tr("Min amount"));
#endif
amountWidget->setFixedWidth(120);
amountWidget->setValidator(new QDoubleValidator(0, 1e20, 8, this));
hlayout->addWidget(amountWidget);
QVBoxLayout* vlayout = new QVBoxLayout(this);
vlayout->setContentsMargins(0, 0, 0, 0);
vlayout->setSpacing(0);
QFrame* topMargin = new QFrame(this);
topMargin->setObjectName("topMargin");
topMargin->setContentsMargins(0, 0, 0, 0);
vlayout->addWidget(topMargin);
vlayout->addWidget(createDateRangeWidget());
QTableView* view = new QTableView(this);
vlayout->addLayout(hlayout);
vlayout->addWidget(createDateRangeWidget());
vlayout->addWidget(view);
vlayout->setSpacing(0);
/*int width = view->verticalScrollBar()->sizeHint().width();
if (platformStyle->getUseExtraSpacing()) {
hlayout->addSpacing(width+2);
} else {
hlayout->addSpacing(width);
}*/
view->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
view->setTabKeyNavigation(false);
view->setContextMenuPolicy(Qt::CustomContextMenu);
view->installEventFilter(this);
transactionView = view;
abandonAction = new QAction(tr("Abandon transaction"), this);
QAction* copyAddressAction = new QAction(tr("Copy address"), this);
QAction* copyLabelAction = new QAction(tr("Copy label"), this);
QAction* copyAmountAction = new QAction(tr("Copy amount"), this);
QAction* copyTxIDAction = new QAction(tr("Copy transaction ID"), this);
QAction* copyTxHexAction = new QAction(tr("Copy raw transaction"), this);
QAction* copyTxPlainText = new QAction(tr("Copy full transaction details"), this);
QAction* editLabelAction = new QAction(tr("Edit label"), this);
QAction* showDetailsAction = new QAction(tr("Show transaction details"), this);
contextMenu = new QMenu();
contextMenu->addAction(copyAddressAction);
contextMenu->addAction(copyLabelAction);
contextMenu->addAction(copyAmountAction);
contextMenu->addAction(copyTxIDAction);
contextMenu->addAction(copyTxHexAction);
contextMenu->addAction(copyTxPlainText);
contextMenu->addAction(showDetailsAction);
contextMenu->addSeparator();
contextMenu->addAction(abandonAction);
contextMenu->addAction(editLabelAction);
mapperThirdPartyTxUrls = new QSignalMapper(this);
connect(mapperThirdPartyTxUrls, SIGNAL(mapped(QString)), this, SLOT(openThirdPartyTxUrl(QString)));
connect(dateWidget, SIGNAL(activated(int)), this, SLOT(chooseDate(int)));
connect(typeWidget, SIGNAL(activated(int)), this, SLOT(chooseType(int)));
connect(watchOnlyWidget, SIGNAL(activated(int)), this, SLOT(chooseWatchonly(int)));
connect(addressWidget, SIGNAL(textChanged(QString)), this, SLOT(changedPrefix(QString)));
connect(amountWidget, SIGNAL(textChanged(QString)), this, SLOT(changedAmount(QString)));
connect(view, SIGNAL(doubleClicked(QModelIndex)), this, SIGNAL(doubleClicked(QModelIndex)));
connect(view, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextualMenu(QPoint)));
connect(abandonAction, SIGNAL(triggered()), this, SLOT(abandonTx()));
connect(copyAddressAction, SIGNAL(triggered()), this, SLOT(copyAddress()));
connect(copyLabelAction, SIGNAL(triggered()), this, SLOT(copyLabel()));
connect(copyAmountAction, SIGNAL(triggered()), this, SLOT(copyAmount()));
connect(copyTxIDAction, SIGNAL(triggered()), this, SLOT(copyTxID()));
connect(copyTxHexAction, SIGNAL(triggered()), this, SLOT(copyTxHex()));
connect(copyTxPlainText, SIGNAL(triggered()), this, SLOT(copyTxPlainText()));
connect(editLabelAction, SIGNAL(triggered()), this, SLOT(editLabel()));
connect(showDetailsAction, SIGNAL(triggered()), this, SLOT(showDetails()));
}
开发者ID:Gulden,项目名称:gulden-official,代码行数:101,代码来源:transactionview.cpp
示例11: doubleClicked
void SmallDeviceView::onRestoreMainViewAction()
{
emit doubleClicked();
}
开发者ID:filesdnd,项目名称:filesdnd-qt,代码行数:4,代码来源:smalldeviceview.cpp
示例12: QMainWindow
slm_machine::slm_machine(QWidget *parent)
: QMainWindow(parent), ui(new Ui::slm_machineClass)
{
/************************** UI and Buddy Management *******************************/
ui->setupUi(this);
setProgressBarVisibility(false);
//Buddy Management
buddies = new buddyManager();
buddies->loadBuddiesAndIPs();
buddyModel = new QStringListModel();
buddyModel->setStringList(buddies->AliasBuddyList);
ui->buddyList->setModel(buddyModel);
ui->buddyList->setEditTriggers(QAbstractItemView::NoEditTriggers);
this->setWindowTitle("SLM");
//UI connections
connect(ui->addBuddyButton, SIGNAL(clicked()),this, SLOT(addBuddyPressed()));
connect(ui->removeBuddyButton, SIGNAL(clicked()), this, SLOT(removeBuddypressed()));
connect(ui->actionExit, SIGNAL(triggered()), this, SLOT(closeApplication()));
connect(ui->buddyList, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(buddyPressed(QModelIndex)));
connect(ui->actionAbout_Qt, SIGNAL(triggered()), this, SLOT(aboutQTPressed()));
connect(ui->actionAbout_SLM, SIGNAL(triggered()), this, SLOT(aboutSLMPressed()));
connect(ui->actionEncryption_Key, SIGNAL(triggered()), this, SLOT(encryptionKeyPressed()));
/************************************************************************************/
/************************** Message Server Management *******************************/
messageServer = slm_server::getInstance();
connect(messageServer, SIGNAL(sendtoUI(QByteArray,QHostAddress)),this,SLOT(messageHandler(QByteArray,QHostAddress)));
/************************************************************************************/
/***************************** File Server Management *******************************/
onGoingFileTransfer = false;
FServer = new fileServer();
//File Server Connections
connect(FServer,SIGNAL(newDocumentArrived(QString,QString,quint32,quint8)),this,SLOT(incomingFileSlot(QString,QString,quint32,quint8)),Qt::QueuedConnection);
connect(FServer,SIGNAL(transferCompleted(QString)),this,SLOT(incomingFileTransferCompleted(QString)),Qt::QueuedConnection);
connect(FServer,SIGNAL(transferCanceled()),this,SLOT(transferIsCancelled()),Qt::QueuedConnection);
connect(FServer,SIGNAL(ongoingTransfer()),this,SLOT(ongoingTransferExists()),Qt::QueuedConnection);
connect(FServer,SIGNAL(receivingProgress(quint32)),this,SLOT(updateReceivingProgress(quint32)),Qt::QueuedConnection);
//Start the File Server Thread
FServer->start();
/***********************************************************************************/
/***************************** Buddy List Right Click *******************************/
checkOnline = new QAction(tr("&Check Online"), this);
checkOnline->setIcon(QIcon(":/icons/CheckOnline"));
rightClickUserMenu = new QMenu();
rightClickUserMenu->addAction(checkOnline);
connect(checkOnline,SIGNAL(triggered()),this,SLOT(checkUserOnline()));
ui->buddyList->installEventFilter(this);
/***********************************************************************************/
/***************************** Tray Icon Management ********************************/
//Create tray icon and contex menu actions
this->createActions();
this->createTrayIcon();
//Tray Icon Connections
connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),this, SLOT(iconActivated(QSystemTrayIcon::ActivationReason)));
connect(this, SIGNAL(signalPlaceToTray()),this, SLOT(slotPlaceToTray()),Qt::QueuedConnection);
//Show application icon in the tray
trayIcon->setIcon(QIcon(":/icons/SLM_Logo"));
trayIcon->setToolTip("SLM (SMG Lan Messenger)");
trayIcon->show();
/**********************************************************************************/
}
开发者ID:mahdiattarbashi,项目名称:slmmachine,代码行数:73,代码来源:slm_machine.cpp
示例13: QDialog
AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget *parent) :
QDialog(parent),
ui(new Ui::AddressBookPage),
model(0),
optionsModel(0),
mode(mode),
tab(tab)
{
ui->setupUi(this);
#ifdef Q_OS_MAC // Icons on push buttons are very uncommon on Mac
ui->newAddressButton->setIcon(QIcon());
ui->copyToClipboard->setIcon(QIcon());
ui->deleteButton->setIcon(QIcon());
#endif
#ifndef USE_QRCODE
ui->showQRCode->setVisible(false);
#endif
switch(mode)
{
case ForSending:
connect(ui->tableView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(accept()));
ui->tableView->setEditTriggers(QAbstractItemView::NoEditTriggers);
ui->tableView->setFocus();
break;
case ForEditing:
ui->buttonBox->setVisible(false);
break;
}
switch(tab)
{
case SendingTab:
ui->labelExplanation->setVisible(false);
ui->deleteButton->setVisible(true);
ui->signMessage->setVisible(false);
break;
case ReceivingTab:
ui->deleteButton->setVisible(false);
ui->signMessage->setVisible(true);
break;
}
// Context menu actions
QAction *copyLabelAction = new QAction(tr("Copy &Label"), this);
QAction *copyAddressAction = new QAction(ui->copyToClipboard->text(), this);
QAction *editAction = new QAction(tr("&Edit"), this);
QAction *showQRCodeAction = new QAction(ui->showQRCode->text(), this);
QAction *signMessageAction = new QAction(ui->signMessage->text(), this);
QAction *verifyMessageAction = new QAction(ui->verifyMessage->text(), this);
deleteAction = new QAction(ui->deleteButton->text(), this);
// Build context menu
contextMenu = new QMenu();
contextMenu->addAction(copyAddressAction);
contextMenu->addAction(copyLabelAction);
contextMenu->addAction(editAction);
if(tab == SendingTab)
contextMenu->addAction(deleteAction);
contextMenu->addSeparator();
contextMenu->addAction(showQRCodeAction);
if(tab == ReceivingTab)
contextMenu->addAction(signMessageAction);
else if(tab == SendingTab)
contextMenu->addAction(verifyMessageAction);
// Connect signals for context menu actions
connect(copyAddressAction, SIGNAL(triggered()), this, SLOT(on_copyToClipboard_clicked()));
connect(copyLabelAction, SIGNAL(triggered()), this, SLOT(onCopyLabelAction()));
connect(editAction, SIGNAL(triggered()), this, SLOT(onEditAction()));
connect(deleteAction, SIGNAL(triggered()), this, SLOT(on_deleteButton_clicked()));
connect(showQRCodeAction, SIGNAL(triggered()), this, SLOT(on_showQRCode_clicked()));
connect(signMessageAction, SIGNAL(triggered()), this, SLOT(on_signMessage_clicked()));
connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(on_verifyMessage_clicked()));
connect(ui->tableView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextualMenu(QPoint)));
// Pass through accept action from button box
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
}
开发者ID:BitcoinCore,项目名称:xxxcoin,代码行数:81,代码来源:addressbookpage.cpp
示例14: QTreeView
ProcessListView::ProcessListView(QWidget *parent) : QTreeView(parent)
{
queueMode = false;
//Model
model = new ProcessListModel(this);
proxyModel = new QSortFilterProxyModel();
proxy
|
请发表评论