Now you don't need to click in a BufferView twice anymore to gain keyboard focus,
for example for hiding a buffer per pressing backspace.
Side-effect is that the input line loses focus now when clicking in the view (obviously),
but the next commmit focuses it automatically on key press, so it should be smooth that way.
BufferView *allBuffersView() const;
inline QSystemTrayIcon *systemTrayIcon() const;
BufferView *allBuffersView() const;
inline QSystemTrayIcon *systemTrayIcon() const;
+ inline BufferWidget *bufferWidget() const;
virtual bool event(QEvent *event);
virtual bool event(QEvent *event);
+BufferWidget *MainWin::bufferWidget() const {
+ return _bufferWidget;
+}
+
{
connect(this, SIGNAL(collapsed(const QModelIndex &)), SLOT(on_collapse(const QModelIndex &)));
connect(this, SIGNAL(expanded(const QModelIndex &)), SLOT(on_expand(const QModelIndex &)));
{
connect(this, SIGNAL(collapsed(const QModelIndex &)), SLOT(on_collapse(const QModelIndex &)));
connect(this, SIGNAL(expanded(const QModelIndex &)), SLOT(on_expand(const QModelIndex &)));
+ connect(this, SIGNAL(clicked(const QModelIndex &)), SLOT(on_clicked(const QModelIndex &)));
setSelectionMode(QAbstractItemView::ExtendedSelection);
setSelectionMode(QAbstractItemView::ExtendedSelection);
+void BufferView::on_clicked(const QModelIndex &index) {
+ Q_UNUSED(index);
+ setFocus(Qt::MouseFocusReason);
+}
+
void BufferView::on_collapse(const QModelIndex &index) {
storeExpandedState(index.data(NetworkModel::NetworkIdRole).value<NetworkId>(), false);
}
void BufferView::on_collapse(const QModelIndex &index) {
storeExpandedState(index.data(NetworkModel::NetworkIdRole).value<NetworkId>(), false);
}
void on_collapse(const QModelIndex &index);
void on_expand(const QModelIndex &index);
void on_collapse(const QModelIndex &index);
void on_expand(const QModelIndex &index);
+ void on_clicked(const QModelIndex &index);
void on_configChanged();
private:
void on_configChanged();
private: