~ubuntu-branches/ubuntu/trusty/krusader/trusty

« back to all changes in this revision

Viewing changes to krusader/Panel/listpanel.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-08-08 13:47:36 UTC
  • mfrom: (1.2.19 upstream)
  • Revision ID: james.westby@ubuntu.com-20110808134736-8e630ivgd2c3sgg5
Tags: 1:2.4.0~beta1-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
 
62
62
#define PROP_SYNC_BUTTON_ON               1
63
63
#define PROP_LOCKED                       2
64
 
#define PROP_PREVIEWS                     4
65
64
 
66
65
class vfs;
67
 
class vfile;
68
66
class KrView;
69
67
class UrlRequester;
70
68
class KrQuickSearch;
74
72
class PanelPopup;
75
73
class SyncBrowseButton;
76
74
class KrBookmarkButton;
77
 
class KPushButton;
78
75
class ListPanelFunc;
79
76
class QSplitter;
80
77
class KDiskFreeSpace;
89
86
#define ITEM2VFILE(PANEL_PTR, KRVIEWITEM)  PANEL_PTR->func->files()->vfs_search(KRVIEWITEM->name())
90
87
#define NAME2VFILE(PANEL_PTR, STRING_NAME) PANEL_PTR->func->files()->vfs_search(STRING_NAME)
91
88
    // constructor create the panel, but DOESN'T fill it with data, use start()
92
 
    ListPanel(int panelType, QWidget *parent, bool &left, AbstractPanelManager *manager);
 
89
    ListPanel(QWidget *parent, AbstractPanelManager *manager, KConfigGroup cfg = KConfigGroup());
93
90
    ~ListPanel();
 
91
 
 
92
    virtual void otherPanelChanged();
 
93
 
94
94
    void start(KUrl url = KUrl(), bool immediate = false);
95
95
 
 
96
    void reparent(QWidget *parent, AbstractPanelManager *manager);
 
97
 
96
98
    int getType() {
97
99
        return panelType;
98
100
    }
113
115
        view->getSelectedItems(fileNames);
114
116
    }
115
117
    void setButtons();
116
 
    bool isLeft() {
117
 
        return _left;
118
 
    }
119
118
    void setJumpBack(KUrl url);
120
119
 
121
120
    int  getProperties();
123
122
 
124
123
    void getFocusCandidates(QVector<QWidget*> &widgets);
125
124
 
126
 
    void otherPanelChanged();
127
 
 
128
 
    void saveSettings(KConfigGroup &cfg);
 
125
    void saveSettings(KConfigGroup cfg, bool localOnly, bool saveHistory = false);
 
126
    void restoreSettings(KConfigGroup cfg);
129
127
 
130
128
public slots:
131
129
    void gotStats(const QString &mountPoint, quint64 kBSize, quint64 kBUsed, quint64 kBAvail);  // displays filesystem status
132
130
    void popRightClickMenu(const QPoint&);
133
131
    void popEmptyRightClickMenu(const QPoint &);
134
132
    void compareDirs(bool otherPanelToo = true);
135
 
    void slotFocusOnMe(); // give this VFS the focus (the path bar)
 
133
    void slotFocusOnMe(bool focus = true);
136
134
    void slotUpdateTotals();
137
135
    void slotStartUpdate();                   // internal
138
136
    void slotGetStats(const KUrl& url);            // get the disk-free stats
171
169
    void createView();
172
170
    void updateButtons();
173
171
 
 
172
    static int defaultPanelType();
 
173
 
174
174
protected slots:
175
175
    void updatePopupPanel(KrViewItem *item);
176
176
    void handleDropOnView(QDropEvent *, QWidget *destWidget = 0); // handles drops on the view only
184
184
    void inlineRefreshListResult(KJob* job);
185
185
    void inlineRefreshPercent(KJob*, unsigned long);
186
186
    void slotVfsError(QString msg);
 
187
    void newTab(KrViewItem *item);
 
188
    void newTab(const KUrl &url, bool nextToThis = false) {
 
189
        _manager->newTab(url, nextToThis ? this : 0);
 
190
    }
187
191
 
188
192
signals:
189
193
    void signalStatus(QString msg);         // emmited when we need to update the status bar
190
194
    void pathChanged(ListPanel *panel);
191
 
    void activePanelChanged(ListPanel *p);   // emitted when the user changes panels
 
195
    void activate();   // emitted when the user changes panels
192
196
    void finishedDragging();              // currently
193
197
    void refreshColors(bool active);
194
198