Parcourir la source

Merge pull request #8 from StronglogicSolutions/defaultFileDir

Default file dir
Emmanuel Buckshi il y a 5 ans
Parent
commit
8e5c257c4a
18 fichiers modifiés avec 289 ajouts et 591 suppressions
  1. 3 0
      .gitignore
  2. 105 87
      argdialog.ui
  3. 11 2
      consoledialog.ui
  4. 44 24
      headers/util.hpp
  5. BIN
      icons/clip.png
  6. BIN
      icons/erase.png
  7. 50 0
      icons/log.svg
  8. BIN
      icons/trash.png
  9. 4 0
      include/argdialog.h
  10. 1 1
      include/kfiledialog.h
  11. 3 1
      include/mainwindow.h
  12. 5 0
      kres.qrc
  13. 2 2
      mainwindow.ui
  14. 34 26
      src/argdialog.cpp
  15. 11 3
      src/kfiledialog.cpp
  16. 16 10
      src/mainwindow.cpp
  17. 0 371
      ui_argdialog.h
  18. 0 64
      ui_consoledialog.h

+ 3 - 0
.gitignore

@@ -12,3 +12,6 @@ qrc_kres.*
 assets
 config
 ky_gui_plugin_import.cpp
+ui_mainwindow.h
+ui_argdialog.h
+ui_consoledialog.h

+ 105 - 87
argdialog.ui

@@ -6,7 +6,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>940</width>
+    <width>970</width>
     <height>864</height>
    </rect>
   </property>
@@ -14,8 +14,8 @@
    <string>Dialog</string>
   </property>
   <property name="windowIcon">
-   <iconset>
-    <normaloff>favicon.ico</normaloff>favicon.ico</iconset>
+   <iconset resource="kres.qrc">
+    <normaloff>:/icons/favicon.ico</normaloff>:/icons/favicon.ico</iconset>
   </property>
   <property name="styleSheet">
    <string notr="true">border-color: rgb(0, 0, 0);
@@ -26,11 +26,11 @@ background-color: rgb(0, 43, 54);</string>
     <rect>
      <x>10</x>
      <y>10</y>
-     <width>921</width>
+     <width>948</width>
      <height>851</height>
     </rect>
    </property>
-   <layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,1,0,0,0,3,0,0">
+   <layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,1,0,0,0,0,3,0">
     <item>
      <widget class="QLabel" name="argDialogTitle">
       <property name="font">
@@ -63,10 +63,16 @@ color:  rgb(255, 85, 0);
         </property>
         <property name="minimumSize">
          <size>
-          <width>108</width>
+          <width>196</width>
           <height>0</height>
          </size>
         </property>
+        <property name="maximumSize">
+         <size>
+          <width>196</width>
+          <height>16777215</height>
+         </size>
+        </property>
         <property name="styleSheet">
          <string notr="true">font: 75 11pt &quot;Noto Sans&quot;;
 color: rgb(131, 148, 150);
@@ -75,6 +81,9 @@ font-weight: 700;</string>
         <property name="text">
          <string>Type</string>
         </property>
+        <property name="alignment">
+         <set>Qt::AlignCenter</set>
+        </property>
        </widget>
       </item>
       <item>
@@ -133,10 +142,16 @@ font-weight: 700;
         </property>
         <property name="minimumSize">
          <size>
-          <width>0</width>
+          <width>196</width>
           <height>0</height>
          </size>
         </property>
+        <property name="maximumSize">
+         <size>
+          <width>196</width>
+          <height>16777215</height>
+         </size>
+        </property>
         <property name="styleSheet">
          <string notr="true">font: 75 11pt &quot;Noto Sans&quot;;
 color: rgb(131, 148, 150);
@@ -146,6 +161,9 @@ font-weight: 700;
         <property name="text">
          <string>Input</string>
         </property>
+        <property name="alignment">
+         <set>Qt::AlignCenter</set>
+        </property>
        </widget>
       </item>
       <item>
@@ -159,22 +177,27 @@ font-weight: 700;
         </property>
        </widget>
       </item>
-      <item>
-       <widget class="QPushButton" name="addArgument">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="minimumSize">
-         <size>
-          <width>100</width>
-          <height>0</height>
-         </size>
-        </property>
-        <property name="styleSheet">
-         <string notr="true">background-color: #2f535f;
+     </layout>
+    </item>
+    <item>
+     <widget class="QPushButton" name="addArgument">
+      <property name="sizePolicy">
+       <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+        <horstretch>0</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
+      </property>
+      <property name="minimumSize">
+       <size>
+        <width>100</width>
+        <height>0</height>
+       </size>
+      </property>
+      <property name="layoutDirection">
+       <enum>Qt::LeftToRight</enum>
+      </property>
+      <property name="styleSheet">
+       <string notr="true">background-color: #2f535f;
 font: 87 11pt &quot;Noto Sans&quot;;
 color: rgb(149, 155, 156);
 font-weight: 700;
@@ -185,20 +208,14 @@ border-radius: 4px;
 border-color: #00000f;
 min-width: 4em;
 padding: 4px;</string>
-        </property>
-        <property name="text">
-         <string>Add</string>
-        </property>
-        <property name="icon">
-         <iconset>
-          <normaloff>icons/right-arrow.png</normaloff>icons/right-arrow.png</iconset>
-        </property>
-        <property name="flat">
-         <bool>false</bool>
-        </property>
-       </widget>
-      </item>
-     </layout>
+      </property>
+      <property name="text">
+       <string>Add</string>
+      </property>
+      <property name="flat">
+       <bool>false</bool>
+      </property>
+     </widget>
     </item>
     <item>
      <layout class="QHBoxLayout" name="horizontalLayout_3">
@@ -224,6 +241,9 @@ font-weight: 700;</string>
         <property name="text">
          <string>Add file attachment</string>
         </property>
+        <property name="alignment">
+         <set>Qt::AlignCenter</set>
+        </property>
        </widget>
       </item>
       <item>
@@ -244,6 +264,11 @@ padding: 4px;</string>
         <property name="text">
          <string>Choose</string>
         </property>
+        <property name="icon">
+         <iconset theme="clip.png">
+          <normalon>:/icons/icons/clip.png</normalon>
+         </iconset>
+        </property>
        </widget>
       </item>
      </layout>
@@ -253,17 +278,23 @@ padding: 4px;</string>
       <item alignment="Qt::AlignVCenter">
        <widget class="QLabel" name="label_5">
         <property name="sizePolicy">
-         <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+         <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
         </property>
         <property name="minimumSize">
          <size>
-          <width>52</width>
+          <width>196</width>
           <height>0</height>
          </size>
         </property>
+        <property name="maximumSize">
+         <size>
+          <width>196</width>
+          <height>16777215</height>
+         </size>
+        </property>
         <property name="styleSheet">
          <string notr="true">font: 75 11pt &quot;Noto Sans&quot;;
 color: rgb(131, 148, 150);
@@ -273,19 +304,22 @@ font-weight: 700;
         <property name="text">
          <string>Time</string>
         </property>
+        <property name="alignment">
+         <set>Qt::AlignHCenter</set>
+        </property>
        </widget>
       </item>
       <item alignment="Qt::AlignRight">
        <widget class="QDateTimeEdit" name="dateTime">
         <property name="sizePolicy">
-         <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+         <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
         </property>
         <property name="minimumSize">
          <size>
-          <width>380</width>
+          <width>740</width>
           <height>38</height>
          </size>
         </property>
@@ -313,23 +347,7 @@ padding-left: 8px;</string>
      </widget>
     </item>
     <item>
-     <layout class="QHBoxLayout" name="horizontalLayout_6" stretch="0,0,0">
-      <item>
-       <spacer name="horizontalSpacer">
-        <property name="orientation">
-         <enum>Qt::Horizontal</enum>
-        </property>
-        <property name="sizeType">
-         <enum>QSizePolicy::Maximum</enum>
-        </property>
-        <property name="sizeHint" stdset="0">
-         <size>
-          <width>20</width>
-          <height>20</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
+     <layout class="QHBoxLayout" name="horizontalLayout_6" stretch="0">
       <item>
        <widget class="QTableWidget" name="argList">
         <property name="styleSheet">
@@ -366,28 +384,23 @@ padding-left: 2px;</string>
         <column/>
        </widget>
       </item>
-      <item>
-       <spacer name="horizontalSpacer_2">
-        <property name="orientation">
-         <enum>Qt::Horizontal</enum>
-        </property>
-        <property name="sizeType">
-         <enum>QSizePolicy::Maximum</enum>
-        </property>
-        <property name="sizeHint" stdset="0">
-         <size>
-          <width>20</width>
-          <height>20</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
      </layout>
     </item>
     <item>
-     <widget class="QPushButton" name="clear">
-      <property name="styleSheet">
-       <string notr="true">background-color: #2f535f;
+     <layout class="QHBoxLayout" name="horizontalLayout_5">
+      <property name="spacing">
+       <number>4</number>
+      </property>
+      <item>
+       <widget class="QPushButton" name="clear">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="styleSheet">
+         <string notr="true">background-color: #2f535f;
 font: 87 11pt &quot;Noto Sans&quot;;
 color: rgb(149, 155, 156);
 font-weight: 700;
@@ -398,14 +411,17 @@ border-radius: 4px;
 border-color: #00000f;
 min-width: 4em;
 padding: 4px;</string>
-      </property>
-      <property name="text">
-       <string>Clear</string>
-      </property>
-     </widget>
-    </item>
-    <item>
-     <layout class="QHBoxLayout" name="horizontalLayout_5">
+        </property>
+        <property name="text">
+         <string>Clear</string>
+        </property>
+        <property name="icon">
+         <iconset>
+          <normalon>:/icons/icons/trash.png</normalon>
+         </iconset>
+        </property>
+       </widget>
+      </item>
       <item>
        <widget class="QDialogButtonBox" name="argCommandButtons">
         <property name="sizePolicy">
@@ -437,7 +453,7 @@ padding: 4px;</string>
          <enum>Qt::Horizontal</enum>
         </property>
         <property name="standardButtons">
-         <set>QDialogButtonBox::Cancel|QDialogButtonBox::Save</set>
+         <set>QDialogButtonBox::Close|QDialogButtonBox::Save</set>
         </property>
         <property name="centerButtons">
          <bool>true</bool>
@@ -449,7 +465,9 @@ padding: 4px;</string>
    </layout>
   </widget>
  </widget>
- <resources/>
+ <resources>
+  <include location="kres.qrc"/>
+ </resources>
  <connections>
   <connection>
    <sender>argCommandButtons</sender>

+ 11 - 2
consoledialog.ui

@@ -13,6 +13,10 @@
   <property name="windowTitle">
    <string>Dialog</string>
   </property>
+  <property name="windowIcon">
+   <iconset resource="kres.qrc">
+    <normaloff>:/icons/log.png</normaloff>:/icons/log.png</iconset>
+  </property>
   <widget class="QTextEdit" name="consoleText">
    <property name="geometry">
     <rect>
@@ -22,6 +26,9 @@
      <height>721</height>
     </rect>
    </property>
+   <property name="styleSheet">
+    <string notr="true">color: rgb(38, 255, 0);</string>
+   </property>
    <property name="readOnly">
     <bool>false</bool>
    </property>
@@ -31,7 +38,7 @@
     <rect>
      <x>300</x>
      <y>20</y>
-     <width>51</width>
+     <width>71</width>
      <height>18</height>
     </rect>
    </property>
@@ -53,6 +60,8 @@
    </property>
   </widget>
  </widget>
- <resources/>
+ <resources>
+  <include location="kres.qrc"/>
+ </resources>
  <connections/>
 </ui>

+ 44 - 24
headers/util.hpp

@@ -58,28 +58,47 @@ struct KSession {
 };
 
 static QString escapeText(QString s) {
-    qDebug() << "Escaping text";
-    if (s.contains("\t")) {
-        s.replace("\t", "\\t");
-    }
-    if (s.contains("'")) {
-        qDebug() << "Replacing single quote";
-        if (s.contains('"')) {
-            s.replace('"', "\\\"");
-        }
-        s.replace("'", "'\"\'\"'");
-        return s;
-    }
-    if (s.contains('"')) {
-        s.replace('"', "\\\"");
-    }
-    return s;
+  s.replace("\t", "\\t");
+  s.replace('"', "\\\"");
+  s.replace("'", "'\"\'\"'");
+  return s;
+}
+
+static QString escapeMessage(QString s) {
+  s.replace("\t", "\\t");
+  s.replace('"', "\\\"");
+  s.replace("'", "\'");
+  return s;
 }
 
 static QString escapeTextToRaw(QString s) {
     return escapeText(s).toUtf8().constData();
 }
 
+/**
+ * @brief configValue
+ * @param key [in] {QString} The key whose corresponding value is to be sought
+ * from the ConfigJson param
+ * @param [in] {ConfigJson} A Key-Value JSON Config object
+ * @return {QString} The value which corresonds to the key, or an empty string
+ *
+ * TODO: ConfigJson should probably be called something else, like
+ * ConfigJsonObject
+ */
+QString configValue(QString key, ConfigJson config) {
+  ConfigJson::iterator it{config.find(key)};  // Find iterator to element matching key
+  if (it != std::end(config)) {               // If element was found
+    return it->second;                        // Return the value of the Key-Pair element
+  }
+  return "";
+}
+
+bool configBoolValue(QString s, ConfigJson config) {
+  if (auto it{config.find(s)}; it != std::end(config)) {
+    return bool{it->second == "true"};
+  }
+}
+
 std::string getJsonString(std::string s) {
     Document d;
     d.Parse(s.c_str());
@@ -365,16 +384,17 @@ inline size_t findNullIndex(uint8_t* data) {
 
 namespace FileUtils {
 QString generatePreview(QString video_path, QString video_name) {
-    QString preview_name = video_name.left(video_name.size() - 4) + "-preview.jpg";
-//    QString command{
-//        "ffmpeg -ss 0 -i " + video_path + " -vf select=\"eq(pict_type\\,I)\" -vframes 1 ./assets/previews/" + preview_name};
-    QString command {
-        "ffmpeg -y -ss 0 -i '" + video_path + "' -vf \"scale=w=640:h=640:force_original_aspect_ratio=decrease,pad=w=640:h=640:x=(iw-ow)/2:y=(ih-oh/2):color=white\" -vframes 1 './assets/previews/" + preview_name + "'"
-    };
+  QString preview_name =
+      video_name.left(video_name.size() - 4) + "-preview.jpg";
+  QString command{
+      "ffmpeg -y -ss 0 -i '" + video_path +
+      "' -vf \"scale=w=640:h=640:force_original_aspect_ratio=decrease\" "
+      "-vframes 1 './assets/previews/" +
+      preview_name + "'"};
 
-    std::system(command.toUtf8());
+  std::system(command.toUtf8());
 
-    return preview_name;
+  return preview_name;
 }
 }; // namespace FileUtils
 }

BIN
icons/clip.png


BIN
icons/erase.png


+ 50 - 0
icons/log.svg

@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
+<g>
+	<g>
+		<g>
+			<path d="M32,464V48c0-8.837,7.163-16,16-16h240v64c0,17.673,14.327,32,32,32h64v48h32v-64c0.025-4.253-1.645-8.341-4.64-11.36
+				l-96-96C312.341,1.645,308.253-0.024,304,0H48C21.49,0,0,21.491,0,48v416c0,26.51,21.49,48,48,48h112v-32H48
+				C39.164,480,32,472.837,32,464z"/>
+			<path d="M480,320h-32v32h32v32h-64v-96h96c0-17.673-14.327-32-32-32h-64c-17.673,0-32,14.327-32,32v96c0,17.673,14.327,32,32,32
+				h64c17.673,0,32-14.327,32-32v-32C512,334.327,497.673,320,480,320z"/>
+			<path d="M304,256c-35.346,0-64,28.654-64,64v32c0,35.346,28.654,64,64,64c35.346,0,64-28.654,64-64v-32
+				C368,284.654,339.346,256,304,256z M336,352c0,17.673-14.327,32-32,32c-17.673,0-32-14.327-32-32v-32c0-17.673,14.327-32,32-32
+				c17.673,0,32,14.327,32,32V352z"/>
+			<path d="M160,256h-32v144c0,8.837,7.163,16,16,16h80v-32h-64V256z"/>
+		</g>
+	</g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+</svg>

BIN
icons/trash.png


+ 4 - 0
include/argdialog.h

@@ -63,6 +63,9 @@ class ArgDialog : public QDialog {
  public:
   explicit ArgDialog(QWidget *parent = nullptr);
   virtual void keyPressEvent(QKeyEvent* e);
+  void setFilePath(QString path);
+  virtual void accept() override;
+
   ~ArgDialog();
 
  signals:
@@ -83,6 +86,7 @@ class ArgDialog : public QDialog {
   void addFile(QString path);
   Task m_task;
   IGPost m_ig_post;
+  QString m_file_path;
 };
 
 #endif  // ARGDIALOG_H

+ 1 - 1
include/kfiledialog.h

@@ -7,7 +7,7 @@ class KFileDialog : QFileDialog {
 Q_OBJECT
 public:
     KFileDialog();
-    QString openFileDialog();
+    QString openFileDialog(QString file_path = "");
 };
 
 #endif // KFILEDIALOG_H

+ 3 - 1
include/mainwindow.h

@@ -70,8 +70,10 @@ private:
     QList<QString> m_events;
     QStandardItemModel* m_process_model;
     QStandardItemModel* m_event_model;
+    /** Misc */
+    ConfigJson m_config;
 
-private slots:
+   private slots:
     /** Receivers */
     void connectClient();
     void updateMessages(int t, const QString& s, StringVec v);

+ 5 - 0
kres.qrc

@@ -6,6 +6,11 @@
         <file>icons/execute.png</file>
         <file>icons/arguments.png</file>
         <file>icons/quit.png</file>
+        <file>icons/erase.png</file>
+        <file>icons/trash.png</file>
+        <file>icons/clip.png</file>
+        <file>favicon.ico</file>
+        <file>icons/log.svg</file>
     </qresource>
     <qresource prefix="/">
         <file>icons/log.png</file>

+ 2 - 2
mainwindow.ui

@@ -14,8 +14,8 @@
    <string>MainWindow</string>
   </property>
   <property name="windowIcon">
-   <iconset>
-    <normaloff>favicon.ico</normaloff>favicon.ico</iconset>
+   <iconset resource="kres.qrc">
+    <normaloff>:/icons/favicon.ico</normaloff>:/icons/favicon.ico</iconset>
   </property>
   <property name="styleSheet">
    <string notr="true">font: 87 10pt &quot;Noto Sans&quot;;

+ 34 - 26
src/argdialog.cpp

@@ -17,11 +17,11 @@ ArgDialog::ArgDialog(QWidget *parent)
       m_ig_post(IGPost{}) {
   ui->setupUi(this);
 
-  ui->argCommandButtons->button(QDialogButtonBox::Cancel)
-    ->setStyleSheet(QString("background:%1").arg("#2f535f"));
+  ui->argCommandButtons->button(QDialogButtonBox::Close)
+      ->setStyleSheet(QString("background:%1").arg("#2f535f"));
   QObject::connect(ui->addFile, &QPushButton::clicked, this, [this]() {
     KFileDialog file_dialog{};
-    auto file_path = file_dialog.openFileDialog();
+    auto file_path = file_dialog.openFileDialog(m_file_path);
     qDebug() << "Selected file:" << file_path;
     if (file_path.size() > 0) {
       auto slash_index = file_path.lastIndexOf("/") + 1;
@@ -53,10 +53,11 @@ ArgDialog::ArgDialog(QWidget *parent)
     }
   });
 
-  ui->argList->setHorizontalHeaderLabels(QStringList{"Value", "Type", "Preview", "Delete"});
-  ui->argList->setColumnWidth(0, 300);
-  ui->argList->setColumnWidth(1, 40);
-  ui->argList->setColumnWidth(2, 100);
+  ui->argList->setHorizontalHeaderLabels(
+      QStringList{"Type", "Value", "Preview", "Delete"});
+  ui->argList->setColumnWidth(0, 40);
+  ui->argList->setColumnWidth(1, 520);
+  ui->argList->setColumnWidth(2, 220);
   ui->argList->setColumnWidth(3, 30);
   ui->argList->verticalHeader()->setDefaultSectionSize(100);
 
@@ -157,8 +158,8 @@ void ArgDialog::setTaskArguments() {
 }
 
 void ArgDialog::addItem(QString value, QString type) {
-  QTableWidgetItem *item = new QTableWidgetItem(value);
-  QTableWidgetItem *item2 = new QTableWidgetItem(type);
+  QTableWidgetItem *item = new QTableWidgetItem(type);
+  QTableWidgetItem *item2 = new QTableWidgetItem(value);
   auto row = ui->argList->rowCount();
   ui->argList->insertRow(row);
   QPushButton *q_pb = new QPushButton();
@@ -198,6 +199,7 @@ void ArgDialog::clearPost() {
   m_ig_post.promote_share = "Share the post through IG story if you enjoy the phrase 🙋‍♀️";
   m_ig_post.requested_by_phrase = "The phrase was requested by ";
   ui->argType->setCurrentIndex(0);
+  ui->argList->setRowCount(0);
 }
 
 void ArgDialog::clearTask() {
@@ -206,9 +208,11 @@ void ArgDialog::clearTask() {
 }
 
 void ArgDialog::addRequestedBy(QString value) {
+  QStringList names = value.split(" ");
+  for (const auto &name : names) {
     if (std::find(m_ig_post.requested_by.begin(), m_ig_post.requested_by.end(), value.toUtf8().constData()) == m_ig_post.requested_by.end()) {
-        m_ig_post.requested_by.push_back(value.toUtf8().constData());
-        addToArgList(value, "requested_by");
+      m_ig_post.requested_by.push_back(name.toUtf8().constData());
+      addToArgList(name, "requested_by");
     } else {
         const char* message = "You have already inputed this name under \"requested_by\"";
         qDebug() << message;
@@ -218,21 +222,22 @@ void ArgDialog::addRequestedBy(QString value) {
             tr(message)
             );
     }
+  }
 }
 
 void ArgDialog::addToArgList(QString value, QString type) {
-    for (int i = 0; i < ui->argList->rowCount(); i++) {
-        auto item = ui->argList->item(i, 1);
-        if (item) {
-            if (QString::compare(item->text(), type) == 0) {
-                auto text = ui->argList->item(i, 0)->text();
-                text.append("\n");
-                text += value;
-                ui->argList->item(i, 0)->setText(text);
-                return;
-            }
-        }
+  for (int i = 0; i < ui->argList->rowCount(); i++) {
+    auto item = ui->argList->item(i, 0);
+    if (item) {
+      if (QString::compare(item->text(), type) == 0) {
+        auto text = ui->argList->item(i, 1)->text();
+        text.append("\n");
+        text += value;
+        ui->argList->item(i, 1)->setText(text);
+        return;
+      }
     }
+  }
     addItem(value, type);
 }
 
@@ -240,10 +245,10 @@ void ArgDialog::addOrReplaceInArgList(QString value, QString type) {
     for (int i = 0; i < ui->argList->rowCount(); i++) {
         auto item = ui->argList->item(i, 1);
         if (item) {
-            if (QString::compare(item->text(), type) == 0) {
-                ui->argList->item(i, 0)->setText(value);
-                return;
-            }
+          if (QString::compare(item->text(), type) == 0) {
+            ui->argList->item(i, 1)->setText(value);
+            return;
+          }
         }
     }
     addItem(value, type);
@@ -279,8 +284,11 @@ void ArgDialog::keyPressEvent(QKeyEvent *e) {
     }
 }
 
+void ArgDialog::setFilePath(QString path) { m_file_path = path; }
+
 ArgDialog::~ArgDialog()
 {
     delete ui;
 }
 
+void ArgDialog::accept() { qDebug() << "Sending request to schedule a task.."; }

+ 11 - 3
src/kfiledialog.cpp

@@ -3,9 +3,17 @@
 KFileDialog::KFileDialog()
 {
     this->setStyleSheet("QFileDialog QWidget { background-color: rgb(0, 43, 54); color: rgb(131, 148, 150); font-weight: 700;}");
+    this->setFileMode(QFileDialog::ExistingFiles);
 }
 
-QString KFileDialog::openFileDialog() {
-    return this->getOpenFileName(this,
-                                                 tr("Open File"), "~", tr("All Files (*.*)"), nullptr, QFileDialog::DontUseNativeDialog);
+QString KFileDialog::openFileDialog(QString file_path) {
+  if (!file_path.isEmpty()) {
+    this->setDirectory(file_path);
+  }
+  this->exec();
+  QStringList filenames = this->selectedFiles();
+  if (!filenames.empty()) {
+    return filenames.at(0);
+  }
+  return "";
 }

+ 16 - 10
src/mainwindow.cpp

@@ -79,6 +79,11 @@ void MainWindow::setConnectScreen(bool visible) {
  * @brief MainWindow::buttonClicked
  */
 void MainWindow::connectClient() {
+  m_config = getConfigObject(ui->kyConfig->toPlainText());
+  QString file_path = m_config.at("fileDirectory");
+  if (file_path != NULL) {
+    arg_ui->setFilePath(file_path);
+  }
   setConnectScreen(false);
   qDebug() << "Connecting to KServer";
   QObject::connect(q_client, &Client::messageReceived, this,
@@ -95,7 +100,7 @@ void MainWindow::connectClient() {
       this->findChild<QPushButton*>("sendMessage");
   // Handle mouse
   QObject::connect(send_message_button, &QPushButton::clicked, this, [this]() {
-    q_client->sendMessage(escapeText(ui->inputText->toPlainText()));
+    q_client->sendMessage(escapeMessage(ui->inputText->toPlainText()));
     ui->inputText->clear();
   });
 
@@ -232,23 +237,25 @@ void MainWindow::updateMessages(int t, const QString& message, StringVec v) {
     ui->messages->append(simple_message);
     console_ui.updateText(message);
   } else if (t == COMMANDS_UPDATE_TYPE) {
-    if (message == "New Session") {
-      ui->led->setState(true);
-    }
     qDebug() << "Updating commands";
     QComboBox* app_list = ui->appList;
     app_list->clear();
-    ConfigJson config = getConfigObject(ui->kyConfig->toPlainText());
-    QString default_app = config.at("defaultApp");
     int app_index = 0;
+    QString default_app = configValue("defaultApp", m_config);
     for (const auto& s : v) {
       app_list->addItem(s);
       if (s.toLower() == default_app.toLower()) {
-        q_client->setSelectedApp(std::vector<QString>{{default_app}});
+        q_client->setSelectedApp(std::vector<QString>{default_app});
         ui->appList->setCurrentIndex(app_index);
       }
       app_index++;
     }
+    if (message == "New Session") {
+      ui->led->setState(true);
+      if (configBoolValue("schedulerMode", std::ref(m_config))) {
+        arg_ui->show();
+      }
+    }
   } else if (t == PROCESS_REQUEST_TYPE) {
     qDebug() << "Updating process list";
     m_processes.push_back(Process{.name = v.at(1),
@@ -294,9 +301,8 @@ void MainWindow::updateMessages(int t, const QString& message, StringVec v) {
           event_message += app_name;
           event_message += ": ";
           event_message += v.at(2);
-        } else {
-          event_message += ": ";
-          event_message += v.at(1);
+        } else if (QString::compare(message, "Message Received") == 0) {
+          event_message += "\n" + v.at(1) + ": " + v.at(2);
         }
       }
     } else {

+ 0 - 371
ui_argdialog.h

@@ -1,371 +0,0 @@
-/********************************************************************************
-** Form generated from reading UI file 'argdialog.ui'
-**
-** Created by: Qt User Interface Compiler version 5.13.0
-**
-** WARNING! All changes made in this file will be lost when recompiling UI file!
-********************************************************************************/
-
-#ifndef UI_ARGDIALOG_H
-#define UI_ARGDIALOG_H
-
-#include <QtCore/QVariant>
-#include <QtGui/QIcon>
-#include <QtWidgets/QApplication>
-#include <QtWidgets/QComboBox>
-#include <QtWidgets/QDateTimeEdit>
-#include <QtWidgets/QDialog>
-#include <QtWidgets/QDialogButtonBox>
-#include <QtWidgets/QHBoxLayout>
-#include <QtWidgets/QHeaderView>
-#include <QtWidgets/QLabel>
-#include <QtWidgets/QPushButton>
-#include <QtWidgets/QSpacerItem>
-#include <QtWidgets/QTableWidget>
-#include <QtWidgets/QTextEdit>
-#include <QtWidgets/QVBoxLayout>
-#include <QtWidgets/QWidget>
-
-QT_BEGIN_NAMESPACE
-
-class Ui_ArgDialog
-{
-public:
-    QWidget *verticalLayoutWidget;
-    QVBoxLayout *verticalLayout;
-    QLabel *argDialogTitle;
-    QHBoxLayout *horizontalLayout;
-    QLabel *label_2;
-    QComboBox *argType;
-    QHBoxLayout *horizontalLayout_2;
-    QLabel *label_3;
-    QTextEdit *argInput;
-    QPushButton *addArgument;
-    QHBoxLayout *horizontalLayout_3;
-    QLabel *label_4;
-    QPushButton *addFile;
-    QHBoxLayout *horizontalLayout_4;
-    QLabel *label_5;
-    QDateTimeEdit *dateTime;
-    QLabel *label;
-    QHBoxLayout *horizontalLayout_6;
-    QSpacerItem *horizontalSpacer;
-    QTableWidget *argList;
-    QSpacerItem *horizontalSpacer_2;
-    QPushButton *clear;
-    QHBoxLayout *horizontalLayout_5;
-    QDialogButtonBox *argCommandButtons;
-
-    void setupUi(QDialog *ArgDialog)
-    {
-        if (ArgDialog->objectName().isEmpty())
-            ArgDialog->setObjectName(QString::fromUtf8("ArgDialog"));
-        ArgDialog->resize(940, 864);
-        QIcon icon;
-        icon.addFile(QString::fromUtf8("favicon.ico"), QSize(), QIcon::Normal, QIcon::Off);
-        ArgDialog->setWindowIcon(icon);
-        ArgDialog->setStyleSheet(QString::fromUtf8("border-color: rgb(0, 0, 0);\n"
-"background-color: rgb(0, 43, 54);"));
-        verticalLayoutWidget = new QWidget(ArgDialog);
-        verticalLayoutWidget->setObjectName(QString::fromUtf8("verticalLayoutWidget"));
-        verticalLayoutWidget->setGeometry(QRect(10, 10, 921, 851));
-        verticalLayout = new QVBoxLayout(verticalLayoutWidget);
-        verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
-        verticalLayout->setContentsMargins(0, 0, 0, 0);
-        argDialogTitle = new QLabel(verticalLayoutWidget);
-        argDialogTitle->setObjectName(QString::fromUtf8("argDialogTitle"));
-        QFont font;
-        font.setPointSize(22);
-        font.setBold(true);
-        font.setWeight(75);
-        argDialogTitle->setFont(font);
-        argDialogTitle->setStyleSheet(QString::fromUtf8("color: rgb(170, 0, 255);\n"
-"color:  rgb(255, 85, 0);\n"
-" qproperty-alignment: 'AlignHCenter';\n"
-""));
-
-        verticalLayout->addWidget(argDialogTitle);
-
-        horizontalLayout = new QHBoxLayout();
-        horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
-        label_2 = new QLabel(verticalLayoutWidget);
-        label_2->setObjectName(QString::fromUtf8("label_2"));
-        QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
-        sizePolicy.setHorizontalStretch(2);
-        sizePolicy.setVerticalStretch(0);
-        sizePolicy.setHeightForWidth(label_2->sizePolicy().hasHeightForWidth());
-        label_2->setSizePolicy(sizePolicy);
-        label_2->setMinimumSize(QSize(108, 0));
-        label_2->setStyleSheet(QString::fromUtf8("font: 75 11pt \"Noto Sans\";\n"
-"color: rgb(131, 148, 150);\n"
-"font-weight: 700;"));
-
-        horizontalLayout->addWidget(label_2);
-
-        argType = new QComboBox(verticalLayoutWidget);
-        argType->addItem(QString());
-        argType->addItem(QString());
-        argType->addItem(QString());
-        argType->addItem(QString());
-        argType->addItem(QString());
-        argType->setObjectName(QString::fromUtf8("argType"));
-        QSizePolicy sizePolicy1(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
-        sizePolicy1.setHorizontalStretch(0);
-        sizePolicy1.setVerticalStretch(0);
-        sizePolicy1.setHeightForWidth(argType->sizePolicy().hasHeightForWidth());
-        argType->setSizePolicy(sizePolicy1);
-        argType->setStyleSheet(QString::fromUtf8("font: 87 11pt \"Noto Sans\";\n"
-"background-color: #2f535f;\n"
-"color: rgb(131, 148, 150);\n"
-"font-weight: 700;\n"
-""));
-
-        horizontalLayout->addWidget(argType);
-
-
-        verticalLayout->addLayout(horizontalLayout);
-
-        horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
-        label_3 = new QLabel(verticalLayoutWidget);
-        label_3->setObjectName(QString::fromUtf8("label_3"));
-        QSizePolicy sizePolicy2(QSizePolicy::Preferred, QSizePolicy::Preferred);
-        sizePolicy2.setHorizontalStretch(0);
-        sizePolicy2.setVerticalStretch(0);
-        sizePolicy2.setHeightForWidth(label_3->sizePolicy().hasHeightForWidth());
-        label_3->setSizePolicy(sizePolicy2);
-        label_3->setMinimumSize(QSize(0, 0));
-        label_3->setStyleSheet(QString::fromUtf8("font: 75 11pt \"Noto Sans\";\n"
-"color: rgb(131, 148, 150);\n"
-"font-weight: 700;\n"
-" qproperty-alignment: 'AlignVLeft';"));
-
-        horizontalLayout_2->addWidget(label_3);
-
-        argInput = new QTextEdit(verticalLayoutWidget);
-        argInput->setObjectName(QString::fromUtf8("argInput"));
-        argInput->setStyleSheet(QString::fromUtf8("font: 87 11pt \"Noto Sans\";\n"
-"background-color: #2f535f;\n"
-"color: rgb(131, 148, 150);\n"
-"font-weight: 700;\n"
-""));
-
-        horizontalLayout_2->addWidget(argInput);
-
-        addArgument = new QPushButton(verticalLayoutWidget);
-        addArgument->setObjectName(QString::fromUtf8("addArgument"));
-        QSizePolicy sizePolicy3(QSizePolicy::Fixed, QSizePolicy::Fixed);
-        sizePolicy3.setHorizontalStretch(0);
-        sizePolicy3.setVerticalStretch(0);
-        sizePolicy3.setHeightForWidth(addArgument->sizePolicy().hasHeightForWidth());
-        addArgument->setSizePolicy(sizePolicy3);
-        addArgument->setMinimumSize(QSize(100, 0));
-        addArgument->setStyleSheet(QString::fromUtf8("background-color: #2f535f;\n"
-"font: 87 11pt \"Noto Sans\";\n"
-"color: rgb(149, 155, 156);\n"
-"font-weight: 700;\n"
-"padding: 4px;\n"
-"border-style: outset;\n"
-"border-width: 2px;\n"
-"border-radius: 4px;\n"
-"border-color: #00000f;\n"
-"min-width: 4em;\n"
-"padding: 4px;"));
-        QIcon icon1;
-        icon1.addFile(QString::fromUtf8("icons/right-arrow.png"), QSize(), QIcon::Normal, QIcon::Off);
-        addArgument->setIcon(icon1);
-        addArgument->setFlat(false);
-
-        horizontalLayout_2->addWidget(addArgument);
-
-
-        verticalLayout->addLayout(horizontalLayout_2);
-
-        horizontalLayout_3 = new QHBoxLayout();
-        horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3"));
-        label_4 = new QLabel(verticalLayoutWidget);
-        label_4->setObjectName(QString::fromUtf8("label_4"));
-        QSizePolicy sizePolicy4(QSizePolicy::Fixed, QSizePolicy::Preferred);
-        sizePolicy4.setHorizontalStretch(0);
-        sizePolicy4.setVerticalStretch(0);
-        sizePolicy4.setHeightForWidth(label_4->sizePolicy().hasHeightForWidth());
-        label_4->setSizePolicy(sizePolicy4);
-        label_4->setMinimumSize(QSize(196, 0));
-        label_4->setStyleSheet(QString::fromUtf8("font: 75 11pt \"Noto Sans\";\n"
-"color: rgb(131, 148, 150);\n"
-"font-weight: 700;"));
-
-        horizontalLayout_3->addWidget(label_4, 0, Qt::AlignVCenter);
-
-        addFile = new QPushButton(verticalLayoutWidget);
-        addFile->setObjectName(QString::fromUtf8("addFile"));
-        addFile->setStyleSheet(QString::fromUtf8("background-color: #2f535f;\n"
-"font: 87 11pt \"Noto Sans\";\n"
-"color: rgb(149, 155, 156);\n"
-"font-weight: 700;\n"
-"padding: 4px;\n"
-"border-style: outset;\n"
-"border-width: 2px;\n"
-"border-radius: 4px;\n"
-"border-color: #00000f;\n"
-"min-width: 4em;\n"
-"padding: 4px;"));
-
-        horizontalLayout_3->addWidget(addFile);
-
-
-        verticalLayout->addLayout(horizontalLayout_3);
-
-        horizontalLayout_4 = new QHBoxLayout();
-        horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4"));
-        label_5 = new QLabel(verticalLayoutWidget);
-        label_5->setObjectName(QString::fromUtf8("label_5"));
-        sizePolicy4.setHeightForWidth(label_5->sizePolicy().hasHeightForWidth());
-        label_5->setSizePolicy(sizePolicy4);
-        label_5->setMinimumSize(QSize(52, 0));
-        label_5->setStyleSheet(QString::fromUtf8("font: 75 11pt \"Noto Sans\";\n"
-"color: rgb(131, 148, 150);\n"
-"font-weight: 700;\n"
-" qproperty-alignment: 'AlignHCenter';"));
-
-        horizontalLayout_4->addWidget(label_5, 0, Qt::AlignVCenter);
-
-        dateTime = new QDateTimeEdit(verticalLayoutWidget);
-        dateTime->setObjectName(QString::fromUtf8("dateTime"));
-        sizePolicy1.setHeightForWidth(dateTime->sizePolicy().hasHeightForWidth());
-        dateTime->setSizePolicy(sizePolicy1);
-        dateTime->setMinimumSize(QSize(380, 38));
-        dateTime->setStyleSheet(QString::fromUtf8("background-color: #00000f;\n"
-"color: #2f535f;\n"
-"font-weight: 700;\n"
-"font-size: 16pt;"));
-
-        horizontalLayout_4->addWidget(dateTime, 0, Qt::AlignRight);
-
-
-        verticalLayout->addLayout(horizontalLayout_4);
-
-        label = new QLabel(verticalLayoutWidget);
-        label->setObjectName(QString::fromUtf8("label"));
-        label->setStyleSheet(QString::fromUtf8("font: 75 11pt \"Noto Sans\";\n"
-"color: rgb(131, 148, 150);\n"
-"font-weight: 700;\n"
-"padding-left: 8px;"));
-
-        verticalLayout->addWidget(label);
-
-        horizontalLayout_6 = new QHBoxLayout();
-        horizontalLayout_6->setObjectName(QString::fromUtf8("horizontalLayout_6"));
-        horizontalSpacer = new QSpacerItem(20, 20, QSizePolicy::Maximum, QSizePolicy::Minimum);
-
-        horizontalLayout_6->addItem(horizontalSpacer);
-
-        argList = new QTableWidget(verticalLayoutWidget);
-        if (argList->columnCount() < 4)
-            argList->setColumnCount(4);
-        argList->setObjectName(QString::fromUtf8("argList"));
-        argList->setStyleSheet(QString::fromUtf8("font: 87 11pt \"Noto Sans\";\n"
-"background-color: #2f535f;\n"
-"color: rgb(131, 148, 150);\n"
-"font-weight: 700;\n"
-"padding-left: 2px;"));
-        argList->setShowGrid(true);
-        argList->setColumnCount(4);
-        argList->horizontalHeader()->setCascadingSectionResizes(false);
-        argList->horizontalHeader()->setMinimumSectionSize(100);
-        argList->horizontalHeader()->setDefaultSectionSize(200);
-        argList->verticalHeader()->setMinimumSectionSize(100);
-        argList->verticalHeader()->setDefaultSectionSize(100);
-
-        horizontalLayout_6->addWidget(argList);
-
-        horizontalSpacer_2 = new QSpacerItem(20, 20, QSizePolicy::Maximum, QSizePolicy::Minimum);
-
-        horizontalLayout_6->addItem(horizontalSpacer_2);
-
-
-        verticalLayout->addLayout(horizontalLayout_6);
-
-        clear = new QPushButton(verticalLayoutWidget);
-        clear->setObjectName(QString::fromUtf8("clear"));
-        clear->setStyleSheet(QString::fromUtf8("background-color: #2f535f;\n"
-"font: 87 11pt \"Noto Sans\";\n"
-"color: rgb(149, 155, 156);\n"
-"font-weight: 700;\n"
-"padding: 4px;\n"
-"border-style: outset;\n"
-"border-width: 2px;\n"
-"border-radius: 4px;\n"
-"border-color: #00000f;\n"
-"min-width: 4em;\n"
-"padding: 4px;"));
-
-        verticalLayout->addWidget(clear);
-
-        horizontalLayout_5 = new QHBoxLayout();
-        horizontalLayout_5->setObjectName(QString::fromUtf8("horizontalLayout_5"));
-        argCommandButtons = new QDialogButtonBox(verticalLayoutWidget);
-        argCommandButtons->setObjectName(QString::fromUtf8("argCommandButtons"));
-        sizePolicy3.setHeightForWidth(argCommandButtons->sizePolicy().hasHeightForWidth());
-        argCommandButtons->setSizePolicy(sizePolicy3);
-        argCommandButtons->setLayoutDirection(Qt::LeftToRight);
-        argCommandButtons->setAutoFillBackground(false);
-        argCommandButtons->setStyleSheet(QString::fromUtf8("background-color: rgb(255, 85, 0);\n"
-"font: 87 11pt \"Noto Sans\";\n"
-"color: rgb(0, 43, 54);\n"
-"font-weight: 700;\n"
-"padding: 4px;\n"
-"border-style: outset;\n"
-"border-width: 2px;\n"
-"border-radius: 4px;\n"
-"border-color: #00000f;\n"
-"min-width: 4em;\n"
-"padding: 4px;"));
-        argCommandButtons->setOrientation(Qt::Horizontal);
-        argCommandButtons->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Save);
-        argCommandButtons->setCenterButtons(true);
-
-        horizontalLayout_5->addWidget(argCommandButtons);
-
-
-        verticalLayout->addLayout(horizontalLayout_5);
-
-        verticalLayout->setStretch(2, 1);
-        verticalLayout->setStretch(6, 3);
-
-        retranslateUi(ArgDialog);
-        QObject::connect(argCommandButtons, SIGNAL(accepted()), ArgDialog, SLOT(accept()));
-        QObject::connect(argCommandButtons, SIGNAL(rejected()), ArgDialog, SLOT(reject()));
-
-        QMetaObject::connectSlotsByName(ArgDialog);
-    } // setupUi
-
-    void retranslateUi(QDialog *ArgDialog)
-    {
-        ArgDialog->setWindowTitle(QCoreApplication::translate("ArgDialog", "Dialog", nullptr));
-        argDialogTitle->setText(QCoreApplication::translate("ArgDialog", "Add Arguments", nullptr));
-        label_2->setText(QCoreApplication::translate("ArgDialog", "Type", nullptr));
-        argType->setItemText(0, QCoreApplication::translate("ArgDialog", "description", nullptr));
-        argType->setItemText(1, QCoreApplication::translate("ArgDialog", "hashtag", nullptr));
-        argType->setItemText(2, QCoreApplication::translate("ArgDialog", "requested by", nullptr));
-        argType->setItemText(3, QCoreApplication::translate("ArgDialog", "promote/share", nullptr));
-        argType->setItemText(4, QCoreApplication::translate("ArgDialog", "link/bio", nullptr));
-
-        label_3->setText(QCoreApplication::translate("ArgDialog", "Input", nullptr));
-        addArgument->setText(QCoreApplication::translate("ArgDialog", "Add", nullptr));
-        label_4->setText(QCoreApplication::translate("ArgDialog", "Add file attachment", nullptr));
-        addFile->setText(QCoreApplication::translate("ArgDialog", "Choose", nullptr));
-        label_5->setText(QCoreApplication::translate("ArgDialog", "Time", nullptr));
-        label->setText(QCoreApplication::translate("ArgDialog", "Items to send", nullptr));
-        clear->setText(QCoreApplication::translate("ArgDialog", "Clear", nullptr));
-    } // retranslateUi
-
-};
-
-namespace Ui {
-    class ArgDialog: public Ui_ArgDialog {};
-} // namespace Ui
-
-QT_END_NAMESPACE
-
-#endif // UI_ARGDIALOG_H

+ 0 - 64
ui_consoledialog.h

@@ -1,64 +0,0 @@
-/********************************************************************************
-** Form generated from reading UI file 'consoledialog.ui'
-**
-** Created by: Qt User Interface Compiler version 5.13.2
-**
-** WARNING! All changes made in this file will be lost when recompiling UI file!
-********************************************************************************/
-
-#ifndef UI_CONSOLEDIALOG_H
-#define UI_CONSOLEDIALOG_H
-
-#include <QtCore/QVariant>
-#include <QtWidgets/QApplication>
-#include <QtWidgets/QDialog>
-#include <QtWidgets/QLabel>
-#include <QtWidgets/QPushButton>
-#include <QtWidgets/QTextEdit>
-
-QT_BEGIN_NAMESPACE
-
-class Ui_ConsoleDialog
-{
-public:
-    QTextEdit *consoleText;
-    QLabel *consoleTitle;
-    QPushButton *closeConsole;
-
-    void setupUi(QDialog *ConsoleDialog)
-    {
-        if (ConsoleDialog->objectName().isEmpty())
-            ConsoleDialog->setObjectName(QString::fromUtf8("ConsoleDialog"));
-        ConsoleDialog->resize(721, 836);
-        consoleText = new QTextEdit(ConsoleDialog);
-        consoleText->setObjectName(QString::fromUtf8("consoleText"));
-        consoleText->setGeometry(QRect(30, 60, 661, 721));
-        consoleText->setReadOnly(false);
-        consoleTitle = new QLabel(ConsoleDialog);
-        consoleTitle->setObjectName(QString::fromUtf8("consoleTitle"));
-        consoleTitle->setGeometry(QRect(300, 20, 51, 18));
-        closeConsole = new QPushButton(ConsoleDialog);
-        closeConsole->setObjectName(QString::fromUtf8("closeConsole"));
-        closeConsole->setGeometry(QRect(600, 800, 80, 26));
-
-        retranslateUi(ConsoleDialog);
-
-        QMetaObject::connectSlotsByName(ConsoleDialog);
-    } // setupUi
-
-    void retranslateUi(QDialog *ConsoleDialog)
-    {
-        ConsoleDialog->setWindowTitle(QCoreApplication::translate("ConsoleDialog", "Dialog", nullptr));
-        consoleTitle->setText(QCoreApplication::translate("ConsoleDialog", "Console", nullptr));
-        closeConsole->setText(QCoreApplication::translate("ConsoleDialog", "Close", nullptr));
-    } // retranslateUi
-
-};
-
-namespace Ui {
-    class ConsoleDialog: public Ui_ConsoleDialog {};
-} // namespace Ui
-
-QT_END_NAMESPACE
-
-#endif // UI_CONSOLEDIALOG_H