added icons for the buttons
[case] / src / case.cpp
index 231e230..bac6bac 100644 (file)
@@ -27,11 +27,11 @@ Case::Case(QWidget *parent) :
     rightPane(new Pane(this)),
     activePane(leftPane),
     inactivePane(rightPane),
-    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)),
+    cloneBtn(new Button("clone", 0, 60, 70)),
+    swapBtn(new Button("swap", 0, 60, 70)),
+    copyBtn(new Button("copy", 0, 60, 70)),
+    moveBtn(new Button("move", 0, 60, 70)),
+    delBtn(new Button("delete", 0, 60, 70)),
     fileOperator(new FileOperator(this))
 {
     QVBoxLayout *layout = new QVBoxLayout;
@@ -83,15 +83,11 @@ void Case::switchActivePane() {
     activePane = inactivePane;
     inactivePane = tmpPane;
 
-    if (leftPane == activePane) {
-        cloneBtn->setText(">");
-        copyBtn->setText("cp>");
-        moveBtn->setText("mv>");
-    } else {
-        cloneBtn->setText("<");
-        copyBtn->setText("<cp");
-        moveBtn->setText("<mv");
-    }
+    cloneBtn->swapIcon();
+    swapBtn->swapIcon();
+    copyBtn->swapIcon();
+    moveBtn->swapIcon();
+    delBtn->swapIcon();
 
     emit activePaneSwitched();
 }