rightPane(new Pane(this)),
activePane(leftPane),
inactivePane(rightPane),
- cloneBtn(new Button(">>", 0, 60, 70)),
- moveBtn(new Button("mv>", 0, 60, 70)),
+ cloneBtn(new Button(">", 0, 60, 70)),
+ swapBtn(new Button("<>", 0, 60, 70)),
copyBtn(new Button("cp>", 0, 60, 70)),
+ moveBtn(new Button("mv>", 0, 60, 70)),
delBtn(new Button("rm", 0, 60, 70)),
- swapBtn(new Button("<>", 0, 60, 70)),
fileOperator(new FileOperator(this))
{
QVBoxLayout *layout = new QVBoxLayout;
cloneBtn->setContentsMargins(0, 0, 0, 0);
middleButtons->addWidget(cloneBtn);
- middleButtons->addWidget(moveBtn);
+ middleButtons->addWidget(swapBtn);
middleButtons->addWidget(copyBtn);
+ middleButtons->addWidget(moveBtn);
middleButtons->addWidget(delBtn);
- middleButtons->addWidget(swapBtn);
paneLayout->addWidget(rightPane);
connect(this, SIGNAL(activePaneSwitched()), rightPane, SLOT(toggleActive()));
connect(cloneBtn, SIGNAL(pressed()), this, SLOT(clonePane()));
- connect(delBtn, SIGNAL(pressed()), this, SLOT(deleteFiles()));
+ connect(swapBtn, SIGNAL(pressed()), this, SLOT(swapPanes()));
connect(copyBtn, SIGNAL(pressed()), this, SLOT(copyFiles()));
connect(moveBtn, SIGNAL(pressed()), this, SLOT(moveFiles()));
- connect(swapBtn, SIGNAL(pressed()), this, SLOT(swapPanes()));
+ connect(delBtn, SIGNAL(pressed()), this, SLOT(deleteFiles()));
}
inactivePane = tmpPane;
if (leftPane == activePane) {
- cloneBtn->setText(">>");
- moveBtn->setText("mv>");
+ cloneBtn->setText(">");
copyBtn->setText("cp>");
+ moveBtn->setText("mv>");
} else {
- cloneBtn->setText("<<");
- moveBtn->setText("<mv");
+ cloneBtn->setText("<");
copyBtn->setText("<cp");
+ moveBtn->setText("<mv");
}
emit activePaneSwitched();
}
-void Case::deleteFiles() {
- if (activePane->selection().size()) {
- fileOperator->deleteFiles(activePane->selection());
- }
+void Case::clonePane() {
+ inactivePane->changePath(activePane->path());
+}
+
+
+void Case::swapPanes() {
+ QString tmpPath = activePane->path();
+ activePane->changePath(inactivePane->path());
+ inactivePane->changePath(tmpPath);
}
}
-void Case::clonePane() {
- inactivePane->changePath(activePane->path());
-}
-
-
-void Case::swapPanes() {
- QString tmpPath = activePane->path();
- activePane->changePath(inactivePane->path());
- inactivePane->changePath(tmpPath);
+void Case::deleteFiles() {
+ if (activePane->selection().size()) {
+ fileOperator->deleteFiles(activePane->selection());
+ }
}