X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fpopups%2Fchannels.cpp;h=49784bd7ae40630f3f5b3ccc4e125a9f228053e4;hb=b8f1cdeba7cf6c2b749ff60102ce4e260fa1309e;hp=f8f94d1a4273534d09fbf9a2bb6766db518810c7;hpb=73a25a6e488f1813c1cd12da085a16e4f91ed4da;p=pulseview.git diff --git a/pv/popups/channels.cpp b/pv/popups/channels.cpp index f8f94d1..49784bd 100644 --- 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 - * 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 . */ #include -#ifdef _WIN32 -// Windows: Avoid boost/thread namespace pollution (which includes windows.h). -#define NOGDI -#define NORESOURCE -#endif -#include -#include - #include #include #include @@ -45,13 +36,9 @@ using namespace Qt; -using boost::shared_lock; -using boost::shared_mutex; -using std::lock_guard; using std::map; -using std::mutex; -using std::set; using std::shared_ptr; +using std::make_shared; using std::unordered_set; using std::vector; @@ -82,8 +69,8 @@ Channels::Channels(Session &session, QWidget *parent) : map, shared_ptr > signal_map; unordered_set< shared_ptr > sigs; - for (const shared_ptr s : session_.signals()) - sigs.insert(s->base()); + for (const shared_ptr b : session_.signalbases()) + sigs.insert(b); for (const shared_ptr &sig : sigs) signal_map[sig->channel()] = sig; @@ -166,7 +153,7 @@ void Channels::populate_group(shared_ptr group, // popup. shared_ptr binding; if (group) - binding = shared_ptr(new Device(group)); + binding = make_shared(group); // 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 group, QString("

%1

").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 - if (binding) - { + if (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); } -} // popups -} // pv +} // namespace popups +} // namespace pv