From cd3857adc1615d8dc5f55a4ecf5d1f2095158c29 Mon Sep 17 00:00:00 2001 From: arcan1s Date: Sun, 1 Sep 2013 14:16:23 +0400 Subject: [PATCH] Added helpwindow fixed wersions edited PKGBUILD edited scripts --- mathmech/PKGBUILD | 2 +- mathmech/mathmech/mathmech.desktop | 1 + .../mathmech/resources/translations/eng.ts | 2 +- .../mathmech/resources/translations/rus.qm | Bin 27389 -> 27371 bytes .../mathmech/resources/translations/rus.ts | 4 +- mathmech/mathmech/src/helpwindow.cpp | 21 ++ mathmech/mathmech/src/helpwindow.h | 25 ++ mathmech/mathmech/src/helpwindow.ui | 218 ++++++++++++++++++ mathmech/mathmech/src/mainwindow.cpp | 15 +- mathmech/mathmech/src/mainwindow.h | 7 +- mathmech/mathmech/src/mainwindow.ui | 9 + mathmech/mathmech/src/mathmech.pro | 9 +- mathmech/mathmech/src/mathmech.pro.user | 2 +- mathmech/mm_radf/src/add_main.c | 2 +- mathmech/mm_statgen/src/add_main.c | 2 +- mathmech/update_ver.sh | 15 +- 16 files changed, 316 insertions(+), 18 deletions(-) mode change 100644 => 100755 mathmech/mathmech/mathmech.desktop create mode 100644 mathmech/mathmech/src/helpwindow.cpp create mode 100644 mathmech/mathmech/src/helpwindow.h create mode 100644 mathmech/mathmech/src/helpwindow.ui diff --git a/mathmech/PKGBUILD b/mathmech/PKGBUILD index 523b982..acf09d9 100644 --- a/mathmech/PKGBUILD +++ b/mathmech/PKGBUILD @@ -6,7 +6,7 @@ pkgver=1.0.3 pkgrel=1 pkgdesc="Software package for analysis of molecular dynamics trajectories" arch=(any) -url="https://github.com/arcan1s/moldyn/mathmech" +url="https://github.com/arcan1s/moldyn" license=('GPL') depends=('qt4' 'qwt') makedepends=('unzip' 'cmake' 'automoc4') diff --git a/mathmech/mathmech/mathmech.desktop b/mathmech/mathmech/mathmech.desktop old mode 100644 new mode 100755 index afcfd02..a75d4ee --- a/mathmech/mathmech/mathmech.desktop +++ b/mathmech/mathmech/mathmech.desktop @@ -1,3 +1,4 @@ +#!/usr/bin/env xdg-open [Desktop Entry] Name=Mathematical Molecular Mechanics Comment=GUI for mathmech program pack diff --git a/mathmech/mathmech/resources/translations/eng.ts b/mathmech/mathmech/resources/translations/eng.ts index 75fe131..9faa2c6 100644 --- a/mathmech/mathmech/resources/translations/eng.ts +++ b/mathmech/mathmech/resources/translations/eng.ts @@ -29,7 +29,7 @@ p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Liberation Serif'; font-size:10pt; font-weight:400; font-style:normal;"> <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Mathematical Molecular Mechanics</span></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Version:</span> 1.0.0</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Version:</span> 1.0.3</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">License:</span> GPL</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Author:</span> Evgeniy Alekseev</p> diff --git a/mathmech/mathmech/resources/translations/rus.qm b/mathmech/mathmech/resources/translations/rus.qm index 1757a6086a8efbf90556396d63409562446c9cab..86e7e35f23081c93a4e0acae3473e9bbb5589830 100644 GIT binary patch delta 1972 zcmex+mGSje#tAa@tqcqdehdtWS_}*f5ey9BG7Jn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z*L_xJV6bLou5T4(V6bpy-V(Krfx-J73zrEC1B3oy7P+RU3=GQWAaqbEi&^_M28Os< zEG>M^3=HPWSZ3x;Wnhr_5258&LumDz5Zba6LPv|TES$o^z+jlfvSPqb!Y*l%WiA)Cp-Al?C?<+xe@u9stA z@CjiPQ9I1Q5R%CzWv;-$U~9{!c4#sKgQ66K))ryY771lw@aSdJUJo*_4MMx7vFR&( zW?)d8%jTS#!oXk>Eeuse}PK(_+yS|HoAzqk0 ze8Xf02JKY#Y=IRF42g@`i{sxhFqkf9@BI0Qfx%`b`vL`F1_u9a?5n+$85k5Z*sm{2 zW?*m?Wq%am!@!`L2%*ELaHvkc$G{M9ltb&=JO&1bRE{dAs|*YdtQ<3~jTsn1jW{;e z&SPNkS;r|=FTlXyu$oh|K0Sni!6uf|OQDp3LHjai%2Q`&O>?@9r@$#9iXr;*!q5V9dgGt=5x)A;FF7 zp~Yeb2Dj~8uiZEq7^2F!+}FInGB89P;C?V=CIf?#D)+Y?j~N);*m?Lb9$;Ybli?9)p2xrt zX2m11@G1j?wBvFJLun0!_AKBrU=3wpkWPlsItCEhy^zQ5{3iwmV_zQMf)WM>-xEB3 z1~(WOqK{7g%O+l5#8bRJgn=RYFHf}u69a=?4NvX8c?=8zX*}H%Oc)sS5_tNUcQP=j z7((b^3!VvYmoPBcIrHp#U(CQ@vWRClV=)6mY%b4hrDO&M<9WQA0ZSPeEN1Xpy?V#M z5c-uj=`$|_gRTf~cM~%MgJTWvOHlkcxA1Wt*JEI)_cr9y`Dx0)VDpsE{8=RfgDM|{ z4!g@2TA2S&kk{&WMFz~A} x*f4As;;>VY)nbuhF<^0Iv0^b`P+&1)@n&&lv12h|u?4XvpY=4@+^vz|1OW8j01N;C diff --git a/mathmech/mathmech/resources/translations/rus.ts b/mathmech/mathmech/resources/translations/rus.ts index 4b0a043..5fd3e9b 100644 --- a/mathmech/mathmech/resources/translations/rus.ts +++ b/mathmech/mathmech/resources/translations/rus.ts @@ -29,7 +29,7 @@ p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Liberation Serif'; font-size:10pt; font-weight:400; font-style:normal;"> <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Mathematical Molecular Mechanics</span></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Версия:</span> 1.0.0</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Версия:</span> 1.0.3</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Лицензия:</span> GPL</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Автор:</span> Evgeniy Alekseev</p> @@ -230,7 +230,7 @@ p, li { white-space: pre-wrap; } Mask of output files - Маска выходных файлов + Маска файлов diff --git a/mathmech/mathmech/src/helpwindow.cpp b/mathmech/mathmech/src/helpwindow.cpp new file mode 100644 index 0000000..668cc50 --- /dev/null +++ b/mathmech/mathmech/src/helpwindow.cpp @@ -0,0 +1,21 @@ +#include "helpwindow.h" +#include "ui_helpwindow.h" + +HelpWindow::HelpWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::HelpWindow) +{ + ui->setupUi(this); +} + +HelpWindow::~HelpWindow() +{ + delete ui; +} + +// ESC press event +void HelpWindow::keyPressEvent(QKeyEvent *pressedKey) +{ + if (pressedKey->key() == Qt::Key_Escape) + close(); +} diff --git a/mathmech/mathmech/src/helpwindow.h b/mathmech/mathmech/src/helpwindow.h new file mode 100644 index 0000000..b85f55f --- /dev/null +++ b/mathmech/mathmech/src/helpwindow.h @@ -0,0 +1,25 @@ +#ifndef HELPWINDOW_H +#define HELPWINDOW_H + +#include + +namespace Ui { + class HelpWindow; +} + +class HelpWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit HelpWindow(QWidget *parent = 0); + ~HelpWindow(); + +private: + Ui::HelpWindow *ui; + +// ESC pressed event + void keyPressEvent(QKeyEvent *pressedKey); +}; + +#endif /* HELPWINDOW_H */ diff --git a/mathmech/mathmech/src/helpwindow.ui b/mathmech/mathmech/src/helpwindow.ui new file mode 100644 index 0000000..ba7efb6 --- /dev/null +++ b/mathmech/mathmech/src/helpwindow.ui @@ -0,0 +1,218 @@ + + + HelpWindow + + + + 0 + 0 + 598 + 456 + + + + Help + + + + + + + 0 + + + + + 0 + 0 + 580 + 233 + + + + General help + + + General + + + + + + + + + + + 0 + 0 + 580 + 233 + + + + Help about trj + + + trj + + + + + + + + + + + 0 + 0 + 580 + 233 + + + + Help about statgen + + + statgen + + + + + + + + + + + 0 + 0 + 580 + 233 + + + + Help about envir + + + envir + + + + + + + + + + + 0 + 0 + 580 + 233 + + + + Help about radf + + + radf + + + + + + + + + + + 0 + 0 + 580 + 233 + + + + Help about trj2pdb + + + trj2pdb + + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 80 + 23 + + + + Close window + + + Close + + + true + + + + + + + + + + textBrowser_general + pushButton + textBrowser_trj + textBrowser_statgen + textBrowser_envir + textBrowser_radf + textBrowser_trj2pdb + + + + + pushButton + clicked() + HelpWindow + close() + + + 545 + 431 + + + 598 + 414 + + + + + diff --git a/mathmech/mathmech/src/mainwindow.cpp b/mathmech/mathmech/src/mainwindow.cpp index e902fcc..896c4ba 100644 --- a/mathmech/mathmech/src/mainwindow.cpp +++ b/mathmech/mathmech/src/mainwindow.cpp @@ -5,10 +5,11 @@ #include "agglwindow.h" #include "aglallwindow.h" #include "atomtypeswindow.h" +#include "helpwindow.h" #include "settingswindow.h" +#include "statgengraphwindow.h" #include "clear_items.h" #include "start_events.h" -#include "statgengraphwindow.h" #include "update_fields.h" #include "mainwindow.h" @@ -928,9 +929,10 @@ void MainWindow::createActions() { connect(ui->actionAtom_types_file, SIGNAL(triggered()), this, SLOT(createAtomTypes())); connect(ui->actionAgglomerate_file, SIGNAL(triggered()), this, SLOT(createAgglFile())); - connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(aboutWin())); - connect(ui->actionSettings, SIGNAL(triggered()), this, SLOT(settingsWinShow())); connect(ui->actionAgl_all, SIGNAL(triggered()), this, SLOT(aglallWinShow())); + connect(ui->actionHelp, SIGNAL(triggered()), this, SLOT(helpWindow())); + connect(ui->actionSettings, SIGNAL(triggered()), this, SLOT(settingsWinShow())); + connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(aboutWin())); } void MainWindow::createAtomTypes() @@ -967,3 +969,10 @@ void MainWindow::aglallWinShow() aglallWin = new AglAllWindow(this, mm_agl_path); aglallWin->show(); } + +void MainWindow::helpWindow() +{ + HelpWindow *helpWindow; + helpWindow = new HelpWindow(this); + helpWindow->show(); +} diff --git a/mathmech/mathmech/src/mainwindow.h b/mathmech/mathmech/src/mainwindow.h index 51aabf3..462e65c 100644 --- a/mathmech/mathmech/src/mainwindow.h +++ b/mathmech/mathmech/src/mainwindow.h @@ -86,11 +86,12 @@ private slots: // completion void on_tabWidget_currentChanged(int index); // window signals - void createAtomTypes(); - void createAgglFile(); void aboutWin(); - void settingsWinShow(); void aglallWinShow(); + void createAgglFile(); + void createAtomTypes(); + void settingsWinShow(); + void helpWindow(); private: Ui::MainWindow *ui; diff --git a/mathmech/mathmech/src/mainwindow.ui b/mathmech/mathmech/src/mainwindow.ui index 2bc2e0e..695e181 100644 --- a/mathmech/mathmech/src/mainwindow.ui +++ b/mathmech/mathmech/src/mainwindow.ui @@ -3710,6 +3710,7 @@ Help + @@ -3755,6 +3756,14 @@ agl_all + + + &Help + + + F1 + + diff --git a/mathmech/mathmech/src/mathmech.pro b/mathmech/mathmech/src/mathmech.pro index 93d8f0c..40435db 100644 --- a/mathmech/mathmech/src/mathmech.pro +++ b/mathmech/mathmech/src/mathmech.pro @@ -19,7 +19,8 @@ HEADERS += mainwindow.h \ aboutwindow.h \ statgengraphwindow.h \ settingswindow.h \ - aglallwindow.h + aglallwindow.h \ + helpwindow.h FORMS += mainwindow.ui \ errorwindow.ui \ atomtypeswindow.ui \ @@ -27,7 +28,8 @@ FORMS += mainwindow.ui \ aboutwindow.ui \ statgengraphwindow.ui \ settingswindow.ui \ - aglallwindow.ui + aglallwindow.ui \ + helpwindow.ui SOURCES += main.cpp mainwindow.cpp \ errorwindow.cpp \ clear_items.cpp \ @@ -38,7 +40,8 @@ SOURCES += main.cpp mainwindow.cpp \ aboutwindow.cpp \ statgengraphwindow.cpp \ settingswindow.cpp \ - aglallwindow.cpp + aglallwindow.cpp \ + helpwindow.cpp TRANSLATIONS += rus.ts \ eng.ts diff --git a/mathmech/mathmech/src/mathmech.pro.user b/mathmech/mathmech/src/mathmech.pro.user index e8a1d41..e0f0208 100644 --- a/mathmech/mathmech/src/mathmech.pro.user +++ b/mathmech/mathmech/src/mathmech.pro.user @@ -1,6 +1,6 @@ - + ProjectExplorer.Project.ActiveTarget diff --git a/mathmech/mm_radf/src/add_main.c b/mathmech/mm_radf/src/add_main.c index f2f6a56..8f89ed7 100644 --- a/mathmech/mm_radf/src/add_main.c +++ b/mathmech/mm_radf/src/add_main.c @@ -127,7 +127,7 @@ int printing_head (const char *output, const int log, const int quiet, const int FILE *f_out; f_out = fopen (output, "w"); - fprintf (f_out, "radf ::: V.1.0.1 ::: 2013-07-23\n\n"); + fprintf (f_out, "radf ::: V.1.0.3\n\n"); fprintf (f_out, "CONFIGURATION\n"); fprintf (f_out, "LOG=%i\nQUIET=%i\nMATRIX=%i\n", log, quiet, matrix); diff --git a/mathmech/mm_statgen/src/add_main.c b/mathmech/mm_statgen/src/add_main.c index 70f31c9..205bdf0 100644 --- a/mathmech/mm_statgen/src/add_main.c +++ b/mathmech/mm_statgen/src/add_main.c @@ -92,7 +92,7 @@ int printing_head (const char *output, const int log, const int quiet, FILE *f_out; f_out = fopen (output, "w"); - fprintf (f_out, "statgen ::: V.1.0.1 ::: 2013-07-23\n\n"); + fprintf (f_out, "statgen ::: V.1.0.3\n\n"); fprintf (f_out, "CONFIGURATION\n"); fprintf (f_out, "LOG=%i\nQUIET=%i\n", log, quiet); diff --git a/mathmech/update_ver.sh b/mathmech/update_ver.sh index b0cf426..cb4fd63 100755 --- a/mathmech/update_ver.sh +++ b/mathmech/update_ver.sh @@ -2,8 +2,8 @@ func_help() { echo -e "\nUsage: update_ver.sh -o OLDVER -n NEWVER" echo -e "\nRequired parameters:" - echo -e " -o --oldver - path to GIT repository" - echo -e " -n --newver - time to sleep" + echo -e " -o --oldver - old version" + echo -e " -n --newver - new version" echo -e "\nAdditional parametrs:" echo -e " -h --help - show this help and exit" exit 1 @@ -38,10 +38,21 @@ fi # work block COMPONENTS=(mm_agl mm_envir mm_radf mm_statgen mm_trj mm_trj2pdb) for COMPONENT in ${COMPONENTS[*]}; do +# help message sed -i "s/Version : $OLDVER/Version : $NEWVER/g" $COMPONENT/src/main.c +# head in output + sed -i "s/V.$OLDVER/V.$NEWVER/g" $COMPONENT/src/add_main.c +# readme sed -i "s/Version: $OLDVER/Version: $NEWVER/g" $COMPONENT/README +# documentation sed -i "s/V.$OLDVER/V.$NEWVER/g" $COMPONENT/$COMPONENT.doxygen done +# update documentation +./update_docs.sh COMPONENT=mathmech +# about window +sed -i "s/$OLDVER/$NEWVER/g" $COMPONENT/resources/translations/eng.ts +sed -i "s/$OLDVER/$NEWVER/g" $COMPONENT/resources/translations/rus.ts +# readme sed -i "s/Version: $OLDVER/Version: $NEWVER/g" $COMPONENT/README