| 1 | /* smplayer, GUI front-end for mplayer.
|
|---|
| 2 | Copyright (C) 2006-2013 Ricardo Villalba <rvm@users.sourceforge.net>
|
|---|
| 3 |
|
|---|
| 4 | This program is free software; you can redistribute it and/or modify
|
|---|
| 5 | it under the terms of the GNU General Public License as published by
|
|---|
| 6 | the Free Software Foundation; either version 2 of the License, or
|
|---|
| 7 | (at your option) any later version.
|
|---|
| 8 |
|
|---|
| 9 | This program is distributed in the hope that it will be useful,
|
|---|
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 12 | GNU General Public License for more details.
|
|---|
| 13 |
|
|---|
| 14 | You should have received a copy of the GNU General Public License
|
|---|
| 15 | along with this program; if not, write to the Free Software
|
|---|
| 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|---|
| 17 | */
|
|---|
| 18 |
|
|---|
| 19 | #include "defaultgui.h"
|
|---|
| 20 | #include "helper.h"
|
|---|
| 21 | #include "colorutils.h"
|
|---|
| 22 | #include "core.h"
|
|---|
| 23 | #include "global.h"
|
|---|
| 24 | #include "widgetactions.h"
|
|---|
| 25 | #include "playlist.h"
|
|---|
| 26 | #include "mplayerwindow.h"
|
|---|
| 27 | #include "myaction.h"
|
|---|
| 28 | #include "images.h"
|
|---|
| 29 | #include "floatingwidget.h"
|
|---|
| 30 | #include "desktopinfo.h"
|
|---|
| 31 | #include "editabletoolbar.h"
|
|---|
| 32 |
|
|---|
| 33 | #if DOCK_PLAYLIST
|
|---|
| 34 | #include "playlistdock.h"
|
|---|
| 35 | #endif
|
|---|
| 36 |
|
|---|
| 37 | #include <QMenu>
|
|---|
| 38 | #include <QSettings>
|
|---|
| 39 | #include <QLabel>
|
|---|
| 40 | #include <QStatusBar>
|
|---|
| 41 | #include <QPushButton>
|
|---|
| 42 | #include <QToolButton>
|
|---|
| 43 | #include <QMenuBar>
|
|---|
| 44 |
|
|---|
| 45 | #define TOOLBAR_VERSION 1
|
|---|
| 46 |
|
|---|
| 47 | using namespace Global;
|
|---|
| 48 |
|
|---|
| 49 | DefaultGui::DefaultGui( QWidget * parent, Qt::WindowFlags flags )
|
|---|
| 50 | : BaseGuiPlus( parent, flags )
|
|---|
| 51 | {
|
|---|
| 52 | createStatusBar();
|
|---|
| 53 |
|
|---|
| 54 | connect( this, SIGNAL(timeChanged(QString)),
|
|---|
| 55 | this, SLOT(displayTime(QString)) );
|
|---|
| 56 | connect( this, SIGNAL(frameChanged(int)),
|
|---|
| 57 | this, SLOT(displayFrame(int)) );
|
|---|
| 58 | connect( this, SIGNAL(ABMarkersChanged(int,int)),
|
|---|
| 59 | this, SLOT(displayABSection(int,int)) );
|
|---|
| 60 | connect( this, SIGNAL(videoInfoChanged(int,int,double)),
|
|---|
| 61 | this, SLOT(displayVideoInfo(int,int,double)) );
|
|---|
| 62 |
|
|---|
| 63 | connect( this, SIGNAL(cursorNearBottom(QPoint)),
|
|---|
| 64 | this, SLOT(showFloatingControl(QPoint)) );
|
|---|
| 65 | connect( this, SIGNAL(cursorNearTop(QPoint)),
|
|---|
| 66 | this, SLOT(showFloatingMenu(QPoint)) );
|
|---|
| 67 | connect( this, SIGNAL(cursorFarEdges()),
|
|---|
| 68 | this, SLOT(hideFloatingControls()) );
|
|---|
| 69 |
|
|---|
| 70 | createActions();
|
|---|
| 71 | createMainToolBars();
|
|---|
| 72 | createControlWidget();
|
|---|
| 73 | createControlWidgetMini();
|
|---|
| 74 | createFloatingControl();
|
|---|
| 75 | createMenus();
|
|---|
| 76 |
|
|---|
| 77 | #if USE_CONFIGURABLE_TOOLBARS
|
|---|
| 78 | connect( editToolbar1Act, SIGNAL(triggered()),
|
|---|
| 79 | toolbar1, SLOT(edit()) );
|
|---|
| 80 | connect( editControl1Act, SIGNAL(triggered()),
|
|---|
| 81 | controlwidget, SLOT(edit()) );
|
|---|
| 82 | connect( editControl2Act, SIGNAL(triggered()),
|
|---|
| 83 | controlwidget_mini, SLOT(edit()) );
|
|---|
| 84 | floating_control->toolbar()->takeAvailableActionsFrom(this);
|
|---|
| 85 | connect( editFloatingControlAct, SIGNAL(triggered()),
|
|---|
| 86 | floating_control->toolbar(), SLOT(edit()) );
|
|---|
| 87 | #endif
|
|---|
| 88 |
|
|---|
| 89 | menuBar()->setObjectName("menubar");
|
|---|
| 90 |
|
|---|
| 91 | retranslateStrings();
|
|---|
| 92 |
|
|---|
| 93 | loadConfig();
|
|---|
| 94 |
|
|---|
| 95 | //if (playlist_visible) showPlaylist(true);
|
|---|
| 96 |
|
|---|
| 97 | if (pref->compact_mode) {
|
|---|
| 98 | controlwidget->hide();
|
|---|
| 99 | toolbar1->hide();
|
|---|
| 100 | toolbar2->hide();
|
|---|
| 101 | }
|
|---|
| 102 | }
|
|---|
| 103 |
|
|---|
| 104 | DefaultGui::~DefaultGui() {
|
|---|
| 105 | saveConfig();
|
|---|
| 106 | }
|
|---|
| 107 |
|
|---|
| 108 | /*
|
|---|
| 109 | void DefaultGui::closeEvent( QCloseEvent * ) {
|
|---|
| 110 | qDebug("DefaultGui::closeEvent");
|
|---|
| 111 |
|
|---|
| 112 | //BaseGuiPlus::closeEvent(e);
|
|---|
| 113 | qDebug("w: %d h: %d", width(), height() );
|
|---|
| 114 | }
|
|---|
| 115 | */
|
|---|
| 116 |
|
|---|
| 117 | void DefaultGui::createActions() {
|
|---|
| 118 | qDebug("DefaultGui::createActions");
|
|---|
| 119 |
|
|---|
| 120 | timeslider_action = createTimeSliderAction(this);
|
|---|
| 121 | timeslider_action->disable();
|
|---|
| 122 |
|
|---|
| 123 | volumeslider_action = createVolumeSliderAction(this);
|
|---|
| 124 | volumeslider_action->disable();
|
|---|
| 125 |
|
|---|
| 126 | // Create the time label
|
|---|
| 127 | time_label_action = new TimeLabelAction(this);
|
|---|
| 128 | time_label_action->setObjectName("timelabel_action");
|
|---|
| 129 |
|
|---|
| 130 | #if MINI_ARROW_BUTTONS
|
|---|
| 131 | QList<QAction*> rewind_actions;
|
|---|
| 132 | rewind_actions << rewind1Act << rewind2Act << rewind3Act;
|
|---|
| 133 | rewindbutton_action = new SeekingButton(rewind_actions, this);
|
|---|
| 134 | rewindbutton_action->setObjectName("rewindbutton_action");
|
|---|
| 135 |
|
|---|
| 136 | QList<QAction*> forward_actions;
|
|---|
| 137 | forward_actions << forward1Act << forward2Act << forward3Act;
|
|---|
| 138 | forwardbutton_action = new SeekingButton(forward_actions, this);
|
|---|
| 139 | forwardbutton_action->setObjectName("forwardbutton_action");
|
|---|
| 140 | #endif
|
|---|
| 141 |
|
|---|
| 142 | // Statusbar
|
|---|
| 143 | viewVideoInfoAct = new MyAction(this, "toggle_video_info" );
|
|---|
| 144 | viewVideoInfoAct->setCheckable(true);
|
|---|
| 145 | connect( viewVideoInfoAct, SIGNAL(toggled(bool)),
|
|---|
| 146 | video_info_display, SLOT(setVisible(bool)) );
|
|---|
| 147 |
|
|---|
| 148 | viewFrameCounterAct = new MyAction( this, "toggle_frame_counter" );
|
|---|
| 149 | viewFrameCounterAct->setCheckable( true );
|
|---|
| 150 | connect( viewFrameCounterAct, SIGNAL(toggled(bool)),
|
|---|
| 151 | frame_display, SLOT(setVisible(bool)) );
|
|---|
| 152 |
|
|---|
| 153 | #if USE_CONFIGURABLE_TOOLBARS
|
|---|
| 154 | editToolbar1Act = new MyAction( this, "edit_main_toolbar" );
|
|---|
| 155 | editControl1Act = new MyAction( this, "edit_control1" );
|
|---|
| 156 | editControl2Act = new MyAction( this, "edit_control2" );
|
|---|
| 157 | editFloatingControlAct = new MyAction( this, "edit_floating_control" );
|
|---|
| 158 | #endif
|
|---|
| 159 | }
|
|---|
| 160 |
|
|---|
| 161 | #if AUTODISABLE_ACTIONS
|
|---|
| 162 | void DefaultGui::enableActionsOnPlaying() {
|
|---|
| 163 | qDebug("DefaultGui::enableActionsOnPlaying");
|
|---|
| 164 | BaseGuiPlus::enableActionsOnPlaying();
|
|---|
| 165 |
|
|---|
| 166 | timeslider_action->enable();
|
|---|
| 167 | volumeslider_action->enable();
|
|---|
| 168 | }
|
|---|
| 169 |
|
|---|
| 170 | void DefaultGui::disableActionsOnStop() {
|
|---|
| 171 | qDebug("DefaultGui::disableActionsOnStop");
|
|---|
| 172 | BaseGuiPlus::disableActionsOnStop();
|
|---|
| 173 |
|
|---|
| 174 | timeslider_action->disable();
|
|---|
| 175 | volumeslider_action->disable();
|
|---|
| 176 | }
|
|---|
| 177 | #endif // AUTODISABLE_ACTIONS
|
|---|
| 178 |
|
|---|
| 179 | void DefaultGui::createMenus() {
|
|---|
| 180 | toolbar_menu = new QMenu(this);
|
|---|
| 181 | toolbar_menu->addAction(toolbar1->toggleViewAction());
|
|---|
| 182 | toolbar_menu->addAction(toolbar2->toggleViewAction());
|
|---|
| 183 | #if USE_CONFIGURABLE_TOOLBARS
|
|---|
| 184 | toolbar_menu->addSeparator();
|
|---|
| 185 | toolbar_menu->addAction(editToolbar1Act);
|
|---|
| 186 | toolbar_menu->addAction(editControl1Act);
|
|---|
| 187 | toolbar_menu->addAction(editControl2Act);
|
|---|
| 188 | toolbar_menu->addAction(editFloatingControlAct);
|
|---|
| 189 | #endif
|
|---|
| 190 | optionsMenu->addSeparator();
|
|---|
| 191 | optionsMenu->addMenu(toolbar_menu);
|
|---|
| 192 |
|
|---|
| 193 | statusbar_menu = new QMenu(this);
|
|---|
| 194 | statusbar_menu->addAction(viewVideoInfoAct);
|
|---|
| 195 | statusbar_menu->addAction(viewFrameCounterAct);
|
|---|
| 196 |
|
|---|
| 197 | optionsMenu->addMenu(statusbar_menu);
|
|---|
| 198 | }
|
|---|
| 199 |
|
|---|
| 200 | QMenu * DefaultGui::createPopupMenu() {
|
|---|
| 201 | QMenu * m = new QMenu(this);
|
|---|
| 202 | #if USE_CONFIGURABLE_TOOLBARS
|
|---|
| 203 | m->addAction(editToolbar1Act);
|
|---|
| 204 | m->addAction(editControl1Act);
|
|---|
| 205 | m->addAction(editControl2Act);
|
|---|
| 206 | m->addAction(editFloatingControlAct);
|
|---|
| 207 | #else
|
|---|
| 208 | m->addAction(toolbar1->toggleViewAction());
|
|---|
| 209 | m->addAction(toolbar2->toggleViewAction());
|
|---|
| 210 | #endif
|
|---|
| 211 | return m;
|
|---|
| 212 | }
|
|---|
| 213 |
|
|---|
| 214 | void DefaultGui::createMainToolBars() {
|
|---|
| 215 | toolbar1 = new EditableToolbar( this );
|
|---|
| 216 | toolbar1->setObjectName("toolbar1");
|
|---|
| 217 | //toolbar1->setMovable(false);
|
|---|
| 218 | addToolBar(Qt::TopToolBarArea, toolbar1);
|
|---|
| 219 | #if USE_CONFIGURABLE_TOOLBARS
|
|---|
| 220 | QStringList toolbar1_actions;
|
|---|
| 221 | toolbar1_actions << "open_file" << "open_url" << "favorites_menu" << "separator"
|
|---|
| 222 | << "screenshot" << "separator" << "show_file_properties" << "show_playlist"
|
|---|
| 223 | << "show_tube_browser" << "separator" << "show_preferences"
|
|---|
| 224 | << "separator" << "play_prev" << "play_next";
|
|---|
| 225 |
|
|---|
| 226 | toolbar1->setDefaultActions(toolbar1_actions);
|
|---|
| 227 | #else
|
|---|
| 228 | toolbar1->addAction(openFileAct);
|
|---|
| 229 | toolbar1->addAction(openDVDAct);
|
|---|
| 230 | toolbar1->addAction(openURLAct);
|
|---|
| 231 | toolbar1->addSeparator();
|
|---|
| 232 | toolbar1->addAction(compactAct);
|
|---|
| 233 | toolbar1->addAction(fullscreenAct);
|
|---|
| 234 | toolbar1->addSeparator();
|
|---|
| 235 | toolbar1->addAction(screenshotAct);
|
|---|
| 236 | toolbar1->addSeparator();
|
|---|
| 237 | toolbar1->addAction(showPropertiesAct);
|
|---|
| 238 | toolbar1->addAction(showPlaylistAct);
|
|---|
| 239 | toolbar1->addAction(showPreferencesAct);
|
|---|
| 240 | toolbar1->addSeparator();
|
|---|
| 241 | toolbar1->addAction(playPrevAct);
|
|---|
| 242 | toolbar1->addAction(playNextAct);
|
|---|
| 243 | // Test:
|
|---|
| 244 | //toolbar1->addSeparator();
|
|---|
| 245 | //toolbar1->addAction(timeslider_action);
|
|---|
| 246 | //toolbar1->addAction(volumeslider_action);
|
|---|
| 247 | #endif
|
|---|
| 248 |
|
|---|
| 249 | toolbar2 = new QToolBar( this );
|
|---|
| 250 | toolbar2->setObjectName("toolbar2");
|
|---|
| 251 | //toolbar2->setMovable(false);
|
|---|
| 252 | addToolBar(Qt::TopToolBarArea, toolbar2);
|
|---|
| 253 |
|
|---|
| 254 | select_audio = new QPushButton( this );
|
|---|
| 255 | select_audio->setMenu( audiotrack_menu );
|
|---|
| 256 | toolbar2->addWidget(select_audio);
|
|---|
| 257 |
|
|---|
| 258 | select_subtitle = new QPushButton( this );
|
|---|
| 259 | select_subtitle->setMenu( subtitlestrack_menu );
|
|---|
| 260 | toolbar2->addWidget(select_subtitle);
|
|---|
| 261 |
|
|---|
| 262 | /*
|
|---|
| 263 | toolbar1->show();
|
|---|
| 264 | toolbar2->show();
|
|---|
| 265 | */
|
|---|
| 266 |
|
|---|
| 267 | // Modify toolbars' actions
|
|---|
| 268 | QAction *tba;
|
|---|
| 269 | tba = toolbar1->toggleViewAction();
|
|---|
| 270 | tba->setObjectName("show_main_toolbar");
|
|---|
| 271 | tba->setShortcut(Qt::Key_F5);
|
|---|
| 272 |
|
|---|
| 273 | tba = toolbar2->toggleViewAction();
|
|---|
| 274 | tba->setObjectName("show_language_toolbar");
|
|---|
| 275 | tba->setShortcut(Qt::Key_F6);
|
|---|
| 276 | }
|
|---|
| 277 |
|
|---|
| 278 |
|
|---|
| 279 | void DefaultGui::createControlWidgetMini() {
|
|---|
| 280 | qDebug("DefaultGui::createControlWidgetMini");
|
|---|
| 281 |
|
|---|
| 282 | controlwidget_mini = new EditableToolbar( this );
|
|---|
| 283 | controlwidget_mini->setObjectName("controlwidget_mini");
|
|---|
| 284 | controlwidget_mini->setLayoutDirection(Qt::LeftToRight);
|
|---|
| 285 | //controlwidget_mini->setResizeEnabled(false);
|
|---|
| 286 | controlwidget_mini->setMovable(false);
|
|---|
| 287 | //addDockWindow(controlwidget_mini, Qt::DockBottom );
|
|---|
| 288 | addToolBar(Qt::BottomToolBarArea, controlwidget_mini);
|
|---|
| 289 |
|
|---|
| 290 | #if USE_CONFIGURABLE_TOOLBARS
|
|---|
| 291 | QStringList controlwidget_mini_actions;
|
|---|
| 292 | controlwidget_mini_actions << "play_or_pause" << "stop" << "separator" << "rewind1" << "timeslider_action"
|
|---|
| 293 | << "forward1" << "separator" << "mute" << "volumeslider_action";
|
|---|
| 294 | controlwidget_mini->setDefaultActions(controlwidget_mini_actions);
|
|---|
| 295 | #else
|
|---|
| 296 | controlwidget_mini->addAction(playOrPauseAct);
|
|---|
| 297 | controlwidget_mini->addAction(stopAct);
|
|---|
| 298 | controlwidget_mini->addSeparator();
|
|---|
| 299 |
|
|---|
| 300 | controlwidget_mini->addAction(rewind1Act);
|
|---|
| 301 |
|
|---|
| 302 | controlwidget_mini->addAction(timeslider_action);
|
|---|
| 303 |
|
|---|
| 304 | controlwidget_mini->addAction(forward1Act);
|
|---|
| 305 |
|
|---|
| 306 | controlwidget_mini->addSeparator();
|
|---|
| 307 |
|
|---|
| 308 | controlwidget_mini->addAction(muteAct );
|
|---|
| 309 |
|
|---|
| 310 | controlwidget_mini->addAction(volumeslider_action);
|
|---|
| 311 | #endif // USE_CONFIGURABLE_TOOLBARS
|
|---|
| 312 |
|
|---|
| 313 | controlwidget_mini->hide();
|
|---|
| 314 | }
|
|---|
| 315 |
|
|---|
| 316 | void DefaultGui::createControlWidget() {
|
|---|
| 317 | qDebug("DefaultGui::createControlWidget");
|
|---|
| 318 |
|
|---|
| 319 | controlwidget = new EditableToolbar( this );
|
|---|
| 320 | controlwidget->setObjectName("controlwidget");
|
|---|
| 321 | controlwidget->setLayoutDirection(Qt::LeftToRight);
|
|---|
| 322 | //controlwidget->setResizeEnabled(false);
|
|---|
| 323 | controlwidget->setMovable(false);
|
|---|
| 324 | //addDockWindow(controlwidget, Qt::DockBottom );
|
|---|
| 325 | addToolBar(Qt::BottomToolBarArea, controlwidget);
|
|---|
| 326 |
|
|---|
| 327 | #if USE_CONFIGURABLE_TOOLBARS
|
|---|
| 328 | QStringList controlwidget_actions;
|
|---|
| 329 | controlwidget_actions << "play" << "pause_and_frame_step" << "stop" << "separator";
|
|---|
| 330 | #if MINI_ARROW_BUTTONS
|
|---|
| 331 | controlwidget_actions << "rewindbutton_action";
|
|---|
| 332 | #else
|
|---|
| 333 | controlwidget_actions << "rewind3" << "rewind2" << "rewind1";
|
|---|
| 334 | #endif
|
|---|
| 335 | controlwidget_actions << "timeslider_action";
|
|---|
| 336 | #if MINI_ARROW_BUTTONS
|
|---|
| 337 | controlwidget_actions << "forwardbutton_action";
|
|---|
| 338 | #else
|
|---|
| 339 | controlwidget_actions << "forward1" << "forward2" << "forward3";
|
|---|
| 340 | #endif
|
|---|
| 341 | controlwidget_actions << "separator" << "fullscreen" << "mute" << "volumeslider_action";
|
|---|
| 342 | controlwidget->setDefaultActions(controlwidget_actions);
|
|---|
| 343 | #else
|
|---|
| 344 | controlwidget->addAction(playAct);
|
|---|
| 345 | controlwidget->addAction(pauseAndStepAct);
|
|---|
| 346 | controlwidget->addAction(stopAct);
|
|---|
| 347 |
|
|---|
| 348 | controlwidget->addSeparator();
|
|---|
| 349 |
|
|---|
| 350 | #if MINI_ARROW_BUTTONS
|
|---|
| 351 | controlwidget->addAction( rewindbutton_action );
|
|---|
| 352 | #else
|
|---|
| 353 | controlwidget->addAction(rewind3Act);
|
|---|
| 354 | controlwidget->addAction(rewind2Act);
|
|---|
| 355 | controlwidget->addAction(rewind1Act);
|
|---|
| 356 | #endif
|
|---|
| 357 |
|
|---|
| 358 | controlwidget->addAction(timeslider_action);
|
|---|
| 359 |
|
|---|
| 360 | #if MINI_ARROW_BUTTONS
|
|---|
| 361 | controlwidget->addAction( forwardbutton_action );
|
|---|
| 362 | #else
|
|---|
| 363 | controlwidget->addAction(forward1Act);
|
|---|
| 364 | controlwidget->addAction(forward2Act);
|
|---|
| 365 | controlwidget->addAction(forward3Act);
|
|---|
| 366 | #endif
|
|---|
| 367 |
|
|---|
| 368 | controlwidget->addSeparator();
|
|---|
| 369 |
|
|---|
| 370 | controlwidget->addAction(fullscreenAct);
|
|---|
| 371 | controlwidget->addAction(muteAct);
|
|---|
| 372 |
|
|---|
| 373 | controlwidget->addAction(volumeslider_action);
|
|---|
| 374 | #endif // USE_CONFIGURABLE_TOOLBARS
|
|---|
| 375 |
|
|---|
| 376 | /*
|
|---|
| 377 | controlwidget->show();
|
|---|
| 378 | */
|
|---|
| 379 | }
|
|---|
| 380 |
|
|---|
| 381 | void DefaultGui::createFloatingControl() {
|
|---|
| 382 | // Floating control
|
|---|
| 383 | floating_control = new FloatingWidget(this);
|
|---|
| 384 | floating_control->setLayoutDirection(Qt::LeftToRight);
|
|---|
| 385 |
|
|---|
| 386 | #if USE_CONFIGURABLE_TOOLBARS
|
|---|
| 387 | QStringList floatingcontrol_actions;
|
|---|
| 388 | floatingcontrol_actions << "play" << "pause" << "stop" << "separator";
|
|---|
| 389 | #if MINI_ARROW_BUTTONS
|
|---|
| 390 | floatingcontrol_actions << "rewindbutton_action";
|
|---|
| 391 | #else
|
|---|
| 392 | floatingcontrol_actions << "rewind3" << "rewind2" << "rewind1";
|
|---|
| 393 | #endif
|
|---|
| 394 | floatingcontrol_actions << "timeslider_action";
|
|---|
| 395 | #if MINI_ARROW_BUTTONS
|
|---|
| 396 | floatingcontrol_actions << "forwardbutton_action";
|
|---|
| 397 | #else
|
|---|
| 398 | floatingcontrol_actions << "forward1" << "forward2" << "forward3";
|
|---|
| 399 | #endif
|
|---|
| 400 | floatingcontrol_actions << "separator" << "fullscreen" << "mute" << "volumeslider_action" << "separator" << "timelabel_action";
|
|---|
| 401 | floating_control->toolbar()->setDefaultActions(floatingcontrol_actions);
|
|---|
| 402 | #else
|
|---|
| 403 | floating_control->toolbar()->addAction(playAct);
|
|---|
| 404 | floating_control->toolbar()->addAction(pauseAct);
|
|---|
| 405 | floating_control->toolbar()->addAction(stopAct);
|
|---|
| 406 | floating_control->toolbar()->addSeparator();
|
|---|
| 407 |
|
|---|
| 408 | #if MINI_ARROW_BUTTONS
|
|---|
| 409 | floating_control->toolbar()->addAction( rewindbutton_action );
|
|---|
| 410 | #else
|
|---|
| 411 | floating_control->toolbar()->addAction(rewind3Act);
|
|---|
| 412 | floating_control->toolbar()->addAction(rewind2Act);
|
|---|
| 413 | floating_control->toolbar()->addAction(rewind1Act);
|
|---|
| 414 | #endif
|
|---|
| 415 |
|
|---|
| 416 | floating_control->toolbar()->addAction(timeslider_action);
|
|---|
| 417 |
|
|---|
| 418 | #if MINI_ARROW_BUTTONS
|
|---|
| 419 | floating_control->toolbar()->addAction( forwardbutton_action );
|
|---|
| 420 | #else
|
|---|
| 421 | floating_control->toolbar()->addAction(forward1Act);
|
|---|
| 422 | floating_control->toolbar()->addAction(forward2Act);
|
|---|
| 423 | floating_control->toolbar()->addAction(forward3Act);
|
|---|
| 424 | #endif
|
|---|
| 425 |
|
|---|
| 426 | floating_control->toolbar()->addSeparator();
|
|---|
| 427 | floating_control->toolbar()->addAction(fullscreenAct);
|
|---|
| 428 | floating_control->toolbar()->addAction(muteAct);
|
|---|
| 429 | floating_control->toolbar()->addAction(volumeslider_action);
|
|---|
| 430 | floating_control->toolbar()->addSeparator();
|
|---|
| 431 | floating_control->toolbar()->addAction(time_label_action);
|
|---|
| 432 | #endif // USE_CONFIGURABLE_TOOLBARS
|
|---|
| 433 |
|
|---|
| 434 | #if defined(Q_OS_WIN) || defined(Q_OS_OS2)
|
|---|
| 435 | // To make work the ESC key (exit fullscreen) and Ctrl-X (close) in Windows and OS2
|
|---|
| 436 | /*
|
|---|
| 437 | floating_control->addAction(exitFullscreenAct);
|
|---|
| 438 | floating_control->addAction(exitAct);
|
|---|
| 439 | */
|
|---|
| 440 | floating_control->addActions(actions());
|
|---|
| 441 | #endif
|
|---|
| 442 |
|
|---|
| 443 | #if !USE_CONFIGURABLE_TOOLBARS
|
|---|
| 444 | floating_control->adjustSize();
|
|---|
| 445 | #endif
|
|---|
| 446 | }
|
|---|
| 447 |
|
|---|
| 448 | void DefaultGui::createStatusBar() {
|
|---|
| 449 | qDebug("DefaultGui::createStatusBar");
|
|---|
| 450 |
|
|---|
| 451 | time_display = new QLabel( statusBar() );
|
|---|
| 452 | time_display->setObjectName("time_display");
|
|---|
| 453 | time_display->setAlignment(Qt::AlignRight);
|
|---|
| 454 | time_display->setFrameShape(QFrame::NoFrame);
|
|---|
| 455 | time_display->setText(" 88:88:88 / 88:88:88 ");
|
|---|
| 456 | time_display->setMinimumSize(time_display->sizeHint());
|
|---|
| 457 |
|
|---|
| 458 | frame_display = new QLabel( statusBar() );
|
|---|
| 459 | frame_display->setObjectName("frame_display");
|
|---|
| 460 | frame_display->setAlignment(Qt::AlignRight);
|
|---|
| 461 | frame_display->setFrameShape(QFrame::NoFrame);
|
|---|
| 462 | frame_display->setText("88888888");
|
|---|
| 463 | frame_display->setMinimumSize(frame_display->sizeHint());
|
|---|
| 464 |
|
|---|
| 465 | ab_section_display = new QLabel( statusBar() );
|
|---|
| 466 | ab_section_display->setObjectName("ab_section_display");
|
|---|
| 467 | ab_section_display->setAlignment(Qt::AlignRight);
|
|---|
| 468 | ab_section_display->setFrameShape(QFrame::NoFrame);
|
|---|
| 469 | // ab_section_display->setText("A:0:00:00 B:0:00:00");
|
|---|
| 470 | // ab_section_display->setMinimumSize(ab_section_display->sizeHint());
|
|---|
| 471 |
|
|---|
| 472 | video_info_display = new QLabel( statusBar() );
|
|---|
| 473 | video_info_display->setObjectName("video_info_display");
|
|---|
| 474 | video_info_display->setAlignment(Qt::AlignRight);
|
|---|
| 475 | video_info_display->setFrameShape(QFrame::NoFrame);
|
|---|
| 476 |
|
|---|
| 477 | statusBar()->setAutoFillBackground(TRUE);
|
|---|
| 478 |
|
|---|
| 479 | ColorUtils::setBackgroundColor( statusBar(), QColor(0,0,0) );
|
|---|
| 480 | ColorUtils::setForegroundColor( statusBar(), QColor(255,255,255) );
|
|---|
| 481 | ColorUtils::setBackgroundColor( time_display, QColor(0,0,0) );
|
|---|
| 482 | ColorUtils::setForegroundColor( time_display, QColor(255,255,255) );
|
|---|
| 483 | ColorUtils::setBackgroundColor( frame_display, QColor(0,0,0) );
|
|---|
| 484 | ColorUtils::setForegroundColor( frame_display, QColor(255,255,255) );
|
|---|
| 485 | ColorUtils::setBackgroundColor( ab_section_display, QColor(0,0,0) );
|
|---|
| 486 | ColorUtils::setForegroundColor( ab_section_display, QColor(255,255,255) );
|
|---|
| 487 | ColorUtils::setBackgroundColor( video_info_display, QColor(0,0,0) );
|
|---|
| 488 | ColorUtils::setForegroundColor( video_info_display, QColor(255,255,255) );
|
|---|
| 489 | statusBar()->setSizeGripEnabled(FALSE);
|
|---|
| 490 |
|
|---|
| 491 | statusBar()->addPermanentWidget( video_info_display );
|
|---|
| 492 | statusBar()->addPermanentWidget( ab_section_display );
|
|---|
| 493 |
|
|---|
| 494 | statusBar()->showMessage( tr("Welcome to SMPlayer") );
|
|---|
| 495 | statusBar()->addPermanentWidget( frame_display, 0 );
|
|---|
| 496 | frame_display->setText( "0" );
|
|---|
| 497 |
|
|---|
| 498 | statusBar()->addPermanentWidget( time_display, 0 );
|
|---|
| 499 | time_display->setText(" 00:00:00 / 00:00:00 ");
|
|---|
| 500 |
|
|---|
| 501 | time_display->show();
|
|---|
| 502 | frame_display->hide();
|
|---|
| 503 | ab_section_display->show();
|
|---|
| 504 | video_info_display->hide();
|
|---|
| 505 | }
|
|---|
| 506 |
|
|---|
| 507 | void DefaultGui::retranslateStrings() {
|
|---|
| 508 | BaseGuiPlus::retranslateStrings();
|
|---|
| 509 |
|
|---|
| 510 | toolbar_menu->menuAction()->setText( tr("&Toolbars") );
|
|---|
| 511 | toolbar_menu->menuAction()->setIcon( Images::icon("toolbars") );
|
|---|
| 512 |
|
|---|
| 513 | statusbar_menu->menuAction()->setText( tr("Status&bar") );
|
|---|
| 514 | statusbar_menu->menuAction()->setIcon( Images::icon("statusbar") );
|
|---|
| 515 |
|
|---|
| 516 | toolbar1->setWindowTitle( tr("&Main toolbar") );
|
|---|
| 517 | toolbar1->toggleViewAction()->setIcon(Images::icon("main_toolbar"));
|
|---|
| 518 |
|
|---|
| 519 | toolbar2->setWindowTitle( tr("&Language toolbar") );
|
|---|
| 520 | toolbar2->toggleViewAction()->setIcon(Images::icon("lang_toolbar"));
|
|---|
| 521 |
|
|---|
| 522 | select_audio->setText( tr("Audio") );
|
|---|
| 523 | select_subtitle->setText( tr("Subtitle") );
|
|---|
| 524 |
|
|---|
| 525 | viewVideoInfoAct->change(Images::icon("view_video_info"), tr("&Video info") );
|
|---|
| 526 | viewFrameCounterAct->change( Images::icon("frame_counter"), tr("&Frame counter") );
|
|---|
| 527 |
|
|---|
| 528 | #if USE_CONFIGURABLE_TOOLBARS
|
|---|
| 529 | editToolbar1Act->change( tr("Edit main &toolbar") );
|
|---|
| 530 | editControl1Act->change( tr("Edit &control bar") );
|
|---|
| 531 | editControl2Act->change( tr("Edit m&ini control bar") );
|
|---|
| 532 | editFloatingControlAct->change( tr("Edit &floating control") );
|
|---|
| 533 | #endif
|
|---|
| 534 | }
|
|---|
| 535 |
|
|---|
| 536 |
|
|---|
| 537 | void DefaultGui::displayTime(QString text) {
|
|---|
| 538 | time_display->setText( text );
|
|---|
| 539 | time_label_action->setText(text);
|
|---|
| 540 | }
|
|---|
| 541 |
|
|---|
| 542 | void DefaultGui::displayFrame(int frame) {
|
|---|
| 543 | if (frame_display->isVisible()) {
|
|---|
| 544 | frame_display->setNum( frame );
|
|---|
| 545 | }
|
|---|
| 546 | }
|
|---|
| 547 |
|
|---|
| 548 | void DefaultGui::displayABSection(int secs_a, int secs_b) {
|
|---|
| 549 | QString s;
|
|---|
| 550 | if (secs_a > -1) s = tr("A:%1").arg(Helper::formatTime(secs_a));
|
|---|
| 551 |
|
|---|
| 552 | if (secs_b > -1) {
|
|---|
| 553 | if (!s.isEmpty()) s += " ";
|
|---|
| 554 | s += tr("B:%1").arg(Helper::formatTime(secs_b));
|
|---|
| 555 | }
|
|---|
| 556 |
|
|---|
| 557 | ab_section_display->setText( s );
|
|---|
| 558 |
|
|---|
| 559 | ab_section_display->setShown( !s.isEmpty() );
|
|---|
| 560 | }
|
|---|
| 561 |
|
|---|
| 562 | void DefaultGui::displayVideoInfo(int width, int height, double fps) {
|
|---|
| 563 | video_info_display->setText(tr("%1x%2 %3 fps", "width + height + fps").arg(width).arg(height).arg(fps));
|
|---|
| 564 | }
|
|---|
| 565 |
|
|---|
| 566 | void DefaultGui::updateWidgets() {
|
|---|
| 567 | qDebug("DefaultGui::updateWidgets");
|
|---|
| 568 |
|
|---|
| 569 | BaseGuiPlus::updateWidgets();
|
|---|
| 570 |
|
|---|
| 571 | panel->setFocus();
|
|---|
| 572 | }
|
|---|
| 573 |
|
|---|
| 574 | void DefaultGui::aboutToEnterFullscreen() {
|
|---|
| 575 | qDebug("DefaultGui::aboutToEnterFullscreen");
|
|---|
| 576 |
|
|---|
| 577 | BaseGuiPlus::aboutToEnterFullscreen();
|
|---|
| 578 |
|
|---|
| 579 | // Save visibility of toolbars
|
|---|
| 580 | fullscreen_toolbar1_was_visible = toolbar1->isVisible();
|
|---|
| 581 | fullscreen_toolbar2_was_visible = toolbar2->isVisible();
|
|---|
| 582 |
|
|---|
| 583 | if (!pref->compact_mode) {
|
|---|
| 584 | //menuBar()->hide();
|
|---|
| 585 | //statusBar()->hide();
|
|---|
| 586 | controlwidget->hide();
|
|---|
| 587 | controlwidget_mini->hide();
|
|---|
| 588 | toolbar1->hide();
|
|---|
| 589 | toolbar2->hide();
|
|---|
| 590 | }
|
|---|
| 591 | }
|
|---|
| 592 |
|
|---|
| 593 | void DefaultGui::aboutToExitFullscreen() {
|
|---|
| 594 | qDebug("DefaultGui::aboutToExitFullscreen");
|
|---|
| 595 |
|
|---|
| 596 | BaseGuiPlus::aboutToExitFullscreen();
|
|---|
| 597 |
|
|---|
| 598 | floating_control->hide();
|
|---|
| 599 |
|
|---|
| 600 | if (!pref->compact_mode) {
|
|---|
| 601 | //menuBar()->show();
|
|---|
| 602 | //statusBar()->show();
|
|---|
| 603 | controlwidget->show();
|
|---|
| 604 |
|
|---|
| 605 | toolbar1->setVisible( fullscreen_toolbar1_was_visible );
|
|---|
| 606 | toolbar2->setVisible( fullscreen_toolbar2_was_visible );
|
|---|
| 607 | }
|
|---|
| 608 | }
|
|---|
| 609 |
|
|---|
| 610 | void DefaultGui::aboutToEnterCompactMode() {
|
|---|
| 611 |
|
|---|
| 612 | BaseGuiPlus::aboutToEnterCompactMode();
|
|---|
| 613 |
|
|---|
| 614 | // Save visibility of toolbars
|
|---|
| 615 | compact_toolbar1_was_visible = toolbar1->isVisible();
|
|---|
| 616 | compact_toolbar2_was_visible = toolbar2->isVisible();
|
|---|
| 617 |
|
|---|
| 618 | //menuBar()->hide();
|
|---|
| 619 | //statusBar()->hide();
|
|---|
| 620 | controlwidget->hide();
|
|---|
| 621 | controlwidget_mini->hide();
|
|---|
| 622 | toolbar1->hide();
|
|---|
| 623 | toolbar2->hide();
|
|---|
| 624 | }
|
|---|
| 625 |
|
|---|
| 626 | void DefaultGui::aboutToExitCompactMode() {
|
|---|
| 627 | BaseGuiPlus::aboutToExitCompactMode();
|
|---|
| 628 |
|
|---|
| 629 | //menuBar()->show();
|
|---|
| 630 | //statusBar()->show();
|
|---|
| 631 | controlwidget->show();
|
|---|
| 632 |
|
|---|
| 633 | toolbar1->setVisible( compact_toolbar1_was_visible );
|
|---|
| 634 | toolbar2->setVisible( compact_toolbar2_was_visible );
|
|---|
| 635 |
|
|---|
| 636 | // Recheck size of controlwidget
|
|---|
| 637 | resizeEvent( new QResizeEvent( size(), size() ) );
|
|---|
| 638 | }
|
|---|
| 639 |
|
|---|
| 640 | void DefaultGui::showFloatingControl(QPoint /*p*/) {
|
|---|
| 641 | qDebug("DefaultGui::showFloatingControl");
|
|---|
| 642 |
|
|---|
| 643 | #if CONTROLWIDGET_OVER_VIDEO
|
|---|
| 644 | if ((pref->compact_mode) && (!pref->fullscreen)) {
|
|---|
| 645 | floating_control->setAnimated( false );
|
|---|
| 646 | } else {
|
|---|
| 647 | floating_control->setAnimated( pref->floating_control_animated );
|
|---|
| 648 | }
|
|---|
| 649 | floating_control->setMargin(pref->floating_control_margin);
|
|---|
| 650 | #ifndef Q_OS_WIN
|
|---|
| 651 | floating_control->setBypassWindowManager(pref->bypass_window_manager);
|
|---|
| 652 | #endif
|
|---|
| 653 | floating_control->showOver(panel, pref->floating_control_width);
|
|---|
| 654 | #else
|
|---|
| 655 | if (!controlwidget->isVisible()) {
|
|---|
| 656 | controlwidget->show();
|
|---|
| 657 | }
|
|---|
| 658 | #endif
|
|---|
| 659 | }
|
|---|
| 660 |
|
|---|
| 661 | void DefaultGui::showFloatingMenu(QPoint /*p*/) {
|
|---|
| 662 | #if !CONTROLWIDGET_OVER_VIDEO
|
|---|
| 663 | qDebug("DefaultGui::showFloatingMenu");
|
|---|
| 664 |
|
|---|
| 665 | if (!menuBar()->isVisible())
|
|---|
| 666 | menuBar()->show();
|
|---|
| 667 | #endif
|
|---|
| 668 | }
|
|---|
| 669 |
|
|---|
| 670 | void DefaultGui::hideFloatingControls() {
|
|---|
| 671 | qDebug("DefaultGui::hideFloatingControls");
|
|---|
| 672 |
|
|---|
| 673 | #if CONTROLWIDGET_OVER_VIDEO
|
|---|
| 674 | floating_control->hide();
|
|---|
| 675 | #else
|
|---|
| 676 | if (controlwidget->isVisible())
|
|---|
| 677 | controlwidget->hide();
|
|---|
| 678 |
|
|---|
| 679 | if (menuBar()->isVisible())
|
|---|
| 680 | menuBar()->hide();
|
|---|
| 681 | #endif
|
|---|
| 682 | }
|
|---|
| 683 |
|
|---|
| 684 | void DefaultGui::resizeEvent( QResizeEvent * ) {
|
|---|
| 685 | /*
|
|---|
| 686 | qDebug("defaultGui::resizeEvent");
|
|---|
| 687 | qDebug(" controlwidget width: %d", controlwidget->width() );
|
|---|
| 688 | qDebug(" controlwidget_mini width: %d", controlwidget_mini->width() );
|
|---|
| 689 | */
|
|---|
| 690 |
|
|---|
| 691 | #if QT_VERSION < 0x040000
|
|---|
| 692 | #define LIMIT 470
|
|---|
| 693 | #else
|
|---|
| 694 | #define LIMIT 570
|
|---|
| 695 | #endif
|
|---|
| 696 |
|
|---|
| 697 | if ( (controlwidget->isVisible()) && (width() < LIMIT) ) {
|
|---|
| 698 | controlwidget->hide();
|
|---|
| 699 | controlwidget_mini->show();
|
|---|
| 700 | }
|
|---|
| 701 | else
|
|---|
| 702 | if ( (controlwidget_mini->isVisible()) && (width() > LIMIT) ) {
|
|---|
| 703 | controlwidget_mini->hide();
|
|---|
| 704 | controlwidget->show();
|
|---|
| 705 | }
|
|---|
| 706 | }
|
|---|
| 707 |
|
|---|
| 708 | #if USE_MINIMUMSIZE
|
|---|
| 709 | QSize DefaultGui::minimumSizeHint() const {
|
|---|
| 710 | return QSize(controlwidget_mini->sizeHint().width(), 0);
|
|---|
| 711 | }
|
|---|
| 712 | #endif
|
|---|
| 713 |
|
|---|
| 714 |
|
|---|
| 715 | void DefaultGui::saveConfig() {
|
|---|
| 716 | qDebug("DefaultGui::saveConfig");
|
|---|
| 717 |
|
|---|
| 718 | QSettings * set = settings;
|
|---|
| 719 |
|
|---|
| 720 | set->beginGroup( "default_gui");
|
|---|
| 721 |
|
|---|
| 722 | set->setValue("video_info", viewVideoInfoAct->isChecked());
|
|---|
| 723 | set->setValue("frame_counter", viewFrameCounterAct->isChecked());
|
|---|
| 724 |
|
|---|
| 725 | set->setValue("fullscreen_toolbar1_was_visible", fullscreen_toolbar1_was_visible);
|
|---|
| 726 | set->setValue("fullscreen_toolbar2_was_visible", fullscreen_toolbar2_was_visible);
|
|---|
| 727 | set->setValue("compact_toolbar1_was_visible", compact_toolbar1_was_visible);
|
|---|
| 728 | set->setValue("compact_toolbar2_was_visible", compact_toolbar2_was_visible);
|
|---|
| 729 |
|
|---|
| 730 | if (pref->save_window_size_on_exit) {
|
|---|
| 731 | qDebug("DefaultGui::saveConfig: w: %d h: %d", width(), height());
|
|---|
| 732 | set->setValue( "pos", pos() );
|
|---|
| 733 | set->setValue( "size", size() );
|
|---|
| 734 | set->setValue( "state", (int) windowState() );
|
|---|
| 735 | }
|
|---|
| 736 |
|
|---|
| 737 | set->setValue( "toolbars_state", saveState(Helper::qtVersion()) );
|
|---|
| 738 |
|
|---|
| 739 | #if USE_CONFIGURABLE_TOOLBARS
|
|---|
| 740 | set->beginGroup( "actions" );
|
|---|
| 741 | set->setValue("toolbar1", toolbar1->actionsToStringList() );
|
|---|
| 742 | set->setValue("controlwidget", controlwidget->actionsToStringList() );
|
|---|
| 743 | set->setValue("controlwidget_mini", controlwidget_mini->actionsToStringList() );
|
|---|
| 744 | set->setValue("floating_control", floating_control->toolbar()->actionsToStringList() );
|
|---|
| 745 | set->setValue("toolbar1_version", TOOLBAR_VERSION);
|
|---|
| 746 | set->endGroup();
|
|---|
| 747 | #endif
|
|---|
| 748 |
|
|---|
| 749 | set->endGroup();
|
|---|
| 750 | }
|
|---|
| 751 |
|
|---|
| 752 | void DefaultGui::loadConfig() {
|
|---|
| 753 | qDebug("DefaultGui::loadConfig");
|
|---|
| 754 |
|
|---|
| 755 | QSettings * set = settings;
|
|---|
| 756 |
|
|---|
| 757 | set->beginGroup( "default_gui");
|
|---|
| 758 |
|
|---|
| 759 | viewVideoInfoAct->setChecked(set->value("video_info", false).toBool());
|
|---|
| 760 | viewFrameCounterAct->setChecked(set->value("frame_counter", false).toBool());
|
|---|
| 761 |
|
|---|
| 762 | fullscreen_toolbar1_was_visible = set->value("fullscreen_toolbar1_was_visible", fullscreen_toolbar1_was_visible).toBool();
|
|---|
| 763 | fullscreen_toolbar2_was_visible = set->value("fullscreen_toolbar2_was_visible", fullscreen_toolbar2_was_visible).toBool();
|
|---|
| 764 | compact_toolbar1_was_visible = set->value("compact_toolbar1_was_visible", compact_toolbar1_was_visible).toBool();
|
|---|
| 765 | compact_toolbar2_was_visible = set->value("compact_toolbar2_was_visible", compact_toolbar2_was_visible).toBool();
|
|---|
| 766 |
|
|---|
| 767 | if (pref->save_window_size_on_exit) {
|
|---|
| 768 | QPoint p = set->value("pos", pos()).toPoint();
|
|---|
| 769 | QSize s = set->value("size", size()).toSize();
|
|---|
| 770 |
|
|---|
| 771 | if ( (s.height() < 200) && (!pref->use_mplayer_window) ) {
|
|---|
| 772 | s = pref->default_size;
|
|---|
| 773 | }
|
|---|
| 774 |
|
|---|
| 775 | move(p);
|
|---|
| 776 | resize(s);
|
|---|
| 777 |
|
|---|
| 778 | setWindowState( (Qt::WindowStates) set->value("state", 0).toInt() );
|
|---|
| 779 |
|
|---|
| 780 | if (!DesktopInfo::isInsideScreen(this)) {
|
|---|
| 781 | move(0,0);
|
|---|
| 782 | qWarning("DefaultGui::loadConfig: window is outside of the screen, moved to 0x0");
|
|---|
| 783 | }
|
|---|
| 784 | }
|
|---|
| 785 |
|
|---|
| 786 | #if USE_CONFIGURABLE_TOOLBARS
|
|---|
| 787 | set->beginGroup( "actions" );
|
|---|
| 788 | int toolbar_version = set->value("toolbar1_version", 0).toInt();
|
|---|
| 789 | if (toolbar_version >= TOOLBAR_VERSION) {
|
|---|
| 790 | toolbar1->setActionsFromStringList( set->value("toolbar1", toolbar1->defaultActions()).toStringList() );
|
|---|
| 791 | } else {
|
|---|
| 792 | qDebug("DefaultGui::loadConfig: toolbar too old, loading default one");
|
|---|
| 793 | toolbar1->setActionsFromStringList( toolbar1->defaultActions() );
|
|---|
| 794 | }
|
|---|
| 795 | controlwidget->setActionsFromStringList( set->value("controlwidget", controlwidget->defaultActions()).toStringList() );
|
|---|
| 796 | controlwidget_mini->setActionsFromStringList( set->value("controlwidget_mini", controlwidget_mini->defaultActions()).toStringList() );
|
|---|
| 797 | floating_control->toolbar()->setActionsFromStringList( set->value("floating_control", floating_control->toolbar()->defaultActions()).toStringList() );
|
|---|
| 798 | floating_control->adjustSize();
|
|---|
| 799 | set->endGroup();
|
|---|
| 800 | #endif
|
|---|
| 801 |
|
|---|
| 802 | restoreState( set->value( "toolbars_state" ).toByteArray(), Helper::qtVersion() );
|
|---|
| 803 |
|
|---|
| 804 | #if DOCK_PLAYLIST
|
|---|
| 805 | qDebug("DefaultGui::loadConfig: playlist visible: %d", playlistdock->isVisible());
|
|---|
| 806 | qDebug("DefaultGui::loadConfig: playlist position: %d, %d", playlistdock->pos().x(), playlistdock->pos().y());
|
|---|
| 807 | qDebug("DefaultGui::loadConfig: playlist size: %d x %d", playlistdock->size().width(), playlistdock->size().height());
|
|---|
| 808 | #endif
|
|---|
| 809 |
|
|---|
| 810 | set->endGroup();
|
|---|
| 811 |
|
|---|
| 812 | updateWidgets();
|
|---|
| 813 | }
|
|---|
| 814 |
|
|---|
| 815 | #include "moc_defaultgui.cpp"
|
|---|