102 * Compress data, minimizes memory usage, can be used only if resourceControl |
103 * Compress data, minimizes memory usage, can be used only if resourceControl |
103 * is enabled. |
104 * is enabled. |
104 * @return 0 if compressed |
105 * @return 0 if compressed |
105 */ |
106 */ |
106 LOGSENGINE_EXPORT int compressData(); |
107 LOGSENGINE_EXPORT int compressData(); |
107 |
108 |
108 /** |
109 /** |
109 * Returns cenrep key status of predictive search feature. |
110 * Configuration. |
110 * @return 0 - feature is permanently off and can't be turned on, |
111 * @param configuration parameters |
111 * 1 - feature is on |
112 * @return 0 if configured succesfully |
112 * 2 - feature is temporarily off and can be turned on |
|
113 * negative value indicates some error in fetching the key |
|
114 */ |
113 */ |
115 LOGSENGINE_EXPORT int predictiveSearchStatus(); |
114 LOGSENGINE_EXPORT int updateConfiguration(LogsConfigurationParams& params); |
116 |
|
117 /** |
|
118 * Allows to modify cenrep key value of predictive search features. |
|
119 * However, this function can't be used if feature is set permanently off |
|
120 * (see predictiveSearchStatus()) |
|
121 * @param enabled, specify whether cenrep key will be set to 1 or 2 |
|
122 * @ return 0 if cenrep key value modified succesfully, |
|
123 * -1 in case of some error |
|
124 */ |
|
125 LOGSENGINE_EXPORT int setPredictiveSearch(bool enabled); |
|
126 |
115 |
127 public: // From QAbstractItemModel |
116 public: // From QAbstractItemModel |
128 |
117 |
129 /** |
118 /** |
130 * Get number of events currently in the model. |
119 * Get number of events currently in the model. |
158 public slots: |
147 public slots: |
159 |
148 |
160 void dataAdded(QList<int> addedIndexes); |
149 void dataAdded(QList<int> addedIndexes); |
161 void dataUpdated(QList<int> updatedIndexes); |
150 void dataUpdated(QList<int> updatedIndexes); |
162 void dataRemoved(QList<int> removedIndexes); |
151 void dataRemoved(QList<int> removedIndexes); |
|
152 void resetModel(); |
163 |
153 |
164 private: |
154 private: |
165 |
155 |
166 /** |
156 /** |
167 * Find sequential indexes and place each sequence to own list. |
157 * Find sequential indexes and place each sequence to own list. |
168 * @param indexes, index list |
158 * @param indexes, index list |
169 * @return list of index sequence lists |
159 * @return list of index sequence lists |
170 */ |
160 */ |
171 QList< QList<int> > findSequentialIndexes(const QList<int>& indexes); |
161 QList< QList<int> > findSequentialIndexes(const QList<int>& indexes); |
172 QString getCallerId(const LogsEvent& event) const; |
162 QString getCallerId(const LogsEvent& event) const; |
|
163 QString SqueezedString(QString basestring, QString secondarystring, qreal maxwidth) const; |
173 void initIcons(); |
164 void initIcons(); |
174 bool matchEventWithClearType(const LogsEvent& event, LogsModel::ClearType clearType); |
165 bool matchEventWithClearType(const LogsEvent& event, LogsModel::ClearType clearType); |
175 |
166 |
176 private: //data |
167 private: //data |
177 |
168 |