~ubuntu-branches/ubuntu/saucy/kgrubeditor/saucy

« back to all changes in this revision

Viewing changes to src/view.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve Stalcup
  • Date: 2008-08-02 08:47:56 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080802084756-4doy9cyfc63kzaic
Tags: 0.7-0ubuntu1
* New upstream release
* bumped standards version to 3.8.0 (no change)
* Updated debian/cdbs for intrepid paths

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 *
36
36
 * Shows the contents of the 2 files that KGRUBEditor edits.
37
37
 * These are /boot/grub/menu.lst and /boot/grub/device.map.
 
38
 * Moreover, it allows the editing of the files with an
 
39
 * external editor.
38
40
 */
39
41
class View : public KDialog, private Ui::View
40
42
{
41
43
Q_OBJECT
42
44
public:
43
45
        /**
44
 
        * Default constructor. Sets the tabs' text to the filenames
45
 
        * and shows their contents in the KTextEdit widgets.
 
46
        *  Sets up the GUI, changes the title
 
47
        *  of the tabs and shows the contents of the files.
46
48
        *
 
49
        * @param menulst The menulst file to show. Usually this is /boot/grub/menu.lst.
 
50
        * @param devicemap The devicemap file to show. Usually this is /boot/grub/device.map.
47
51
        * @param parent QWidget parent. Self explanatory.
48
52
        */
49
 
        View( QWidget *parent = 0 );
 
53
        View( const KUrl menulst, const KUrl devicemap, QWidget *parent = 0 );
 
54
        /**
 
55
        * Desctructor.
 
56
        */
 
57
        ~View();
 
58
private:
 
59
        /**
 
60
        * Creates and configures the 'Refresh' and 'Open With'
 
61
        * customised dialog buttons.
 
62
        */
 
63
        void setupDialogButtons();
 
64
        /**
 
65
        * Connects all signals to their slots.
 
66
        */
 
67
        void setupConnections();
 
68
private slots:
 
69
        /**
 
70
        * Refreshes the contents of the 2 files that this dialog handles.
 
71
        */
 
72
        void refresh();
 
73
 
 
74
        /**
 
75
        * Shows all application which are set to handle plain text files
 
76
        * in the 'Open With' popup menu.
 
77
        */
 
78
        void populateOpenMenu();
 
79
        /**
 
80
        * According to which file is currently viewed (either menulst or
 
81
        * devicemap), opens the file in an external editor in order to
 
82
        * manually edit it.
 
83
        */
 
84
        void open( QAction *action );
 
85
private:
 
86
        QMenu *openMenu;
 
87
        KUrl *m_menulst;
 
88
        KUrl *m_devicemap;
50
89
};
51
90
 
52
91
#endif