@@ -224,6 +224,7 void SocExplorerEngine::setLogLevel(int | |||||
224 | { |
|
224 | { | |
225 | if(!_self) |
|
225 | if(!_self) | |
226 | init(); |
|
226 | init(); | |
|
227 | printf("Set log level to %d\n",level); | |||
227 | loglvl = level; |
|
228 | loglvl = level; | |
228 | } |
|
229 | } | |
229 |
|
230 |
@@ -49,6 +49,31 | |||||
49 | #endif |
|
49 | #endif | |
50 |
|
50 | |||
51 |
|
51 | |||
|
52 | class SOCEXPLORER_SDK_EXPORT SocExplorerAutoProgressBar | |||
|
53 | { | |||
|
54 | public: | |||
|
55 | SocExplorerAutoProgressBar(QProgressBar* progressBar=NULL) | |||
|
56 | { | |||
|
57 | this->p_progressbar=progressBar; | |||
|
58 | } | |||
|
59 | ~SocExplorerAutoProgressBar() | |||
|
60 | { | |||
|
61 | if(p_progressbar) | |||
|
62 | { | |||
|
63 | delete p_progressbar; | |||
|
64 | } | |||
|
65 | } | |||
|
66 | void setProgressBar(QProgressBar* progressBar) | |||
|
67 | { | |||
|
68 | this->p_progressbar=progressBar; | |||
|
69 | } | |||
|
70 | void setValue(int value) | |||
|
71 | { | |||
|
72 | p_progressbar->setValue(value); | |||
|
73 | } | |||
|
74 | private: | |||
|
75 | QProgressBar* p_progressbar; | |||
|
76 | }; | |||
52 |
|
77 | |||
53 | //! SocExplorerEngine is a pure static class which aims to provide services for both SocExplorer software and plugins. |
|
78 | //! SocExplorerEngine is a pure static class which aims to provide services for both SocExplorer software and plugins. | |
54 |
|
79 |
@@ -59,7 +59,9 int main(int argc, char *argv[]) | |||||
59 | int lvl; |
|
59 | int lvl; | |
60 | lvl = args.at(i+1).toInt(&success,10); |
|
60 | lvl = args.at(i+1).toInt(&success,10); | |
61 | if(success) |
|
61 | if(success) | |
|
62 | { | |||
62 | SocExplorerEngine::setLogLevel(lvl); |
|
63 | SocExplorerEngine::setLogLevel(lvl); | |
|
64 | } | |||
63 | } |
|
65 | } | |
64 | } |
|
66 | } | |
65 |
|
67 |
General Comments 0
You need to be logged in to leave comments.
Login now