filebrowser.h

来自「KDE下的西门子手机管理程序」· C头文件 代码 · 共 77 行

H
77
字号
/***************************************************************************                          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 + =
减小字号Ctrl + -
显示快捷键?