本文整理汇总了C++中QToolButton::setCursor方法的典型用法代码示例。如果您正苦于以下问题:C++ QToolButton::setCursor方法的具体用法?C++ QToolButton::setCursor怎么用?C++ QToolButton::setCursor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QToolButton
的用法示例。
在下文中一共展示了QToolButton::setCursor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QTabWidget
QTabWidget *OptionDialog::createTabs() {
tabs = new QTabWidget(this);
for (int i = 0; i < myFractal->_funcCount; ++i)
tabs->addTab(new FunctionTab(myFractal->_functions[i]),
QString::number(i + 1));
QToolButton *newTabButton = new QToolButton(tabs);
newTabButton->setCursor(Qt::ArrowCursor);
newTabButton->setAutoRaise(true);
newTabButton->setIcon(QIcon(":/images/plus_16.png"));
newTabButton->setToolTip(tr("Add function"));
tabs->setCornerWidget(newTabButton, Qt::TopLeftCorner);
QToolButton *closeTabButton = new QToolButton(tabs);
closeTabButton->setCursor(Qt::ArrowCursor);
closeTabButton->setAutoRaise(true);
closeTabButton->setIcon(QIcon(":/images/delete_16.png"));
closeTabButton->setToolTip(tr("Remove function"));
tabs->setCornerWidget(closeTabButton, Qt::TopRightCorner);
tabs->repaint();
connect(closeTabButton, SIGNAL(clicked()), this, SLOT(remFunc()));
connect(newTabButton, SIGNAL(clicked()), this, SLOT(addFunc()));
// connect(tabs,SIGNAL(currentChanged(int)),this,SLOT(tabChange(false)));
return tabs;
}
示例2: createPlayWidgetActions
void MusicSystemTrayMenu::createPlayWidgetActions()
{
m_widgetAction = new QWidgetAction(this);
QWidget *widgetActionContainer = new QWidget(this);
QVBoxLayout *vbox = new QVBoxLayout(widgetActionContainer);
vbox->setMargin(0);
QWidget *widgetContainer = new QWidget(widgetActionContainer);
QHBoxLayout *box = new QHBoxLayout(widgetContainer);
box->setMargin(0);
QToolButton *previousPlay = new QToolButton(widgetContainer);
QToolButton *nextPlay = new QToolButton(widgetContainer);
m_PlayOrStop = new QToolButton(widgetContainer);
previousPlay->setIcon(QIcon(QString::fromUtf8(":/contextMenu/sysprevious")));
nextPlay->setIcon(QIcon(QString::fromUtf8(":/contextMenu/sysnext")));
m_PlayOrStop->setIcon(QIcon(QString::fromUtf8(":/contextMenu/sysplay")));
previousPlay->setIconSize(QSize(40, 40));
nextPlay->setIconSize(QSize(40, 40));
m_PlayOrStop->setIconSize(QSize(45, 45));
previousPlay->setStyleSheet(MusicUIObject::MToolButtonStyle01);
nextPlay->setStyleSheet(MusicUIObject::MToolButtonStyle01);
m_PlayOrStop->setStyleSheet(MusicUIObject::MToolButtonStyle01);
previousPlay->setCursor(QCursor(Qt::PointingHandCursor));
nextPlay->setCursor(QCursor(Qt::PointingHandCursor));
m_PlayOrStop->setCursor(QCursor(Qt::PointingHandCursor));
previousPlay->setToolTip(tr("Previous"));
nextPlay->setToolTip(tr("Next"));
m_PlayOrStop->setToolTip(tr("Play"));
box->addWidget(previousPlay);
box->addWidget(m_PlayOrStop);
box->addWidget(nextPlay);
m_showText = new QLabel(widgetActionContainer);
m_showText->setAlignment(Qt::AlignCenter);
m_showText->setStyleSheet(MusicUIObject::MCustomStyle12);
vbox->addWidget(widgetContainer);
vbox->addWidget(m_showText);
widgetActionContainer->setLayout(vbox);
m_widgetAction->setDefaultWidget(widgetActionContainer);
connect(previousPlay, SIGNAL(clicked()), parent(), SLOT(musicPlayPrevious()));
connect(nextPlay, SIGNAL(clicked()), parent(), SLOT(musicPlayNext()));
connect(m_PlayOrStop, SIGNAL(clicked()), parent(), SLOT(musicStatePlay()));
}
示例3: UpdateRecentProjects
void WelcomeWidget::UpdateRecentProjects(
const QVector<RecentProject> &recent_projects) {
ui->tableWidgetRecent->clearContents();
ui->tableWidgetRecent->setRowCount(recent_projects.count());
int row = 0;
QSignalMapper *mapper = new QSignalMapper;
for (const RecentProject &recent_project : recent_projects) {
QTableWidgetItem *item_name = new QTableWidgetItem(recent_project.name());
QTableWidgetItem *item_path = new QTableWidgetItem(recent_project.path());
QToolButton *erase = new QToolButton;
erase->setStyleSheet("border: 0;");
erase->setCursor(QCursor(Qt::PointingHandCursor));
erase->setIcon(QIcon(":/icons/images/remove.png"));
erase->setIconSize(QSize(12, 12));
connect(erase, SIGNAL(clicked()), mapper, SLOT(map()));
mapper->setMapping(erase, row);
QFont font = item_name->font();
font.setBold(true);
item_name->setFont(font);
item_name->setToolTip(recent_project.name());
item_path->setToolTip(recent_project.path());
ui->tableWidgetRecent->setIndexWidget(
ui->tableWidgetRecent->model()->index(row, 0), erase);
ui->tableWidgetRecent->setItem(row, 1, item_name);
ui->tableWidgetRecent->setItem(row, 2, item_path);
++row;
}
connect(mapper, SIGNAL(mapped(int)),
parent_, SLOT(RemoveRecentProject(int)));
}
示例4: QToolButton
WNavigationTreeCaption::WNavigationTreeCaption()
{
QToolButton * pwButtonUndock = new QToolButton(this);
pwButtonUndock->setToolTip("Float / Unfloat");
#if 1
pwButtonUndock->setStyleSheet("QToolButton { border: none; padding: 3px; }");
#else
pwButtonUndock->setStyleSheet("QToolButton { border: none; padding: 0px; }");
#endif
QPixmap oPixmap = style()->standardPixmap(QStyle::SP_TitleBarNormalButton);
pwButtonUndock->setIcon(oPixmap);
// pwButtonUndock->setMaximumSize(oPixmap.size());
pwButtonUndock->setCursor(Qt::ArrowCursor);
pwButtonUndock->setFocusPolicy(Qt::ClickFocus);
QHBoxLayout * layout = new QHBoxLayout(this);
layout->setMargin(0);
// layout->setSpacing(10);
// layout->addStretch();
#if 0
layout->addWidget(g_pwButtonStatusOfNavigationTree, Qt::AlignLeft | Qt::AlignHCenter);
#endif
layout->addWidget(g_pwButtonSwitchProfile); // , Qt::AlignLeft | Qt::AlignHCenter);
//layout->addWidget(new QWidget);
layout->addStretch();
//layout->addWidget(pwButtonUndock, Qt::AlignRight | Qt::AlignHCenter);
layout->addWidget(pwButtonUndock);
setLayout(layout);
connect(pwButtonUndock, SIGNAL(clicked()), g_pwNavigationTree, SLOT(SL_ToggleDocking()));
setCursor(Qt::OpenHandCursor); // This cursor shows to the user he/she may drag the widget to undock the Navigation Tree
}
示例5: commitError
void QgsGuiVectorLayerTools::commitError( QgsVectorLayer* vlayer ) const
{
QgsMessageViewer *mv = new QgsMessageViewer();
mv->setWindowTitle( tr( "Commit errors" ) );
mv->setMessageAsPlainText( tr( "Could not commit changes to layer %1" ).arg( vlayer->name() )
+ "\n\n"
+ tr( "Errors: %1\n" ).arg( vlayer->commitErrors().join( "\n " ) )
);
QToolButton *showMore = new QToolButton();
// store pointer to vlayer in data of QAction
QAction *act = new QAction( showMore );
act->setData( QVariant( QMetaType::QObjectStar, &vlayer ) );
act->setText( tr( "Show more" ) );
showMore->setStyleSheet( "background-color: rgba(255, 255, 255, 0); color: black; text-decoration: underline;" );
showMore->setCursor( Qt::PointingHandCursor );
showMore->setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Preferred );
showMore->addAction( act );
showMore->setDefaultAction( act );
connect( showMore, SIGNAL( triggered( QAction* ) ), mv, SLOT( exec() ) );
connect( showMore, SIGNAL( triggered( QAction* ) ), showMore, SLOT( deleteLater() ) );
// no timeout set, since notice needs attention and is only shown first time layer is labeled
QgsMessageBarItem *errorMsg = new QgsMessageBarItem(
tr( "Commit errors" ),
tr( "Could not commit changes to layer %1" ).arg( vlayer->name() ),
showMore,
QgsMessageBar::WARNING,
0,
QgisApp::instance()->messageBar() );
QgisApp::instance()->messageBar()->pushItem( errorMsg );
}
示例6: addAlert
QtChatWindow::AlertID QtChatWindow::addAlert(const std::string& alertText) {
QWidget* alertWidget = new QWidget(this);
QHBoxLayout* alertLayout = new QHBoxLayout(alertWidget);
alertLayout_->addWidget(alertWidget);
QLabel* alertLabel = new QLabel(this);
alertLabel->setText(alertText.c_str());
alertLayout->addWidget(alertLabel);
QToolButton* closeButton = new QToolButton(alertWidget);
closeButton->setIcon(style()->standardIcon(QStyle::SP_TitleBarCloseButton));
closeButton->setIconSize(QSize(16,16));
closeButton->setCursor(Qt::ArrowCursor);
closeButton->setStyleSheet("QToolButton { border: none; padding: 0px; }");
connect (closeButton, SIGNAL(clicked()), this, SLOT(handleAlertButtonClicked()));
alertLayout->addWidget(closeButton);
QPalette palette = alertWidget->palette();
palette.setColor(QPalette::Window, QColor(Qt::yellow));
palette.setColor(QPalette::WindowText, QColor(Qt::black));
alertWidget->setStyleSheet(alertStyleSheet_);
alertLabel->setStyleSheet(alertStyleSheet_);
AlertID id = nextAlertId_++;
alertWidgets_[id] = alertWidget;
return id;
}
示例7: QLabel
MusicSongsSummariziedFloatWidget::MusicSongsSummariziedFloatWidget(QWidget *parent)
: QLabel(parent)
{
setWindowFlags( Qt::Window | Qt::FramelessWindowHint );
setObjectName("MainWidget");
setStyleSheet("#MainWidget{background:rgba(0, 0, 0, 60);}");
resize(60, 25);
MusicUtils::widgetToRound(this, 10, 10);
QHBoxLayout *layout = new QHBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
QToolButton *locationButton = new QToolButton(this);
QToolButton *searchButton = new QToolButton(this);
layout->addWidget(locationButton);
layout->addWidget(searchButton);
locationButton->setIcon(QIcon(QString::fromUtf8(":/appTools/location")));
locationButton->setIconSize(QSize(20, 20));
locationButton->setStyleSheet(MusicUIObject::MToolButtonStyle03);
locationButton->setCursor(QCursor(Qt::PointingHandCursor));
searchButton->setIcon(QIcon(QString::fromUtf8(":/appTools/search")));
searchButton->setIconSize(QSize(20, 20));
searchButton->setStyleSheet(MusicUIObject::MToolButtonStyle03);
searchButton->setCursor(QCursor(Qt::PointingHandCursor));
connect(locationButton, SIGNAL(clicked()), SIGNAL(musicCurrentPlayLocation()));
connect(searchButton, SIGNAL(clicked()), SIGNAL(musicSearch()));
m_currentAnimationValue = 1;
m_timer.setInterval(3*1000);
connect(&m_timer, SIGNAL(timeout()), SLOT(leaveTimeout()));
m_animation = new QPropertyAnimation(this, "windowOpacity");
m_animation->setDuration(1000);
connect(m_animation, SIGNAL(finished()), SLOT(animationFinished()));
M_CONNECTION->setValue("MusicSongsSummariziedFloatWidget", this);
M_CONNECTION->poolConnect("MusicSongsSummariziedFloatWidget", "MusicBottomAreaWidget");
M_CONNECTION->poolConnect("MusicSongsSummariziedFloatWidget", "MusicApplication");
m_timer.start();
}
示例8: CreateToolButton
QToolButton* SelectPathWidgetBase::CreateToolButton(const DAVA::String& iconPath)
{
QToolButton* retButton;
retButton = new QToolButton(this);
QIcon icon(iconPath.c_str());
retButton->setIcon(icon);
retButton->setCursor(Qt::ArrowCursor);
retButton->setStyleSheet("QToolButton { border: none; padding: 0px; }");
int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
QSize msz = minimumSizeHint();
setStyleSheet(QString("QLineEdit { padding-right: %1px; } ").arg(retButton->sizeHint().width() * 2 + frameWidth));
setMinimumSize(qMax(msz.width(), retButton->sizeHint().height() + frameWidth * 2 + 2),
qMax(msz.height(), retButton->sizeHint().height() + frameWidth * 2 + 2));
return retButton;
}
示例9: QLineEdit
FilterWidget::FilterWidget(QWidget *parent)
: QLineEdit(parent)
, m_patternGroup(new QActionGroup(this))
{
setClearButtonEnabled(true);
connect(this, SIGNAL(textChanged(QString)), this, SIGNAL(filterChanged()));
QMenu *menu = new QMenu(this);
m_caseSensitivityAction = menu->addAction(tr("Case Sensitive"));
m_caseSensitivityAction->setCheckable(true);
connect(m_caseSensitivityAction, SIGNAL(toggled(bool)), this, SIGNAL(filterChanged()));
menu->addSeparator();
m_patternGroup->setExclusive(true);
QAction *patternAction = menu->addAction("Fixed String");
patternAction->setData(QVariant(int(QRegExp::FixedString)));
patternAction->setCheckable(true);
patternAction->setChecked(true);
m_patternGroup->addAction(patternAction);
patternAction = menu->addAction("Regular Expression");
patternAction->setCheckable(true);
patternAction->setData(QVariant(int(QRegExp::RegExp2)));
m_patternGroup->addAction(patternAction);
patternAction = menu->addAction("Wildcard");
patternAction->setCheckable(true);
patternAction->setData(QVariant(int(QRegExp::Wildcard)));
m_patternGroup->addAction(patternAction);
connect(m_patternGroup, SIGNAL(triggered(QAction*)), this, SIGNAL(filterChanged()));
const QIcon icon = QIcon(QPixmap(":/images/find.png"));
QToolButton *optionsButton = new QToolButton;
#ifndef QT_NO_CURSOR
optionsButton->setCursor(Qt::ArrowCursor);
#endif
optionsButton->setFocusPolicy(Qt::NoFocus);
optionsButton->setStyleSheet("* { border: none; }");
optionsButton->setIcon(icon);
optionsButton->setMenu(menu);
optionsButton->setPopupMode(QToolButton::InstantPopup);
QWidgetAction *optionsAction = new QWidgetAction(this);
optionsAction->setDefaultWidget(optionsButton);
addAction(optionsAction, QLineEdit::LeadingPosition);
}
示例10: QWidget
MediaSearchWidget::MediaSearchWidget(QWidget *parent) :
QWidget(parent)
{
// m_animate = new StateMachineServer;
this->setMinimumSize(160, 20);
this->setFixedSize(160, 20);
m_searchKeyEdit = new QLineEdit;
m_searchKeyEdit->setText( tr("Searching...") );
QToolButton* searchBtn = new QToolButton;
QSize size = QSize( 20, this->size().height() );
searchBtn->setMinimumSize(size);
searchBtn->setMaximumSize(size);
searchBtn->setIconSize(size);
searchBtn->setIcon( QIcon(":/images/Button-search.png"));
searchBtn->setFocusPolicy(Qt::NoFocus);// 得到焦点时,不显示虚线框
searchBtn->setCursor(QCursor(Qt::PointingHandCursor));
QHBoxLayout *editLayout = new QHBoxLayout();
editLayout->setContentsMargins(0, 0, 0, 0);
editLayout->addStretch();
editLayout->addWidget(searchBtn);
m_searchKeyEdit->setLayout(editLayout);
// 设置输入框中文件输入区,不让输入的文字在被隐藏在按钮下
m_searchKeyEdit->setTextMargins(0, 1, size.width(), 1);
QHBoxLayout* hLayout = new QHBoxLayout;
hLayout->setContentsMargins(0,0,0,0);
hLayout->setSpacing(4);
hLayout->addWidget(m_searchKeyEdit);
hLayout->setAlignment(Qt::AlignLeft);
this->setLayout(hLayout);
connect(searchBtn, SIGNAL(clicked()), this, SLOT(searchMusic()) );
// connect(this, SIGNAL(animateHide()), m_animate, SIGNAL(transHide()) );
// /connect(this, SIGNAL(animateShow()), m_animate, SIGNAL(transShow()) );
}
示例11: QWidget
DatasetsListWidget::DatasetsListWidget(DatasetsController *_ctrl)
: QWidget(), ctrl(_ctrl)
{
QVBoxLayout *l = new QVBoxLayout(this);
l->setMargin(0);
tabs = new DatasetsTabWidget(this);
l->addWidget(tabs);
QToolButton *newTabButton = new QToolButton(this);
tabs->setCornerWidget(newTabButton, Qt::TopRightCorner);
newTabButton->setCursor(Qt::ArrowCursor);
newTabButton->setAutoRaise(true);
newTabButton->setText("+");
newTabButton->setObjectName("+");
newTabButton->setToolTip(tr("Add dataset"));
QIcon addIcon = QIcon(QString(":U2Designer/images/add.png"));
newTabButton->setIcon(addIcon);
connect(newTabButton, SIGNAL(clicked()), SLOT(sl_newDataset()));
connect(tabs, SIGNAL(tabCloseRequested(int)), SLOT(sl_deleteDataset(int)));
connect(tabs, SIGNAL(si_contextMenu(const QPoint &, int)), SLOT(sl_contextMenu(const QPoint &, int)));
}
示例12: QTabWidget
TabWidget::TabWidget(QWidget *parent) : QTabWidget(parent){
EditableTabBar* t = new EditableTabBar();
connect(t, SIGNAL(tabTextChanged(int, const QString &)), this,SLOT(tabTextChanged(int, const QString &)));
setTabBar(t);
this->setTabsClosable(true);
this->setMovable(true);
this->setContextMenuPolicy(Qt::CustomContextMenu);
connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(contextMenu(const QPoint&)));
connect(this,SIGNAL(tabCloseRequested(int)),this,SLOT(closeTab(int)));
QToolButton *toolb = new QToolButton(this);
toolb->setCursor(Qt::ArrowCursor);
toolb->setToolTip("Add tab");
toolb->setAutoRaise(true);
toolb->setIcon(QIcon(":/plus.png"));
this->setCornerWidget(toolb, Qt::TopLeftCorner);
connect(toolb,SIGNAL(clicked()),this,SLOT(addTab()));
}
示例13: DockWindow
SelectionView::SelectionView(Gui::Document* pcDocument, QWidget *parent)
: DockWindow(pcDocument,parent)
{
setWindowTitle( tr( "Property View" ) );
QVBoxLayout* pLayout = new QVBoxLayout( this );
pLayout->setSpacing( 0 );
pLayout->setMargin ( 0 );
QLineEdit* searchBox = new QLineEdit(this);
#if QT_VERSION >= 0x040700
searchBox->setPlaceholderText( tr( "Search" ) );
#endif
searchBox->setToolTip( tr( "Searches object labels" ) );
pLayout->addWidget( searchBox );
QHBoxLayout* llayout = new QHBoxLayout(searchBox);
QToolButton* clearButton = new QToolButton(searchBox);
clearButton->setFixedSize(18, 21);
clearButton->setCursor(Qt::ArrowCursor);
clearButton->setStyleSheet(QString::fromAscii("QToolButton {margin-bottom:6px}"));
clearButton->setIcon(BitmapFactory().pixmap(":/icons/edit-cleartext.svg"));
clearButton->setToolTip( tr( "Clears the search field" ) );
llayout->addWidget(clearButton,0,Qt::AlignRight);
selectionView = new QListWidget(this);
selectionView->setContextMenuPolicy(Qt::CustomContextMenu);
pLayout->addWidget( selectionView );
resize( 200, 200 );
QObject::connect(clearButton, SIGNAL(clicked()), searchBox, SLOT(clear()));
QObject::connect(searchBox, SIGNAL(textChanged(QString)), this, SLOT(search(QString)));
QObject::connect(selectionView, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(select(QListWidgetItem*)));
QObject::connect(selectionView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(onItemContextMenu(QPoint)));
Gui::Selection().Attach(this);
}
示例14: setUpViewMiniCalendar
void SideBarCalendar::setUpViewMiniCalendar(){
miniCal = new CustomCalendarWidget;
QToolButton* next = new QToolButton;
QToolButton* prev = new QToolButton;
QPushButton* today = new QPushButton("Aujourd'hui");
year = new QLabel(QString::number(miniCal->selectedDate().year()));
month = new QLabel(QDate::longMonthName(miniCal->selectedDate().month()));
QString styleToolButton = "QToolButton {background-color: rgba(0,0,0,0)}";
QSize sizeToolButton(24,24);
next->setIcon(QIcon(":/icons/img/icons/ic_chevron_right_48px.svg"));
next->setStyleSheet(styleToolButton);
next->setIconSize(sizeToolButton);
next->setCursor(Qt::PointingHandCursor);
prev->setIcon(QIcon(":/icons/img/icons/ic_chevron_left_48px.svg"));
prev->setStyleSheet(styleToolButton);
prev->setIconSize(sizeToolButton);
prev->setCursor(Qt::PointingHandCursor);
/* Infos jour sélectionné
* Contient : No du jour et nom du jour de la semaine
*/
currentDayCal = new DayWidget;
currentDayCal->setDayName(QDate::longDayName(miniCal->selectedDate().dayOfWeek()));
currentDayCal->setDayNumber(miniCal->selectedDate().day());
/* Header
* Contient: Bouton next, prev, mois et année
*/
QWidget* header = new QWidget;
header->setStyleSheet("QLabel{font-size: 16px;}");
QHBoxLayout* headerLayout = new QHBoxLayout;
headerLayout->addWidget(prev);
headerLayout->addStretch(1);
headerLayout->addWidget(month);
headerLayout->addWidget(year);
headerLayout->addStretch(1);
headerLayout->addWidget(next);
header->setLayout(headerLayout);
/*
* Layout principale
* Contient: Header et Calendar
*/
layoutMiniCalendar = new QVBoxLayout;
layoutMiniCalendar->addWidget(currentDayCal);
layoutMiniCalendar->addWidget(header);
layoutMiniCalendar->addWidget(today, 0, Qt::AlignCenter);
layoutMiniCalendar->addWidget(miniCal, 0, Qt::AlignHCenter);
layoutMiniCalendar->addStretch(1);
miniCal->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
miniCal->setFixedHeight(280);
miniCal->setFixedWidth(280);
connect(prev, SIGNAL(clicked()), miniCal, SLOT(showPreviousMonth()));
connect(next, SIGNAL(clicked()), miniCal, SLOT(showNextMonth()));
connect(miniCal, SIGNAL(currentPageChanged(int,int)), this, SLOT(pageChanged(int,int)));
connect(miniCal, SIGNAL(selectionChanged()), this, SLOT(onDayClicked()));
connect(today, SIGNAL(clicked()), this, SLOT(onTodayClicked()));
viewMiniCalendar->setLayout(layoutMiniCalendar);
}
示例15: QWidget
DirBrowser::DirBrowser(QWidget *parent, Playlist *pl)
: QWidget(parent), ui(new Ui::DirBrowser), m_pl(pl), m_insertactive(false)
{
QKeySequence seq;
QShortcut *sc;
ui->setupUi(this);
ui->searchFrame->hide();
ui->tabs->setTabsClosable(true);
QToolButton *plusbut = new QToolButton(this);
QString icon_path = Helper::getIconPath();
QIcon icon = QIcon(icon_path + "/addtab.png");
plusbut->setIcon(icon);
ui->tabs->setCornerWidget(plusbut, Qt::TopRightCorner);
plusbut->setCursor(Qt::ArrowCursor);
plusbut->setAutoRaise(true);
plusbut->setToolTip(tr("Add tab"));
connect(plusbut, SIGNAL(clicked()), this, SLOT(addTab()));
seq = QKeySequence("Ctrl+t");
sc = new QShortcut(seq, this);
connect(sc, SIGNAL (activated()), this, SLOT(addTab()));
seq = QKeySequence("Ctrl+w");
sc = new QShortcut(seq, this);
connect(sc, SIGNAL (activated()), this, SLOT(closeCurrentTab()));
connect(ui->tabs, SIGNAL(currentChanged(int)),
this, SLOT(onCurrentTabChanged(int)));
connect(ui->tabs, SIGNAL(tabCloseRequested(int)),
this, SLOT(closeTab(int)));
icon = QIcon(icon_path + "/cross.png");
ui->closeSearchTB->setIcon(icon);
connect(ui->closeSearchTB, SIGNAL(clicked()),
this, SLOT(closeSearchPanel()));
seq = QKeySequence("Ctrl+f");
sc = new QShortcut(seq, this);
connect(sc, SIGNAL (activated()), this, SLOT(openSearchPanel()));
seq = QKeySequence("/");
sc = new QShortcut(seq, this);
connect(sc, SIGNAL (activated()), this, SLOT(openSearchPanel()));
seq = QKeySequence("Esc");
sc = new QShortcut(seq, this);
connect(sc, SIGNAL (activated()), this, SLOT(closeSearchPanel()));
seq = QKeySequence(Qt::Key_F3);
sc = new QShortcut(seq, this);
connect(sc, SIGNAL(activated()), this, SLOT(searchNext()));
seq = QKeySequence(Qt::SHIFT + Qt::Key_F3);
sc = new QShortcut(seq, this);
connect(sc, SIGNAL(activated()), this, SLOT(searchPrev()));
connect(ui->searchCMB->lineEdit(), SIGNAL(textChanged(const QString&)),
this, SLOT(onSearchTextChanged(const QString&)));
connect(ui->nextTB, SIGNAL(clicked()), this, SLOT(searchNext()));
connect(ui->prevTB, SIGNAL(clicked()), this, SLOT(searchPrev()));
connect(ui->searchCMB->lineEdit(), SIGNAL(returnPressed()),
this, SLOT(returnPressedInSearch()));
seq = QKeySequence("Ctrl+s");
sc = new QShortcut(seq, this);
connect(sc, SIGNAL(activated()), this, SLOT(toggleSearchKind()));
connect(ui->serverSearchCB, SIGNAL(stateChanged(int)),
this, SLOT(onSearchKindChanged(int)));
connect(ui->execSearchPB, SIGNAL(clicked()), this, SLOT(serverSearch()));
onSearchKindChanged(int(ui->serverSearchCB->checkState()));
ui->execSearchPB->hide();
setPlaylist(pl);
}