Changeset View
Changeset View
Standalone View
Standalone View
krusader/GUI/kcmdmodebutton.cpp
Show All 15 Lines | |||||
16 | * * | 16 | * * | ||
17 | * You should have received a copy of the GNU General Public License * | 17 | * You should have received a copy of the GNU General Public License * | ||
18 | * along with Krusader. If not, see [http://www.gnu.org/licenses/]. * | 18 | * along with Krusader. If not, see [http://www.gnu.org/licenses/]. * | ||
19 | *****************************************************************************/ | 19 | *****************************************************************************/ | ||
20 | 20 | | |||
21 | #include "kcmdmodebutton.h" | 21 | #include "kcmdmodebutton.h" | ||
22 | 22 | | |||
23 | #include "../kractions.h" | 23 | #include "../kractions.h" | ||
24 | #include "../icon.h" | ||||
24 | 25 | | |||
25 | // QtWidgets | 26 | // QtWidgets | ||
26 | #include <QMenu> | 27 | #include <QMenu> | ||
27 | 28 | | |||
28 | #include <KI18n/KLocalizedString> | 29 | #include <KI18n/KLocalizedString> | ||
29 | #include <KIconThemes/KIconLoader> | | |||
30 | #include <KWidgetsAddons/KActionMenu> | 30 | #include <KWidgetsAddons/KActionMenu> | ||
31 | 31 | | |||
32 | /** | 32 | /** | ||
33 | * KCMDModeButton class, which represents a button with popup menu to switch | 33 | * KCMDModeButton class, which represents a button with popup menu to switch | ||
34 | * the mode of the krusader built-in command-line | 34 | * the mode of the krusader built-in command-line | ||
35 | */ | 35 | */ | ||
36 | KCMDModeButton::KCMDModeButton(QWidget *parent) : QToolButton(parent) | 36 | KCMDModeButton::KCMDModeButton(QWidget *parent) : QToolButton(parent) | ||
37 | { | 37 | { | ||
38 | /* // from the old terminal-button: | 38 | /* // from the old terminal-button: | ||
39 | setText( i18n( "If pressed, Krusader executes command line in a terminal." ) ); | 39 | setText( i18n( "If pressed, Krusader executes command line in a terminal." ) ); | ||
40 | setToolTip( i18n( "If pressed, Krusader executes command line in a terminal." ) ); | 40 | setToolTip( i18n( "If pressed, Krusader executes command line in a terminal." ) ); | ||
41 | QWhatsThis::add( terminal, i18n( | 41 | QWhatsThis::add( terminal, i18n( | ||
42 | "The 'run in terminal' button allows Krusader " | 42 | "The 'run in terminal' button allows Krusader " | ||
43 | "to run console (or otherwise non-graphical) " | 43 | "to run console (or otherwise non-graphical) " | ||
44 | "programs in a terminal of your choice. If it's " | 44 | "programs in a terminal of your choice. If it's " | ||
45 | "pressed, terminal mode is active." ) ); | 45 | "pressed, terminal mode is active." ) ); | ||
46 | */ | 46 | */ | ||
47 | setIcon(SmallIcon("utilities-terminal")); | 47 | setIcon(Icon("utilities-terminal")); | ||
48 | adjustSize(); | 48 | adjustSize(); | ||
49 | action = new KActionMenu(i18n("Execution mode"), this); | 49 | action = new KActionMenu(i18n("Execution mode"), this); | ||
50 | Q_CHECK_PTR(action); | 50 | Q_CHECK_PTR(action); | ||
51 | for (int i = 0; KrActions::execTypeArray[i] != 0; i++) { | 51 | for (int i = 0; KrActions::execTypeArray[i] != 0; i++) { | ||
52 | action->addAction(*KrActions::execTypeArray[i]); | 52 | action->addAction(*KrActions::execTypeArray[i]); | ||
53 | } | 53 | } | ||
54 | QMenu *pP = action->menu(); | 54 | QMenu *pP = action->menu(); | ||
55 | Q_CHECK_PTR(pP); | 55 | Q_CHECK_PTR(pP); | ||
Show All 19 Lines |