aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm/widgets
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-08-21 10:34:14 -0400
committerKen Moore <moorekou@gmail.com>2015-08-21 10:34:14 -0400
commit27faa0cd64f3127457a6fa15494c6e33d2f04e69 (patch)
tree8777589a3222db22a75c37e2abf411d8a8a7a9c1 /lumina-fm/widgets
parentAdjust the "desktop icons" checkbox in lumina-config to make it a bit easier ... (diff)
downloadlumina-27faa0cd64f3127457a6fa15494c6e33d2f04e69.tar.gz
lumina-27faa0cd64f3127457a6fa15494c6e33d2f04e69.tar.bz2
lumina-27faa0cd64f3127457a6fa15494c6e33d2f04e69.zip
Copy the old MainUI class over as an emergency backup in preparation for tying all the new UI/widgets in.
Diffstat (limited to 'lumina-fm/widgets')
-rw-r--r--lumina-fm/widgets/DirWidget.cpp22
-rw-r--r--lumina-fm/widgets/DirWidget.h3
2 files changed, 18 insertions, 7 deletions
diff --git a/lumina-fm/widgets/DirWidget.cpp b/lumina-fm/widgets/DirWidget.cpp
index 8e7e3b0e..b32e5c20 100644
--- a/lumina-fm/widgets/DirWidget.cpp
+++ b/lumina-fm/widgets/DirWidget.cpp
@@ -47,9 +47,17 @@ void DirWidget::setShowSidebar(bool show){
void DirWidget::setDetails(QList<DETAILTYPES> list){
listDetails = list;
+ if(CDIR.isEmpty() || !showDetails){ return; } //don't need to reload dir if details are not visible
emit LoadDirectory(ID, CDIR);
}
+void DirWidget::setThumbnailSize(int px){
+ bool larger = ui->listWidget->iconSize().height() < px;
+ ui->listWidget->setIconSize(QSize(px,px));
+ ui->treeWidget->setIconSize(QSize(px,px));
+ if(CDIR.isEmpty() || !larger ){ return; } //don't need to reload icons unless the new size is larger
+ emit LoadDirectory(ID, CDIR);
+}
// ================
// PUBLIC SLOTS
// ================
@@ -237,16 +245,18 @@ void DirWidget::UpdateButtons(){
// PRIVATE
// =================
void DirWidget::setupConnections(){
- //Tree Widget interaction
+ //Info routines
connect(ui->treeWidget, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(OpenContextMenu()) );
connect(ui->listWidget, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(OpenContextMenu()) );
connect(ui->treeWidget, SIGNAL(itemSelectionChanged()), this, SLOT(SelectionChanged()) );
connect(ui->listWidget, SIGNAL(itemSelectionChanged()), this, SLOT(SelectionChanged()) );
-
- /*connect(ui->tree_dir_view, SIGNAL(activated(const QModelIndex&)), this, SLOT(ItemRun(const QModelIndex&)) );
- connect(ui->list_dir_view, SIGNAL(activated(const QModelIndex&)), this, SLOT(ItemRun(const QModelIndex&)) );
- connect(ui->tree_dir_view->selectionModel(), SIGNAL(selectionChanged(const QItemSelection, const QItemSelection)), this, SLOT(ItemSelectionChanged()) );
- connect(ui->list_dir_view->selectionModel(), SIGNAL(selectionChanged(const QItemSelection, const QItemSelection)), this, SLOT(ItemSelectionChanged()) );*/
+
+ //Activation routines
+ connect(ui->treeWidget, SIGNAL(itemActivated(QTreeWidgetItem*)), this, SLOT(on_tool_act_run_clicked()) );
+ connect(ui->listWidget, SIGNAL(itemActivated(QListWidgetItem*)), this, SLOT(on_tool_act_run_clicked()) );
+ connect(ui->treeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem*)), this, SLOT(on_tool_act_run_clicked()) );
+ connect(ui->listWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(on_tool_act_run_clicked()) );
+
}
diff --git a/lumina-fm/widgets/DirWidget.h b/lumina-fm/widgets/DirWidget.h
index 272aba8e..646df309 100644
--- a/lumina-fm/widgets/DirWidget.h
+++ b/lumina-fm/widgets/DirWidget.h
@@ -30,7 +30,8 @@ public:
QString id();
void setShowDetails(bool show);
void setShowSidebar(bool show);
- void setDetails(QList<DETAILTYPES> list);
+ void setDetails(QList<DETAILTYPES> list); //Which details to show and in which order (L->R)
+ void setThumbnailSize(int px);
public slots:
void LoadDir(QString dir, QList<LFileInfo> list);
bgstack15