]>
cloud.milkyroute.net Git - dolphin.git/blob - src/bookmarkssettingspage.h
becf67654e426525d74ca5d48aa9996c3770d0c9
1 /***************************************************************************
2 * Copyright (C) 2006 by Peter Penz *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
19 ***************************************************************************/
21 #ifndef BOOKMARKSSETTINGSPAGE_H
22 #define BOOKMARKSSETTINGSPAGE_H
24 #include <settingspagebase.h>
25 #include <q3valuelist.h>
27 class DolphinMainWindow
;
33 * @brief Represents the page from the Dolphin Settings which allows
34 * to modify the bookmarks.
36 class BookmarksSettingsPage
: public SettingsPageBase
41 explicit BookmarksSettingsPage(DolphinMainWindow
* mainWindow
, QWidget
* parent
);
43 virtual ~BookmarksSettingsPage();
45 /** @see SettingsPageBase::applySettings */
46 virtual void applySettings();
50 void slotBookmarkDoubleClicked(Q3ListViewItem
*, const QPoint
&, int);
51 void slotAddButtonClicked();
52 void slotEditButtonClicked();
53 void slotRemoveButtonClicked();
54 void slotMoveUpButtonClicked();
55 void slotMoveDownButtonClicked();
58 * Is connected with the signal QListView::pressed(QListViewItem* item)
59 * and assures that always one bookmarks stays selected although a
60 * click has been done on the viewport area.
61 * TODO: this is a workaround, possibly there is a more easy approach
64 void slotBookmarkPressed(Q3ListViewItem
* item
);
74 DolphinMainWindow
* m_mainWindow
;
75 K3ListView
* m_listView
;
76 KPushButton
* m_addButton
;
77 KPushButton
* m_editButton
;
78 KPushButton
* m_removeButton
;
79 KPushButton
* m_moveUpButton
;
80 KPushButton
* m_moveDownButton
;
83 * Returns the index of the selected bookmark
84 * inside the bookmarks listview.
86 int selectedBookmarkIndex() const;
89 * Moves the currently selected bookmark up, if 'direction'
90 * is < 0, otherwise the bookmark is moved down.
92 void moveBookmark(int direction
);