Просмотр исходного кода

Started to implement PlanWindow

Dmitry Yu Okunev лет назад: 7
Родитель
Сommit
b7b361602f
13 измененных файлов с 498 добавлено и 133 удалено
  1. 33 9
      logtimewindow.cpp
  2. 5 1
      logtimewindow.h
  3. 18 0
      logtimewindow.ui
  4. 1 1
      mainwindow-common.cpp
  5. 1 0
      mainwindow-common.h
  6. 64 4
      mainwindow-full.cpp
  7. 20 3
      mainwindow-full.h
  8. 166 110
      mainwindow-full.ui
  9. 6 3
      mephi-tasks.pro
  10. 75 0
      planwindow.cpp
  11. 46 0
      planwindow.h
  12. 61 0
      planwindow.ui
  13. 2 2
      showtimewindow.ui

+ 33 - 9
logtimewindow.cpp

@@ -39,6 +39,8 @@ LogTimeWindow::LogTimeWindow ( QWidget *parent ) :
 
 	this->continousLoggingTimer = new QTimer(this);
 
+	this->previousComment = "";
+
 	connect ( this->continousLoggingTimer, SIGNAL(timeout()), this, SLOT(updateUntilTime()) );
 }
 
@@ -382,7 +384,27 @@ void LogTimeWindow::on_issue_doubleClicked ( const QModelIndex &index )
 void LogTimeWindow::on_comment_editingFinished()
 {
 	//this->ui->accept->click();
-	this->ui->accept->setFocus();
+
+	if (!this->ui->continousLoggingStopButton->isEnabled()) {
+		this->ui->accept->setFocus();
+		return;
+	}
+
+	QDateTime now = QDateTime::currentDateTime();
+	if (now.toSecsSinceEpoch() - this->ui->sinceInput->dateTime().toSecsSinceEpoch() < 60) {
+		return;
+	}
+
+	this->ui->comment->setEnabled(false);
+	this->ui->comment->undo();
+
+	QString currentComment = this->ui->comment->text();
+	if (this->previousComment != currentComment) {
+		this->saveCurrentEntry();
+		this->previousComment = currentComment;
+	}
+	this->ui->comment->redo();
+	this->ui->comment->setEnabled(true);
 
 	return;
 }
@@ -417,6 +439,11 @@ void LogTimeWindow::on_issue_currentItemChanged(QTreeWidgetItem *current, QTreeW
 	Q_UNUSED(current)
 	Q_UNUSED(previous)
 
+	QDateTime now = QDateTime::currentDateTime();
+	if (now.toSecsSinceEpoch() - this->ui->sinceInput->dateTime().toSecsSinceEpoch() < 60) {
+		return;
+	}
+
 	if (this->ui->continousLoggingStopButton->isEnabled()) {
 		this->saveCurrentEntry();
 	}
@@ -433,14 +460,6 @@ void LogTimeWindow::on_comment_textChanged(const QString &arg1)
 	if (!this->ui->comment->isEnabled()) {
 		return;
 	}
-
-	if (this->ui->continousLoggingStopButton->isEnabled()) {
-		this->ui->comment->setEnabled(false);
-		this->ui->comment->undo();
-		this->saveCurrentEntry();
-		this->ui->comment->redo();
-		this->ui->comment->setEnabled(true);
-	}
 }
 
 void LogTimeWindow::updateUntilTime()
@@ -448,3 +467,8 @@ void LogTimeWindow::updateUntilTime()
 	QDateTime now = QDateTime::currentDateTime();
 	this->ui->untilInput->setDateTime(now);
 }
+
+void LogTimeWindow::on_refresh_clicked()
+{
+	this->updateIssues();
+}

+ 5 - 1
logtimewindow.h

@@ -65,7 +65,9 @@ private slots:
 
 	void updateUntilTime();
 
-private:
+	void on_refresh_clicked();
+
+	private:
 	int updateLastLogTime();
 	void get_time_entries_callback ( QNetworkReply *reply, QJsonDocument *json, void *arg );
 	QMutex updateProjectsMutex;
@@ -83,6 +85,8 @@ private:
 
 	void saveCurrentEntry();
 
+	QString previousComment;
+
 	QMutex projectsDisplayMutex;
 	QMutex projectsDisplayExceptionMutex;
 

+ 18 - 0
logtimewindow.ui

@@ -205,6 +205,24 @@
          </widget>
         </item>
         <item>
+         <widget class="QPushButton" name="refresh">
+          <property name="maximumSize">
+           <size>
+            <width>40</width>
+            <height>16777215</height>
+           </size>
+          </property>
+          <property name="font">
+           <font>
+            <pointsize>18</pointsize>
+           </font>
+          </property>
+          <property name="text">
+           <string>⟳</string>
+          </property>
+         </widget>
+        </item>
+        <item>
          <widget class="QPushButton" name="accept">
           <property name="sizePolicy">
            <sizepolicy hsizetype="Expanding" vsizetype="Fixed">

+ 1 - 1
mainwindow-common.cpp

@@ -176,6 +176,7 @@ void MainWindowCommon::get_issues_callback ( QNetworkReply *reply, QJsonDocument
 	this->issues.set ( issues );
 	this->issues_display();
 	this->updateIssuesMutex.unlock();
+	this->on_updatedIssues();
 	return;
 }
 
@@ -255,7 +256,6 @@ void MainWindowCommon::openShowTimeWindow()
 	return;
 }
 
-
 void MainWindowCommon::showOnTop()
 {
 #ifdef Q_OS_WIN32

+ 1 - 0
mainwindow-common.h

@@ -122,6 +122,7 @@ protected slots:
 	void on_closeShowTimeWindow();
 
 signals:
+	void on_updatedIssues();
 
 protected slots:
 	void toggleShowHide();

+ 64 - 4
mainwindow-full.cpp

@@ -31,6 +31,8 @@ MainWindowFull::MainWindowFull ( QWidget *parent ) :
 	MainWindowCommon ( parent ),
 	ui ( new Ui::MainWindowFull )
 {
+	this->planWindow = NULL;
+
 	this->ui->setupUi ( this );
 	connect ( redmine, SIGNAL ( callback_call      ( void*, callback_t, QNetworkReply*, QJsonDocument*, void* ) ),
 	          this,    SLOT (  callback_dispatcher ( void*, callback_t, QNetworkReply*, QJsonDocument*, void* ) ) );
@@ -95,7 +97,7 @@ MainWindowFull::MainWindowFull ( QWidget *parent ) :
 
 	this->createTrayActions();
 	connect ( this->trayIcon, SIGNAL ( activated     ( QSystemTrayIcon::ActivationReason ) ),
-		  this,		  SLOT   ( iconActivated ( QSystemTrayIcon::ActivationReason ) ) );
+			  this,			  SLOT   ( iconActivated ( QSystemTrayIcon::ActivationReason ) ) );
 
 	return;
 }
@@ -228,8 +230,20 @@ void MainWindowFull::on_toolActionHelp_triggered()
 
 void MainWindowFull::on_actionLogTime_triggered()
 {
-    LogTimeWindow *w = new LogTimeWindow();
-    w->show();
+	LogTimeWindow *w = new LogTimeWindow();
+	w->show();
+}
+
+void MainWindowFull::on_actionShowTime_triggered()
+{
+	ShowTimeWindow *w = new ShowTimeWindow();
+	w->show();
+}
+
+void MainWindowFull::on_actionPlan_triggered()
+{
+	PlanWindow *w = new PlanWindow(this);
+	w->show();
 }
 
 /**** /actions ****/
@@ -729,7 +743,7 @@ void MainWindowFull::issue_display_postproc()
 	QList<int> ids = this->issue_fields.keys();
 	qSort ( ids.begin(), ids.end() );
 	foreach ( const int &id, ids )
-	this->ui->issueLeftColumn->addRow ( this->issue_fields[id].first, this->issue_fields[id].second );
+		this->ui->issueLeftColumn->addRow ( this->issue_fields[id].first, this->issue_fields[id].second );
 	return;
 }
 
@@ -1114,12 +1128,16 @@ void MainWindowFull::createTrayActions()
 	this->openShowTimeWindowAction = new QAction ( tr ( "Журнал времени" ), this );
 	connect ( this->openShowTimeWindowAction, SIGNAL ( triggered() ), this, SLOT ( openShowTimeWindow() ) );
 
+	this->openPlanWindowAction = new QAction ( tr ( "Оперативный план" ), this );
+	connect ( this->openPlanWindowAction, SIGNAL ( triggered() ), this, SLOT ( openPlanWindow() ) );
+
 	this->quitAction = new QAction ( tr ( "Завершить" ), this );
 	connect ( this->quitAction, SIGNAL ( triggered() ), qApp, SLOT ( quit() ) );
 
 	this->trayIconMenu->addAction ( this->showHideAction );
 	this->trayIconMenu->addAction ( this->openLogTimeWindowAction );
 	this->trayIconMenu->addAction ( this->openShowTimeWindowAction );
+	this->trayIconMenu->addAction ( this->openPlanWindowAction );
 	this->trayIconMenu->addAction ( this->quitAction );
 
 	return;
@@ -1146,3 +1164,45 @@ void MainWindowFull::iconActivated ( QSystemTrayIcon::ActivationReason reason )
 
 
 /**** /tray-related stuff ****/
+
+
+void MainWindowFull::on_issue_button_toOpPlan_up_clicked()
+{
+	/*foreach ( QTreeWidgetItem * selectedIssueItem, this->ui->issuesTree->selectedItems() ) {
+		QJsonObject issue    = this->issues.get ( selectedIssueItem );
+		int         issue_id = issue["id"].toInt();
+	}*/
+	this->on_updatedIssues();
+}
+
+void MainWindowFull::on_issue_button_removeFromOpPlan_clicked()
+{
+	this->on_updatedIssues();
+}
+
+void MainWindowFull::on_issue_button_toOpPlan_down_clicked()
+{
+	this->on_updatedIssues();
+}
+
+
+
+void MainWindowFull::on_closePlanWindow()
+{
+	this->planWindow = NULL;
+
+	return;
+}
+
+void MainWindowFull::openPlanWindow()
+{
+	if (this->planWindow != NULL)
+		delete this->planWindow;
+	this->planWindow = new PlanWindow(this);
+
+	connect ( this->planWindow, SIGNAL ( on_destructor() ), this, SLOT ( on_closePlanWindow() ) );
+
+	this->planWindow->show();
+
+	return;
+}

+ 20 - 3
mainwindow-full.h

@@ -6,11 +6,13 @@
 #include <QComboBox>
 
 #include <mainwindow-common.h>
+//#include "planwindow.h"
 
 namespace Ui
 {
-class MainWindowFull;
+	class MainWindowFull;
 }
+class PlanWindow;
 
 class MainWindowFull : public MainWindowCommon
 {
@@ -35,7 +37,8 @@ protected:
 	bool eventFilter ( QObject *obj, QEvent *event );
 
 protected slots:
-
+	void openPlanWindow();
+	void on_closePlanWindow();
 
 private slots:
 	void on_actionHelp_triggered();
@@ -64,11 +67,23 @@ private slots:
 
 	void on_issuesFilter_field_status_currentIndexChanged ( int index );
 
-    void on_actionLogTime_triggered();
+	void on_actionLogTime_triggered();
+
+	void on_actionPlan_triggered();
+
+	void on_actionShowTime_triggered();
+
+	void on_issue_button_toOpPlan_up_clicked();
+
+	void on_issue_button_removeFromOpPlan_clicked();
+
+	void on_issue_button_toOpPlan_down_clicked();
 
 private:
 	Ui::MainWindowFull *ui;
 
+	PlanWindow     *planWindow;
+
 	QMutex projects_display_mutex;
 	QMutex issues_display_mutex;
 	void issues_display();
@@ -164,8 +179,10 @@ private:
 	QAction *quitAction;
 	QAction *openLogTimeWindowAction;
 	QAction *openShowTimeWindowAction;
+	QAction *openPlanWindowAction;
 
 	void iconActivated ( QSystemTrayIcon::ActivationReason reason );
 };
 
+#include "planwindow.h"
 #endif // MAINWINDOWFULL_H

+ 166 - 110
mainwindow-full.ui

@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>1833</width>
-    <height>1143</height>
+    <width>2867</width>
+    <height>1821</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -168,7 +168,7 @@
     <rect>
      <x>0</x>
      <y>0</y>
-     <width>1833</width>
+     <width>2867</width>
      <height>19</height>
     </rect>
    </property>
@@ -177,6 +177,8 @@
      <string>Программа</string>
     </property>
     <addaction name="actionLogTime"/>
+    <addaction name="actionShowTime"/>
+    <addaction name="actionPlan"/>
     <addaction name="actionQuit"/>
    </widget>
    <widget class="QMenu" name="menu_2">
@@ -516,135 +518,173 @@
        </widget>
       </item>
       <item>
-       <layout class="QHBoxLayout" name="issueProperties">
+       <layout class="QHBoxLayout" name="issueButtonRow">
         <item>
-         <widget class="QWidget" name="issueLeftColumnWidget" native="true">
-          <property name="minimumSize">
-           <size>
-            <width>320</width>
-            <height>0</height>
-           </size>
-          </property>
-          <property name="maximumSize">
-           <size>
-            <width>320</width>
-            <height>16777215</height>
-           </size>
-          </property>
-          <widget class="QWidget" name="formLayoutWidget_3">
-           <property name="geometry">
-            <rect>
-             <x>-1</x>
-             <y>-1</y>
-             <width>321</width>
-             <height>591</height>
-            </rect>
-           </property>
-           <layout class="QFormLayout" name="issueLeftColumn">
-            <property name="verticalSpacing">
-             <number>2</number>
-            </property>
-           </layout>
-          </widget>
-         </widget>
-        </item>
-        <item>
-         <widget class="QWidget" name="issueCentralColumnWidget" native="true">
-          <property name="minimumSize">
-           <size>
-            <width>400</width>
-            <height>0</height>
-           </size>
-          </property>
-          <property name="maximumSize">
-           <size>
-            <width>400</width>
-            <height>16777215</height>
-           </size>
-          </property>
-          <widget class="QWidget" name="formLayoutWidget">
-           <property name="geometry">
-            <rect>
-             <x>0</x>
-             <y>0</y>
-             <width>401</width>
-             <height>591</height>
-            </rect>
-           </property>
-           <layout class="QFormLayout" name="issueCentralColumn">
-            <property name="verticalSpacing">
-             <number>2</number>
-            </property>
-           </layout>
-          </widget>
-         </widget>
-        </item>
-        <item>
-         <layout class="QVBoxLayout" name="issueButtonColumn">
-          <property name="spacing">
-           <number>2</number>
-          </property>
-          <property name="sizeConstraint">
-           <enum>QLayout::SetMinimumSize</enum>
-          </property>
+         <layout class="QHBoxLayout" name="issueProperties">
           <item>
-           <spacer name="verticalSpacer">
-            <property name="orientation">
-             <enum>Qt::Vertical</enum>
+           <widget class="QWidget" name="issueLeftColumnWidget" native="true">
+            <property name="minimumSize">
+             <size>
+              <width>320</width>
+              <height>0</height>
+             </size>
             </property>
-            <property name="sizeHint" stdset="0">
+            <property name="maximumSize">
              <size>
-              <width>20</width>
-              <height>40</height>
+              <width>320</width>
+              <height>16777215</height>
              </size>
             </property>
-           </spacer>
+            <widget class="QWidget" name="formLayoutWidget_3">
+             <property name="geometry">
+              <rect>
+               <x>-1</x>
+               <y>-1</y>
+               <width>321</width>
+               <height>591</height>
+              </rect>
+             </property>
+             <layout class="QFormLayout" name="issueLeftColumn">
+              <property name="verticalSpacing">
+               <number>2</number>
+              </property>
+             </layout>
+            </widget>
+           </widget>
           </item>
           <item>
-           <widget class="QPushButton" name="issue_button_reset">
-            <property name="text">
-             <string>Сбросить</string>
+           <widget class="QWidget" name="issueCentralColumnWidget" native="true">
+            <property name="minimumSize">
+             <size>
+              <width>400</width>
+              <height>0</height>
+             </size>
             </property>
+            <property name="maximumSize">
+             <size>
+              <width>400</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <widget class="QWidget" name="formLayoutWidget">
+             <property name="geometry">
+              <rect>
+               <x>0</x>
+               <y>0</y>
+               <width>401</width>
+               <height>591</height>
+              </rect>
+             </property>
+             <layout class="QFormLayout" name="issueCentralColumn">
+              <property name="verticalSpacing">
+               <number>2</number>
+              </property>
+             </layout>
+            </widget>
            </widget>
           </item>
           <item>
-           <widget class="QPushButton" name="issue_button_sign">
-            <property name="text">
-             <string>Подписать</string>
+           <layout class="QVBoxLayout" name="issueButtonColumn">
+            <property name="spacing">
+             <number>2</number>
             </property>
-           </widget>
+            <property name="sizeConstraint">
+             <enum>QLayout::SetMinimumSize</enum>
+            </property>
+            <item>
+             <spacer name="verticalSpacer">
+              <property name="orientation">
+               <enum>Qt::Vertical</enum>
+              </property>
+              <property name="sizeHint" stdset="0">
+               <size>
+                <width>20</width>
+                <height>5</height>
+               </size>
+              </property>
+             </spacer>
+            </item>
+            <item>
+             <widget class="QPushButton" name="issue_button_reset">
+              <property name="text">
+               <string>Сбросить</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QPushButton" name="issue_button_sign">
+              <property name="text">
+               <string>Подписать</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QPushButton" name="issue_button_save">
+              <property name="text">
+               <string>Сохранить</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <spacer name="verticalSpacer_2">
+              <property name="orientation">
+               <enum>Qt::Vertical</enum>
+              </property>
+              <property name="sizeType">
+               <enum>QSizePolicy::Minimum</enum>
+              </property>
+              <property name="sizeHint" stdset="0">
+               <size>
+                <width>20</width>
+                <height>10</height>
+               </size>
+              </property>
+             </spacer>
+            </item>
+            <item>
+             <widget class="QPushButton" name="issue_button_toOpPlan_up">
+              <property name="text">
+               <string>В начало плана</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QPushButton" name="issue_button_removeFromOpPlan">
+              <property name="text">
+               <string>Убрать из плана</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QPushButton" name="issue_button_toOpPlan_down">
+              <property name="text">
+               <string>В конец плана</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
           </item>
           <item>
-           <widget class="QPushButton" name="issue_button_save">
-            <property name="text">
-             <string>Сохранить</string>
+           <spacer name="spacer">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
             </property>
-           </widget>
+            <property name="sizeType">
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
           </item>
          </layout>
         </item>
-        <item>
-         <spacer name="spacer">
-          <property name="orientation">
-           <enum>Qt::Horizontal</enum>
-          </property>
-          <property name="sizeType">
-           <enum>QSizePolicy::Expanding</enum>
-          </property>
-          <property name="sizeHint" stdset="0">
-           <size>
-            <width>40</width>
-            <height>20</height>
-           </size>
-          </property>
-         </spacer>
-        </item>
        </layout>
       </item>
       <item>
-       <layout class="QHBoxLayout" name="issueButtonRow"/>
-      </item>
-      <item>
        <layout class="QVBoxLayout" name="issueComments"/>
       </item>
      </layout>
@@ -692,6 +732,22 @@
     <string>Зажурналировать время</string>
    </property>
   </action>
+  <action name="actionShowTime">
+   <property name="text">
+    <string>Журнал времени</string>
+   </property>
+   <property name="toolTip">
+    <string>Журнал времени</string>
+   </property>
+  </action>
+  <action name="actionPlan">
+   <property name="text">
+    <string>Оперативный план</string>
+   </property>
+   <property name="toolTip">
+    <string>Оперативный план</string>
+   </property>
+  </action>
   <zorder>filtersDock</zorder>
   <zorder>issueDock</zorder>
  </widget>

+ 6 - 3
mephi-tasks.pro

@@ -37,7 +37,8 @@ SOURCES += main.cpp\
     logtimewindow.cpp \
     redmineclass_time_entry.cpp \
     showtimewindow.cpp \
-    myqlineedit.cpp
+    myqlineedit.cpp \
+    planwindow.cpp
 
 HEADERS  += \
     helpwindow.h \
@@ -60,7 +61,8 @@ HEADERS  += \
     logtimewindow.h \
     redmineclass_time_entry.h \
     showtimewindow.h \
-    myqlineedit.h
+    myqlineedit.h \
+    planwindow.h
 
 FORMS    += \
     helpwindow.ui \
@@ -72,7 +74,8 @@ FORMS    += \
     loginwindow.ui \
     mainwindowandroid.ui \
     logtimewindow.ui \
-    showtimewindow.ui
+    showtimewindow.ui \
+    planwindow.ui
 
      win32:CONFIG(release, debug|release): LIBS += -L$$PWD/build-qtredmine/release/ -lqtredmine
 else:win32:CONFIG(debug,   debug|release): LIBS += -L$$PWD/build-qtredmine/debug/   -lqtredmine

+ 75 - 0
planwindow.cpp

@@ -0,0 +1,75 @@
+#include "planwindow.h"
+#include "ui_planwindow.h"
+
+PlanWindow::PlanWindow(MainWindowFull *mainWindow, QWidget *parent) :
+	QWidget(parent),
+	mainWindow(mainWindow),
+	ui(new Ui::PlanWindow)
+{
+	this->selectedUserId = 0;
+
+	this->setWindowTitle ( "Система «Задачи» НИЯУ МИФИ: Оперативный план" );
+	connect ( redmine, SIGNAL ( callback_call       ( void*, callback_t, QNetworkReply*, QJsonDocument*, void* ) ),
+			  this,    SLOT   ( callback_dispatcher ( void*, callback_t, QNetworkReply*, QJsonDocument*, void* ) ) );
+
+	connect ( this->mainWindow, SIGNAL ( on_updatedIssues ), this, SLOT ( consider_updatedIssues ) );
+
+	this->ui->setupUi(this);
+
+	//this->ui->plan->horizontalHeader()->setSectionResizeMode ( 2, QHeaderView::Stretch );
+
+	this->updateStuffToDo();
+}
+
+PlanWindow::~PlanWindow()
+{
+	this->on_destructor();
+	delete this->ui;
+}
+
+void PlanWindow::consider_updatedIssues()
+{
+
+}
+
+
+void PlanWindow::get_stuff_to_do_callback ( QNetworkReply *reply, QJsonDocument *json, void *arg )
+{
+	( void ) reply;
+	( void ) arg;
+	this->updateStuffToDoMutex.lock(); // is not a thread-safe function, locking
+	QJsonObject answer = json->object();
+	QJsonArray doingNow    = answer["doing_now"].toArray();
+	QJsonArray recommended = answer["recommended"].toArray();
+
+	foreach ( const QJsonValue & issue, doingNow ) {
+		//this->ui->plan->addRow ( issue.toObject()["id"] );
+	}
+	foreach ( const QJsonValue & issue, recommended ) {
+		//this->ui->plan->addRow ( issue.toObject()["id"] );
+	}
+
+	//QList<QJsonObject> issues = this->mainWindow->getIssues()->get();
+
+	this->updateStuffToDoMutex.unlock();
+	this->on_updatedStuffToDo();
+	return;
+}
+
+void PlanWindow::updateStuffToDo()
+{
+	/*int selectedUserId = this->selectedUserId;
+	if (selectedUserId == 0) {
+		selectedUserId = this->mainWindow->me["id"]->toInt();
+	}
+	this->mainWindow->getRedmine()->get_stuff_to_do ( ( Redmine::callback_t ) &PlanWindow::get_stuff_to_do_callback, this, selectedUserId, NULL, false, "");*/
+	return;
+}
+
+
+void PlanWindow::on_user_currentIndexChanged(int index)
+{
+	(void) index;
+
+	this->selectedUserId = this->ui->user->currentData().toInt();
+}

+ 46 - 0
planwindow.h

@@ -0,0 +1,46 @@
+#ifndef PLANWINDOW_H
+#define PLANWINDOW_H
+
+#include <QWidget>
+
+#include "mainwindow-full.h"
+//#include "htmldelegate.h"
+
+namespace Ui {
+	class PlanWindow;
+}
+
+class PlanWindow : public QWidget
+{
+		Q_OBJECT
+		CALLBACK_DISPATCHER ( Redmine, PlanWindow, this )
+
+	public:
+		explicit PlanWindow(MainWindowFull *mainWindow, QWidget *parent = 0);
+		~PlanWindow();
+
+	signals:
+		void on_destructor();
+		void on_updatedStuffToDo();
+
+	public slots:
+		void consider_updatedIssues();
+
+	private slots:
+		void on_user_currentIndexChanged(int index);
+
+	private:
+		void get_stuff_to_do_callback ( QNetworkReply *reply, QJsonDocument *json, void *arg );
+		void plannedIssues_display();
+		void updateStuffToDo();
+
+		MainWindowFull *mainWindow;
+		Ui::PlanWindow *ui;
+
+		RedmineItemTree issues;
+		QMutex updateStuffToDoMutex;
+		//HTMLDelegate delegate;
+		int selectedUserId;
+};
+
+#endif // PLANWINDOW_H

+ 61 - 0
planwindow.ui

@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PlanWindow</class>
+ <widget class="QWidget" name="PlanWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>1045</width>
+    <height>563</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Оперативный план</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <layout class="QHBoxLayout" name="mainLayout">
+     <item>
+      <layout class="QVBoxLayout" name="left">
+       <item>
+        <widget class="QComboBox" name="user"/>
+       </item>
+       <item>
+        <widget class="QTreeWidget" name="plan">
+         <column>
+          <property name="text">
+           <string notr="true">1</string>
+          </property>
+         </column>
+        </widget>
+       </item>
+       <item>
+        <layout class="QHBoxLayout" name="buttonsLayout">
+         <item>
+          <widget class="QPushButton" name="pushButton">
+           <property name="text">
+            <string>Сохранить</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <layout class="QVBoxLayout" name="right"/>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>

+ 2 - 2
showtimewindow.ui

@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>699</width>
-    <height>452</height>
+    <width>700</width>
+    <height>448</height>
    </rect>
   </property>
   <property name="windowTitle">