📄 filebrowser.h
字号:
/*************************************************************************** filebrowser.h - description ------------------- begin : Sun Feb 11 2001 copyright : (C) 2001 by Matthias Welwarsky email : matze@stud.fbi.fh-darmstadt.de ***************************************************************************//*************************************************************************** * * * 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 FILEBROWSER_H#define FILEBROWSER_H#include <qwidget.h>#include <qdir.h>/** implements a simple file browser widget. it can be used to navigate through a directory tree. * signals are emitted when a file is clicked (or double clicked, depending on the global desktop * settings. * @author Matthias Welwarsky */class QListViewItem;class KFileReader;class KFileDetailView;class KHistoryCombo;class FileBrowser : public QWidget { Q_OBJECTpublic: FileBrowser(QWidget *parent=0, const char *name=0); ~FileBrowser(); /** set the directory where the browsing starts */ virtual void setDirectory(const QDir&); /** No descriptions */ virtual void setDirectory(const QString&);private: // Private attributes enum { UpButton=1, BackButton, ForwardButton, HistoryCombo }; /** the directory that is currently displayed */ QDir currentDir; /** the list view that displays the browser */ KFileDetailView* fileView; /** the directory lister, a kio job to list the directory to be browsed. */ KFileReader* dirLister; /** */ KHistoryCombo* historyCombo;private: // Private methods /** initialise internals */ void init();protected slots: // Protected slots /** called by the file view if a file or directory is chosen */ void executed(QListViewItem*); /** updates the view, called on directory change. */ void updateView(); /** No descriptions */ void toolBarButtonClicked(int);signals: // Signals /** emitted when the user selects a file via the file view */ void selected(const QString&);};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -