/usr/include/libfm-qt/sidepane.h is in libfm-qt-dev 0.11.2-1.
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 130 131 132 133 134 | /*
* 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>
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() {
return iconSize_;
}
void setIconSize(QSize size);
FmPath* currentPath() {
return currentPath_;
}
void setCurrentPath(FmPath* path);
void setMode(Mode mode);
Mode mode() {
return mode_;
}
QWidget* view() {
return view_;
}
const char *modeName(Mode mode);
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() {
return showHidden_;
}
bool setHomeDir(const char *home_dir);
// libfm-gtk compatible alias
FmPath* getCwd() {
return currentPath();
}
void chdir(FmPath* path) {
setCurrentPath(path);
}
Q_SIGNALS:
void chdirRequested(int type, FmPath* path);
void openFolderInNewWindowRequested(FmPath* path);
void openFolderInNewTabRequested(FmPath* path);
void openFolderInTerminalRequested(FmPath* path);
void createNewFolderRequested(FmPath* path);
void modeChanged(Fm::SidePane::Mode mode);
void prepareFileMenu(Fm::FileMenu* menu); // emit before showing a Fm::FileMenu
protected Q_SLOTS:
void onPlacesViewChdirRequested(int type, FmPath* path);
void onDirTreeViewChdirRequested(int type, FmPath* path);
void onComboCurrentIndexChanged(int current);
private:
void initDirTree();
private:
FmPath* currentPath_;
QWidget* view_;
QComboBox* combo_;
QVBoxLayout* verticalLayout;
QSize iconSize_;
Mode mode_;
bool showHidden_;
};
}
#endif // FM_SIDEPANE_H
|