/usr/include/libfm-qt/sidepane.h is in libfm-qt-dev 0.12.0-14build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | /*
* Copyright (C) 2013 - 2015 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef FM_SIDEPANE_H
#define FM_SIDEPANE_H
#include "libfmqtglobals.h"
#include <libfm/fm.h>
#include <QWidget>
#include "core/filepath.h"
class QComboBox;
class QVBoxLayout;
class QWidget;
namespace Fm {
class FileMenu;
class LIBFM_QT_API SidePane : public QWidget {
Q_OBJECT
public:
enum Mode {
ModeNone = -1,
ModePlaces = 0,
ModeDirTree,
NumModes
};
public:
explicit SidePane(QWidget* parent = 0);
virtual ~SidePane();
QSize iconSize() const {
return iconSize_;
}
void setIconSize(QSize size);
const Fm::FilePath& currentPath() const {
return currentPath_;
}
void setCurrentPath(Fm::FilePath path);
void setMode(Mode mode);
Mode mode() const {
return mode_;
}
QWidget* view() const {
return view_;
}
static const char* modeName(Mode mode);
static Mode modeByName(const char* str);
#if 0 // FIXME: are these APIs from libfm-qt needed?
int modeCount(void) {
return NumModes;
}
QString modeLabel(Mode mode);
QString modeTooltip(Mode mode);
#endif
void setShowHidden(bool show_hidden);
bool showHidden() const {
return showHidden_;
}
bool setHomeDir(const char* home_dir);
void chdir(Fm::FilePath path) {
setCurrentPath(std::move(path));
}
Q_SIGNALS:
void chdirRequested(int type, const Fm::FilePath& path);
void openFolderInNewWindowRequested(const Fm::FilePath& path);
void openFolderInNewTabRequested(const Fm::FilePath& path);
void openFolderInTerminalRequested(const Fm::FilePath& path);
void createNewFolderRequested(const Fm::FilePath& path);
void modeChanged(Fm::SidePane::Mode mode);
void prepareFileMenu(Fm::FileMenu* menu); // emit before showing a Fm::FileMenu
protected Q_SLOTS:
void onComboCurrentIndexChanged(int current);
private:
void initDirTree();
private:
Fm::FilePath currentPath_;
QWidget* view_;
QComboBox* combo_;
QVBoxLayout* verticalLayout;
QSize iconSize_;
Mode mode_;
bool showHidden_;
};
}
#endif // FM_SIDEPANE_H
|