]>
cloud.milkyroute.net Git - dolphin.git/blob - src/bookmarkssettingspage.h
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 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
21 #ifndef BOOKMARKSSETTINGSPAGE_H
22 #define BOOKMARKSSETTINGSPAGE_H
24 #include <settingspagebase.h>
25 #include <q3valuelist.h>
32 * @brief Represents the page from the Dolphin Settings which allows
33 * to modify the bookmarks.
35 class BookmarksSettingsPage
: public SettingsPageBase
40 BookmarksSettingsPage(QWidget
* parent
);
42 virtual ~BookmarksSettingsPage();
44 /** @see SettingsPageBase::applySettings */
45 virtual void applySettings();
49 void slotBookmarkDoubleClicked(Q3ListViewItem
*, const QPoint
&, int);
50 void slotAddButtonClicked();
51 void slotEditButtonClicked();
52 void slotRemoveButtonClicked();
53 void slotMoveUpButtonClicked();
54 void slotMoveDownButtonClicked();
57 * Is connected with the signal QListView::pressed(QListViewItem* item)
58 * and assures that always one bookmarks stays selected although a
59 * click has been done on the viewport area.
60 * TODO: this is a workaround, possibly there is a more easy approach
63 void slotBookmarkPressed(Q3ListViewItem
* item
);
73 KListView
* m_listView
;
74 KPushButton
* m_addButton
;
75 KPushButton
* m_editButton
;
76 KPushButton
* m_removeButton
;
77 KPushButton
* m_moveUpButton
;
78 KPushButton
* m_moveDownButton
;
81 * Returns the index of the selected bookmark
82 * inside the bookmarks listview.
84 int selectedBookmarkIndex() const;
87 * Moves the currently selected bookmark up, if 'direction'
88 * is < 0, otherwise the bookmark is moved down.
90 void moveBookmark(int direction
);