summaryrefslogtreecommitdiffstats
path: root/krusader/GUI/kcmdmodebutton.h
blob: 9c30c2e447cd38ef550913ea024265140dccd211 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/***************************************************************************
                          kcmmodebutton.h  -  description
                             -------------------

    this file contains a class KCMDModeButton, which represents a button with
    popup menu to switch the mode of the krusader built-in command-line

    begin                : Oct 2006
    inspired by          : other Krusader source files
    author of this file  : Vaclav Juza
    email                : vaclavjuza at gmail dot com
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef KCMDMODEBUTTON_H
#define KCMDMODEBUTTON_H

#include <tqtoolbutton.h>

class KActionMenu;

/**
  * @author Vaclav Juza
  *
  * represents a button for switching the command-line execution mode
  * It extends TQToolButton, set the icon etc., and creates a popup menu
  * containing the actions to actually switch the mode.
  */
class KCMDModeButton : public TQToolButton  {
  Q_OBJECT
  TQ_OBJECT
public: 
  /** Constructor. Sets up the menu, and the icon */
  KCMDModeButton(TQWidget *tqparent=0, const char *name=0);
  ~KCMDModeButton();

  /** Shows the popup menu. Called when clicked to the button */
  void openPopup();

private:
  /** The menu containing the actions for switching the mode */
  KActionMenu *action;
};

#endif