projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Convert threshold display setting to a multi-value choice
[pulseview.git]
/
pv
/
popups
/
channels.cpp
diff --git
a/pv/popups/channels.cpp
b/pv/popups/channels.cpp
index f8f94d1a4273534d09fbf9a2bb6766db518810c7..ca142d68582a433eb0626661a459e8000653a5c6 100644
(file)
--- a/
pv/popups/channels.cpp
+++ b/
pv/popups/channels.cpp
@@
-14,20
+14,11
@@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include <map>
*/
#include <map>
-#ifdef _WIN32
-// Windows: Avoid boost/thread namespace pollution (which includes windows.h).
-#define NOGDI
-#define NORESOURCE
-#endif
-#include <boost/thread/locks.hpp>
-#include <boost/thread/shared_mutex.hpp>
-
#include <QCheckBox>
#include <QFormLayout>
#include <QGridLayout>
#include <QCheckBox>
#include <QFormLayout>
#include <QGridLayout>
@@
-39,19
+30,15
@@
#include <pv/data/signalbase.hpp>
#include <pv/devices/device.hpp>
#include <pv/session.hpp>
#include <pv/data/signalbase.hpp>
#include <pv/devices/device.hpp>
#include <pv/session.hpp>
-#include <pv/view/signal.hpp>
+#include <pv/view
s/trace
/signal.hpp>
#include <libsigrokcxx/libsigrokcxx.hpp>
using namespace Qt;
#include <libsigrokcxx/libsigrokcxx.hpp>
using namespace Qt;
-using boost::shared_lock;
-using boost::shared_mutex;
-using std::lock_guard;
using std::map;
using std::map;
-using std::mutex;
-using std::set;
using std::shared_ptr;
using std::shared_ptr;
+using std::make_shared;
using std::unordered_set;
using std::vector;
using std::unordered_set;
using std::vector;
@@
-82,8
+69,8
@@
Channels::Channels(Session &session, QWidget *parent) :
map<shared_ptr<Channel>, shared_ptr<SignalBase> > signal_map;
unordered_set< shared_ptr<SignalBase> > sigs;
map<shared_ptr<Channel>, shared_ptr<SignalBase> > signal_map;
unordered_set< shared_ptr<SignalBase> > sigs;
- for (const shared_ptr<
view::Signal> s : session_.signal
s())
- sigs.insert(
s->base()
);
+ for (const shared_ptr<
data::SignalBase> b : session_.signalbase
s())
+ sigs.insert(
b
);
for (const shared_ptr<SignalBase> &sig : sigs)
signal_map[sig->channel()] = sig;
for (const shared_ptr<SignalBase> &sig : sigs)
signal_map[sig->channel()] = sig;
@@
-166,7
+153,7
@@
void Channels::populate_group(shared_ptr<ChannelGroup> group,
// popup.
shared_ptr<Device> binding;
if (group)
// popup.
shared_ptr<Device> binding;
if (group)
- binding =
shared_ptr<Device>(new Device(group)
);
+ binding =
make_shared<Device>(group
);
// Create a title if the group is going to have any content
if ((!sigs.empty() || (binding && !binding->properties().empty())) &&
// Create a title if the group is going to have any content
if ((!sigs.empty() || (binding && !binding->properties().empty())) &&
@@
-175,13
+162,11
@@
void Channels::populate_group(shared_ptr<ChannelGroup> group,
QString("<h3>%1</h3>").arg(group->name().c_str())));
// Create the channel group grid
QString("<h3>%1</h3>").arg(group->name().c_str())));
// Create the channel group grid
- QGridLayout *const channel_grid =
- create_channel_group_grid(sigs);
+ QGridLayout *const channel_grid = create_channel_group_grid(sigs);
layout_.addRow(channel_grid);
// Create the channel group options
layout_.addRow(channel_grid);
// Create the channel group options
- if (binding)
- {
+ if (binding) {
binding->add_properties_to_form(&layout_, true);
group_bindings_.push_back(binding);
}
binding->add_properties_to_form(&layout_, true);
group_bindings_.push_back(binding);
}
@@
-259,5
+244,5
@@
void Channels::disable_all_channels()
set_all_channels(false);
}
set_all_channels(false);
}
-}
//
popups
-}
//
pv
+}
// namespace
popups
+}
// namespace
pv