Changeset View
Changeset View
Standalone View
Standalone View
gui/mdwslider.cpp
Show All 16 Lines | |||||
17 | * You should have received a copy of the GNU Library General Public | 17 | * You should have received a copy of the GNU Library General Public | ||
18 | * License along with this program; if not, write to the Free | 18 | * License along with this program; if not, write to the Free | ||
19 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 19 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | #include "gui/mdwslider.h" | 22 | #include "gui/mdwslider.h" | ||
23 | 23 | | |||
24 | #include <klocalizedstring.h> | 24 | #include <klocalizedstring.h> | ||
25 | #include <kiconloader.h> | | |||
26 | #include <kconfig.h> | 25 | #include <kconfig.h> | ||
27 | #include <kglobalaccel.h> | 26 | #include <kglobalaccel.h> | ||
28 | #include <kactioncollection.h> | 27 | #include <kactioncollection.h> | ||
29 | 28 | | |||
30 | #include <QCoreApplication> | 29 | #include <QCoreApplication> | ||
31 | #include <QToolButton> | 30 | #include <QToolButton> | ||
32 | #include <QMenu> | 31 | #include <QMenu> | ||
33 | #include <QLabel> | 32 | #include <QLabel> | ||
▲ Show 20 Lines • Show All 522 Lines • ▼ Show 20 Line(s) | 534 | // frame1->setFrameShape(QFrame::StyledPanel); | |||
556 | mediaLayout->addStretch(); | 555 | mediaLayout->addStretch(); | ||
557 | volLayout->addLayout(mediaLayout); | 556 | volLayout->addLayout(mediaLayout); | ||
558 | } | 557 | } | ||
559 | 558 | | |||
560 | 559 | | |||
561 | QToolButton* MDWSlider::addMediaButton(QString iconName, QLayout* layout, QWidget *parent) | 560 | QToolButton* MDWSlider::addMediaButton(QString iconName, QLayout* layout, QWidget *parent) | ||
562 | { | 561 | { | ||
563 | QToolButton *lbl = new QToolButton(parent); | 562 | QToolButton *lbl = new QToolButton(parent); | ||
564 | lbl->setIconSize(QSize(IconSize(KIconLoader::Toolbar), IconSize(KIconLoader::Toolbar))); | | |||
565 | lbl->setAutoRaise(true); | 563 | lbl->setAutoRaise(true); | ||
566 | lbl->setCheckable(false); | 564 | lbl->setCheckable(false); | ||
567 | 565 | | |||
568 | ToggleToolButton::setIndicatorIcon(iconName, lbl); | 566 | ToggleToolButton::setIndicatorIcon(iconName, lbl); | ||
569 | layout->addWidget(lbl); | 567 | layout->addWidget(lbl); | ||
570 | 568 | | |||
571 | return lbl; | 569 | return lbl; | ||
572 | } | 570 | } | ||
▲ Show 20 Lines • Show All 545 Lines • ▼ Show 20 Line(s) | |||||
1118 | #endif | 1116 | #endif | ||
1119 | 1117 | | |||
1120 | 1118 | | |||
1121 | void MDWSlider::showContextMenu(const QPoint &pos) | 1119 | void MDWSlider::showContextMenu(const QPoint &pos) | ||
1122 | { | 1120 | { | ||
1123 | if (view()==nullptr) return; | 1121 | if (view()==nullptr) return; | ||
1124 | 1122 | | |||
1125 | QMenu *menu = view()->getPopup(); | 1123 | QMenu *menu = view()->getPopup(); | ||
1126 | menu->addSection( SmallIcon( "kmix" ), mixDevice()->readableName() ); | 1124 | menu->addSection( QIcon::fromTheme( "kmix" ), mixDevice()->readableName() ); | ||
1127 | 1125 | | |||
1128 | if (m_moveMenu) { | 1126 | if (m_moveMenu) { | ||
1129 | MixSet *ms = mixDevice()->moveDestinationMixSet(); | 1127 | MixSet *ms = mixDevice()->moveDestinationMixSet(); | ||
1130 | Q_ASSERT(ms!=nullptr); | 1128 | Q_ASSERT(ms!=nullptr); | ||
1131 | 1129 | | |||
1132 | m_moveMenu->setEnabled(ms->count()>1); | 1130 | m_moveMenu->setEnabled(ms->count()>1); | ||
1133 | // The "Event Sounds" stream cannot be moved at present. This is because | 1131 | // The "Event Sounds" stream cannot be moved at present. This is because | ||
1134 | // Mixer_PULSE::moveStream() does not record the stream ID in the | 1132 | // Mixer_PULSE::moveStream() does not record the stream ID in the | ||
▲ Show 20 Lines • Show All 118 Lines • Show Last 20 Lines |