summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2012-08-12 02:52:29 +0200
committerSlávek Banko <[email protected]>2012-08-12 02:52:29 +0200
commitb929f2e6f6210eccc0ccd35f66104e16578159ff (patch)
treec68592daa39454ef04b365a375c5d27ed3eb13e8 /src
parentd306f1c84fe46a5b205358a5944f2c944a5eead0 (diff)
downloadkmplayer-b929f2e6f6210eccc0ccd35f66104e16578159ff.tar.gz
kmplayer-b929f2e6f6210eccc0ccd35f66104e16578159ff.zip
Added next preset scales and shortcuts for zoom
This partially resolves Bug 1032
Diffstat (limited to 'src')
-rw-r--r--src/kmplayer.h2
-rw-r--r--src/kmplayer_part.cpp12
-rw-r--r--src/kmplayerapp.cpp14
-rw-r--r--src/kmplayercontrolpanel.cpp2
-rw-r--r--src/kmplayercontrolpanel.h3
-rw-r--r--src/kmplayerui.rc5
6 files changed, 36 insertions, 2 deletions
diff --git a/src/kmplayer.h b/src/kmplayer.h
index 9c9b6d2..4e8fb15 100644
--- a/src/kmplayer.h
+++ b/src/kmplayer.h
@@ -116,6 +116,8 @@ private slots:
void zoom50 ();
void zoom100 ();
void zoom150 ();
+ void zoom200 ();
+ void zoom300 ();
void editMode ();
void syncEditMode ();
void broadcastClicked ();
diff --git a/src/kmplayer_part.cpp b/src/kmplayer_part.cpp
index 4fb7800..fbdc632 100644
--- a/src/kmplayer_part.cpp
+++ b/src/kmplayer_part.cpp
@@ -316,6 +316,10 @@ KDE_NO_CDTOR_EXPORT KMPlayerPart::KMPlayerPart (TQWidget * wparent, const char *
this, TQT_SLOT (setMenuZoom (int)));
panel->zoomMenu ()->connectItem (KMPlayer::ControlPanel::menu_zoom150,
this, TQT_SLOT (setMenuZoom (int)));
+ panel->zoomMenu ()->connectItem (KMPlayer::ControlPanel::menu_zoom200,
+ this, TQT_SLOT (setMenuZoom (int)));
+ panel->zoomMenu ()->connectItem (KMPlayer::ControlPanel::menu_zoom300,
+ this, TQT_SLOT (setMenuZoom (int)));
m_view->setNoInfoMessages (m_features != Feat_InfoPanel);
if (m_features == Feat_InfoPanel)
@@ -619,7 +623,13 @@ KDE_NO_EXPORT void KMPlayerPart::setMenuZoom (int id) {
m_liveconnectextension->setSize (w, h);
return;
}
- float scale = 1.5;
+ float scale = 1;
+ if (id == KMPlayer::ControlPanel::menu_zoom300)
+ scale = 3.0;
+ if (id == KMPlayer::ControlPanel::menu_zoom200)
+ scale = 2.0;
+ if (id == KMPlayer::ControlPanel::menu_zoom150)
+ scale = 1.5;
if (id == KMPlayer::ControlPanel::menu_zoom50)
scale = 0.5;
if (m_view->viewer ())
diff --git a/src/kmplayerapp.cpp b/src/kmplayerapp.cpp
index b1bc729..94b318e 100644
--- a/src/kmplayerapp.cpp
+++ b/src/kmplayerapp.cpp
@@ -596,6 +596,8 @@ KDE_NO_EXPORT void KMPlayerApp::initActions () {
new KAction (i18n ("50%"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT (zoom50 ()), ac, "view_zoom_50");
new KAction (i18n ("100%"), TQString ("viewmagfit"), KShortcut (), TQT_TQOBJECT(this), TQT_SLOT (zoom100 ()), ac, "view_zoom_100");
new KAction (i18n ("150%"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT (zoom150 ()), ac, "view_zoom_150");
+ new KAction (i18n ("200%"), 0, KShortcut (), TQT_TQOBJECT(this), TQT_SLOT (zoom200 ()), ac, "view_zoom_200");
+ new KAction (i18n ("300%"), 0, KShortcut (), TQT_TQOBJECT(this), TQT_SLOT (zoom300 ()), ac, "view_zoom_300");
viewEditMode = new KToggleAction (i18n ("&Edit mode"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT (editMode ()), ac, "edit_mode");
viewSyncEditMode = new KAction (i18n ("Sync &with playlist"), TQString ("reload"), KShortcut (), TQT_TQOBJECT(this), TQT_SLOT (syncEditMode ()), ac, "sync_edit_mode");
viewSyncEditMode->setEnabled (false);
@@ -681,6 +683,10 @@ KDE_NO_EXPORT void KMPlayerApp::initView () {
TQT_TQOBJECT(this), TQT_SLOT (zoom100 ()));
m_view->controlPanel ()->zoomMenu ()->connectItem (KMPlayer::ControlPanel::menu_zoom150,
TQT_TQOBJECT(this), TQT_SLOT (zoom150 ()));
+ m_view->controlPanel ()->zoomMenu ()->connectItem (KMPlayer::ControlPanel::menu_zoom200,
+ TQT_TQOBJECT(this), TQT_SLOT (zoom200 ()));
+ m_view->controlPanel ()->zoomMenu ()->connectItem (KMPlayer::ControlPanel::menu_zoom300,
+ TQT_TQOBJECT(this), TQT_SLOT (zoom300 ()));
connect (m_view->controlPanel()->broadcastButton (), TQT_SIGNAL (clicked ()),
TQT_TQOBJECT(this), TQT_SLOT (broadcastClicked ()));
m_auto_resize = m_player->settings ()->autoresize;
@@ -1075,6 +1081,14 @@ KDE_NO_EXPORT void KMPlayerApp::zoom150 () {
resizePlayer (150);
}
+KDE_NO_EXPORT void KMPlayerApp::zoom200 () {
+ resizePlayer (200);
+}
+
+KDE_NO_EXPORT void KMPlayerApp::zoom300 () {
+ resizePlayer (300);
+}
+
KDE_NO_EXPORT void KMPlayerApp::editMode () {
m_view->docArea ()->hide ();
bool editmode = !m_view->editMode ();
diff --git a/src/kmplayercontrolpanel.cpp b/src/kmplayercontrolpanel.cpp
index 1a1c7a8..73f4756 100644
--- a/src/kmplayercontrolpanel.cpp
+++ b/src/kmplayercontrolpanel.cpp
@@ -393,6 +393,8 @@ KDE_NO_CDTOR_EXPORT ControlPanel::ControlPanel(TQWidget * parent, View * view)
m_zoomMenu->insertItem (i18n ("50%"), menu_zoom50);
m_zoomMenu->insertItem (i18n ("100%"), menu_zoom100);
m_zoomMenu->insertItem (i18n ("150%"), menu_zoom150);
+ m_zoomMenu->insertItem (i18n ("200%"), menu_zoom200);
+ m_zoomMenu->insertItem (i18n ("300%"), menu_zoom300);
m_popupMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("viewmag"), KIcon::Small, 0, false), i18n ("&Zoom"), m_zoomMenu, menu_zoom);
m_popupMenu->insertSeparator ();
m_colorMenu = new KMPlayerPopupMenu (this);
diff --git a/src/kmplayercontrolpanel.h b/src/kmplayercontrolpanel.h
index be45131..845ed8f 100644
--- a/src/kmplayercontrolpanel.h
+++ b/src/kmplayercontrolpanel.h
@@ -100,7 +100,8 @@ class KMPLAYER_EXPORT ControlPanel : public TQWidget {
public:
enum MenuID {
menu_config = 0, menu_player, menu_fullscreen, menu_volume,
- menu_bookmark, menu_zoom, menu_zoom50, menu_zoom100, menu_zoom150,
+ menu_bookmark, menu_zoom, menu_zoom50, menu_zoom100,
+ menu_zoom150, menu_zoom200, menu_zoom300,
menu_view, menu_video, menu_playlist, menu_minimal
};
enum Button {
diff --git a/src/kmplayerui.rc b/src/kmplayerui.rc
index d22f181..fa9d666 100644
--- a/src/kmplayerui.rc
+++ b/src/kmplayerui.rc
@@ -34,6 +34,8 @@
<Action name="view_zoom_50"/>
<Action name="view_zoom_100"/>
<Action name="view_zoom_150"/>
+ <Action name="view_zoom_200"/>
+ <Action name="view_zoom_300"/>
</Menu>
<Action name="view_keep_ratio"/>
<Separator />
@@ -73,6 +75,9 @@
<Action shortcut="F2" name="edit_playlist_item"/>
<Action shortcut="C" name="view_arts_control" />
<Action shortcut="M" name="view_minimal" />
+ <Action shortcut="Alt+1" name="view_zoom_100" />
+ <Action shortcut="Alt+2" name="view_zoom_200" />
+ <Action shortcut="Alt+3" name="view_zoom_300" />
</ActionProperties>
<ToolBar name="mainToolBar"><text></text>
<Action name="new_window"/>