Changeset View
Changeset View
Standalone View
Standalone View
krusader/krusaderview.cpp
Show All 33 Lines | |||||
34 | #include <QMenuBar> | 34 | #include <QMenuBar> | ||
35 | #include <QStatusBar> | 35 | #include <QStatusBar> | ||
36 | 36 | | |||
37 | #include <KI18n/KLocalizedString> | 37 | #include <KI18n/KLocalizedString> | ||
38 | #include <KXmlGui/KToolBar> | 38 | #include <KXmlGui/KToolBar> | ||
39 | #include <KWidgetsAddons/KToggleAction> | 39 | #include <KWidgetsAddons/KToggleAction> | ||
40 | 40 | | |||
41 | #include "krusader.h" | 41 | #include "krusader.h" | ||
42 | #include "icon.h" | ||||
42 | #include "kractions.h" | 43 | #include "kractions.h" | ||
43 | #include "krslots.h" | 44 | #include "krslots.h" | ||
44 | #include "defaults.h" | 45 | #include "defaults.h" | ||
45 | #include "Panel/listpanel.h" | 46 | #include "Panel/listpanel.h" | ||
46 | #include "Panel/panelfunc.h" | 47 | #include "Panel/panelfunc.h" | ||
47 | #include "GUI/kcmdline.h" | 48 | #include "GUI/kcmdline.h" | ||
48 | #include "GUI/kfnkeys.h" | 49 | #include "GUI/kfnkeys.h" | ||
49 | #include "GUI/terminaldock.h" | 50 | #include "GUI/terminaldock.h" | ||
▲ Show 20 Lines • Show All 402 Lines • ▼ Show 20 Line(s) | 447 | { | |||
452 | rightMng->saveSettings(KConfigGroup(&svr, "Right Tabs"), false); | 453 | rightMng->saveSettings(KConfigGroup(&svr, "Right Tabs"), false); | ||
453 | } | 454 | } | ||
454 | 455 | | |||
455 | void KrusaderView::toggleVerticalMode() | 456 | void KrusaderView::toggleVerticalMode() | ||
456 | { | 457 | { | ||
457 | if (horiz_splitter->orientation() == Qt::Vertical) { | 458 | if (horiz_splitter->orientation() == Qt::Vertical) { | ||
458 | horiz_splitter->setOrientation(Qt::Horizontal); | 459 | horiz_splitter->setOrientation(Qt::Horizontal); | ||
459 | KrActions::actVerticalMode->setText(i18n("Vertical Mode")); | 460 | KrActions::actVerticalMode->setText(i18n("Vertical Mode")); | ||
460 | KrActions::actVerticalMode->setIcon(QIcon::fromTheme("view-split-top-bottom")); | 461 | KrActions::actVerticalMode->setIcon(Icon("view-split-top-bottom")); | ||
461 | } else { | 462 | } else { | ||
462 | horiz_splitter->setOrientation(Qt::Vertical); | 463 | horiz_splitter->setOrientation(Qt::Vertical); | ||
463 | KrActions::actVerticalMode->setText(i18n("Horizontal Mode")); | 464 | KrActions::actVerticalMode->setText(i18n("Horizontal Mode")); | ||
464 | KrActions::actVerticalMode->setIcon(QIcon::fromTheme("view-split-left-right")); | 465 | KrActions::actVerticalMode->setIcon(Icon("view-split-left-right")); | ||
465 | } | 466 | } | ||
466 | } | 467 | } | ||
467 | 468 | | |||
468 | void KrusaderView::saveSettings(KConfigGroup &cfg) | 469 | void KrusaderView::saveSettings(KConfigGroup &cfg) | ||
469 | { | 470 | { | ||
470 | QList<int> lst = horiz_splitter->sizes(); | 471 | QList<int> lst = horiz_splitter->sizes(); | ||
471 | cfg.writeEntry("Splitter Sizes", lst); | 472 | cfg.writeEntry("Splitter Sizes", lst); | ||
472 | QList<int> vertSplitterSizes = _terminalDock->isVisible() && !isTerminalEmulatorFullscreen() | 473 | QList<int> vertSplitterSizes = _terminalDock->isVisible() && !isTerminalEmulatorFullscreen() | ||
Show All 32 Lines | |||||
505 | void KrusaderView::draggingTab(PanelManager *from, QMouseEvent *e) | 506 | void KrusaderView::draggingTab(PanelManager *from, QMouseEvent *e) | ||
506 | { | 507 | { | ||
507 | QString icon; | 508 | QString icon; | ||
508 | if (horiz_splitter->orientation() == Qt::Horizontal) | 509 | if (horiz_splitter->orientation() == Qt::Horizontal) | ||
509 | icon = (from == leftMng) ? "arrow-right" : "arrow-left"; | 510 | icon = (from == leftMng) ? "arrow-right" : "arrow-left"; | ||
510 | else | 511 | else | ||
511 | icon = (from == leftMng) ? "arrow-down" : "arrow-up"; | 512 | icon = (from == leftMng) ? "arrow-down" : "arrow-up"; | ||
512 | 513 | | |||
513 | QCursor cursor(QIcon::fromTheme(icon).pixmap(22)); | 514 | QCursor cursor(Icon(icon).pixmap(22)); | ||
514 | 515 | | |||
515 | if (cursorIsOnOtherSide(from, e->globalPos())) { | 516 | if (cursorIsOnOtherSide(from, e->globalPos())) { | ||
516 | if(!qApp->overrideCursor()) | 517 | if(!qApp->overrideCursor()) | ||
517 | qApp->setOverrideCursor(cursor); | 518 | qApp->setOverrideCursor(cursor); | ||
518 | } else | 519 | } else | ||
519 | qApp->restoreOverrideCursor(); | 520 | qApp->restoreOverrideCursor(); | ||
520 | } | 521 | } | ||
521 | 522 | | |||
522 | void KrusaderView::draggingTabFinished(PanelManager *from, QMouseEvent *e) | 523 | void KrusaderView::draggingTabFinished(PanelManager *from, QMouseEvent *e) | ||
523 | { | 524 | { | ||
524 | qApp->restoreOverrideCursor(); | 525 | qApp->restoreOverrideCursor(); | ||
525 | 526 | | |||
526 | if (cursorIsOnOtherSide(from, e->globalPos())) | 527 | if (cursorIsOnOtherSide(from, e->globalPos())) | ||
527 | from->moveTabToOtherSide(); | 528 | from->moveTabToOtherSide(); | ||
528 | } | 529 | } | ||
529 | 530 | |